diff --git a/Common/Gmsh.cpp b/Common/Gmsh.cpp index bd4dbd58ed8fad388fc1f7922338c3a1a04c7be9..4b76efa8cf4559bd2260476f0f7fc5aa3f87bbd2 100644 --- a/Common/Gmsh.cpp +++ b/Common/Gmsh.cpp @@ -1,4 +1,4 @@ -// $Id: Gmsh.cpp,v 1.2 2008-04-13 09:45:48 geuzaine Exp $ +// $Id: Gmsh.cpp,v 1.3 2008-04-13 15:20:30 geuzaine Exp $ // // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // @@ -58,7 +58,7 @@ int GmshNewModel() int GmshMerge(std::string fileName) { // Merge CAD or mesh data in the current model, or create - // post-processing view associated with the current model + // post-processing data associated with the current model } int GmshClear() @@ -66,13 +66,6 @@ int GmshClear() // Destroys all models and post-processing views } -int GmshOpen(std::string fileName) -{ - GmshClear(); - GmshNewModel(); - GmshMerge(fileName); -} - int GmshFinalize() { return 1; diff --git a/Fltk/GUI.cpp b/Fltk/GUI.cpp index a654930211532928acdcd319785097d5c7633946..1f2c684dc187bbb9bdb83d519414f3aad0cb2cf1 100644 --- a/Fltk/GUI.cpp +++ b/Fltk/GUI.cpp @@ -1,4 +1,4 @@ -// $Id: GUI.cpp,v 1.675 2008-04-13 11:34:38 geuzaine Exp $ +// $Id: GUI.cpp,v 1.676 2008-04-13 15:20:30 geuzaine Exp $ // // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // @@ -865,8 +865,8 @@ int GUI::arrow_shortcuts() GUI::GUI(int argc, char **argv) { // initialize static windows - m_window = NULL; g_window = NULL; + m_window = NULL; opt_window = NULL; plugin_window = NULL; field_window = NULL; @@ -947,15 +947,18 @@ GUI::GUI(int argc, char **argv) 0x08, 0x00, 0xff, 0x1f, 0x08, 0x00, 0xff, 0x1f, 0x04, 0x40, 0xfd, 0x3f, 0x04, 0xa8, 0xea, 0x3f, 0x02, 0x55, 0x55, 0x7f, 0xa2, 0xaa, 0xaa, 0x7a, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }; - m_window->icon((char*)XCreateBitmapFromData(fl_display, DefaultRootWindow(fl_display), - gmsh32x32, 32, 32)); g_window->icon((char*)XCreateBitmapFromData(fl_display, DefaultRootWindow(fl_display), gmsh32x32, 32, 32)); + m_window->icon((char*)XCreateBitmapFromData(fl_display, DefaultRootWindow(fl_display), + gmsh32x32, 32, 32)); #endif // open graphics window first for correct non-modal behaviour on windows g_window->show(1, argv); m_window->show(); + + // graphic window should have the initial focus (so we can + // e.g. directly loop through time steps with the keyboard) g_opengl_window->take_focus(); create_option_window(); @@ -1446,8 +1449,9 @@ void GUI::create_graphic_window() int glheight = CTX.viewport[3] - CTX.viewport[1]; int height = glheight + sh; + // the graphic window is the main window: it should be a normal + // window (neither modal nor non-modal) g_window = new Main_Window(width, height, false); - //g_window = new Main_Window(width, height, CTX.non_modal_windows); g_window->callback(file_quit_cb); // bottom button bar diff --git a/Fltk/GUI.h b/Fltk/GUI.h index c5438ae2ffc065ca7b772eec611b7215bcd16fcf..a141fa45819905219fff96c0ca4e018a9f9f85bd 100644 --- a/Fltk/GUI.h +++ b/Fltk/GUI.h @@ -148,6 +148,12 @@ class GUI{ public: + // graphic window + Fl_Window *g_window; + Opengl_Window *g_opengl_window; + Fl_Button *g_status_butt[12]; + Fl_Box *g_status_label[2]; + // menu window Fl_Window *m_window; #if defined(__APPLE__) && defined(HAVE_FLTK_1_1_5_OR_ABOVE) @@ -163,12 +169,6 @@ public: std::vector<Popup_Button*> m_popup2_butt; std::vector<char*> m_pop_label; - // graphic window - Fl_Window *g_window; - Opengl_Window *g_opengl_window; - Fl_Button *g_status_butt[12]; - Fl_Box *g_status_label[2]; - // Option window Fl_Window *opt_window; Fl_Hold_Browser *opt_browser;