Select Git revision
CommandLine.cpp
Forked from
gmsh / gmsh
Source project has a limited visibility.
-
Christophe Geuzaine authored
move -microstructure and -computeBestSeed stuff to a separate plugin (VoroMetal): this should not be in the Gmsh kernel
Christophe Geuzaine authoredmove -microstructure and -computeBestSeed stuff to a separate plugin (VoroMetal): this should not be in the Gmsh kernel
visibilityWindow.cpp 49.73 KiB
// Gmsh - Copyright (C) 1997-2016 C. Geuzaine, J.-F. Remacle
//
// See the LICENSE.txt file for license information. Please report all
// bugs and problems to the public mailing list <gmsh@onelab.info>.
#include "GmshConfig.h"
#if !defined(HAVE_NO_STDINT_H)
#include <stdint.h>
#elif defined(HAVE_NO_INTPTR_T)
typedef unsigned long intptr_t;
#endif
#include <string>
#include <sstream>
#include <map>
#include <vector>
#include <string.h>
#include <FL/Fl_Tabs.H>
#include <FL/Fl_Box.H>
#include <FL/Fl_Return_Button.H>
#include "GmshConfig.h"
#include "FlGui.h"
#include "drawContext.h"
#include "visibilityWindow.h"
#include "paletteWindow.h"
#include "contextWindow.h"
#include "graphicWindow.h"
#include "openglWindow.h"
#include "GmshDefines.h"
#include "GmshMessage.h"
#include "GModel.h"
#include "MElement.h"
#include "PView.h"
#include "PViewData.h"
#include "GeoStringInterface.h"
#include "Options.h"
#include "Context.h"
#if defined(HAVE_PARSER)
#include "Parser.h"
#endif
class Vis {
private:
std::string _name;
public:
Vis() {}
Vis(std::string &name) : _name(name) {}
virtual ~Vis(){}
virtual int getTag() const = 0;
virtual int getDim() const { return -1; }
virtual std::string getName() const { return _name; }
virtual std::string getType() const = 0;
virtual char getVisibility() const = 0;
virtual void setVisibility(char val, bool recursive=false,
bool allmodels=false) = 0;
};
class VisModel : public Vis {
private:
GModel *_model;
int _tag;
public:
VisModel(GModel *model, int tag, std::string &name)
: Vis(name), _model(model), _tag(tag) {}
~VisModel(){}
int getTag() const { return _tag; }
std::string getType() const { return "Model"; }
char getVisibility() const { return _model->getVisibility(); }
void setVisibility(char val, bool recursive=false, bool allmodels=false)
{