diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2002-07-14 21:25:39 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2002-07-14 21:25:39 +0000 |
| commit | d0f18c45b5052098236b042331a578620d7b05be (patch) | |
| tree | 0c8b43075631c98670bffa3cc83e3c4ea9f23ee7 | |
| parent | 7c4010a10684b49ad3ae85ef87af658acd3b038e (diff) | |
Boy, aren't WIN32 compilers *so* much fun.
Fix more export problems, make some more static inline methods regular
functions, don't use FL_NORMAL_SIZE in a static initializer since BC++
doesn't seem to support it...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2531 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
| -rw-r--r-- | CHANGES | 4 | ||||
| -rw-r--r-- | FL/Fl_File_Chooser.H | 2 | ||||
| -rw-r--r-- | FL/Fl_Image.H | 10 | ||||
| -rw-r--r-- | FL/Fl_Shared_Image.H | 20 | ||||
| -rw-r--r-- | FL/Fl_Tiled_Image.H | 6 | ||||
| -rw-r--r-- | FL/Fl_Window.H | 52 | ||||
| -rw-r--r-- | src/Fl_Shared_Image.cxx | 15 | ||||
| -rw-r--r-- | src/Fl_Window.cxx | 9 | ||||
| -rw-r--r-- | test/editor.cxx | 18 |
9 files changed, 77 insertions, 59 deletions
@@ -12,7 +12,9 @@ CHANGES IN FLTK 1.1.0 - MacOS: missing compile rule for .dylib files. - Fl_Group::current(), Fl_Group::begin(), and Fl_Group::end() are no longer inlined so that they are - properly exported in DLLs under WIN32. + properly exported in DLLs under WIN32. Similar + changes for all static inline methods in other + classes. - MacOS: support for Mac system menu (Fl_Sys_Menu_Bar) - MacOS: wait(0) would not handle all pending events - Added new makeinclude file for MingW using GCC 3.1.x. diff --git a/FL/Fl_File_Chooser.H b/FL/Fl_File_Chooser.H index ee99f7250..f53068f00 100644 --- a/FL/Fl_File_Chooser.H +++ b/FL/Fl_File_Chooser.H @@ -20,7 +20,7 @@ #include <FL/Fl_Return_Button.H> #include <FL/fl_ask.H> -class Fl_File_Chooser { +class FL_EXPORT Fl_File_Chooser { public: enum { SINGLE = 0, MULTI = 1, CREATE = 2, DIRECTORY = 4 }; private: diff --git a/FL/Fl_Image.H b/FL/Fl_Image.H index 2ab513f8c..d8ca4c0a2 100644 --- a/FL/Fl_Image.H +++ b/FL/Fl_Image.H @@ -1,5 +1,5 @@ // -// "$Id: Fl_Image.H,v 1.5.2.3.2.12 2002/04/26 11:32:37 easysw Exp $" +// "$Id: Fl_Image.H,v 1.5.2.3.2.13 2002/07/14 21:25:39 easysw Exp $" // // Image header file for the Fast Light Tool Kit (FLTK). // @@ -46,10 +46,10 @@ class FL_EXPORT Fl_Image { void d(int D) {d_ = D;} void ld(int LD) {ld_ = LD;} void data(const char * const *p, int c) {data_ = p; count_ = c;} - void draw_empty(int X, int Y); + FL_EXPORT void draw_empty(int X, int Y); - static void labeltype(const Fl_Label *lo, int lx, int ly, int lw, int lh, Fl_Align la); - static void measure(const Fl_Label *lo, int &lw, int &lh); + FL_EXPORT static void labeltype(const Fl_Label *lo, int lx, int ly, int lw, int lh, Fl_Align la); + FL_EXPORT static void measure(const Fl_Label *lo, int &lw, int &lh); public: @@ -98,5 +98,5 @@ class FL_EXPORT Fl_RGB_Image : public Fl_Image { #endif // -// End of "$Id: Fl_Image.H,v 1.5.2.3.2.12 2002/04/26 11:32:37 easysw Exp $". +// End of "$Id: Fl_Image.H,v 1.5.2.3.2.13 2002/07/14 21:25:39 easysw Exp $". // diff --git a/FL/Fl_Shared_Image.H b/FL/Fl_Shared_Image.H index 1a23276bb..d174b09a7 100644 --- a/FL/Fl_Shared_Image.H +++ b/FL/Fl_Shared_Image.H @@ -1,5 +1,5 @@ // -// "$Id: Fl_Shared_Image.H,v 1.22.2.5 2002/06/28 21:04:35 easysw Exp $" +// "$Id: Fl_Shared_Image.H,v 1.22.2.6 2002/07/14 21:25:39 easysw Exp $" // // Shared image header file for the Fast Light Tool Kit (FLTK). // @@ -53,11 +53,11 @@ class FL_EXPORT Fl_Shared_Image : public Fl_Image { static int compare(Fl_Shared_Image **i0, Fl_Shared_Image **i1); // Use get() and release() to load/delete images in memory... - Fl_Shared_Image(); - Fl_Shared_Image(const char *n, Fl_Image *img = 0); - virtual ~Fl_Shared_Image(); - void add(); - void update(); + FL_EXPORT Fl_Shared_Image(); + FL_EXPORT Fl_Shared_Image(const char *n, Fl_Image *img = 0); + FL_EXPORT virtual ~Fl_Shared_Image(); + FL_EXPORT void add(); + FL_EXPORT void update(); public: @@ -75,8 +75,8 @@ class FL_EXPORT Fl_Shared_Image : public Fl_Image { static Fl_Shared_Image *find(const char *n, int W = 0, int H = 0); static Fl_Shared_Image *get(const char *n, int W = 0, int H = 0); - static Fl_Shared_Image **images() { return images_; } - static int num_images() { return num_images_; } + static Fl_Shared_Image **images(); + static int num_images(); static void add_handler(Fl_Shared_Handler f); static void remove_handler(Fl_Shared_Handler f); }; @@ -87,10 +87,10 @@ class FL_EXPORT Fl_Shared_Image : public Fl_Image { // of the core FLTK library... // -FL_EXPORT void fl_register_images(); +FL_EXPORT extern void fl_register_images(); #endif // !Fl_Shared_Image_H // -// End of "$Id: Fl_Shared_Image.H,v 1.22.2.5 2002/06/28 21:04:35 easysw Exp $" +// End of "$Id: Fl_Shared_Image.H,v 1.22.2.6 2002/07/14 21:25:39 easysw Exp $" // diff --git a/FL/Fl_Tiled_Image.H b/FL/Fl_Tiled_Image.H index 422e37bd6..bd4ef2896 100644 --- a/FL/Fl_Tiled_Image.H +++ b/FL/Fl_Tiled_Image.H @@ -1,5 +1,5 @@ // -// "$Id: Fl_Tiled_Image.H,v 1.1.2.2 2002/01/01 15:11:28 easysw Exp $" +// "$Id: Fl_Tiled_Image.H,v 1.1.2.3 2002/07/14 21:25:39 easysw Exp $" // // Tiled image header file for the Fast Light Tool Kit (FLTK). // @@ -30,7 +30,7 @@ // Tiled image class. -class Fl_Tiled_Image : public Fl_Image { +class FL_EXPORT Fl_Tiled_Image : public Fl_Image { protected: Fl_Image *image_; // The image that is shared @@ -52,5 +52,5 @@ class Fl_Tiled_Image : public Fl_Image { #endif // !Fl_Tiled_Image_H // -// End of "$Id: Fl_Tiled_Image.H,v 1.1.2.2 2002/01/01 15:11:28 easysw Exp $" +// End of "$Id: Fl_Tiled_Image.H,v 1.1.2.3 2002/07/14 21:25:39 easysw Exp $" // diff --git a/FL/Fl_Window.H b/FL/Fl_Window.H index 0be9e69ee..03f561496 100644 --- a/FL/Fl_Window.H +++ b/FL/Fl_Window.H @@ -1,5 +1,5 @@ // -// "$Id: Fl_Window.H,v 1.12.2.6.2.2 2002/01/01 15:11:28 easysw Exp $" +// "$Id: Fl_Window.H,v 1.12.2.6.2.3 2002/07/14 21:25:39 easysw Exp $" // // Window header file for the Fast Light Tool Kit (FLTK). // @@ -32,7 +32,7 @@ class Fl_X; -class Fl_Window : public Fl_Group { +class FL_EXPORT Fl_Window : public Fl_Group { friend class Fl_X; Fl_X *i; // points at the system-specific stuff @@ -62,14 +62,14 @@ protected: public: - FL_EXPORT Fl_Window(int,int,int,int, const char* = 0); - FL_EXPORT Fl_Window(int,int, const char* = 0); - virtual FL_EXPORT ~Fl_Window(); + Fl_Window(int,int,int,int, const char* = 0); + Fl_Window(int,int, const char* = 0); + virtual ~Fl_Window(); - virtual FL_EXPORT int handle(int); + virtual int handle(int); - virtual FL_EXPORT void resize(int,int,int,int); - FL_EXPORT void border(int b); + virtual void resize(int,int,int,int); + void border(int b); void clear_border() {set_flag(FL_NOBORDER);} int border() const {return !(flags() & FL_NOBORDER);} void set_override() {set_flag(FL_NOBORDER|FL_OVERRIDE);} @@ -79,8 +79,8 @@ public: void set_non_modal() {set_flag(FL_NON_MODAL);} int non_modal() const {return flags() & (FL_NON_MODAL|FL_MODAL);} - FL_EXPORT void hotspot(int x, int y, int offscreen = 0); - FL_EXPORT void hotspot(const Fl_Widget*, int offscreen = 0); + void hotspot(int x, int y, int offscreen = 0); + void hotspot(const Fl_Widget*, int offscreen = 0); void hotspot(const Fl_Widget& p, int offscreen = 0) {hotspot(&p,offscreen);} void free_position() {clear_flag(FL_FORCE_POSITION);} void size_range(int a, int b, int c=0, int d=0, int e=0, int f=0, int g=0) { @@ -88,36 +88,36 @@ public: const char* label() const {return Fl_Widget::label();} const char* iconlabel() const {return iconlabel_;} - FL_EXPORT void label(const char*); - FL_EXPORT void iconlabel(const char*); - FL_EXPORT void label(const char* label, const char* iconlabel); + void label(const char*); + void iconlabel(const char*); + void label(const char* label, const char* iconlabel); const char* xclass() const {return xclass_;} void xclass(const char* c) {xclass_ = c;} const void* icon() const {return icon_;} void icon(const void * ic) {icon_ = ic;} int shown() {return i != 0;} - virtual FL_EXPORT void show(); - virtual FL_EXPORT void hide(); - FL_EXPORT void show(int, char**); - FL_EXPORT void fullscreen(); - FL_EXPORT void fullscreen_off(int,int,int,int); - FL_EXPORT void iconize(); + virtual void show(); + virtual void hide(); + void show(int, char**); + void fullscreen(); + void fullscreen_off(int,int,int,int); + void iconize(); - FL_EXPORT int x_root() const ; - FL_EXPORT int y_root() const ; + int x_root() const ; + int y_root() const ; - static Fl_Window *current() {return current_;} - FL_EXPORT void make_current(); + static Fl_Window *current(); + void make_current(); // for back-compatability only: - FL_EXPORT void cursor(Fl_Cursor, Fl_Color=FL_BLACK, Fl_Color=FL_WHITE); - static FL_EXPORT void default_callback(Fl_Window*, void* v); + void cursor(Fl_Cursor, Fl_Color=FL_BLACK, Fl_Color=FL_WHITE); + static void default_callback(Fl_Window*, void* v); }; #endif // -// End of "$Id: Fl_Window.H,v 1.12.2.6.2.2 2002/01/01 15:11:28 easysw Exp $". +// End of "$Id: Fl_Window.H,v 1.12.2.6.2.3 2002/07/14 21:25:39 easysw Exp $". // diff --git a/src/Fl_Shared_Image.cxx b/src/Fl_Shared_Image.cxx index f101d2afe..fabcc191f 100644 --- a/src/Fl_Shared_Image.cxx +++ b/src/Fl_Shared_Image.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Shared_Image.cxx,v 1.23.2.14 2002/06/28 21:04:36 easysw Exp $" +// "$Id: Fl_Shared_Image.cxx,v 1.23.2.15 2002/07/14 21:25:39 easysw Exp $" // // Shared image code for the Fast Light Tool Kit (FLTK). // @@ -60,6 +60,17 @@ extern "C" { } +// Static methods that really should be inline, but some WIN32 compilers +// can't handle it... +Fl_Shared_Image **Fl_Shared_Image::images() { + return images_; +} + +int Fl_Shared_Image::num_images() { + return num_images_; +} + + // // 'Fl_Shared_Image::compare()' - Compare two shared images... // @@ -456,5 +467,5 @@ Fl_Shared_Image::remove_handler(Fl_Shared_Handler f) { // -// End of "$Id: Fl_Shared_Image.cxx,v 1.23.2.14 2002/06/28 21:04:36 easysw Exp $". +// End of "$Id: Fl_Shared_Image.cxx,v 1.23.2.15 2002/07/14 21:25:39 easysw Exp $". // diff --git a/src/Fl_Window.cxx b/src/Fl_Window.cxx index 8e71e86c1..3567fc40d 100644 --- a/src/Fl_Window.cxx +++ b/src/Fl_Window.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Window.cxx,v 1.6.2.3.2.6 2002/07/01 20:14:08 easysw Exp $" +// "$Id: Fl_Window.cxx,v 1.6.2.3.2.7 2002/07/14 21:25:39 easysw Exp $" // // Window widget class for the Fast Light Tool Kit (FLTK). // @@ -113,6 +113,11 @@ void Fl_Window::default_callback(Fl_Window* window, void* v) { Fl::atclose(window, v); } +Fl_Window *Fl_Window::current() { + return current_; +} + + // -// End of "$Id: Fl_Window.cxx,v 1.6.2.3.2.6 2002/07/01 20:14:08 easysw Exp $". +// End of "$Id: Fl_Window.cxx,v 1.6.2.3.2.7 2002/07/14 21:25:39 easysw Exp $". // diff --git a/test/editor.cxx b/test/editor.cxx index ca0489560..4367f1cf8 100644 --- a/test/editor.cxx +++ b/test/editor.cxx @@ -1,5 +1,5 @@ // -// "$Id: editor.cxx,v 1.2.2.3.2.12 2002/07/11 22:43:53 matthiaswm Exp $" +// "$Id: editor.cxx,v 1.2.2.3.2.13 2002/07/14 21:25:39 easysw Exp $" // // A simple text editor program for the Fast Light Tool Kit (FLTK). // @@ -62,13 +62,13 @@ Fl_Text_Buffer *textbuf = 0; Fl_Text_Buffer *stylebuf = 0; Fl_Text_Display::Style_Table_Entry styletable[] = { // Style table - { FL_BLACK, FL_COURIER, FL_NORMAL_SIZE }, // A - Plain - { FL_DARK_GREEN, FL_COURIER_ITALIC, FL_NORMAL_SIZE }, // B - Line comments - { FL_DARK_GREEN, FL_COURIER_ITALIC, FL_NORMAL_SIZE }, // C - Block comments - { FL_BLUE, FL_COURIER, FL_NORMAL_SIZE }, // D - Strings - { FL_DARK_RED, FL_COURIER, FL_NORMAL_SIZE }, // E - Directives - { FL_DARK_RED, FL_COURIER_BOLD, FL_NORMAL_SIZE }, // F - Types - { FL_BLUE, FL_COURIER_BOLD, FL_NORMAL_SIZE } // G - Keywords + { FL_BLACK, FL_COURIER, 14 }, // A - Plain + { FL_DARK_GREEN, FL_COURIER_ITALIC, 14 }, // B - Line comments + { FL_DARK_GREEN, FL_COURIER_ITALIC, 14 }, // C - Block comments + { FL_BLUE, FL_COURIER, 14 }, // D - Strings + { FL_DARK_RED, FL_COURIER, 14 }, // E - Directives + { FL_DARK_RED, FL_COURIER_BOLD, 14 }, // F - Types + { FL_BLUE, FL_COURIER_BOLD, 14 } // G - Keywords }; const char *code_keywords[] = { // List of known C/C++ keywords... "and", @@ -762,5 +762,5 @@ int main(int argc, char **argv) { } // -// End of "$Id: editor.cxx,v 1.2.2.3.2.12 2002/07/11 22:43:53 matthiaswm Exp $". +// End of "$Id: editor.cxx,v 1.2.2.3.2.13 2002/07/14 21:25:39 easysw Exp $". // |
