Skip to content
Snippets Groups Projects
Commit c66f95bf authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

global (empty) solver options

parent a710b30c
No related branches found
No related tags found
No related merge requests found
...@@ -49,7 +49,9 @@ static char g2_bits[] = { ...@@ -49,7 +49,9 @@ static char g2_bits[] = {
0x00,0x00,0xfc,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00, 0x00,0x00,0xfc,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0xfc}; 0x00,0x00,0x00,0x00,0x00,0xfc};
// 'Gmsh command' (Unix) icon // 'Gmsh command' (Unix Motif) icon
#ifdef _XMOTIF
#define g3_width 66 #define g3_width 66
#define g3_height 29 #define g3_height 29
...@@ -73,6 +75,7 @@ static char g3_bits[] = { ...@@ -73,6 +75,7 @@ static char g3_bits[] = {
0x52,0x94,0xfd,0x30,0x00,0xe0,0x71,0x92,0x92,0x6c,0x64,0xfd,0x00,0x00,0x00, 0x52,0x94,0xfd,0x30,0x00,0xe0,0x71,0x92,0x92,0x6c,0x64,0xfd,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0xfc}; 0x00,0x00,0x00,0x00,0x00,0xfc};
#endif
// 'About Gmsh' bitmap // 'About Gmsh' bitmap
......
// $Id: Callbacks.cpp,v 1.59 2001-05-23 07:29:42 geuzaine Exp $ // $Id: Callbacks.cpp,v 1.60 2001-05-25 08:43:24 geuzaine Exp $
#include <sys/types.h> #include <sys/types.h>
#include <signal.h> #include <signal.h>
...@@ -401,6 +401,14 @@ void opt_mesh_ok_cb(CALLBACK_ARGS) { ...@@ -401,6 +401,14 @@ void opt_mesh_ok_cb(CALLBACK_ARGS) {
Draw(); Draw();
} }
// Option Solver Menu
void opt_solver_cb(CALLBACK_ARGS) {
WID->create_solver_options_window();
}
void opt_solver_ok_cb(CALLBACK_ARGS) {
}
// Option Post Menu // Option Post Menu
void opt_post_cb(CALLBACK_ARGS) { void opt_post_cb(CALLBACK_ARGS) {
...@@ -495,6 +503,8 @@ void help_short_cb(CALLBACK_ARGS){ ...@@ -495,6 +503,8 @@ void help_short_cb(CALLBACK_ARGS){
Msg(DIRECT, " Alt+b hide/show all post-processing scales"); Msg(DIRECT, " Alt+b hide/show all post-processing scales");
Msg(DIRECT, " Alt+c alternate between predefined color schemes"); Msg(DIRECT, " Alt+c alternate between predefined color schemes");
Msg(DIRECT, " Alt+d alternate between mesh wire frame, hidden lines and shading modes"); Msg(DIRECT, " Alt+d alternate between mesh wire frame, hidden lines and shading modes");
Msg(DIRECT, " Shift+d decrease animation delay");
Msg(DIRECT, " Ctrl+Shift+d increase animation delay");
Msg(DIRECT, " Alt+f toggle redraw mode (fast/full)"); Msg(DIRECT, " Alt+f toggle redraw mode (fast/full)");
Msg(DIRECT, " Alt+l hide/show geometry lines"); Msg(DIRECT, " Alt+l hide/show geometry lines");
Msg(DIRECT, " Alt+Shift+l hide/show mesh lines"); Msg(DIRECT, " Alt+Shift+l hide/show mesh lines");
...@@ -502,8 +512,6 @@ void help_short_cb(CALLBACK_ARGS){ ...@@ -502,8 +512,6 @@ void help_short_cb(CALLBACK_ARGS){
Msg(DIRECT, " Alt+o change projection mode"); Msg(DIRECT, " Alt+o change projection mode");
Msg(DIRECT, " Alt+p hide/show geometry points"); Msg(DIRECT, " Alt+p hide/show geometry points");
Msg(DIRECT, " Alt+Shift+p hide/show mesh points"); Msg(DIRECT, " Alt+Shift+p hide/show mesh points");
Msg(DIRECT, " Shift+s decrease animation delay");
Msg(DIRECT, " Ctrl+Shift+s increase animation delay");
Msg(DIRECT, " Alt+s hide/show geometry surfaces"); Msg(DIRECT, " Alt+s hide/show geometry surfaces");
Msg(DIRECT, " Alt+Shift+s hide/show mesh surfaces"); Msg(DIRECT, " Alt+Shift+s hide/show mesh surfaces");
Msg(DIRECT, " Alt+t alternate intervals mode for all post-processing views"); Msg(DIRECT, " Alt+t alternate intervals mode for all post-processing views");
......
...@@ -57,6 +57,11 @@ void opt_mesh_show_by_entity_num_cb(CALLBACK_ARGS) ; ...@@ -57,6 +57,11 @@ void opt_mesh_show_by_entity_num_cb(CALLBACK_ARGS) ;
void opt_mesh_color_scheme_cb(CALLBACK_ARGS) ; void opt_mesh_color_scheme_cb(CALLBACK_ARGS) ;
void opt_mesh_ok_cb(CALLBACK_ARGS) ; void opt_mesh_ok_cb(CALLBACK_ARGS) ;
// Option Solver Menu
void opt_solver_cb(CALLBACK_ARGS) ;
void opt_solver_ok_cb(CALLBACK_ARGS) ;
// Option Post Menu // Option Post Menu
void opt_post_cb(CALLBACK_ARGS) ; void opt_post_cb(CALLBACK_ARGS) ;
......
// $Id: GUI.cpp,v 1.80 2001-05-24 10:11:28 geuzaine Exp $ // $Id: GUI.cpp,v 1.81 2001-05-25 08:43:24 geuzaine Exp $
// To make the interface as visually consistent as possible, please: // To make the interface as visually consistent as possible, please:
// - use the BH, BW, WB, IW values for button heights/widths, window borders, etc. // - use the BH, BW, WB, IW values for button heights/widths, window borders, etc.
...@@ -62,6 +62,7 @@ Fl_Menu_Item m_menubar_table[] = { ...@@ -62,6 +62,7 @@ Fl_Menu_Item m_menubar_table[] = {
{"General...", FL_SHIFT+'o', (Fl_Callback *)opt_general_cb, 0, FL_MENU_DIVIDER}, {"General...", FL_SHIFT+'o', (Fl_Callback *)opt_general_cb, 0, FL_MENU_DIVIDER},
{"Geometry...", FL_SHIFT+'g', (Fl_Callback *)opt_geometry_cb, 0}, {"Geometry...", FL_SHIFT+'g', (Fl_Callback *)opt_geometry_cb, 0},
{"Mesh...", FL_SHIFT+'m', (Fl_Callback *)opt_mesh_cb, 0}, {"Mesh...", FL_SHIFT+'m', (Fl_Callback *)opt_mesh_cb, 0},
{"Solver...", FL_SHIFT+'s', (Fl_Callback *)opt_solver_cb, 0},
{"Post-processing...", FL_SHIFT+'p', (Fl_Callback *)opt_post_cb, 0, FL_MENU_DIVIDER}, {"Post-processing...", FL_SHIFT+'p', (Fl_Callback *)opt_post_cb, 0, FL_MENU_DIVIDER},
{"Save options now", 0, (Fl_Callback *)opt_save_cb, 0}, {"Save options now", 0, (Fl_Callback *)opt_save_cb, 0},
{0}, {0},
...@@ -325,11 +326,11 @@ int GUI::global_shortcuts(int event){ ...@@ -325,11 +326,11 @@ int GUI::global_shortcuts(int event){
mesh_save_cb(0,0); mesh_save_cb(0,0);
return 1; return 1;
} }
else if(Fl::test_shortcut(FL_CTRL+FL_SHIFT+'s')){ else if(Fl::test_shortcut(FL_CTRL+FL_SHIFT+'d')){
opt_post_anim_delay(0,GMSH_SET|GMSH_GUI,opt_post_anim_delay(0,GMSH_GET,0) + 0.01); opt_post_anim_delay(0,GMSH_SET|GMSH_GUI,opt_post_anim_delay(0,GMSH_GET,0) + 0.01);
return 1; return 1;
} }
else if(Fl::test_shortcut(FL_SHIFT+'s')){ else if(Fl::test_shortcut(FL_SHIFT+'d')){
opt_post_anim_delay(0,GMSH_SET|GMSH_GUI,opt_post_anim_delay(0,GMSH_GET,0) - 0.01); opt_post_anim_delay(0,GMSH_SET|GMSH_GUI,opt_post_anim_delay(0,GMSH_GET,0) - 0.01);
return 1; return 1;
} }
...@@ -460,6 +461,7 @@ GUI::GUI(int argc, char **argv) { ...@@ -460,6 +461,7 @@ GUI::GUI(int argc, char **argv) {
init_general_options_window = 0; init_general_options_window = 0;
init_geometry_options_window = 0; init_geometry_options_window = 0;
init_mesh_options_window = 0; init_mesh_options_window = 0;
init_solver_options_window = 0;
init_post_options_window = 0; init_post_options_window = 0;
init_statistics_window = 0; init_statistics_window = 0;
init_message_window = 0; init_message_window = 0;
...@@ -499,6 +501,7 @@ GUI::GUI(int argc, char **argv) { ...@@ -499,6 +501,7 @@ GUI::GUI(int argc, char **argv) {
create_general_options_window(); create_general_options_window();
create_geometry_options_window(); create_geometry_options_window();
create_mesh_options_window(); create_mesh_options_window();
create_solver_options_window();
create_post_options_window(); create_post_options_window();
create_view_options_window(-1); create_view_options_window(-1);
create_message_window(); create_message_window();
...@@ -1358,6 +1361,59 @@ void GUI::create_mesh_options_window(){ ...@@ -1358,6 +1361,59 @@ void GUI::create_mesh_options_window(){
} }
//******************** Create the window for solver options *******************
void GUI::create_solver_options_window(){
if(!init_solver_options_window){
init_solver_options_window = 1 ;
int width = 20*CTX.fontsize;
int height = 5*WB+8*BH ;
solver_window = new Fl_Window(width,height);
solver_window->box(WINDOW_BOX);
solver_window->label("Solver options");
{
Fl_Tabs* o = new Fl_Tabs(WB, WB, width-2*WB, height-3*WB-BH);
{
Fl_Group* o = new Fl_Group(WB, WB+BH, width-2*WB, height-3*WB-2*BH, "Solvers");
o->labelsize(CTX.fontsize);
Fl_Box *text = new Fl_Box(FL_NO_BOX, 2*WB, 3*WB+1*BH, width-4*WB, 2*BH,
"There are no global solver options available yet");
text->align(FL_ALIGN_LEFT|FL_ALIGN_TOP|FL_ALIGN_INSIDE|FL_ALIGN_WRAP);
text->labelsize(CTX.fontsize);
o->end();
}
o->end();
}
{
Fl_Return_Button* o = new Fl_Return_Button(width-2*BB-2*WB, height-BH-WB, BB, BH, "OK");
o->labelsize(CTX.fontsize);
o->callback(opt_solver_ok_cb);
}
{
Fl_Button* o = new Fl_Button(width-BB-WB, height-BH-WB, BB, BH, "Cancel");
o->labelsize(CTX.fontsize);
o->callback(cancel_cb, (void*)solver_window);
}
if(CTX.center_windows)
solver_window->position(m_window->x()+m_window->w()/2-width/2,
m_window->y()+9*BH-height/2);
solver_window->end();
}
else{
if(solver_window->shown())
solver_window->redraw();
else
solver_window->show();
}
}
//******************** Create the window for post-processing options ******************* //******************** Create the window for post-processing options *******************
......
...@@ -128,6 +128,12 @@ public: ...@@ -128,6 +128,12 @@ public:
Fl_Value_Input *mesh_value[20] ; Fl_Value_Input *mesh_value[20] ;
Fl_Button *mesh_col[50] ; Fl_Button *mesh_col[50] ;
// solver options window
int init_solver_options_window;
Fl_Window *solver_window ;
Fl_Check_Button *solver_butt[20] ;
Fl_Value_Input *solver_value[20] ;
// post-processing options window // post-processing options window
int init_post_options_window; int init_post_options_window;
Fl_Window *post_window ; Fl_Window *post_window ;
...@@ -184,6 +190,7 @@ public: ...@@ -184,6 +190,7 @@ public:
void create_general_options_window(); void create_general_options_window();
void create_geometry_options_window(); void create_geometry_options_window();
void create_mesh_options_window(); void create_mesh_options_window();
void create_solver_options_window();
void create_post_options_window(); void create_post_options_window();
PluginDialogBox *create_plugin_window(GMSH_Plugin *, int); PluginDialogBox *create_plugin_window(GMSH_Plugin *, int);
void create_view_options_window(int numview); void create_view_options_window(int numview);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment