diff --git a/Fltk/Callbacks.cpp b/Fltk/Callbacks.cpp index 4bffbba74a77df494cc960f487b99bb0f0305fd7..b31407ed0115c033c589c746f028d4ffd6b45fbd 100644 --- a/Fltk/Callbacks.cpp +++ b/Fltk/Callbacks.cpp @@ -1,4 +1,4 @@ -// $Id: Callbacks.cpp,v 1.115 2002-04-12 18:43:23 geuzaine Exp $ +// $Id: Callbacks.cpp,v 1.116 2002-04-12 23:59:22 geuzaine Exp $ #include <sys/types.h> #include <signal.h> @@ -776,7 +776,7 @@ void help_short_cb(CALLBACK_ARGS){ Msg(DIRECT, " Ctrl+o open file"); Msg(DIRECT, " p go to post-processor module"); Msg(DIRECT, " Shift+p show post-processing general options"); - Msg(DIRECT, " Ctrl+p save file by extension"); + Msg(DIRECT, " Ctrl+e save file by extension"); Msg(DIRECT, " Ctrl+q quit"); Msg(DIRECT, " Ctrl+s save mesh in default format"); Msg(DIRECT, ""); diff --git a/Fltk/GUI.cpp b/Fltk/GUI.cpp index 97c5665c0de87b59706735688b90f1d54820d6e6..e5d31aad62c41c2d0e24050471841176365583e4 100644 --- a/Fltk/GUI.cpp +++ b/Fltk/GUI.cpp @@ -1,4 +1,4 @@ -// $Id: GUI.cpp,v 1.163 2002-04-12 18:43:23 geuzaine Exp $ +// $Id: GUI.cpp,v 1.164 2002-04-12 23:59:22 geuzaine Exp $ // To make the interface as visually consistent as possible, please: // - use the IW, BB, BH, BW and WB values @@ -46,12 +46,15 @@ extern Context_T CTX; //******************* Definition of the static menus *********************************** +// Don't define shortcuts for FL_CTRL+'n', FL_CTRL+'p', FL_CTRL+'f', FL_CTRL+'b' +// these are used by fltk for widget navigation (in the same way as the 4 arrow keys) + Fl_Menu_Item m_menubar_table[] = { {"File", 0, 0, 0, FL_SUBMENU}, {"Open...", FL_CTRL+'o', (Fl_Callback *)file_open_cb, 0}, {"Merge...", FL_CTRL+'m', (Fl_Callback *)file_merge_cb, 0}, {"Save as", 0, 0, 0, FL_MENU_DIVIDER|FL_SUBMENU}, - {"By extension...", FL_CTRL+'p', (Fl_Callback *)file_save_as_auto_cb, 0, FL_MENU_DIVIDER}, + {"By extension...", FL_CTRL+'e', (Fl_Callback *)file_save_as_auto_cb, 0, FL_MENU_DIVIDER}, {"Geometry", 0, 0, 0, FL_SUBMENU}, {"Gmsh flattened geometry (geo)...", 0, (Fl_Callback *)file_save_as_geo_cb, 0}, {"Gmsh current options (opt)...", 0, (Fl_Callback *)file_save_as_geo_options_cb, 0}, @@ -961,7 +964,7 @@ void GUI::create_graphic_window(int argc, char **argv){ g_status_butt[6]->tooltip("Play/pause animation"); #endif - g_window->resizable(new Fl_Box(x,0,width-x,glheight)); + g_window->resizable(new Dummy_Box(x,0,width-x,glheight)); g_window->position(CTX.gl_position[0],CTX.gl_position[1]); g_window->end(); diff --git a/Fltk/Opengl_Window.cpp b/Fltk/Opengl_Window.cpp index f259b9e82896093344c9faf34555d1479a8a408a..01d68743e520f5de33165f74e891d839d555507f 100644 --- a/Fltk/Opengl_Window.cpp +++ b/Fltk/Opengl_Window.cpp @@ -1,4 +1,4 @@ -// $Id: Opengl_Window.cpp,v 1.20 2002-02-22 17:40:58 geuzaine Exp $ +// $Id: Opengl_Window.cpp,v 1.21 2002-04-12 23:59:22 geuzaine Exp $ #include "Gmsh.h" #include "Numeric.h" @@ -110,6 +110,8 @@ int Opengl_Window::handle(int event) { static Curve *c=NULL, *oc; static Surface *s=NULL, *os; + //printf("gmsh handle\n"); + GLuint ii[SELECTION_BUFFER_SIZE], jj[SELECTION_BUFFER_SIZE]; switch (event) { @@ -119,7 +121,11 @@ int Opengl_Window::handle(int event) { return 1; case FL_LEAVE : + return 1; + case FL_FOCUS : + return 1; + case FL_UNFOCUS : return 1; diff --git a/Fltk/Opengl_Window.h b/Fltk/Opengl_Window.h index ae48f4df5425ea781a199cd6a00a6fe86fe64216..55acc61e74511b9c0d14b934d907993aff3eae98 100644 --- a/Fltk/Opengl_Window.h +++ b/Fltk/Opengl_Window.h @@ -14,4 +14,18 @@ public: : Fl_Gl_Window(x, y, w, h, l) {} }; +// This dummy box class permits to define a box widget that will not +// eat the FL_ENTER/FL_LEAVE events (the new Box widget in fltk >1.1 +// does that, so that our Opengl_Window->handle() was not called each +// time the mouse moved...) +// +// There is probably a better solution... + +class Dummy_Box : public Fl_Box { + int handle(int){ return 0; }; // always! +public: + Dummy_Box(int x,int y,int w,int h,const char *l=0) + : Fl_Box(x, y, w, h, l) {} +}; + #endif