From 43bfe74b25d0b7709757037a13c8ee2118bb8588 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Fri, 18 Dec 2015 18:56:58 +0000 Subject: Running FLTK in static initializers (cont'd): 1) Changed the way fluid attaches images to widgets and menu items so it is compatible with running fluid-generated code containing such images in a static initializer. Images are now attached calling a function: widget->image( image_function_name() ); and this function is defined before in fluid-generated code as: static Fl_Image *image_function_name() { static Fl_Image *image = new image_type(......); return image; } 2) Changed src/Fl_File_Chooser.fl so the source code generate by fluid from it is compatible with running in a static initializer. 3) Changed src/Fl_File_Chooser.cxx and FL/Fl_File_Chooser.H to the result of running fluid on src/Fl_File_Chooser.fl git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10972 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- FL/Fl_File_Chooser.H | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'FL') diff --git a/FL/Fl_File_Chooser.H b/FL/Fl_File_Chooser.H index 6808c25b1..6e3ed2297 100644 --- a/FL/Fl_File_Chooser.H +++ b/FL/Fl_File_Chooser.H @@ -49,7 +49,7 @@ class FL_EXPORT Fl_File_Chooser { public: enum { SINGLE = 0, MULTI = 1, CREATE = 2, DIRECTORY = 4 }; private: - static Fl_Preferences *prefs_; + static Fl_Preferences *prefs_; void (*callback_)(Fl_File_Chooser*, void *); void *data_; char directory_[FL_PATH_MAX]; -- cgit v1.2.3