Skip to content

Commit

Permalink
Made sure all draw()s were protected and all handle()s were public. (…
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
Carl E. Thompson committed Jun 10, 2000
1 parent 8e5c8b5 commit b3d9c22
Show file tree
Hide file tree
Showing 11 changed files with 51 additions and 41 deletions.
5 changes: 3 additions & 2 deletions FL/Fl_Box.H
@@ -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).
//
Expand Down Expand Up @@ -31,6 +31,7 @@
#endif

class Fl_Box : public Fl_Widget {
protected:
FL_EXPORT void draw();
public:
FL_EXPORT Fl_Box(int x, int y, int w, int h, const char *l=0)
Expand All @@ -42,5 +43,5 @@ public:
#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 $".
//
6 changes: 3 additions & 3 deletions FL/Fl_Browser_.H
@@ -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).
//
Expand Down Expand Up @@ -96,14 +96,14 @@ protected:
FL_EXPORT int handle(int,int,int,int,int);

FL_EXPORT void draw();
FL_EXPORT int handle(int);
FL_EXPORT Fl_Browser_(int,int,int,int,const char * = 0);

public:

Fl_Scrollbar scrollbar; // Vertical scrollbar
Fl_Scrollbar hscrollbar; // Horizontal scrollbar

FL_EXPORT int handle(int);
FL_EXPORT void resize(int,int,int,int);

FL_EXPORT int select(void *,int=1,int docallbacks=0);
Expand Down Expand Up @@ -146,5 +146,5 @@ public:
#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 $".
//
6 changes: 3 additions & 3 deletions FL/Fl_Clock.H
@@ -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).
//
Expand Down Expand Up @@ -58,8 +58,8 @@ public:
// a Fl_Clock displays the current time always by using a timeout:

class Fl_Clock : public Fl_Clock_Output {
FL_EXPORT int handle(int);
public:
FL_EXPORT int handle(int);
FL_EXPORT void update();
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);
Expand All @@ -69,5 +69,5 @@ public:
#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 $".
//
14 changes: 8 additions & 6 deletions FL/Fl_Color_Chooser.H
@@ -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).
//
Expand Down Expand Up @@ -37,19 +37,21 @@
#include <FL/Fl_Value_Input.H>

class Flcc_HueBox : public Fl_Widget {
FL_EXPORT int handle(int);
FL_EXPORT void draw();
int px, py;
protected:
FL_EXPORT void draw();
public:
FL_EXPORT int handle(int);
Flcc_HueBox(int X, int Y, int W, int H) : Fl_Widget(X,Y,W,H) {
px = py = 0;}
};

class Flcc_ValueBox : public Fl_Widget {
FL_EXPORT int handle(int);
FL_EXPORT void draw();
int py;
protected:
FL_EXPORT void draw();
public:
FL_EXPORT int handle(int);
Flcc_ValueBox(int X, int Y, int W, int H) : Fl_Widget(X,Y,W,H) {
py = 0;}
};
Expand Down Expand Up @@ -94,5 +96,5 @@ FL_EXPORT int fl_color_chooser(const char* name, uchar& r, uchar& g, uchar& b);
#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 $".
//
7 changes: 4 additions & 3 deletions FL/Fl_Free.H
@@ -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).
//
Expand Down Expand Up @@ -41,9 +41,10 @@ typedef int (*FL_HANDLEPTR)(Fl_Widget *, int , float, float, char);
class Fl_Free : public Fl_Widget {
FL_HANDLEPTR hfunc;
static FL_EXPORT void step(void *);
protected:
FL_EXPORT void draw();
FL_EXPORT int handle(int);
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();
};
Expand All @@ -59,5 +60,5 @@ public:
#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 $".
//
6 changes: 3 additions & 3 deletions FL/Fl_Group.H
@@ -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).
//
Expand Down Expand Up @@ -44,14 +44,14 @@ class Fl_Group : public Fl_Widget {
protected:

FL_EXPORT void draw();
FL_EXPORT int handle(int);
FL_EXPORT void draw_child(Fl_Widget&) const;
FL_EXPORT void update_child(Fl_Widget&) const;
FL_EXPORT void draw_outside_label(const Fl_Widget&) const ;
FL_EXPORT short* sizes();

public:

FL_EXPORT int handle(int);
void begin() {current_ = this;}
void end() {current_ = (Fl_Group*)parent();}
static Fl_Group *current() {return current_;}
Expand Down Expand Up @@ -96,5 +96,5 @@ public:
#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 $".
//
6 changes: 3 additions & 3 deletions FL/Fl_Menu_Bar.H
@@ -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).
//
Expand Down Expand Up @@ -30,15 +30,15 @@

class Fl_Menu_Bar : public Fl_Menu_ {
protected:
FL_EXPORT int handle(int);
FL_EXPORT void draw();
public:
FL_EXPORT int handle(int);
Fl_Menu_Bar(int x,int y,int w,int h,const char *l=0)
: Fl_Menu_(x,y,w,h,l) {}
};

#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 $".
//
5 changes: 3 additions & 2 deletions FL/Fl_Roller.H
@@ -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).
//
Expand Down Expand Up @@ -31,6 +31,7 @@
#endif

class Fl_Roller : public Fl_Valuator {
protected:
FL_EXPORT void draw();
public:
FL_EXPORT int handle(int);
Expand All @@ -40,5 +41,5 @@ public:
#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 $".
//
9 changes: 5 additions & 4 deletions FL/Fl_Scrollbar.H
@@ -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).
//
Expand Down Expand Up @@ -32,14 +32,15 @@ class Fl_Scrollbar : public Fl_Slider {

int linesize_;
int pushed_;
FL_EXPORT void draw();
FL_EXPORT int handle(int);
static FL_EXPORT void timeout_cb(void*);
FL_EXPORT void increment_cb();
protected:
FL_EXPORT void draw();

public:

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(int position, int size, int top, int total) {
Expand All @@ -53,5 +54,5 @@ public:
#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 $".
//
8 changes: 5 additions & 3 deletions FL/Fl_Tabs.H
@@ -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).
//
Expand Down Expand Up @@ -31,10 +31,12 @@
class Fl_Tabs : public Fl_Group {
Fl_Widget *value_;
Fl_Widget *push_;
FL_EXPORT void draw();
FL_EXPORT int tab_positions(int*, int*);
FL_EXPORT int tab_height();
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:
FL_EXPORT int handle(int);
FL_EXPORT Fl_Widget *value();
Expand All @@ -48,5 +50,5 @@ public:
#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 $".
//
20 changes: 11 additions & 9 deletions src/Fl_Gl_Window.cxx
@@ -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).
//
Expand Down Expand Up @@ -53,11 +53,11 @@
#define COPY 2 // unchanged
#define NODAMAGE 3 // unchanged even by X expose() events

#ifdef MESA
#define SWAP_TYPE NODAMAGE
#else
//#ifdef MESA
//#define SWAP_TYPE NODAMAGE
//#else
#define SWAP_TYPE SWAP
#endif
//#endif

////////////////////////////////////////////////////////////////

Expand Down Expand Up @@ -292,9 +292,11 @@ void Fl_Gl_Window::hide() {
glXDestroyContext(fl_display, (GLXContext)context);
#endif
}
#ifdef GLX_MESA_release_buffers
glXReleaseBuffersMESA(fl_display, fl_xid(this));
#endif
// This causes incompatibility with some OpenGL libraries
// I don't think this is not necessary in any case, right?
//#ifdef GLX_MESA_release_buffers
// glXReleaseBuffersMESA(fl_display, fl_xid(this));
//#endif
context = 0;
}
#if HAVE_GL_OVERLAY && defined(_WIN32)
Expand Down Expand Up @@ -327,5 +329,5 @@ void Fl_Gl_Window::draw_overlay() {}
#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 $".
//

0 comments on commit b3d9c22

Please sign in to comment.