mirror of
https://github.com/fltk/fltk.git
synced 2026-06-06 00:22:42 +08:00
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
This commit is contained in:
@@ -12,7 +12,9 @@ CHANGES IN FLTK 1.1.0
|
|||||||
- MacOS: missing compile rule for .dylib files.
|
- MacOS: missing compile rule for .dylib files.
|
||||||
- Fl_Group::current(), Fl_Group::begin(), and
|
- Fl_Group::current(), Fl_Group::begin(), and
|
||||||
Fl_Group::end() are no longer inlined so that they are
|
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: support for Mac system menu (Fl_Sys_Menu_Bar)
|
||||||
- MacOS: wait(0) would not handle all pending events
|
- MacOS: wait(0) would not handle all pending events
|
||||||
- Added new makeinclude file for MingW using GCC 3.1.x.
|
- Added new makeinclude file for MingW using GCC 3.1.x.
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
#include <FL/Fl_Return_Button.H>
|
#include <FL/Fl_Return_Button.H>
|
||||||
#include <FL/fl_ask.H>
|
#include <FL/fl_ask.H>
|
||||||
|
|
||||||
class Fl_File_Chooser {
|
class FL_EXPORT Fl_File_Chooser {
|
||||||
public:
|
public:
|
||||||
enum { SINGLE = 0, MULTI = 1, CREATE = 2, DIRECTORY = 4 };
|
enum { SINGLE = 0, MULTI = 1, CREATE = 2, DIRECTORY = 4 };
|
||||||
private:
|
private:
|
||||||
|
|||||||
+5
-5
@@ -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).
|
// 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 d(int D) {d_ = D;}
|
||||||
void ld(int LD) {ld_ = LD;}
|
void ld(int LD) {ld_ = LD;}
|
||||||
void data(const char * const *p, int c) {data_ = p; count_ = c;}
|
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);
|
FL_EXPORT 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 measure(const Fl_Label *lo, int &lw, int &lh);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@@ -98,5 +98,5 @@ class FL_EXPORT Fl_RGB_Image : public Fl_Image {
|
|||||||
#endif
|
#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 $".
|
||||||
//
|
//
|
||||||
|
|||||||
+10
-10
@@ -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).
|
// 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);
|
static int compare(Fl_Shared_Image **i0, Fl_Shared_Image **i1);
|
||||||
|
|
||||||
// Use get() and release() to load/delete images in memory...
|
// Use get() and release() to load/delete images in memory...
|
||||||
Fl_Shared_Image();
|
FL_EXPORT Fl_Shared_Image();
|
||||||
Fl_Shared_Image(const char *n, Fl_Image *img = 0);
|
FL_EXPORT Fl_Shared_Image(const char *n, Fl_Image *img = 0);
|
||||||
virtual ~Fl_Shared_Image();
|
FL_EXPORT virtual ~Fl_Shared_Image();
|
||||||
void add();
|
FL_EXPORT void add();
|
||||||
void update();
|
FL_EXPORT void update();
|
||||||
|
|
||||||
public:
|
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 *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 *get(const char *n, int W = 0, int H = 0);
|
||||||
static Fl_Shared_Image **images() { return images_; }
|
static Fl_Shared_Image **images();
|
||||||
static int num_images() { return num_images_; }
|
static int num_images();
|
||||||
static void add_handler(Fl_Shared_Handler f);
|
static void add_handler(Fl_Shared_Handler f);
|
||||||
static void remove_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...
|
// of the core FLTK library...
|
||||||
//
|
//
|
||||||
|
|
||||||
FL_EXPORT void fl_register_images();
|
FL_EXPORT extern void fl_register_images();
|
||||||
|
|
||||||
#endif // !Fl_Shared_Image_H
|
#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 $"
|
||||||
//
|
//
|
||||||
|
|||||||
+3
-3
@@ -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).
|
// Tiled image header file for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
|
|
||||||
// Tiled image class.
|
// Tiled image class.
|
||||||
class Fl_Tiled_Image : public Fl_Image {
|
class FL_EXPORT Fl_Tiled_Image : public Fl_Image {
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
Fl_Image *image_; // The image that is shared
|
Fl_Image *image_; // The image that is shared
|
||||||
@@ -52,5 +52,5 @@ class Fl_Tiled_Image : public Fl_Image {
|
|||||||
#endif // !Fl_Tiled_Image_H
|
#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 $"
|
||||||
//
|
//
|
||||||
|
|||||||
+26
-26
@@ -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).
|
// Window header file for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
class Fl_X;
|
class Fl_X;
|
||||||
|
|
||||||
class Fl_Window : public Fl_Group {
|
class FL_EXPORT Fl_Window : public Fl_Group {
|
||||||
|
|
||||||
friend class Fl_X;
|
friend class Fl_X;
|
||||||
Fl_X *i; // points at the system-specific stuff
|
Fl_X *i; // points at the system-specific stuff
|
||||||
@@ -62,14 +62,14 @@ protected:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
FL_EXPORT Fl_Window(int,int,int,int, const char* = 0);
|
Fl_Window(int,int,int,int, const char* = 0);
|
||||||
FL_EXPORT Fl_Window(int,int, const char* = 0);
|
Fl_Window(int,int, const char* = 0);
|
||||||
virtual FL_EXPORT ~Fl_Window();
|
virtual ~Fl_Window();
|
||||||
|
|
||||||
virtual FL_EXPORT int handle(int);
|
virtual int handle(int);
|
||||||
|
|
||||||
virtual FL_EXPORT void resize(int,int,int,int);
|
virtual void resize(int,int,int,int);
|
||||||
FL_EXPORT void border(int b);
|
void border(int b);
|
||||||
void clear_border() {set_flag(FL_NOBORDER);}
|
void clear_border() {set_flag(FL_NOBORDER);}
|
||||||
int border() const {return !(flags() & FL_NOBORDER);}
|
int border() const {return !(flags() & FL_NOBORDER);}
|
||||||
void set_override() {set_flag(FL_NOBORDER|FL_OVERRIDE);}
|
void set_override() {set_flag(FL_NOBORDER|FL_OVERRIDE);}
|
||||||
@@ -79,8 +79,8 @@ public:
|
|||||||
void set_non_modal() {set_flag(FL_NON_MODAL);}
|
void set_non_modal() {set_flag(FL_NON_MODAL);}
|
||||||
int non_modal() const {return flags() & (FL_NON_MODAL|FL_MODAL);}
|
int non_modal() const {return flags() & (FL_NON_MODAL|FL_MODAL);}
|
||||||
|
|
||||||
FL_EXPORT void hotspot(int x, int y, int offscreen = 0);
|
void hotspot(int x, int y, int offscreen = 0);
|
||||||
FL_EXPORT void hotspot(const Fl_Widget*, int offscreen = 0);
|
void hotspot(const Fl_Widget*, int offscreen = 0);
|
||||||
void hotspot(const Fl_Widget& p, int offscreen = 0) {hotspot(&p,offscreen);}
|
void hotspot(const Fl_Widget& p, int offscreen = 0) {hotspot(&p,offscreen);}
|
||||||
void free_position() {clear_flag(FL_FORCE_POSITION);}
|
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) {
|
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* label() const {return Fl_Widget::label();}
|
||||||
const char* iconlabel() const {return iconlabel_;}
|
const char* iconlabel() const {return iconlabel_;}
|
||||||
FL_EXPORT void label(const char*);
|
void label(const char*);
|
||||||
FL_EXPORT void iconlabel(const char*);
|
void iconlabel(const char*);
|
||||||
FL_EXPORT void label(const char* label, const char* iconlabel);
|
void label(const char* label, const char* iconlabel);
|
||||||
const char* xclass() const {return xclass_;}
|
const char* xclass() const {return xclass_;}
|
||||||
void xclass(const char* c) {xclass_ = c;}
|
void xclass(const char* c) {xclass_ = c;}
|
||||||
const void* icon() const {return icon_;}
|
const void* icon() const {return icon_;}
|
||||||
void icon(const void * ic) {icon_ = ic;}
|
void icon(const void * ic) {icon_ = ic;}
|
||||||
|
|
||||||
int shown() {return i != 0;}
|
int shown() {return i != 0;}
|
||||||
virtual FL_EXPORT void show();
|
virtual void show();
|
||||||
virtual FL_EXPORT void hide();
|
virtual void hide();
|
||||||
FL_EXPORT void show(int, char**);
|
void show(int, char**);
|
||||||
FL_EXPORT void fullscreen();
|
void fullscreen();
|
||||||
FL_EXPORT void fullscreen_off(int,int,int,int);
|
void fullscreen_off(int,int,int,int);
|
||||||
FL_EXPORT void iconize();
|
void iconize();
|
||||||
|
|
||||||
FL_EXPORT int x_root() const ;
|
int x_root() const ;
|
||||||
FL_EXPORT int y_root() const ;
|
int y_root() const ;
|
||||||
|
|
||||||
static Fl_Window *current() {return current_;}
|
static Fl_Window *current();
|
||||||
FL_EXPORT void make_current();
|
void make_current();
|
||||||
|
|
||||||
// for back-compatability only:
|
// for back-compatability only:
|
||||||
FL_EXPORT void cursor(Fl_Cursor, Fl_Color=FL_BLACK, Fl_Color=FL_WHITE);
|
void cursor(Fl_Cursor, Fl_Color=FL_BLACK, Fl_Color=FL_WHITE);
|
||||||
static FL_EXPORT void default_callback(Fl_Window*, void* v);
|
static void default_callback(Fl_Window*, void* v);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#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 $".
|
||||||
//
|
//
|
||||||
|
|||||||
+13
-2
@@ -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).
|
// 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...
|
// '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 $".
|
||||||
//
|
//
|
||||||
|
|||||||
+7
-2
@@ -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).
|
// 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::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 $".
|
||||||
//
|
//
|
||||||
|
|||||||
+9
-9
@@ -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).
|
// 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_Buffer *stylebuf = 0;
|
||||||
Fl_Text_Display::Style_Table_Entry
|
Fl_Text_Display::Style_Table_Entry
|
||||||
styletable[] = { // Style table
|
styletable[] = { // Style table
|
||||||
{ FL_BLACK, FL_COURIER, FL_NORMAL_SIZE }, // A - Plain
|
{ FL_BLACK, FL_COURIER, 14 }, // A - Plain
|
||||||
{ FL_DARK_GREEN, FL_COURIER_ITALIC, FL_NORMAL_SIZE }, // B - Line comments
|
{ FL_DARK_GREEN, FL_COURIER_ITALIC, 14 }, // B - Line comments
|
||||||
{ FL_DARK_GREEN, FL_COURIER_ITALIC, FL_NORMAL_SIZE }, // C - Block comments
|
{ FL_DARK_GREEN, FL_COURIER_ITALIC, 14 }, // C - Block comments
|
||||||
{ FL_BLUE, FL_COURIER, FL_NORMAL_SIZE }, // D - Strings
|
{ FL_BLUE, FL_COURIER, 14 }, // D - Strings
|
||||||
{ FL_DARK_RED, FL_COURIER, FL_NORMAL_SIZE }, // E - Directives
|
{ FL_DARK_RED, FL_COURIER, 14 }, // E - Directives
|
||||||
{ FL_DARK_RED, FL_COURIER_BOLD, FL_NORMAL_SIZE }, // F - Types
|
{ FL_DARK_RED, FL_COURIER_BOLD, 14 }, // F - Types
|
||||||
{ FL_BLUE, FL_COURIER_BOLD, FL_NORMAL_SIZE } // G - Keywords
|
{ FL_BLUE, FL_COURIER_BOLD, 14 } // G - Keywords
|
||||||
};
|
};
|
||||||
const char *code_keywords[] = { // List of known C/C++ keywords...
|
const char *code_keywords[] = { // List of known C/C++ keywords...
|
||||||
"and",
|
"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 $".
|
||||||
//
|
//
|
||||||
|
|||||||
Reference in New Issue
Block a user