mirror of
https://github.com/fltk/fltk.git
synced 2026-05-28 20:06:18 +08:00
Made sure all draw()s were protected and all handle()s were public. (Most
were already.) Looks like I forgot to commit those changes to eliminate Mesa dependancy in the code. Here it is. Carl git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1189 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
+3
-2
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_Box.H,v 1.5.2.2 2000/06/05 21:20:19 mike Exp $"
|
// "$Id: Fl_Box.H,v 1.5.2.3 2000/06/10 19:29:58 carl Exp $"
|
||||||
//
|
//
|
||||||
// Box header file for the Fast Light Tool Kit (FLTK).
|
// Box header file for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -31,6 +31,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
class Fl_Box : public Fl_Widget {
|
class Fl_Box : public Fl_Widget {
|
||||||
|
protected:
|
||||||
FL_EXPORT void draw();
|
FL_EXPORT void draw();
|
||||||
public:
|
public:
|
||||||
FL_EXPORT Fl_Box(int x, int y, int w, int h, const char *l=0)
|
FL_EXPORT Fl_Box(int x, int y, int w, int h, const char *l=0)
|
||||||
@@ -42,5 +43,5 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_Box.H,v 1.5.2.2 2000/06/05 21:20:19 mike Exp $".
|
// End of "$Id: Fl_Box.H,v 1.5.2.3 2000/06/10 19:29:58 carl Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
+3
-3
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_Browser_.H,v 1.6.2.2 2000/06/05 21:20:20 mike Exp $"
|
// "$Id: Fl_Browser_.H,v 1.6.2.3 2000/06/10 19:29:59 carl Exp $"
|
||||||
//
|
//
|
||||||
// Common browser header file for the Fast Light Tool Kit (FLTK).
|
// Common browser header file for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -96,7 +96,6 @@ protected:
|
|||||||
FL_EXPORT int handle(int,int,int,int,int);
|
FL_EXPORT int handle(int,int,int,int,int);
|
||||||
|
|
||||||
FL_EXPORT void draw();
|
FL_EXPORT void draw();
|
||||||
FL_EXPORT int handle(int);
|
|
||||||
FL_EXPORT Fl_Browser_(int,int,int,int,const char * = 0);
|
FL_EXPORT Fl_Browser_(int,int,int,int,const char * = 0);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@@ -104,6 +103,7 @@ public:
|
|||||||
Fl_Scrollbar scrollbar; // Vertical scrollbar
|
Fl_Scrollbar scrollbar; // Vertical scrollbar
|
||||||
Fl_Scrollbar hscrollbar; // Horizontal scrollbar
|
Fl_Scrollbar hscrollbar; // Horizontal scrollbar
|
||||||
|
|
||||||
|
FL_EXPORT int handle(int);
|
||||||
FL_EXPORT void resize(int,int,int,int);
|
FL_EXPORT void resize(int,int,int,int);
|
||||||
|
|
||||||
FL_EXPORT int select(void *,int=1,int docallbacks=0);
|
FL_EXPORT int select(void *,int=1,int docallbacks=0);
|
||||||
@@ -146,5 +146,5 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_Browser_.H,v 1.6.2.2 2000/06/05 21:20:20 mike Exp $".
|
// End of "$Id: Fl_Browser_.H,v 1.6.2.3 2000/06/10 19:29:59 carl Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
+3
-3
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_Clock.H,v 1.6.2.2 2000/06/05 21:20:21 mike Exp $"
|
// "$Id: Fl_Clock.H,v 1.6.2.3 2000/06/10 19:29:59 carl Exp $"
|
||||||
//
|
//
|
||||||
// Clock header file for the Fast Light Tool Kit (FLTK).
|
// Clock header file for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -58,8 +58,8 @@ public:
|
|||||||
// a Fl_Clock displays the current time always by using a timeout:
|
// a Fl_Clock displays the current time always by using a timeout:
|
||||||
|
|
||||||
class Fl_Clock : public Fl_Clock_Output {
|
class Fl_Clock : public Fl_Clock_Output {
|
||||||
FL_EXPORT int handle(int);
|
|
||||||
public:
|
public:
|
||||||
|
FL_EXPORT int handle(int);
|
||||||
FL_EXPORT void update();
|
FL_EXPORT void update();
|
||||||
FL_EXPORT Fl_Clock(int x,int y,int w,int h, const char *l = 0);
|
FL_EXPORT Fl_Clock(int x,int y,int w,int h, const char *l = 0);
|
||||||
FL_EXPORT Fl_Clock(uchar t,int x,int y,int w,int h, const char *l);
|
FL_EXPORT Fl_Clock(uchar t,int x,int y,int w,int h, const char *l);
|
||||||
@@ -69,5 +69,5 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_Clock.H,v 1.6.2.2 2000/06/05 21:20:21 mike Exp $".
|
// End of "$Id: Fl_Clock.H,v 1.6.2.3 2000/06/10 19:29:59 carl Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_Color_Chooser.H,v 1.5.2.2 2000/06/05 21:20:21 mike Exp $"
|
// "$Id: Fl_Color_Chooser.H,v 1.5.2.3 2000/06/10 19:29:59 carl Exp $"
|
||||||
//
|
//
|
||||||
// Color chooser header file for the Fast Light Tool Kit (FLTK).
|
// Color chooser header file for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -37,19 +37,21 @@
|
|||||||
#include <FL/Fl_Value_Input.H>
|
#include <FL/Fl_Value_Input.H>
|
||||||
|
|
||||||
class Flcc_HueBox : public Fl_Widget {
|
class Flcc_HueBox : public Fl_Widget {
|
||||||
FL_EXPORT int handle(int);
|
|
||||||
FL_EXPORT void draw();
|
|
||||||
int px, py;
|
int px, py;
|
||||||
|
protected:
|
||||||
|
FL_EXPORT void draw();
|
||||||
public:
|
public:
|
||||||
|
FL_EXPORT int handle(int);
|
||||||
Flcc_HueBox(int X, int Y, int W, int H) : Fl_Widget(X,Y,W,H) {
|
Flcc_HueBox(int X, int Y, int W, int H) : Fl_Widget(X,Y,W,H) {
|
||||||
px = py = 0;}
|
px = py = 0;}
|
||||||
};
|
};
|
||||||
|
|
||||||
class Flcc_ValueBox : public Fl_Widget {
|
class Flcc_ValueBox : public Fl_Widget {
|
||||||
FL_EXPORT int handle(int);
|
|
||||||
FL_EXPORT void draw();
|
|
||||||
int py;
|
int py;
|
||||||
|
protected:
|
||||||
|
FL_EXPORT void draw();
|
||||||
public:
|
public:
|
||||||
|
FL_EXPORT int handle(int);
|
||||||
Flcc_ValueBox(int X, int Y, int W, int H) : Fl_Widget(X,Y,W,H) {
|
Flcc_ValueBox(int X, int Y, int W, int H) : Fl_Widget(X,Y,W,H) {
|
||||||
py = 0;}
|
py = 0;}
|
||||||
};
|
};
|
||||||
@@ -94,5 +96,5 @@ FL_EXPORT int fl_color_chooser(const char* name, uchar& r, uchar& g, uchar& b);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_Color_Chooser.H,v 1.5.2.2 2000/06/05 21:20:21 mike Exp $".
|
// End of "$Id: Fl_Color_Chooser.H,v 1.5.2.3 2000/06/10 19:29:59 carl Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
+4
-3
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_Free.H,v 1.5.2.2 2000/06/05 21:20:23 mike Exp $"
|
// "$Id: Fl_Free.H,v 1.5.2.3 2000/06/10 19:29:59 carl Exp $"
|
||||||
//
|
//
|
||||||
// Forms free header file for the Fast Light Tool Kit (FLTK).
|
// Forms free header file for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -41,9 +41,10 @@ typedef int (*FL_HANDLEPTR)(Fl_Widget *, int , float, float, char);
|
|||||||
class Fl_Free : public Fl_Widget {
|
class Fl_Free : public Fl_Widget {
|
||||||
FL_HANDLEPTR hfunc;
|
FL_HANDLEPTR hfunc;
|
||||||
static FL_EXPORT void step(void *);
|
static FL_EXPORT void step(void *);
|
||||||
|
protected:
|
||||||
FL_EXPORT void draw();
|
FL_EXPORT void draw();
|
||||||
FL_EXPORT int handle(int);
|
|
||||||
public:
|
public:
|
||||||
|
FL_EXPORT int handle(int);
|
||||||
FL_EXPORT Fl_Free(uchar t,int x,int y,int w,int h,const char *l,FL_HANDLEPTR hdl);
|
FL_EXPORT Fl_Free(uchar t,int x,int y,int w,int h,const char *l,FL_HANDLEPTR hdl);
|
||||||
FL_EXPORT ~Fl_Free();
|
FL_EXPORT ~Fl_Free();
|
||||||
};
|
};
|
||||||
@@ -59,5 +60,5 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_Free.H,v 1.5.2.2 2000/06/05 21:20:23 mike Exp $".
|
// End of "$Id: Fl_Free.H,v 1.5.2.3 2000/06/10 19:29:59 carl Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
+3
-3
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_Group.H,v 1.6.2.2 2000/06/05 21:20:23 mike Exp $"
|
// "$Id: Fl_Group.H,v 1.6.2.3 2000/06/10 19:29:59 carl Exp $"
|
||||||
//
|
//
|
||||||
// Group header file for the Fast Light Tool Kit (FLTK).
|
// Group header file for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -44,7 +44,6 @@ class Fl_Group : public Fl_Widget {
|
|||||||
protected:
|
protected:
|
||||||
|
|
||||||
FL_EXPORT void draw();
|
FL_EXPORT void draw();
|
||||||
FL_EXPORT int handle(int);
|
|
||||||
FL_EXPORT void draw_child(Fl_Widget&) const;
|
FL_EXPORT void draw_child(Fl_Widget&) const;
|
||||||
FL_EXPORT void update_child(Fl_Widget&) const;
|
FL_EXPORT void update_child(Fl_Widget&) const;
|
||||||
FL_EXPORT void draw_outside_label(const Fl_Widget&) const ;
|
FL_EXPORT void draw_outside_label(const Fl_Widget&) const ;
|
||||||
@@ -52,6 +51,7 @@ protected:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
FL_EXPORT int handle(int);
|
||||||
void begin() {current_ = this;}
|
void begin() {current_ = this;}
|
||||||
void end() {current_ = (Fl_Group*)parent();}
|
void end() {current_ = (Fl_Group*)parent();}
|
||||||
static Fl_Group *current() {return current_;}
|
static Fl_Group *current() {return current_;}
|
||||||
@@ -96,5 +96,5 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_Group.H,v 1.6.2.2 2000/06/05 21:20:23 mike Exp $".
|
// End of "$Id: Fl_Group.H,v 1.6.2.3 2000/06/10 19:29:59 carl Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
+3
-3
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_Menu_Bar.H,v 1.5.2.2 2000/06/05 21:20:25 mike Exp $"
|
// "$Id: Fl_Menu_Bar.H,v 1.5.2.3 2000/06/10 19:29:59 carl Exp $"
|
||||||
//
|
//
|
||||||
// Menu bar header file for the Fast Light Tool Kit (FLTK).
|
// Menu bar header file for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -30,9 +30,9 @@
|
|||||||
|
|
||||||
class Fl_Menu_Bar : public Fl_Menu_ {
|
class Fl_Menu_Bar : public Fl_Menu_ {
|
||||||
protected:
|
protected:
|
||||||
FL_EXPORT int handle(int);
|
|
||||||
FL_EXPORT void draw();
|
FL_EXPORT void draw();
|
||||||
public:
|
public:
|
||||||
|
FL_EXPORT int handle(int);
|
||||||
Fl_Menu_Bar(int x,int y,int w,int h,const char *l=0)
|
Fl_Menu_Bar(int x,int y,int w,int h,const char *l=0)
|
||||||
: Fl_Menu_(x,y,w,h,l) {}
|
: Fl_Menu_(x,y,w,h,l) {}
|
||||||
};
|
};
|
||||||
@@ -40,5 +40,5 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_Menu_Bar.H,v 1.5.2.2 2000/06/05 21:20:25 mike Exp $".
|
// End of "$Id: Fl_Menu_Bar.H,v 1.5.2.3 2000/06/10 19:29:59 carl Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
+3
-2
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_Roller.H,v 1.5.2.2 2000/06/05 21:20:29 mike Exp $"
|
// "$Id: Fl_Roller.H,v 1.5.2.3 2000/06/10 19:29:59 carl Exp $"
|
||||||
//
|
//
|
||||||
// Roller header file for the Fast Light Tool Kit (FLTK).
|
// Roller header file for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -31,6 +31,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
class Fl_Roller : public Fl_Valuator {
|
class Fl_Roller : public Fl_Valuator {
|
||||||
|
protected:
|
||||||
FL_EXPORT void draw();
|
FL_EXPORT void draw();
|
||||||
public:
|
public:
|
||||||
FL_EXPORT int handle(int);
|
FL_EXPORT int handle(int);
|
||||||
@@ -40,5 +41,5 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_Roller.H,v 1.5.2.2 2000/06/05 21:20:29 mike Exp $".
|
// End of "$Id: Fl_Roller.H,v 1.5.2.3 2000/06/10 19:29:59 carl Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
+5
-4
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_Scrollbar.H,v 1.5.2.2 2000/06/05 21:20:29 mike Exp $"
|
// "$Id: Fl_Scrollbar.H,v 1.5.2.3 2000/06/10 19:30:00 carl Exp $"
|
||||||
//
|
//
|
||||||
// Scroll bar header file for the Fast Light Tool Kit (FLTK).
|
// Scroll bar header file for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -32,14 +32,15 @@ class Fl_Scrollbar : public Fl_Slider {
|
|||||||
|
|
||||||
int linesize_;
|
int linesize_;
|
||||||
int pushed_;
|
int pushed_;
|
||||||
FL_EXPORT void draw();
|
|
||||||
FL_EXPORT int handle(int);
|
|
||||||
static FL_EXPORT void timeout_cb(void*);
|
static FL_EXPORT void timeout_cb(void*);
|
||||||
FL_EXPORT void increment_cb();
|
FL_EXPORT void increment_cb();
|
||||||
|
protected:
|
||||||
|
FL_EXPORT void draw();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
FL_EXPORT Fl_Scrollbar(int x,int y,int w,int h, const char *l = 0);
|
FL_EXPORT Fl_Scrollbar(int x,int y,int w,int h, const char *l = 0);
|
||||||
|
FL_EXPORT int handle(int);
|
||||||
|
|
||||||
int value() {return int(Fl_Slider::value());}
|
int value() {return int(Fl_Slider::value());}
|
||||||
int value(int position, int size, int top, int total) {
|
int value(int position, int size, int top, int total) {
|
||||||
@@ -53,5 +54,5 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_Scrollbar.H,v 1.5.2.2 2000/06/05 21:20:29 mike Exp $".
|
// End of "$Id: Fl_Scrollbar.H,v 1.5.2.3 2000/06/10 19:30:00 carl Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
+5
-3
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_Tabs.H,v 1.5.2.2 2000/06/05 21:20:30 mike Exp $"
|
// "$Id: Fl_Tabs.H,v 1.5.2.3 2000/06/10 19:30:00 carl Exp $"
|
||||||
//
|
//
|
||||||
// Tab header file for the Fast Light Tool Kit (FLTK).
|
// Tab header file for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -31,10 +31,12 @@
|
|||||||
class Fl_Tabs : public Fl_Group {
|
class Fl_Tabs : public Fl_Group {
|
||||||
Fl_Widget *value_;
|
Fl_Widget *value_;
|
||||||
Fl_Widget *push_;
|
Fl_Widget *push_;
|
||||||
FL_EXPORT void draw();
|
|
||||||
FL_EXPORT int tab_positions(int*, int*);
|
FL_EXPORT int tab_positions(int*, int*);
|
||||||
FL_EXPORT int tab_height();
|
FL_EXPORT int tab_height();
|
||||||
FL_EXPORT void draw_tab(int x1, int x2, int W, int H, Fl_Widget* o, int sel=0);
|
FL_EXPORT void draw_tab(int x1, int x2, int W, int H, Fl_Widget* o, int sel=0);
|
||||||
|
protected:
|
||||||
|
FL_EXPORT void draw();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
FL_EXPORT int handle(int);
|
FL_EXPORT int handle(int);
|
||||||
FL_EXPORT Fl_Widget *value();
|
FL_EXPORT Fl_Widget *value();
|
||||||
@@ -48,5 +50,5 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_Tabs.H,v 1.5.2.2 2000/06/05 21:20:30 mike Exp $".
|
// End of "$Id: Fl_Tabs.H,v 1.5.2.3 2000/06/10 19:30:00 carl Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
+11
-9
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_Gl_Window.cxx,v 1.12.2.14 2000/06/10 18:24:30 bill Exp $"
|
// "$Id: Fl_Gl_Window.cxx,v 1.12.2.15 2000/06/10 19:30:01 carl Exp $"
|
||||||
//
|
//
|
||||||
// OpenGL window code for the Fast Light Tool Kit (FLTK).
|
// OpenGL window code for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -53,11 +53,11 @@
|
|||||||
#define COPY 2 // unchanged
|
#define COPY 2 // unchanged
|
||||||
#define NODAMAGE 3 // unchanged even by X expose() events
|
#define NODAMAGE 3 // unchanged even by X expose() events
|
||||||
|
|
||||||
#ifdef MESA
|
//#ifdef MESA
|
||||||
#define SWAP_TYPE NODAMAGE
|
//#define SWAP_TYPE NODAMAGE
|
||||||
#else
|
//#else
|
||||||
#define SWAP_TYPE SWAP
|
#define SWAP_TYPE SWAP
|
||||||
#endif
|
//#endif
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@@ -292,9 +292,11 @@ void Fl_Gl_Window::hide() {
|
|||||||
glXDestroyContext(fl_display, (GLXContext)context);
|
glXDestroyContext(fl_display, (GLXContext)context);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#ifdef GLX_MESA_release_buffers
|
// This causes incompatibility with some OpenGL libraries
|
||||||
glXReleaseBuffersMESA(fl_display, fl_xid(this));
|
// I don't think this is not necessary in any case, right?
|
||||||
#endif
|
//#ifdef GLX_MESA_release_buffers
|
||||||
|
// glXReleaseBuffersMESA(fl_display, fl_xid(this));
|
||||||
|
//#endif
|
||||||
context = 0;
|
context = 0;
|
||||||
}
|
}
|
||||||
#if HAVE_GL_OVERLAY && defined(_WIN32)
|
#if HAVE_GL_OVERLAY && defined(_WIN32)
|
||||||
@@ -327,5 +329,5 @@ void Fl_Gl_Window::draw_overlay() {}
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_Gl_Window.cxx,v 1.12.2.14 2000/06/10 18:24:30 bill Exp $".
|
// End of "$Id: Fl_Gl_Window.cxx,v 1.12.2.15 2000/06/10 19:30:01 carl Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
Reference in New Issue
Block a user