1
// Gmsh - Copyright (C) 1997-2009 C. Geuzaine, J.-F. Remacle
3
// See the LICENSE.txt file for license information. Please report all
4
// bugs and problems to <gmsh@geuz.org>.
13
#define GMSH_WINDOW_BOX FL_FLAT_BOX
14
#define NB_BUTT_SCROLL 25
15
#define NB_HISTORY_MAX 1000
16
#define IW (10 * FL_NORMAL_SIZE) // input field width
17
#define BB (7 * FL_NORMAL_SIZE) // width of a button with internal label
18
#define BH (2 * FL_NORMAL_SIZE + 1) // button height
19
#define WB (7) // window border
27
class statisticsWindow;
28
class visibilityWindow;
32
class geometryContextWindow;
33
class meshContextWindow;
45
static GUI *_instance;
47
std::vector<GVertex*> selectedVertices;
48
std::vector<GEdge*> selectedEdges;
49
std::vector<GFace*> selectedFaces;
50
std::vector<GRegion*> selectedRegions;
51
std::vector<MElement*> selectedElements;
53
std::vector<graphicWindow*> graph;
55
optionWindow *options;
57
pluginWindow *plugins;
58
statisticsWindow *stats;
59
visibilityWindow *visibility;
60
clippingWindow *clipping;
61
messageWindow *messages;
63
geometryContextWindow *geoContext;
64
meshContextWindow *meshContext;
66
std::vector<solverWindow*> solver;
68
GUI(int argc, char **argv);
70
// return the single static instance of the GUI
71
static GUI *instance(int argc=0, char **argv=0);
72
// check if the GUI is available
73
static bool available(){ return (_instance != 0); }
74
// run the GUI until there's no window left
75
int run(){ return Fl::run(); }
76
// check (now!) if there are any pending events, and process them
77
void check(){ Fl::check(); }
78
// wait (possibly indefinitely) for any events, then process them
79
void wait(){ Fl::wait(); }
80
// wait (at most time seconds) for any events, then process them
81
void wait(double time){ Fl::wait(time); }
82
// test application-level keyboard shortcuts
83
int testGlobalShortcuts(int event);
84
// test the arrow shortcuts (not in the application-level shortcuts)
85
// since it is used elsewhere (where we want to override widget
86
// navigation). This is necessary since FLTK 1.1.
87
int testArrowShortcuts();
88
// set the title of the graphic windows
89
void setGraphicTitle(std::string title);
90
// update the GUI when views get added or deleted
92
// update the GUI when fields change
94
// reset the visibility window
95
void resetVisibility();
96
// store current window positions and sizes in CTX
97
void storeCurrentWindowsInfo();
98
// get the last opengl window that received an event
99
openglWindow *getCurrentOpenglWindow();
100
// split the current opengl window
101
void splitCurrentOpenglWindow(char how);
102
// select an entity in the most recent graphic window
103
char selectEntity(int type);
104
// display status message
105
void setStatus(const char *msg, int num);
106
// create the window for physical context dependant definitions
107
void callForSolverPlugin(int dim);
110
void redraw_cb(Fl_Widget *w, void *data);
111
void window_cb(Fl_Widget *w, void *data);
114
void add_multiline_in_browser(Fl_Browser *o, const char *prefix,
115
const char *str, int wrap=0);