diff --git a/Common/Context.h b/Common/Context.h index 2369df549667622ebc49b16f8f400acbd97d6566..23989f48a49ccc2a090b537fec6b56d2fdd029bc 100644 --- a/Common/Context.h +++ b/Common/Context.h @@ -94,6 +94,7 @@ public : int alpha; // enable alpha blending int flash; // authorize colormap flashing (beek) int same_visual; // force same visual for GUI and Graphics + double zoom_factor; // mouse2 zoom coefficient //only used for Motif int font_base; // display list index for the font diff --git a/Common/GetOptions.cpp b/Common/GetOptions.cpp index bb6bb4bbf75fbb6fce40d21876c8578b265f8d35..c5ee1a4c91cbd4aa9511f563e5cee835a83e64f0 100644 --- a/Common/GetOptions.cpp +++ b/Common/GetOptions.cpp @@ -1,4 +1,4 @@ -// $Id: GetOptions.cpp,v 1.7 2001-02-03 14:03:46 geuzaine Exp $ +// $Id: GetOptions.cpp,v 1.8 2001-02-05 07:56:57 geuzaine Exp $ #include "Gmsh.h" #include "GmshUI.h" @@ -69,7 +69,9 @@ char gmsh_options[] = #else " -v be verbose\n" #endif +#ifdef _MOTIF " -nothreads disable threads\n" +#endif " -path string set path for included files\n" " -version show version number\n" " -info show detailed version information\n" diff --git a/Common/Options.h b/Common/Options.h index da9ad297c80f8ff9b669dce3489d0aad312c1c9b..396c7808db7efd9371c2dc1b8daa89270dff3ad3 100644 --- a/Common/Options.h +++ b/Common/Options.h @@ -72,6 +72,7 @@ StringXNumber GeneralOptions_Number[] = { { "Flash" , GMSH_INT, (void*)&CTX.flash , 0. }, { "AlphaBlending" , GMSH_INT, (void*)&CTX.alpha , 0. }, { "Trackball" , GMSH_INT, (void*)&CTX.useTrackball , 1. }, + { "ZoomFactor" , GMSH_DOUBLE, (void*)&CTX.zoom_factor , 1.1 }, { "Clip0" , GMSH_INT, (void*)&CTX.clip[0] , 0. }, { "Clip00" , GMSH_DOUBLE, (void*)&CTX.clip_plane[0][0] , 0.0 }, { "Clip01" , GMSH_DOUBLE, (void*)&CTX.clip_plane[0][1] , 0.0 }, diff --git a/Fltk/GUI.cpp b/Fltk/GUI.cpp index 260fa11f092408104ef972aa0104ca200374ba76..a4afed36729e5136806cc232c9d4311b3eddbae4 100644 --- a/Fltk/GUI.cpp +++ b/Fltk/GUI.cpp @@ -1,4 +1,4 @@ -// $Id: GUI.cpp,v 1.38 2001-02-04 15:52:26 geuzaine Exp $ +// $Id: GUI.cpp,v 1.39 2001-02-05 07:56:57 geuzaine Exp $ // To make the interface as visually consistent as possible, please: // - use the BH, BW, WB, IW values for button heights/widths, window borders, etc. @@ -443,8 +443,8 @@ int GUI::global_shortcuts(int event){ } else if(Fl::test_shortcut(FL_ALT+'t')){ MarkAllViewsChanged(1); - Post_View *v = (Post_View*)List_Pointer(Post_ViewList, view_number); if(init_view_window){ + Post_View *v = (Post_View*)List_Pointer(Post_ViewList, view_number); view_butt[6]->value(v->IntervalsType==DRAW_POST_ISO); view_butt[6]->redraw(); view_butt[7]->value(v->IntervalsType==DRAW_POST_DISCRETE); @@ -1587,6 +1587,7 @@ void GUI::create_message_window(){ void GUI::add_message(char *msg){ msg_browser->add(msg,0); + msg_browser->bottomline(msg_browser->size()); } void GUI::save_message(char *name){ @@ -1596,8 +1597,11 @@ void GUI::save_message(char *name){ Msg(WARNING, "Unable to Open File '%s'", name); return; } - for(int i = 1 ; i<=msg_browser->size() ; i++) - fprintf(fp, "%s\n", msg_browser->text(i)); + for(int i = 1 ; i<=msg_browser->size() ; i++){ + const char *c=msg_browser->text(i); + if(c[0]=='@') fprintf(fp, "%s\n", &c[3]); + else fprintf(fp, "%s\n", c); + } Msg(INFO, "Log Creation Complete '%s'", name); Msg(STATUS2, "Wrote File '%s'", name); diff --git a/Fltk/Opengl_Window.cpp b/Fltk/Opengl_Window.cpp index efd01ca8dcef6dac143d33567e1edf5a2c03dfd8..f4e7e0b8afd12aa31db8cf49cdbf0517e274f38a 100644 --- a/Fltk/Opengl_Window.cpp +++ b/Fltk/Opengl_Window.cpp @@ -1,4 +1,4 @@ -// $Id: Opengl_Window.cpp,v 1.12 2001-02-04 15:52:26 geuzaine Exp $ +// $Id: Opengl_Window.cpp,v 1.13 2001-02-05 07:56:57 geuzaine Exp $ #include "Gmsh.h" #include "GmshUI.h" @@ -216,8 +216,8 @@ int Opengl_Window::handle(int event) { if(!CTX.useTrackball) set_r(2, CTX.r[2] + ((abs(ymov) > abs(xmov))?0:-180*(float)xmov/(float)w())); set_s(0, CTX.s[0] * ( (abs(ymov) > abs(xmov)) ? - ( (ymov>0) ? (float)(1.04*(abs(ymov)+h()))/(float)h() - : (float)(h())/(float)(1.04*(abs(ymov)+h())) ) + ( (ymov>0) ? (float)(CTX.zoom_factor*(abs(ymov)+h()))/(float)h() + : (float)(h())/(float)(CTX.zoom_factor*(abs(ymov)+h())) ) : 1.) ); set_s(1, CTX.s[0]); set_s(2, CTX.s[0]); diff --git a/utils/gmsh_fltk.spec b/utils/gmsh_fltk.spec index f9dca01376fe1d12de411ee99f427e19479fcfe8..97436bf4d279c2c1e661aa06247fb0e29ac5d4ad 100644 --- a/utils/gmsh_fltk.spec +++ b/utils/gmsh_fltk.spec @@ -11,14 +11,14 @@ Buildroot: /var/tmp/%{name}-buildroot Requires: Mesa >= 3.0 %description -Gmsh is an automatic three-dimensional mesh generator, primarily -Delaunay, with pre- and post-processing facilities. Its primal goal is -to provide a simple meshing tool for academic test cases with -parametric input and up to date visualization capabilities. One of -the strengths of Gmsh is its ability to respect a characteristic -length field for the generation of adapted meshes on lines, surfaces -and volumes. Gmsh requires OpenGL (or Mesa) to be installed on your -system. +Gmsh is an automatic three-dimensional finite element mesh generator, +primarily Delaunay, with built-in pre- and post-processing +facilities. Its primal goal is to provide a simple meshing tool for +academic test cases with parametric input and up to date visualization +capabilities. One of the strengths of Gmsh is its ability to respect +a characteristic length field for the generation of adapted meshes on +lines, surfaces and volumes. Gmsh requires OpenGL (or Mesa) to be +installed on your system. Install Gmsh if you need a 3D finite element mesh generator and/or post-processor. diff --git a/utils/gmsh_motif.spec b/utils/gmsh_motif.spec index 982a2fa062beff92b2120ad6b297db54845872e3..92e9357233c79781649f788b8634d15aa3ac388a 100644 --- a/utils/gmsh_motif.spec +++ b/utils/gmsh_motif.spec @@ -10,17 +10,18 @@ Packager: Christophe.Geuzaine@AdValvas.be Buildroot: /var/tmp/%{name}-buildroot Requires: Mesa >= 3.0 lesstif >= 0.90 -%description -Gmsh is an automatic three-dimensional mesh generator, primarily -Delaunay, with pre- and post-processing facilities. Its primal goal is -to provide a simple meshing tool for academic test cases with -parametric input and up to date visualization capabilities. One of -the strengths of Gmsh is its ability to respect a characteristic -length field for the generation of adapted meshes on lines, surfaces -and volumes. Gmsh requires the Mesa and Lesstif libraries to be -installed on your system. - -Install Gmsh if you need a simple 3D finite element mesh generator. +%description +Gmsh is an automatic three-dimensional finite element mesh generator, +primarily Delaunay, with built-in pre- and post-processing +facilities. Its primal goal is to provide a simple meshing tool for +academic test cases with parametric input and up to date visualization +capabilities. One of the strengths of Gmsh is its ability to respect +a characteristic length field for the generation of adapted meshes on +lines, surfaces and volumes. Gmsh requires the Mesa and Lesstif +libraries to be installed on your system. + +Install Gmsh if you need a 3D finite element mesh generator and/or +post-processor. %prep