diff --git a/Fltk/GUI.cpp b/Fltk/GUI.cpp index 2375279adc2159d816e56209c9ef67fa2af7491d..631e34785790c6e963415db4db101bb1677eb16b 100644 --- a/Fltk/GUI.cpp +++ b/Fltk/GUI.cpp @@ -1,4 +1,4 @@ -// $Id: GUI.cpp,v 1.372 2004-10-28 03:44:36 geuzaine Exp $ +// $Id: GUI.cpp,v 1.373 2004-10-28 03:59:10 geuzaine Exp $ // // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // @@ -341,7 +341,7 @@ static Fl_Menu_Item menu_point_display[] = { static Fl_Menu_Item menu_point_display_with_plugin[] = { {"Color dot", 0, 0, 0}, {"3D sphere", 0, 0, 0}, - {"Use Solver Plugin", 0, 0, 0}, + {"Use solver plugin", 0, 0, 0}, {0} }; @@ -354,7 +354,7 @@ static Fl_Menu_Item menu_line_display[] = { static Fl_Menu_Item menu_line_display_with_plugin[] = { {"Color segment", 0, 0, 0}, {"3D cylinder", 0, 0, 0}, - {"Use Solver Plugin", 0, 0, 0}, + {"Use solver plugin", 0, 0, 0}, {0} }; diff --git a/Plugin/StructuralSolver.cpp b/Plugin/StructuralSolver.cpp index e266cb5c670c5fb33557f73473db0ec89256638a..4f4bbf9634761281857cda03e89bc949c39aa5d2 100644 --- a/Plugin/StructuralSolver.cpp +++ b/Plugin/StructuralSolver.cpp @@ -419,6 +419,9 @@ Structural_Material StructuralSolver :: GetMaterial (const std::string & name) c if ((*it).name == name) return *it; } + + // just to fix the warning... + return *it; } @@ -432,6 +435,10 @@ Structural_Material StructuralSolver :: GetMaterial (const std::string & name) c #define ACROSS_ 1 #define AROUND_ 2 +void close_cb(Fl_Widget* w, void* data) +{ + if(data) ((Fl_Window *) data)->hide(); +} void StructuralSolver ::popupPropertiesForPhysicalEntity (int dim) { @@ -444,6 +451,7 @@ void StructuralSolver ::popupPropertiesForPhysicalEntity (int dim) #define BH (2*fontsize+1) // button height #define WB (6) // window border #define IW (17*fontsize) // input field width +#define BB (7*fontsize) // width of a button with internal label if(_window) { for(i = 0; i < 2; i++) @@ -556,7 +564,15 @@ void StructuralSolver ::popupPropertiesForPhysicalEntity (int dim) g[1]->end(); } o->end(); + + { + Fl_Button *o = new Fl_Button(width - BB - WB, height - BH - WB, BB, BH, "Cancel"); + o->callback(close_cb, (void *)_window); + } + } + _window->end(); + #endif } diff --git a/Plugin/StructuralSolver.h b/Plugin/StructuralSolver.h index 25d6eff3f2f9b0b4bac91608aa56a10f0fc238ae..08f61eca3761ff043347309e458d579aead41e0c 100644 --- a/Plugin/StructuralSolver.h +++ b/Plugin/StructuralSolver.h @@ -32,6 +32,7 @@ #include <FL/Fl_Window.H> #include <FL/Fl_Choice.H> #include <FL/Fl_Value_Input.H> +#include <FL/Fl_Button.H> #include <FL/Fl_Tabs.H> #include <FL/filename.H> #include <FL/Fl_PNG_Image.H>