More shadow variable changes...

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2567 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Michael R Sweet
2002-08-09 03:17:30 +00:00
parent a6b935289e
commit 050919103f
56 changed files with 653 additions and 654 deletions
+4 -4
View File
@@ -1,5 +1,5 @@
//
// "$Id: Fl_Float_Input.H,v 1.4.2.3.2.1 2002/01/01 15:11:27 easysw Exp $"
// "$Id: Fl_Float_Input.H,v 1.4.2.3.2.2 2002/08/09 03:17:29 easysw Exp $"
//
// Floating point input header file for the Fast Light Tool Kit (FLTK).
//
@@ -30,12 +30,12 @@
class Fl_Float_Input : public Fl_Input {
public:
Fl_Float_Input(int x,int y,int w,int h,const char *l = 0)
: Fl_Input(x,y,w,h,l) {type(FL_FLOAT_INPUT);}
Fl_Float_Input(int X,int Y,int W,int H,const char *l = 0)
: Fl_Input(X,Y,W,H,l) {type(FL_FLOAT_INPUT);}
};
#endif
//
// End of "$Id: Fl_Float_Input.H,v 1.4.2.3.2.1 2002/01/01 15:11:27 easysw Exp $".
// End of "$Id: Fl_Float_Input.H,v 1.4.2.3.2.2 2002/08/09 03:17:29 easysw Exp $".
//
+5 -5
View File
@@ -1,5 +1,5 @@
//
// "$Id: Fl_Gl_Window.H,v 1.7.2.5.2.1 2002/01/01 15:11:27 easysw Exp $"
// "$Id: Fl_Gl_Window.H,v 1.7.2.5.2.2 2002/08/09 03:17:29 easysw Exp $"
//
// OpenGL header file for the Fast Light Tool Kit (FLTK).
//
@@ -60,11 +60,11 @@ public:
FL_EXPORT void resize(int,int,int,int);
char valid() const {return valid_;}
void valid(char i) {valid_ = i;}
void valid(char v) {valid_ = v;}
FL_EXPORT void invalidate();
static int can_do(int i) {return can_do(i,0);}
static int can_do(const int *i) {return can_do(0, i);}
static int can_do(int m) {return can_do(m,0);}
static int can_do(const int *m) {return can_do(0, m);}
int can_do() {return can_do(mode_,alist);}
Fl_Mode mode() const {return (Fl_Mode)mode_;}
int mode(int a) {return mode(a,0);}
@@ -90,5 +90,5 @@ public:
#endif
//
// End of "$Id: Fl_Gl_Window.H,v 1.7.2.5.2.1 2002/01/01 15:11:27 easysw Exp $".
// End of "$Id: Fl_Gl_Window.H,v 1.7.2.5.2.2 2002/08/09 03:17:29 easysw Exp $".
//
+4 -4
View File
@@ -1,5 +1,5 @@
//
// "$Id: Fl_Hor_Slider.H,v 1.4.2.3.2.1 2002/01/01 15:11:27 easysw Exp $"
// "$Id: Fl_Hor_Slider.H,v 1.4.2.3.2.2 2002/08/09 03:17:29 easysw Exp $"
//
// Horizontal slider header file for the Fast Light Tool Kit (FLTK).
//
@@ -30,12 +30,12 @@
class Fl_Hor_Slider : public Fl_Slider {
public:
Fl_Hor_Slider(int x,int y,int w,int h,const char *l=0)
: Fl_Slider(x,y,w,h,l) {type(FL_HOR_SLIDER);}
Fl_Hor_Slider(int X,int Y,int W,int H,const char *l=0)
: Fl_Slider(X,Y,W,H,l) {type(FL_HOR_SLIDER);}
};
#endif
//
// End of "$Id: Fl_Hor_Slider.H,v 1.4.2.3.2.1 2002/01/01 15:11:27 easysw Exp $".
// End of "$Id: Fl_Hor_Slider.H,v 1.4.2.3.2.2 2002/08/09 03:17:29 easysw Exp $".
//
+4 -4
View File
@@ -1,5 +1,5 @@
//
// "$Id: Fl_Hor_Value_Slider.H,v 1.4.2.3.2.1 2002/01/01 15:11:27 easysw Exp $"
// "$Id: Fl_Hor_Value_Slider.H,v 1.4.2.3.2.2 2002/08/09 03:17:29 easysw Exp $"
//
// Horizontal value slider header file for the Fast Light Tool Kit (FLTK).
//
@@ -30,12 +30,12 @@
class Fl_Hor_Value_Slider : public Fl_Value_Slider {
public:
Fl_Hor_Value_Slider(int x,int y,int w,int h,const char *l=0)
: Fl_Value_Slider(x,y,w,h,l) {type(FL_HOR_SLIDER);}
Fl_Hor_Value_Slider(int X,int Y,int W,int H,const char *l=0)
: Fl_Value_Slider(X,Y,W,H,l) {type(FL_HOR_SLIDER);}
};
#endif
//
// End of "$Id: Fl_Hor_Value_Slider.H,v 1.4.2.3.2.1 2002/01/01 15:11:27 easysw Exp $".
// End of "$Id: Fl_Hor_Value_Slider.H,v 1.4.2.3.2.2 2002/08/09 03:17:29 easysw Exp $".
//
+4 -4
View File
@@ -1,5 +1,5 @@
//
// "$Id: Fl_Int_Input.H,v 1.4.2.3.2.1 2002/01/01 15:11:27 easysw Exp $"
// "$Id: Fl_Int_Input.H,v 1.4.2.3.2.2 2002/08/09 03:17:29 easysw Exp $"
//
// Integer input header file for the Fast Light Tool Kit (FLTK).
//
@@ -30,12 +30,12 @@
class Fl_Int_Input : public Fl_Input {
public:
Fl_Int_Input(int x,int y,int w,int h,const char *l = 0)
: Fl_Input(x,y,w,h,l) {type(FL_INT_INPUT);}
Fl_Int_Input(int X,int Y,int W,int H,const char *l = 0)
: Fl_Input(X,Y,W,H,l) {type(FL_INT_INPUT);}
};
#endif
//
// End of "$Id: Fl_Int_Input.H,v 1.4.2.3.2.1 2002/01/01 15:11:27 easysw Exp $".
// End of "$Id: Fl_Int_Input.H,v 1.4.2.3.2.2 2002/08/09 03:17:29 easysw Exp $".
//
+4 -4
View File
@@ -1,5 +1,5 @@
//
// "$Id: Fl_Multiline_Input.H,v 1.4.2.3.2.1 2002/01/01 15:11:28 easysw Exp $"
// "$Id: Fl_Multiline_Input.H,v 1.4.2.3.2.2 2002/08/09 03:17:29 easysw Exp $"
//
// Multiline input header file for the Fast Light Tool Kit (FLTK).
//
@@ -30,12 +30,12 @@
class Fl_Multiline_Input : public Fl_Input {
public:
Fl_Multiline_Input(int x,int y,int w,int h,const char *l = 0)
: Fl_Input(x,y,w,h,l) {type(FL_MULTILINE_INPUT);}
Fl_Multiline_Input(int X,int Y,int W,int H,const char *l = 0)
: Fl_Input(X,Y,W,H,l) {type(FL_MULTILINE_INPUT);}
};
#endif
//
// End of "$Id: Fl_Multiline_Input.H,v 1.4.2.3.2.1 2002/01/01 15:11:28 easysw Exp $".
// End of "$Id: Fl_Multiline_Input.H,v 1.4.2.3.2.2 2002/08/09 03:17:29 easysw Exp $".
//
+4 -4
View File
@@ -1,5 +1,5 @@
//
// "$Id: Fl_Multiline_Output.H,v 1.4.2.3.2.2 2002/04/11 11:52:41 easysw Exp $"
// "$Id: Fl_Multiline_Output.H,v 1.4.2.3.2.3 2002/08/09 03:17:29 easysw Exp $"
//
// Multi line output header file for the Fast Light Tool Kit (FLTK).
//
@@ -30,12 +30,12 @@
class Fl_Multiline_Output : public Fl_Output {
public:
Fl_Multiline_Output(int x,int y,int w,int h,const char *l = 0)
: Fl_Output(x,y,w,h,l) {type(FL_MULTILINE_OUTPUT);}
Fl_Multiline_Output(int X,int Y,int W,int H,const char *l = 0)
: Fl_Output(X,Y,W,H,l) {type(FL_MULTILINE_OUTPUT);}
};
#endif
//
// End of "$Id: Fl_Multiline_Output.H,v 1.4.2.3.2.2 2002/04/11 11:52:41 easysw Exp $".
// End of "$Id: Fl_Multiline_Output.H,v 1.4.2.3.2.3 2002/08/09 03:17:29 easysw Exp $".
//
+4 -4
View File
@@ -1,5 +1,5 @@
//
// "$Id: Fl_Output.H,v 1.5.2.3.2.2 2002/04/11 11:52:41 easysw Exp $"
// "$Id: Fl_Output.H,v 1.5.2.3.2.3 2002/08/09 03:17:29 easysw Exp $"
//
// Output header file for the Fast Light Tool Kit (FLTK).
//
@@ -30,12 +30,12 @@
class Fl_Output : public Fl_Input {
public:
Fl_Output(int x, int y, int w, int h, const char *l = 0)
: Fl_Input(x, y, w, h, l) {type(FL_NORMAL_OUTPUT);}
Fl_Output(int X,int Y,int W,int H, const char *l = 0)
: Fl_Input(X, Y, W, H, l) {type(FL_NORMAL_OUTPUT);}
};
#endif
//
// End of "$Id: Fl_Output.H,v 1.5.2.3.2.2 2002/04/11 11:52:41 easysw Exp $".
// End of "$Id: Fl_Output.H,v 1.5.2.3.2.3 2002/08/09 03:17:29 easysw Exp $".
//
+4 -4
View File
@@ -1,5 +1,5 @@
//
// "$Id: Fl_Radio_Light_Button.H,v 1.4.2.3.2.1 2002/01/01 15:11:28 easysw Exp $"
// "$Id: Fl_Radio_Light_Button.H,v 1.4.2.3.2.2 2002/08/09 03:17:29 easysw Exp $"
//
// Radio light button header file for the Fast Light Tool Kit (FLTK).
//
@@ -29,12 +29,12 @@
class Fl_Radio_Light_Button : public Fl_Light_Button {
public:
Fl_Radio_Light_Button(int x,int y,int w,int h,const char *l=0)
: Fl_Light_Button(x,y,w,h,l) {type(FL_RADIO_BUTTON);}
Fl_Radio_Light_Button(int X,int Y,int W,int H,const char *l=0)
: Fl_Light_Button(X,Y,W,H,l) {type(FL_RADIO_BUTTON);}
};
#endif
//
// End of "$Id: Fl_Radio_Light_Button.H,v 1.4.2.3.2.1 2002/01/01 15:11:28 easysw Exp $".
// End of "$Id: Fl_Radio_Light_Button.H,v 1.4.2.3.2.2 2002/08/09 03:17:29 easysw Exp $".
//
+4 -4
View File
@@ -1,5 +1,5 @@
//
// "$Id: Fl_Repeat_Button.H,v 1.5.2.5.2.1 2002/01/01 15:11:28 easysw Exp $"
// "$Id: Fl_Repeat_Button.H,v 1.5.2.5.2.2 2002/08/09 03:17:29 easysw Exp $"
//
// Repeat button header file for the Fast Light Tool Kit (FLTK).
//
@@ -32,8 +32,8 @@ class Fl_Repeat_Button : public Fl_Button {
static FL_EXPORT void repeat_callback(void *);
public:
FL_EXPORT int handle(int);
Fl_Repeat_Button(int x,int y,int w,int h,const char *l=0)
: Fl_Button(x,y,w,h,l) {}
Fl_Repeat_Button(int X,int Y,int W,int H,const char *l=0)
: Fl_Button(X,Y,W,H,l) {}
void deactivate() {
Fl::remove_timeout(repeat_callback,this);
Fl_Button::deactivate();
@@ -43,5 +43,5 @@ public:
#endif
//
// End of "$Id: Fl_Repeat_Button.H,v 1.5.2.5.2.1 2002/01/01 15:11:28 easysw Exp $".
// End of "$Id: Fl_Repeat_Button.H,v 1.5.2.5.2.2 2002/08/09 03:17:29 easysw Exp $".
//
+4 -4
View File
@@ -1,5 +1,5 @@
//
// "$Id: Fl_Secret_Input.H,v 1.4.2.3.2.1 2002/01/01 15:11:28 easysw Exp $"
// "$Id: Fl_Secret_Input.H,v 1.4.2.3.2.2 2002/08/09 03:17:29 easysw Exp $"
//
// Secret input header file for the Fast Light Tool Kit (FLTK).
//
@@ -30,12 +30,12 @@
class Fl_Secret_Input : public Fl_Input {
public:
Fl_Secret_Input(int x,int y,int w,int h,const char *l = 0)
: Fl_Input(x,y,w,h,l) {type(FL_SECRET_INPUT);}
Fl_Secret_Input(int X,int Y,int W,int H,const char *l = 0)
: Fl_Input(X,Y,W,H,l) {type(FL_SECRET_INPUT);}
};
#endif
//
// End of "$Id: Fl_Secret_Input.H,v 1.4.2.3.2.1 2002/01/01 15:11:28 easysw Exp $".
// End of "$Id: Fl_Secret_Input.H,v 1.4.2.3.2.2 2002/08/09 03:17:29 easysw Exp $".
//
+4 -4
View File
@@ -1,5 +1,5 @@
//
// "$Id: Fl_Select_Browser.H,v 1.4.2.3.2.1 2002/01/01 15:11:28 easysw Exp $"
// "$Id: Fl_Select_Browser.H,v 1.4.2.3.2.2 2002/08/09 03:17:29 easysw Exp $"
//
// Select browser header file for the Fast Light Tool Kit (FLTK).
//
@@ -30,12 +30,12 @@
class Fl_Select_Browser : public Fl_Browser {
public:
Fl_Select_Browser(int x,int y,int w,int h,const char *l=0)
: Fl_Browser(x,y,w,h,l) {type(FL_SELECT_BROWSER);}
Fl_Select_Browser(int X,int Y,int W,int H,const char *l=0)
: Fl_Browser(X,Y,W,H,l) {type(FL_SELECT_BROWSER);}
};
#endif
//
// End of "$Id: Fl_Select_Browser.H,v 1.4.2.3.2.1 2002/01/01 15:11:28 easysw Exp $".
// End of "$Id: Fl_Select_Browser.H,v 1.4.2.3.2.2 2002/08/09 03:17:29 easysw Exp $".
//
+3 -3
View File
@@ -1,5 +1,5 @@
//
// "$Id: Fl_Text_Buffer.H,v 1.3.2.3 2002/06/09 13:35:49 easysw Exp $"
// "$Id: Fl_Text_Buffer.H,v 1.3.2.4 2002/08/09 03:17:29 easysw Exp $"
//
// Header file for Fl_Text_Buffer class.
//
@@ -78,7 +78,7 @@ class FL_EXPORT Fl_Text_Buffer {
char character(int pos);
char* text_in_rectangle(int start, int end, int rectStart, int rectEnd);
void insert(int pos, const char* text);
void append(const char* text) { insert(length(), text); }
void append(const char* t) { insert(length(), t); }
void remove(int start, int end);
void replace(int start, int end, const char *text);
void copy(Fl_Text_Buffer* fromBuf, int fromStart, int fromEnd, int toPos);
@@ -238,5 +238,5 @@ class FL_EXPORT Fl_Text_Buffer {
#endif
//
// End of "$Id: Fl_Text_Buffer.H,v 1.3.2.3 2002/06/09 13:35:49 easysw Exp $".
// End of "$Id: Fl_Text_Buffer.H,v 1.3.2.4 2002/08/09 03:17:29 easysw Exp $".
//
+3 -3
View File
@@ -1,5 +1,5 @@
//
// "$Id: Fl_Text_Display.H,v 1.4.2.9 2002/08/05 18:03:58 easysw Exp $"
// "$Id: Fl_Text_Display.H,v 1.4.2.10 2002/08/09 03:17:29 easysw Exp $"
//
// Header file for Fl_Text_Display class.
//
@@ -95,7 +95,7 @@ class Fl_Text_Display: public Fl_Group {
FL_EXPORT void cursor_style(int style);
int scrollbar_width() { return scrollbar_width_; }
Fl_Align scrollbar_align() { return scrollbar_align_; }
void scrollbar_width(int w) { scrollbar_width_ = w; }
void scrollbar_width(int W) { scrollbar_width_ = W; }
void scrollbar_align(Fl_Align a) { scrollbar_align_ = a; }
int word_start(int pos) { return buffer()->word_start(pos); }
int word_end(int pos) { return buffer()->word_end(pos); }
@@ -243,5 +243,5 @@ class Fl_Text_Display: public Fl_Group {
#endif
//
// End of "$Id: Fl_Text_Display.H,v 1.4.2.9 2002/08/05 18:03:58 easysw Exp $".
// End of "$Id: Fl_Text_Display.H,v 1.4.2.10 2002/08/09 03:17:29 easysw Exp $".
//
+4 -4
View File
@@ -1,5 +1,5 @@
//
// "$Id: Fl_Toggle_Button.H,v 1.4.2.3.2.1 2002/01/01 15:11:28 easysw Exp $"
// "$Id: Fl_Toggle_Button.H,v 1.4.2.3.2.2 2002/08/09 03:17:29 easysw Exp $"
//
// Toggle button header file for the Fast Light Tool Kit (FLTK).
//
@@ -30,12 +30,12 @@
class Fl_Toggle_Button : public Fl_Button {
public:
Fl_Toggle_Button(int x,int y,int w,int h,const char *l=0)
: Fl_Button(x,y,w,h,l) {type(FL_TOGGLE_BUTTON);}
Fl_Toggle_Button(int X,int Y,int W,int H,const char *l=0)
: Fl_Button(X,Y,W,H,l) {type(FL_TOGGLE_BUTTON);}
};
#endif
//
// End of "$Id: Fl_Toggle_Button.H,v 1.4.2.3.2.1 2002/01/01 15:11:28 easysw Exp $".
// End of "$Id: Fl_Toggle_Button.H,v 1.4.2.3.2.2 2002/08/09 03:17:29 easysw Exp $".
//
+3 -3
View File
@@ -1,5 +1,5 @@
//
// "$Id: Fl_Value_Output.H,v 1.5.2.3.2.2 2002/01/01 15:11:28 easysw Exp $"
// "$Id: Fl_Value_Output.H,v 1.5.2.3.2.3 2002/08/09 03:17:29 easysw Exp $"
//
// Value output header file for the Fast Light Tool Kit (FLTK).
//
@@ -38,7 +38,7 @@ public:
FL_EXPORT void draw();
FL_EXPORT Fl_Value_Output(int x,int y,int w,int h,const char *l=0);
void soft(uchar x) {soft_ = x;}
void soft(uchar s) {soft_ = s;}
uchar soft() const {return soft_;}
Fl_Font textfont() const {return (Fl_Font)textfont_;}
@@ -52,5 +52,5 @@ public:
#endif
//
// End of "$Id: Fl_Value_Output.H,v 1.5.2.3.2.2 2002/01/01 15:11:28 easysw Exp $".
// End of "$Id: Fl_Value_Output.H,v 1.5.2.3.2.3 2002/08/09 03:17:29 easysw Exp $".
//
+4 -4
View File
@@ -1,5 +1,5 @@
//
// "$Id: forms.H,v 1.7.2.7.2.4 2002/03/25 21:08:41 easysw Exp $"
// "$Id: forms.H,v 1.7.2.7.2.5 2002/08/09 03:17:29 easysw Exp $"
//
// Forms emulation header file for the Fast Light Tool Kit (FLTK).
//
@@ -812,8 +812,8 @@ class Fl_FormsText : public Fl_Widget {
protected:
FL_EXPORT void draw();
public:
Fl_FormsText(Fl_Boxtype b, int x, int y, int w, int h, const char* l=0)
: Fl_Widget(x,y,w,h,l) {box(b); align(FL_ALIGN_LEFT);}
Fl_FormsText(Fl_Boxtype b, int X, int Y, int W, int H, const char* l=0)
: Fl_Widget(X,Y,W,H,l) {box(b); align(FL_ALIGN_LEFT);}
};
#define FL_NORMAL_TEXT FL_NO_BOX
forms_constructorb(Fl_FormsText, fl_add_text)
@@ -838,5 +838,5 @@ inline void fl_draw() {Fl::flush();}
#endif /* define __FORMS_H__ */
//
// End of "$Id: forms.H,v 1.7.2.7.2.4 2002/03/25 21:08:41 easysw Exp $".
// End of "$Id: forms.H,v 1.7.2.7.2.5 2002/08/09 03:17:29 easysw Exp $".
//
+42 -42
View File
@@ -1,5 +1,5 @@
//
// "$Id: Fl_Gl_Choice.cxx,v 1.5.2.7.2.10 2002/04/13 20:28:51 easysw Exp $"
// "$Id: Fl_Gl_Choice.cxx,v 1.5.2.7.2.11 2002/08/09 03:17:29 easysw Exp $"
//
// OpenGL visual selection code for the Fast Light Tool Kit (FLTK).
//
@@ -40,52 +40,52 @@ static Fl_Gl_Choice *first;
// this assummes one of the two arguments is zero:
// We keep the list system in Win32 to stay compatible and interpret
// the list later...
Fl_Gl_Choice *Fl_Gl_Choice::find(int mode, const int *alist) {
Fl_Gl_Choice *Fl_Gl_Choice::find(int m, const int *alistp) {
Fl_Gl_Choice *g;
for (g = first; g; g = g->next)
if (g->mode == mode && g->alist == alist)
if (g->mode == m && g->alist == alistp)
return g;
#ifdef __APPLE__
const int *blist;
int list[32];
if (alist)
blist = alist;
if (alistp)
blist = alistp;
else {
int n = 0;
if (mode & FL_INDEX) {
if (m & FL_INDEX) {
list[n++] = AGL_BUFFER_SIZE;
list[n++] = 8; // glut tries many sizes, but this should work...
} else {
list[n++] = AGL_RGBA;
list[n++] = AGL_GREEN_SIZE;
list[n++] = (mode & FL_RGB8) ? 8 : 1;
if (mode & FL_ALPHA) {
list[n++] = (m & FL_RGB8) ? 8 : 1;
if (m & FL_ALPHA) {
list[n++] = AGL_ALPHA_SIZE;
list[n++] = 1;
}
if (mode & FL_ACCUM) {
if (m & FL_ACCUM) {
list[n++] = AGL_ACCUM_GREEN_SIZE;
list[n++] = 1;
if (mode & FL_ALPHA) {
if (m & FL_ALPHA) {
list[n++] = AGL_ACCUM_ALPHA_SIZE;
list[n++] = 1;
}
}
}
if (mode & FL_DOUBLE) {
if (m & FL_DOUBLE) {
list[n++] = AGL_DOUBLEBUFFER;
}
if (mode & FL_DEPTH) {
if (m & FL_DEPTH) {
list[n++] = AGL_DEPTH_SIZE; list[n++] = 16;
}
if (mode & FL_STENCIL) {
if (m & FL_STENCIL) {
list[n++] = AGL_STENCIL_SIZE; list[n++] = 1;
}
# ifdef AGL_STEREO /* is there such a thing as AGL_STEREO? */
if (mode & FL_STEREO) {
if (m & FL_STEREO) {
list[n++] = AGL_STEREO;
}
# endif
@@ -101,44 +101,44 @@ Fl_Gl_Choice *Fl_Gl_Choice::find(int mode, const int *alist) {
const int *blist;
int list[32];
if (alist)
blist = alist;
if (alistp)
blist = alistp;
else {
int n = 0;
if (mode & FL_INDEX) {
if (m & FL_INDEX) {
list[n++] = GLX_BUFFER_SIZE;
list[n++] = 8; // glut tries many sizes, but this should work...
} else {
list[n++] = GLX_RGBA;
list[n++] = GLX_GREEN_SIZE;
list[n++] = (mode & FL_RGB8) ? 8 : 1;
if (mode & FL_ALPHA) {
list[n++] = (m & FL_RGB8) ? 8 : 1;
if (m & FL_ALPHA) {
list[n++] = GLX_ALPHA_SIZE;
list[n++] = 1;
}
if (mode & FL_ACCUM) {
if (m & FL_ACCUM) {
list[n++] = GLX_ACCUM_GREEN_SIZE;
list[n++] = 1;
if (mode & FL_ALPHA) {
if (m & FL_ALPHA) {
list[n++] = GLX_ACCUM_ALPHA_SIZE;
list[n++] = 1;
}
}
}
if (mode & FL_DOUBLE) {
if (m & FL_DOUBLE) {
list[n++] = GLX_DOUBLEBUFFER;
}
if (mode & FL_DEPTH) {
if (m & FL_DEPTH) {
list[n++] = GLX_DEPTH_SIZE; list[n++] = 1;
}
if (mode & FL_STENCIL) {
if (m & FL_STENCIL) {
list[n++] = GLX_STENCIL_SIZE; list[n++] = 1;
}
if (mode & FL_STEREO) {
if (m & FL_STEREO) {
list[n++] = GLX_STEREO;
}
# if defined(GLX_VERSION_1_1) && defined(GLX_SGIS_multisample)
if (mode & FL_MULTISAMPLE) {
if (m & FL_MULTISAMPLE) {
list[n++] = GLX_SAMPLES_SGIS;
list[n++] = 4; // value Glut uses
}
@@ -148,10 +148,10 @@ Fl_Gl_Choice *Fl_Gl_Choice::find(int mode, const int *alist) {
}
fl_open_display();
XVisualInfo *vis = glXChooseVisual(fl_display, fl_screen, (int *)blist);
if (!vis) {
XVisualInfo *visp = glXChooseVisual(fl_display, fl_screen, (int *)blist);
if (!visp) {
# if defined(GLX_VERSION_1_1) && defined(GLX_SGIS_multisample)
if (mode&FL_MULTISAMPLE) return find(mode&~FL_MULTISAMPLE,0);
if (m&FL_MULTISAMPLE) return find(m&~FL_MULTISAMPLE,0);
# endif
return 0;
}
@@ -168,13 +168,13 @@ Fl_Gl_Choice *Fl_Gl_Choice::find(int mode, const int *alist) {
if (!DescribePixelFormat(fl_gc, i, sizeof(pfd), &pfd)) break;
// continue if it does not satisfy our requirements:
if (~pfd.dwFlags & (PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL)) continue;
if (pfd.iPixelType != ((mode&FL_INDEX)?PFD_TYPE_COLORINDEX:PFD_TYPE_RGBA)) continue;
if ((mode & FL_ALPHA) && !pfd.cAlphaBits) continue;
if ((mode & FL_ACCUM) && !pfd.cAccumBits) continue;
if ((!(mode & FL_DOUBLE)) != (!(pfd.dwFlags & PFD_DOUBLEBUFFER))) continue;
if ((!(mode & FL_STEREO)) != (!(pfd.dwFlags & PFD_STEREO))) continue;
if ((mode & FL_DEPTH) && !pfd.cDepthBits) continue;
if ((mode & FL_STENCIL) && !pfd.cStencilBits) continue;
if (pfd.iPixelType != ((m&FL_INDEX)?PFD_TYPE_COLORINDEX:PFD_TYPE_RGBA)) continue;
if ((m & FL_ALPHA) && !pfd.cAlphaBits) continue;
if ((m & FL_ACCUM) && !pfd.cAccumBits) continue;
if ((!(m & FL_DOUBLE)) != (!(pfd.dwFlags & PFD_DOUBLEBUFFER))) continue;
if ((!(m & FL_STEREO)) != (!(pfd.dwFlags & PFD_STEREO))) continue;
if ((m & FL_DEPTH) && !pfd.cDepthBits) continue;
if ((m & FL_STENCIL) && !pfd.cStencilBits) continue;
// see if better than the one we have already:
if (pixelformat) {
// offering overlay is better:
@@ -192,8 +192,8 @@ Fl_Gl_Choice *Fl_Gl_Choice::find(int mode, const int *alist) {
#endif
g = new Fl_Gl_Choice;
g->mode = mode;
g->alist = alist;
g->mode = m;
g->alist = alistp;
g->next = first;
first = g;
@@ -203,15 +203,15 @@ Fl_Gl_Choice *Fl_Gl_Choice::find(int mode, const int *alist) {
#elif defined(__APPLE__)
g->pixelformat = fmt;
#else
g->vis = vis;
g->vis = visp;
if (/*MaxCmapsOfScreen(ScreenOfDisplay(fl_display,fl_screen))==1 && */
vis->visualid == fl_visual->visualid &&
visp->visualid == fl_visual->visualid &&
!getenv("MESA_PRIVATE_CMAP"))
g->colormap = fl_colormap;
else
g->colormap = XCreateColormap(fl_display, RootWindow(fl_display,fl_screen),
vis->visual, AllocNone);
visp->visual, AllocNone);
#endif
return g;
@@ -318,5 +318,5 @@ void fl_delete_gl_context(GLContext context) {
#endif
//
// End of "$Id: Fl_Gl_Choice.cxx,v 1.5.2.7.2.10 2002/04/13 20:28:51 easysw Exp $".
// End of "$Id: Fl_Gl_Choice.cxx,v 1.5.2.7.2.11 2002/08/09 03:17:29 easysw Exp $".
//
+5 -5
View File
@@ -1,5 +1,5 @@
//
// "$Id: Fl_Gl_Window.cxx,v 1.12.2.22.2.11 2002/05/25 13:38:24 easysw Exp $"
// "$Id: Fl_Gl_Window.cxx,v 1.12.2.22.2.12 2002/08/09 03:17:30 easysw Exp $"
//
// OpenGL window code for the Fast Light Tool Kit (FLTK).
//
@@ -262,10 +262,10 @@ void Fl_Gl_Window::flush() {
// and depth test needs to be off:
static GLContext ortho_context = 0;
static Fl_Gl_Window* ortho_window = 0;
int init = !ortho_context;
if (init) ortho_context = fl_create_gl_context(this, g);
int orthoinit = !ortho_context;
if (orthoinit) ortho_context = fl_create_gl_context(this, g);
fl_set_gl_context(this, ortho_context);
if (init || !save_valid || ortho_window != this) {
if (orthoinit || !save_valid || ortho_window != this) {
glDisable(GL_DEPTH_TEST);
glReadBuffer(GL_BACK);
glDrawBuffer(GL_FRONT);
@@ -367,5 +367,5 @@ void Fl_Gl_Window::draw_overlay() {}
#endif
//
// End of "$Id: Fl_Gl_Window.cxx,v 1.12.2.22.2.11 2002/05/25 13:38:24 easysw Exp $".
// End of "$Id: Fl_Gl_Window.cxx,v 1.12.2.22.2.12 2002/08/09 03:17:30 easysw Exp $".
//
+10 -10
View File
@@ -1,5 +1,5 @@
//
// "$Id: Fl_Input_.cxx,v 1.21.2.11.2.20 2002/08/09 01:09:49 easysw Exp $"
// "$Id: Fl_Input_.cxx,v 1.21.2.11.2.21 2002/08/09 03:17:30 easysw Exp $"
//
// Common input widget routines for the Fast Light Tool Kit (FLTK).
//
@@ -237,20 +237,20 @@ void Fl_Input_::drawtext(int X, int Y, int W, int H) {
if (erase_cursor_only && p > pp) goto CONTINUE2; // this line is after
// calculate area to erase:
int r = X+W;
int x;
int xx;
if (p >= pp) {
x = X;
xx = X;
if (erase_cursor_only) r = xpos+2;
else if (readonly()) x -= 3;
else if (readonly()) xx -= 3;
} else {
x = xpos+(int)expandpos(p, pp, buf, 0);
if (erase_cursor_only) r = x+2;
else if (readonly()) x -= 3;
xx = xpos+(int)expandpos(p, pp, buf, 0);
if (erase_cursor_only) r = xx+2;
else if (readonly()) xx -= 3;
}
// clip to and erase it:
fl_color(color());
fl_rectf(x, Y+ypos, r-x, height);
fl_push_clip(x, Y+ypos, r-x, height);
fl_rectf(xx, Y+ypos, r-xx, height);
fl_push_clip(xx, Y+ypos, r-xx, height);
// it now draws entire line over it
// this should not draw letters to left of erased area, but
// that is nyi.
@@ -848,5 +848,5 @@ Fl_Input_::~Fl_Input_() {
}
//
// End of "$Id: Fl_Input_.cxx,v 1.21.2.11.2.20 2002/08/09 01:09:49 easysw Exp $".
// End of "$Id: Fl_Input_.cxx,v 1.21.2.11.2.21 2002/08/09 03:17:30 easysw Exp $".
//
+16 -16
View File
@@ -1,5 +1,5 @@
//
// "$Id: Fl_Roller.cxx,v 1.6.2.4.2.6 2002/05/24 14:19:19 easysw Exp $"
// "$Id: Fl_Roller.cxx,v 1.6.2.4.2.7 2002/08/09 03:17:30 easysw Exp $"
//
// Roller widget for the Fast Light Tool Kit (FLTK).
//
@@ -105,13 +105,13 @@ void Fl_Roller::draw() {
if (active_r()) {
// draw ridges:
double junk;
for (double y = -ARC+modf(offset*sin(ARC)/(W/2)/delta,&junk)*delta;;
y += delta) {
int y1 = int((sin(y)/sin(ARC)+1)*W/2);
if (y1 <= 0) continue; else if (y1 >= W-1) break;
fl_color(FL_DARK3); fl_yxline(X+y1,Y+1,Y+H-1);
if (y < 0) y1--; else y1++;
fl_color(FL_LIGHT1);fl_yxline(X+y1,Y+1,Y+H-1);
for (double yy = -ARC+modf(offset*sin(ARC)/(W/2)/delta,&junk)*delta;;
yy += delta) {
int yy1 = int((sin(yy)/sin(ARC)+1)*W/2);
if (yy1 <= 0) continue; else if (yy1 >= W-1) break;
fl_color(FL_DARK3); fl_yxline(X+yy1,Y+1,Y+H-1);
if (yy < 0) yy1--; else yy1++;
fl_color(FL_LIGHT1);fl_yxline(X+yy1,Y+1,Y+H-1);
}
// draw edges:
h1 = W/8+1; // distance from end the color inverts
@@ -139,13 +139,13 @@ void Fl_Roller::draw() {
if (active_r()) {
// draw ridges:
double junk;
for (double y = -ARC+modf(offset*sin(ARC)/(H/2)/delta,&junk)*delta;
; y += delta) {
int y1 = int((sin(y)/sin(ARC)+1)*H/2);
if (y1 <= 0) continue; else if (y1 >= H-1) break;
fl_color(FL_DARK3); fl_xyline(X+1,Y+y1,X+W-1);
if (y < 0) y1--; else y1++;
fl_color(FL_LIGHT1);fl_xyline(X+1,Y+y1,X+W-1);
for (double yy = -ARC+modf(offset*sin(ARC)/(H/2)/delta,&junk)*delta;
; yy += delta) {
int yy1 = int((sin(yy)/sin(ARC)+1)*H/2);
if (yy1 <= 0) continue; else if (yy1 >= H-1) break;
fl_color(FL_DARK3); fl_xyline(X+1,Y+yy1,X+W-1);
if (yy < 0) yy1--; else yy1++;
fl_color(FL_LIGHT1);fl_xyline(X+1,Y+yy1,X+W-1);
}
// draw edges:
h1 = H/8+1; // distance from end the color inverts
@@ -171,5 +171,5 @@ Fl_Roller::Fl_Roller(int X,int Y,int W,int H,const char* L)
}
//
// End of "$Id: Fl_Roller.cxx,v 1.6.2.4.2.6 2002/05/24 14:19:19 easysw Exp $".
// End of "$Id: Fl_Roller.cxx,v 1.6.2.4.2.7 2002/08/09 03:17:30 easysw Exp $".
//
+4 -4
View File
@@ -1,5 +1,5 @@
//
// "$Id: Fl_Round_Button.cxx,v 1.4.2.3.2.3 2002/01/01 15:11:31 easysw Exp $"
// "$Id: Fl_Round_Button.cxx,v 1.4.2.3.2.4 2002/08/09 03:17:30 easysw Exp $"
//
// Round button for the Fast Light Tool Kit (FLTK).
//
@@ -30,13 +30,13 @@
#include <FL/Fl.H>
#include <FL/Fl_Round_Button.H>
Fl_Round_Button::Fl_Round_Button(int x,int y,int w,int h, const char *l)
: Fl_Light_Button(x,y,w,h,l) {
Fl_Round_Button::Fl_Round_Button(int X,int Y,int W,int H, const char *l)
: Fl_Light_Button(X,Y,W,H,l) {
box(FL_NO_BOX);
down_box(FL_ROUND_DOWN_BOX);
selection_color(FL_BLACK);
}
//
// End of "$Id: Fl_Round_Button.cxx,v 1.4.2.3.2.3 2002/01/01 15:11:31 easysw Exp $".
// End of "$Id: Fl_Round_Button.cxx,v 1.4.2.3.2.4 2002/08/09 03:17:30 easysw Exp $".
//
+9 -9
View File
@@ -1,5 +1,5 @@
//
// "$Id: Fl_Scrollbar.cxx,v 1.7.2.14.2.8 2002/03/25 21:08:41 easysw Exp $"
// "$Id: Fl_Scrollbar.cxx,v 1.7.2.14.2.9 2002/08/09 03:17:30 easysw Exp $"
//
// Scroll bar widget for the Fast Light Tool Kit (FLTK).
//
@@ -207,10 +207,10 @@ void Fl_Scrollbar::draw() {
fl_color(fl_inactive(labelcolor()));
int w1 = (H-4)/3; if (w1 < 1) w1 = 1;
int x1 = X+(H-w1-1)/2;
int y1 = Y+(H-2*w1-1)/2;
fl_polygon(x1, y1+w1, x1+w1, y1+2*w1, x1+w1, y1);
int yy1 = Y+(H-2*w1-1)/2;
fl_polygon(x1, yy1+w1, x1+w1, yy1+2*w1, x1+w1, yy1);
x1 += (W-H);
fl_polygon(x1, y1, x1, y1+2*w1, x1+w1, y1+w1);
fl_polygon(x1, yy1, x1, yy1+2*w1, x1+w1, yy1+w1);
}
} else { // vertical
if (H < 3*W) {Fl_Slider::draw(X,Y,W,H); return;}
@@ -226,10 +226,10 @@ void Fl_Scrollbar::draw() {
fl_color(labelcolor() | 8);
int w1 = (W-4)/3; if (w1 < 1) w1 = 1;
int x1 = X+(W-2*w1-1)/2;
int y1 = Y+(W-w1-1)/2;
fl_polygon(x1, y1+w1, x1+2*w1, y1+w1, x1+w1, y1);
y1 += H-W;
fl_polygon(x1, y1, x1+w1, y1+w1, x1+2*w1, y1);
int yy1 = Y+(W-w1-1)/2;
fl_polygon(x1, yy1+w1, x1+2*w1, yy1+w1, x1+w1, yy1);
yy1 += H-W;
fl_polygon(x1, yy1, x1+w1, yy1+w1, x1+2*w1, yy1);
}
}
}
@@ -246,5 +246,5 @@ Fl_Scrollbar::Fl_Scrollbar(int X, int Y, int W, int H, const char* L)
}
//
// End of "$Id: Fl_Scrollbar.cxx,v 1.7.2.14.2.8 2002/03/25 21:08:41 easysw Exp $".
// End of "$Id: Fl_Scrollbar.cxx,v 1.7.2.14.2.9 2002/08/09 03:17:30 easysw Exp $".
//
+54 -54
View File
File diff suppressed because it is too large Load Diff
+17 -17
View File
@@ -1,5 +1,5 @@
//
// "$Id: Fl_Tabs.cxx,v 1.6.2.10.2.10 2002/05/15 16:50:27 easysw Exp $"
// "$Id: Fl_Tabs.cxx,v 1.6.2.10.2.11 2002/08/09 03:17:30 easysw Exp $"
//
// Tab widget for the Fast Light Tool Kit (FLTK).
//
@@ -43,7 +43,7 @@
// or by EXTRASPACE or by zero.
// Return value is the index of the selected item.
int Fl_Tabs::tab_positions(int* p, int* w) {
int Fl_Tabs::tab_positions(int* p, int* wp) {
int selected = -1;
Fl_Widget*const* a = array();
int i;
@@ -55,16 +55,16 @@ int Fl_Tabs::tab_positions(int* p, int* w) {
int wt = 0; int ht = 0;
o->measure_label(wt,ht);
w[i] = wt+EXTRASPACE;
p[i+1] = p[i]+w[i]+BORDER;
wp[i] = wt+EXTRASPACE;
p[i+1] = p[i]+wp[i]+BORDER;
}
int r = this->w();
int r = w();
if (p[i] <= r) return selected;
// uh oh, they are too big:
// pack them against right edge:
p[i] = r;
for (i = children(); i--;) {
int l = r-w[i];
int l = r-wp[i];
if (p[i+1] < l) l = p[i+1];
if (p[i] <= l) break;
p[i] = l;
@@ -74,12 +74,12 @@ int Fl_Tabs::tab_positions(int* p, int* w) {
for (i = 0; i<children(); i++) {
if (p[i] >= i*EXTRASPACE) break;
p[i] = i*EXTRASPACE;
int W = this->w()-1-EXTRASPACE*(children()-i) - p[i];
if (w[i] > W) w[i] = W;
int W = w()-1-EXTRASPACE*(children()-i) - p[i];
if (wp[i] > W) wp[i] = W;
}
// adjust edges according to visiblity:
for (i = children(); i > selected; i--) {
p[i] = p[i-1]+w[i-1];
p[i] = p[i-1]+wp[i-1];
}
return selected;
}
@@ -108,8 +108,8 @@ Fl_Widget *Fl_Tabs::which(int event_x, int event_y) {
if (event_y > y()+H || event_y < y()) return 0;
}
if (event_x < x()) return 0;
int p[128], w[128];
tab_positions(p, w);
int p[128], wp[128];
tab_positions(p, wp);
for (int i=0; i<children(); i++) {
if (event_x < x()+p[i+1]) return child(i);
}
@@ -233,17 +233,17 @@ void Fl_Tabs::draw() {
if (v) update_child(*v);
}
if (damage() & (FL_DAMAGE_EXPOSE|FL_DAMAGE_ALL)) {
int p[128]; int w[128];
int selected = tab_positions(p,w);
int p[128]; int wp[128];
int selected = tab_positions(p,wp);
int i;
Fl_Widget*const* a = array();
for (i=0; i<selected; i++)
draw_tab(x()+p[i], x()+p[i+1], w[i], H, a[i], LEFT);
draw_tab(x()+p[i], x()+p[i+1], wp[i], H, a[i], LEFT);
for (i=children()-1; i > selected; i--)
draw_tab(x()+p[i], x()+p[i+1], w[i], H, a[i], RIGHT);
draw_tab(x()+p[i], x()+p[i+1], wp[i], H, a[i], RIGHT);
if (v) {
i = selected;
draw_tab(x()+p[i], x()+p[i+1], w[i], H, a[i], SELECTED);
draw_tab(x()+p[i], x()+p[i+1], wp[i], H, a[i], SELECTED);
}
}
}
@@ -300,5 +300,5 @@ Fl_Tabs::Fl_Tabs(int X,int Y,int W, int H, const char *l) :
}
//
// End of "$Id: Fl_Tabs.cxx,v 1.6.2.10.2.10 2002/05/15 16:50:27 easysw Exp $".
// End of "$Id: Fl_Tabs.cxx,v 1.6.2.10.2.11 2002/08/09 03:17:30 easysw Exp $".
//
+85 -85
View File
File diff suppressed because it is too large Load Diff
+44 -45
View File
@@ -1,5 +1,5 @@
//
// "$Id: Fl_Text_Display.cxx,v 1.12.2.23 2002/07/30 18:40:50 easysw Exp $"
// "$Id: Fl_Text_Display.cxx,v 1.12.2.24 2002/08/09 03:17:30 easysw Exp $"
//
// Copyright 2001-2002 by Bill Spitzak and others.
// Original code Copyright Mark Edel. Permission to distribute under
@@ -347,20 +347,20 @@ void Fl_Text_Display::draw_text( int left, int top, int width, int height ) {
fl_pop_clip();
}
void Fl_Text_Display::redisplay_range(int start, int end) {
void Fl_Text_Display::redisplay_range(int startpos, int endpos) {
if (damage_range1_start == -1 && damage_range1_end == -1) {
damage_range1_start = start;
damage_range1_end = end;
} else if ((start >= damage_range1_start && start <= damage_range1_end) ||
(end >= damage_range1_start && end <= damage_range1_end)) {
damage_range1_start = min(damage_range1_start, start);
damage_range1_end = max(damage_range1_end, end);
damage_range1_start = startpos;
damage_range1_end = endpos;
} else if ((startpos >= damage_range1_start && startpos <= damage_range1_end) ||
(endpos >= damage_range1_start && endpos <= damage_range1_end)) {
damage_range1_start = min(damage_range1_start, startpos);
damage_range1_end = max(damage_range1_end, endpos);
} else if (damage_range2_start == -1 && damage_range2_end == -1) {
damage_range2_start = start;
damage_range2_end = end;
damage_range2_start = startpos;
damage_range2_end = endpos;
} else {
damage_range2_start = min(damage_range2_start, start);
damage_range2_end = max(damage_range2_end, end);
damage_range2_start = min(damage_range2_start, startpos);
damage_range2_end = max(damage_range2_end, endpos);
}
damage(FL_DAMAGE_SCROLL);
}
@@ -371,29 +371,28 @@ void Fl_Text_Display::redisplay_range(int start, int end) {
** after pos, including blank lines which are not technically part of
** any range of characters.
*/
void Fl_Text_Display::draw_range(int start, int end) {
void Fl_Text_Display::draw_range(int startpos, int endpos) {
int i, startLine, lastLine, startIndex, endIndex;
/* If the range is outside of the displayed text, just return */
if ( end < mFirstChar || ( start > mLastChar &&
!empty_vlines() ) )
return;
if ( endpos < mFirstChar || ( startpos > mLastChar &&
!empty_vlines() ) ) return;
/* Clean up the starting and ending values */
if ( start < 0 ) start = 0;
if ( start > mBuffer->length() ) start = mBuffer->length();
if ( end < 0 ) end = 0;
if ( end > mBuffer->length() ) end = mBuffer->length();
if ( startpos < 0 ) startpos = 0;
if ( startpos > mBuffer->length() ) startpos = mBuffer->length();
if ( endpos < 0 ) endpos = 0;
if ( endpos > mBuffer->length() ) endpos = mBuffer->length();
/* Get the starting and ending lines */
if ( start < mFirstChar )
start = mFirstChar;
if ( !position_to_line( start, &startLine ) )
if ( startpos < mFirstChar )
startpos = mFirstChar;
if ( !position_to_line( startpos, &startLine ) )
startLine = mNVisibleLines - 1;
if ( end >= mLastChar ) {
if ( endpos >= mLastChar ) {
lastLine = mNVisibleLines - 1;
} else {
if ( !position_to_line( end, &lastLine ) ) {
if ( !position_to_line( endpos, &lastLine ) ) {
/* shouldn't happen */
lastLine = mNVisibleLines - 1;
}
@@ -401,13 +400,13 @@ void Fl_Text_Display::draw_range(int start, int end) {
/* Get the starting and ending positions within the lines */
startIndex = mLineStarts[ startLine ] == -1 ? 0 :
start - mLineStarts[ startLine ];
if ( end >= mLastChar )
startpos - mLineStarts[ startLine ];
if ( endpos >= mLastChar )
endIndex = INT_MAX;
else if ( mLineStarts[ lastLine ] == -1 )
endIndex = 0;
else
endIndex = end - mLineStarts[ lastLine ];
endIndex = endpos - mLineStarts[ lastLine ];
/* If the starting and ending lines are the same, redisplay the single
line between "start" and "end" */
@@ -1045,7 +1044,7 @@ void Fl_Text_Display::draw_string( int style, int X, int Y, int toX,
configured here, on the fly. */
Fl_Font font = textfont();
int size = textsize();
int fsize = textsize();
Fl_Color foreground;
Fl_Color background;
@@ -1055,8 +1054,8 @@ void Fl_Text_Display::draw_string( int style, int X, int Y, int toX,
else if (si >= mNStyles) si = mNStyles - 1;
styleRec = mStyleTable + si;
font = styleRec->font;
size = styleRec->size;
font = styleRec->font;
fsize = styleRec->size;
if ( style & (HIGHLIGHT_MASK | PRIMARY_MASK) ) {
background = selection_color();
@@ -1074,7 +1073,7 @@ void Fl_Text_Display::draw_string( int style, int X, int Y, int toX,
fl_color( background );
fl_rectf( X, Y, toX - X, mMaxsize );
fl_color( foreground );
fl_font( font, size );
fl_font( font, fsize );
fl_draw( string, nChars, X, Y + mMaxsize - fl_descent());
// CET - FIXME
@@ -1240,20 +1239,20 @@ int Fl_Text_Display::position_style( int lineStartPos,
*/
int Fl_Text_Display::string_width( const char *string, int length, int style ) {
Fl_Font font;
int size;
int fsize;
if ( style & STYLE_LOOKUP_MASK ) {
int si = (style & STYLE_LOOKUP_MASK) - 'A';
if (si < 0) si = 0;
else if (si >= mNStyles) si = mNStyles - 1;
font = mStyleTable[si].font;
size = mStyleTable[si].size;
font = mStyleTable[si].font;
fsize = mStyleTable[si].size;
} else {
font = textfont();
size = textsize();
font = textfont();
fsize = textsize();
}
fl_font( font, size );
fl_font( font, fsize );
return ( int ) ( fl_width( string, length ) );
}
@@ -1712,7 +1711,7 @@ int Fl_Text_Display::vline_length( int visLineNum ) {
** redraw requests resulting from changes to the attached style buffer (which
** contains auxiliary information for coloring or styling text).
*/
void Fl_Text_Display::extend_range_for_styles( int *start, int *end ) {
void Fl_Text_Display::extend_range_for_styles( int *startpos, int *endpos ) {
Fl_Text_Selection * sel = mStyleBuffer->primary_selection();
int extended = 0;
@@ -1727,12 +1726,12 @@ void Fl_Text_Display::extend_range_for_styles( int *start, int *end ) {
tells the text display's buffer modify callback to extend it's redraw
range to show the text color/and font changes as well. */
if ( sel->selected() ) {
if ( sel->start() < *start ) {
*start = sel->start();
if ( sel->start() < *startpos ) {
*startpos = sel->start();
extended = 1;
}
if ( sel->end() > *end ) {
*end = sel->end();
if ( sel->end() > *endpos ) {
*endpos = sel->end();
extended = 1;
}
}
@@ -1741,7 +1740,7 @@ void Fl_Text_Display::extend_range_for_styles( int *start, int *end ) {
fonts don't match in spacing, extend redraw area to end of line to
redraw characters exposed by possible font size changes */
if ( mFixedFontWidth == -1 && extended )
* end = mBuffer->line_end( *end ) + 1;
*endpos = mBuffer->line_end( *endpos ) + 1;
}
// The draw() method. It tries to minimize what is draw as much as possible.
@@ -1962,5 +1961,5 @@ int Fl_Text_Display::handle(int event) {
//
// End of "$Id: Fl_Text_Display.cxx,v 1.12.2.23 2002/07/30 18:40:50 easysw Exp $".
// End of "$Id: Fl_Text_Display.cxx,v 1.12.2.24 2002/08/09 03:17:30 easysw Exp $".
//
+19 -19
View File
@@ -1,5 +1,5 @@
//
// "$Id: Fl_Text_Editor.cxx,v 1.9.2.6 2002/04/11 11:52:42 easysw Exp $"
// "$Id: Fl_Text_Editor.cxx,v 1.9.2.7 2002/08/09 03:17:30 easysw Exp $"
//
// Copyright 2001-2002 by Bill Spitzak and others.
// Original code Copyright Mark Edel. Permission to distribute under
@@ -113,34 +113,34 @@ void Fl_Text_Editor::add_default_key_bindings(Key_Binding** list) {
Fl_Text_Editor::Key_Func
Fl_Text_Editor::bound_key_function(int key, int state, Key_Binding* list) {
Key_Binding* current;
for (current = list; current; current = current->next)
if (current->key == key)
if (current->state == FL_TEXT_EDITOR_ANY_STATE || current->state == state)
Key_Binding* cur;
for (cur = list; cur; cur = cur->next)
if (cur->key == key)
if (cur->state == FL_TEXT_EDITOR_ANY_STATE || cur->state == state)
break;
if (!current) return 0;
return current->function;
if (!cur) return 0;
return cur->function;
}
void
Fl_Text_Editor::remove_all_key_bindings(Key_Binding** list) {
Key_Binding *current, *next;
for (current = *list; current; current = next) {
next = current->next;
delete current;
Key_Binding *cur, *next;
for (cur = *list; cur; cur = next) {
next = cur->next;
delete cur;
}
*list = 0;
}
void
Fl_Text_Editor::remove_key_binding(int key, int state, Key_Binding** list) {
Key_Binding *current, *last = 0;
for (current = *list; current; last = current, current = current->next)
if (current->key == key && current->state == state) break;
if (!current) return;
if (last) last->next = current->next;
else *list = current->next;
delete current;
Key_Binding *cur, *last = 0;
for (cur = *list; cur; last = cur, cur = cur->next)
if (cur->key == key && cur->state == state) break;
if (!cur) return;
if (last) last->next = cur->next;
else *list = cur->next;
delete cur;
}
void
@@ -439,5 +439,5 @@ int Fl_Text_Editor::handle(int event) {
}
//
// End of "$Id: Fl_Text_Editor.cxx,v 1.9.2.6 2002/04/11 11:52:42 easysw Exp $".
// End of "$Id: Fl_Text_Editor.cxx,v 1.9.2.7 2002/08/09 03:17:30 easysw Exp $".
//
+9 -9
View File
@@ -1,5 +1,5 @@
//
// "$Id: Fl_Tile.cxx,v 1.5.2.5.2.2 2002/01/01 15:11:31 easysw Exp $"
// "$Id: Fl_Tile.cxx,v 1.5.2.5.2.3 2002/08/09 03:17:30 easysw Exp $"
//
// Tile widget for the Fast Light Tool Kit (FLTK).
//
@@ -82,15 +82,15 @@ void Fl_Tile::resize(int X,int Y,int W,int H) {
p += 8;
for (int i=children(); i--;) {
Fl_Widget* o = *a++;
int X = o->x()+dx;
int R = X+o->w();
if (*p++ >= OR) X += dw; else if (X > NR) X = NR;
int xx = o->x()+dx;
int R = xx+o->w();
if (*p++ >= OR) xx += dw; else if (xx > NR) xx = NR;
if (*p++ >= OR) R += dw; else if (R > NR) R = NR;
int Y = o->y()+dy;
int B = Y+o->h();
if (*p++ >= OB) Y += dh; else if (Y > NB) Y = NB;
int yy = o->y()+dy;
int B = yy+o->h();
if (*p++ >= OB) yy += dh; else if (yy > NB) yy = NB;
if (*p++ >= OB) B += dh; else if (B > NB) B = NB;
o->resize(X,Y,R-X,B-Y); o->redraw();
o->resize(xx,yy,R-xx,B-yy); o->redraw();
}
}
@@ -196,5 +196,5 @@ int Fl_Tile::handle(int event) {
}
//
// End of "$Id: Fl_Tile.cxx,v 1.5.2.5.2.2 2002/01/01 15:11:31 easysw Exp $".
// End of "$Id: Fl_Tile.cxx,v 1.5.2.5.2.3 2002/08/09 03:17:30 easysw Exp $".
//
+5 -5
View File
@@ -1,5 +1,5 @@
//
// "$Id: Fl_Tooltip.cxx,v 1.38.2.23 2002/05/15 16:37:06 spitzak Exp $"
// "$Id: Fl_Tooltip.cxx,v 1.38.2.24 2002/08/09 03:17:30 easysw Exp $"
//
// Tooltip source file for the Fast Light Tool Kit (FLTK).
//
@@ -130,11 +130,11 @@ tt_exit(Fl_Widget *w) {
}
static void
tt_enter(Fl_Widget* widget) {
tt_enter(Fl_Widget* wp) {
// printf("tt_enter(widget=%p)\n", widget);
// printf(" window=%p\n", window);
// find the enclosing group with a tooltip:
Fl_Widget* w = widget;
Fl_Widget* w = wp;
while (w && !w->tooltip()) {
//if (w == window) return; // don't do anything if pointed at tooltip
w = w->parent();
@@ -142,7 +142,7 @@ tt_enter(Fl_Widget* widget) {
if (!w) {
Fl_Tooltip::enter_area(0, 0, 0, 0, 0, 0);
} else {
Fl_Tooltip::enter_area(widget,0,0,widget->w(), widget->h(), w->tooltip());
Fl_Tooltip::enter_area(wp,0,0,wp->w(), wp->h(), w->tooltip());
}
}
@@ -203,5 +203,5 @@ void Fl_Widget::tooltip(const char *tt) {
}
//
// End of "$Id: Fl_Tooltip.cxx,v 1.38.2.23 2002/05/15 16:37:06 spitzak Exp $".
// End of "$Id: Fl_Tooltip.cxx,v 1.38.2.24 2002/08/09 03:17:30 easysw Exp $".
//
+4 -4
View File
@@ -1,5 +1,5 @@
//
// "$Id: Fl_Valuator.cxx,v 1.5.2.4.2.4 2002/05/28 00:16:08 easysw Exp $"
// "$Id: Fl_Valuator.cxx,v 1.5.2.4.2.5 2002/08/09 03:17:30 easysw Exp $"
//
// Valuator widget for the Fast Light Tool Kit (FLTK).
//
@@ -116,12 +116,12 @@ double Fl_Valuator::increment(double v, int n) {
int Fl_Valuator::format(char* buffer) {
double v = value();
if (!A) return sprintf(buffer, "%g", v);
int i, x;
int i, X;
double ba = B / A;
for (x = 1, i = 0; x < ba; x *= 10) i++;
for (X = 1, i = 0; X < ba; X *= 10) i++;
return sprintf(buffer, "%.*f", i, v);
}
//
// End of "$Id: Fl_Valuator.cxx,v 1.5.2.4.2.4 2002/05/28 00:16:08 easysw Exp $".
// End of "$Id: Fl_Valuator.cxx,v 1.5.2.4.2.5 2002/08/09 03:17:30 easysw Exp $".
//
+4 -4
View File
@@ -1,5 +1,5 @@
//
// "$Id: Fl_Value_Input.cxx,v 1.6.2.5.2.6 2002/05/25 07:18:38 easysw Exp $"
// "$Id: Fl_Value_Input.cxx,v 1.6.2.5.2.7 2002/08/09 03:17:30 easysw Exp $"
//
// Value input widget for the Fast Light Tool Kit (FLTK).
//
@@ -115,8 +115,8 @@ int Fl_Value_Input::handle(int event) {
}
}
Fl_Value_Input::Fl_Value_Input(int x, int y, int w, int h, const char* l)
: Fl_Valuator(x, y, w, h, l), input(x, y, w, h, 0) {
Fl_Value_Input::Fl_Value_Input(int X, int Y, int W, int H, const char* l)
: Fl_Valuator(X, Y, W, H, l), input(X, Y, W, H, 0) {
soft_ = 0;
if (input.parent()) // defeat automatic-add
((Fl_Group*)input.parent())->remove(input);
@@ -131,5 +131,5 @@ Fl_Value_Input::Fl_Value_Input(int x, int y, int w, int h, const char* l)
}
//
// End of "$Id: Fl_Value_Input.cxx,v 1.6.2.5.2.6 2002/05/25 07:18:38 easysw Exp $".
// End of "$Id: Fl_Value_Input.cxx,v 1.6.2.5.2.7 2002/08/09 03:17:30 easysw Exp $".
//
+4 -4
View File
@@ -1,5 +1,5 @@
//
// "$Id: Fl_Value_Output.cxx,v 1.6.2.3.2.4 2002/07/20 05:56:44 easysw Exp $"
// "$Id: Fl_Value_Output.cxx,v 1.6.2.3.2.5 2002/08/09 03:17:30 easysw Exp $"
//
// Value output widget for the Fast Light Tool Kit (FLTK).
//
@@ -86,8 +86,8 @@ int Fl_Value_Output::handle(int event) {
}
}
Fl_Value_Output::Fl_Value_Output(int x,int y,int w,int h,const char *l)
: Fl_Valuator(x,y,w,h,l) {
Fl_Value_Output::Fl_Value_Output(int X, int Y, int W, int H,const char *l)
: Fl_Valuator(X,Y,W,H,l) {
box(FL_NO_BOX);
align(FL_ALIGN_LEFT);
textfont_ = FL_HELVETICA;
@@ -97,5 +97,5 @@ Fl_Value_Output::Fl_Value_Output(int x,int y,int w,int h,const char *l)
}
//
// End of "$Id: Fl_Value_Output.cxx,v 1.6.2.3.2.4 2002/07/20 05:56:44 easysw Exp $".
// End of "$Id: Fl_Value_Output.cxx,v 1.6.2.3.2.5 2002/08/09 03:17:30 easysw Exp $".
//
+4 -4
View File
@@ -1,5 +1,5 @@
//
// "$Id: Fl_Value_Slider.cxx,v 1.5.2.4.2.2 2002/01/01 15:11:31 easysw Exp $"
// "$Id: Fl_Value_Slider.cxx,v 1.5.2.4.2.3 2002/08/09 03:17:30 easysw Exp $"
//
// Value slider widget for the Fast Light Tool Kit (FLTK).
//
@@ -28,8 +28,8 @@
#include <FL/fl_draw.H>
#include <math.h>
Fl_Value_Slider::Fl_Value_Slider(int x,int y,int w,int h, const char*l)
: Fl_Slider(x,y,w,h,l) {
Fl_Value_Slider::Fl_Value_Slider(int X, int Y, int W, int H, const char*l)
: Fl_Slider(X,Y,W,H,l) {
step(1,100);
textfont_ = FL_HELVETICA;
textsize_ = 10;
@@ -72,5 +72,5 @@ int Fl_Value_Slider::handle(int event) {
}
//
// End of "$Id: Fl_Value_Slider.cxx,v 1.5.2.4.2.2 2002/01/01 15:11:31 easysw Exp $".
// End of "$Id: Fl_Value_Slider.cxx,v 1.5.2.4.2.3 2002/08/09 03:17:30 easysw Exp $".
//
+4 -4
View File
@@ -1,5 +1,5 @@
//
// "$Id: Fl_Window.cxx,v 1.6.2.3.2.9 2002/08/05 17:50:25 easysw Exp $"
// "$Id: Fl_Window.cxx,v 1.6.2.3.2.10 2002/08/09 03:17:30 easysw Exp $"
//
// Window widget class for the Fast Light Tool Kit (FLTK).
//
@@ -117,8 +117,8 @@ void Fl::default_atclose(Fl_Window* window, void* v) {
void (*Fl::atclose)(Fl_Window*, void*) = default_atclose;
void Fl_Window::default_callback(Fl_Window* window, void* v) {
Fl::atclose(window, v);
void Fl_Window::default_callback(Fl_Window* win, void* v) {
Fl::atclose(win, v);
}
Fl_Window *Fl_Window::current() {
@@ -127,5 +127,5 @@ Fl_Window *Fl_Window::current() {
//
// End of "$Id: Fl_Window.cxx,v 1.6.2.3.2.9 2002/08/05 17:50:25 easysw Exp $".
// End of "$Id: Fl_Window.cxx,v 1.6.2.3.2.10 2002/08/09 03:17:30 easysw Exp $".
//
+5 -5
View File
@@ -1,5 +1,5 @@
//
// "$Id: Fl_XBM_Image.cxx,v 1.1.2.6 2002/06/28 15:23:03 easysw Exp $"
// "$Id: Fl_XBM_Image.cxx,v 1.1.2.7 2002/08/09 03:17:30 easysw Exp $"
//
// Fl_XBM_Image routines.
//
@@ -43,7 +43,7 @@
Fl_XBM_Image::Fl_XBM_Image(const char *name) : Fl_Bitmap((const char *)0,0,0) {
FILE *f;
uchar *data;
uchar *ptr;
if ((f = fopen(name, "rb")) == NULL) return;
@@ -79,7 +79,7 @@ Fl_XBM_Image::Fl_XBM_Image(const char *name) : Fl_Bitmap((const char *)0,0,0) {
array = new uchar[n];
// read the data:
for (i = 0, data = (uchar *)array; i < n;) {
for (i = 0, ptr = (uchar *)array; i < n;) {
if (!fgets(buffer,1024,f)) {
fclose(f);
return;
@@ -88,7 +88,7 @@ Fl_XBM_Image::Fl_XBM_Image(const char *name) : Fl_Bitmap((const char *)0,0,0) {
while (*a && i<n) {
int t;
if (sscanf(a," 0x%x",&t)>0) {
*data++ = t;
*ptr++ = t;
i ++;
}
while (*a && *a++ != ',');
@@ -100,5 +100,5 @@ Fl_XBM_Image::Fl_XBM_Image(const char *name) : Fl_Bitmap((const char *)0,0,0) {
//
// End of "$Id: Fl_XBM_Image.cxx,v 1.1.2.6 2002/06/28 15:23:03 easysw Exp $".
// End of "$Id: Fl_XBM_Image.cxx,v 1.1.2.7 2002/08/09 03:17:30 easysw Exp $".
//
+8 -8
View File
@@ -1,5 +1,5 @@
//
// "$Id: Fl_XPM_Image.cxx,v 1.1.2.6 2002/05/25 13:38:24 easysw Exp $"
// "$Id: Fl_XPM_Image.cxx,v 1.1.2.7 2002/08/09 03:17:30 easysw Exp $"
//
// Fl_XPM_Image routines.
//
@@ -77,9 +77,9 @@ Fl_XPM_Image::Fl_XPM_Image(const char *name) : Fl_Pixmap((char *const*)0) {
q++;
int n = 0;
for (int x = 0; x < 3; x++) {
int d = hexdigit(*q);
if (d > 15) break;
n = (n<<4)+d;
int xd = hexdigit(*q);
if (xd > 15) break;
n = (n<<4)+xd;
q++;
}
*myp++ = n;
@@ -89,9 +89,9 @@ Fl_XPM_Image::Fl_XPM_Image(const char *name) : Fl_Pixmap((char *const*)0) {
if (c>='0' && c<='7') {
c -= '0';
for (int x=0; x<2; x++) {
int d = hexdigit(*q);
if (d>7) break;
c = (c<<3)+d;
int xd = hexdigit(*q);
if (xd>7) break;
c = (c<<3)+xd;
q++;
}
}
@@ -125,5 +125,5 @@ Fl_XPM_Image::Fl_XPM_Image(const char *name) : Fl_Pixmap((char *const*)0) {
//
// End of "$Id: Fl_XPM_Image.cxx,v 1.1.2.6 2002/05/25 13:38:24 easysw Exp $".
// End of "$Id: Fl_XPM_Image.cxx,v 1.1.2.7 2002/08/09 03:17:30 easysw Exp $".
//
+25 -25
View File
@@ -1,5 +1,5 @@
//
// "$Id: Fl_arg.cxx,v 1.5.2.8.2.11 2002/04/14 12:51:56 easysw Exp $"
// "$Id: Fl_arg.cxx,v 1.5.2.8.2.12 2002/08/09 03:17:30 easysw Exp $"
//
// Optional argument initialization code for the Fast Light Tool Kit (FLTK).
//
@@ -47,10 +47,10 @@ int XParseGeometry(const char*, int*, int*, unsigned int*, unsigned int*);
# define YNegative 0x0020
#endif
static int match(const char *a, const char *match, int atleast = 1) {
const char *b = match;
static int fl_match(const char *a, const char *s, int atleast = 1) {
const char *b = s;
while (*a && (*a == *b || tolower(*a) == *b)) {a++; b++;}
return !*a && b >= match+atleast;
return !*a && b >= s+atleast;
}
// flags set by previously parsed arguments:
@@ -80,31 +80,31 @@ int Fl::arg(int argc, char **argv, int &i) {
if (s[0] != '-' || s[1] == '-' || !s[1]) {return_i = 1; return 0;}
s++; // point after the dash
if (match(s, "iconic")) {
if (fl_match(s, "iconic")) {
fl_show_iconic = 1;
i++;
return 1;
} else if (match(s, "kbd")) {
} else if (fl_match(s, "kbd")) {
Fl::visible_focus(1);
i++;
return 1;
} else if (match(s, "nokbd", 3)) {
} else if (fl_match(s, "nokbd", 3)) {
Fl::visible_focus(0);
i++;
return 1;
} else if (match(s, "dnd", 2)) {
} else if (fl_match(s, "dnd", 2)) {
Fl::dnd_text_ops(1);
i++;
return 1;
} else if (match(s, "nodnd", 3)) {
} else if (fl_match(s, "nodnd", 3)) {
Fl::dnd_text_ops(0);
i++;
return 1;
} else if (match(s, "tooltips", 2)) {
} else if (fl_match(s, "tooltips", 2)) {
Fl_Tooltip::enable();
i++;
return 1;
} else if (match(s, "notooltips", 3)) {
} else if (fl_match(s, "notooltips", 3)) {
Fl_Tooltip::disable();
i++;
return 1;
@@ -114,7 +114,7 @@ int Fl::arg(int argc, char **argv, int &i) {
if (i >= argc-1 || !v)
return 0; // all the rest need an argument, so if missing it is an error
if (match(s, "geometry")) {
if (fl_match(s, "geometry")) {
int flags, gx, gy; unsigned int gw, gh;
flags = XParseGeometry(v, &gx, &gy, &gw, &gh);
@@ -122,26 +122,26 @@ int Fl::arg(int argc, char **argv, int &i) {
geometry = v;
#if !defined(WIN32) && !defined(__APPLE__)
} else if (match(s, "display", 2)) {
} else if (fl_match(s, "display", 2)) {
Fl::display(v);
#endif
} else if (match(s, "title", 2)) {
} else if (fl_match(s, "title", 2)) {
title = v;
} else if (match(s, "name", 2)) {
} else if (fl_match(s, "name", 2)) {
name = v;
} else if (match(s, "bg2", 3) || match(s, "background2", 11)) {
} else if (fl_match(s, "bg2", 3) || fl_match(s, "background2", 11)) {
fl_bg2 = v;
} else if (match(s, "bg", 2) || match(s, "background", 10)) {
} else if (fl_match(s, "bg", 2) || fl_match(s, "background", 10)) {
fl_bg = v;
} else if (match(s, "fg", 2) || match(s, "foreground", 10)) {
} else if (fl_match(s, "fg", 2) || fl_match(s, "foreground", 10)) {
fl_fg = v;
} else if (match(s, "scheme", 1)) {
} else if (fl_match(s, "scheme", 1)) {
Fl::scheme(v);
} else return 0; // unrecognized
@@ -203,17 +203,17 @@ void Fl_Window::show(int argc, char **argv) {
static char beenhere;
if (!beenhere) {
if (geometry) {
int flags = 0, gx = x(), gy = y(); unsigned int gw = w(), gh = h();
flags = XParseGeometry(geometry, &gx, &gy, &gw, &gh);
if (flags & XNegative) gx = Fl::w()-w()+gx;
if (flags & YNegative) gy = Fl::h()-h()+gy;
int fl = 0, gx = x(), gy = y(); unsigned int gw = w(), gh = h();
fl = XParseGeometry(geometry, &gx, &gy, &gw, &gh);
if (fl & XNegative) gx = Fl::w()-w()+gx;
if (fl & YNegative) gy = Fl::h()-h()+gy;
// int mw,mh; minsize(mw,mh);
// if (mw > gw) gw = mw;
// if (mh > gh) gh = mh;
Fl_Widget *r = resizable();
if (!r) resizable(this);
// for WIN32 we assumme window is not mapped yet:
if (flags & (XValue | YValue))
if (fl & (XValue | YValue))
x(-1), resize(gx,gy,gw,gh);
else
size(gw,gh);
@@ -412,5 +412,5 @@ int XParseGeometry(const char* string, int* x, int* y,
#endif // ifdef WIN32
//
// End of "$Id: Fl_arg.cxx,v 1.5.2.8.2.11 2002/04/14 12:51:56 easysw Exp $".
// End of "$Id: Fl_arg.cxx,v 1.5.2.8.2.12 2002/08/09 03:17:30 easysw Exp $".
//
+9 -9
View File
@@ -1,5 +1,5 @@
//
// "$Id: Fl_get_system_colors.cxx,v 1.6.2.7.2.12 2002/07/17 15:23:58 easysw Exp $"
// "$Id: Fl_get_system_colors.cxx,v 1.6.2.7.2.13 2002/08/09 03:17:30 easysw Exp $"
//
// System color support for the Fast Light Tool Kit (FLTK).
//
@@ -245,7 +245,7 @@ int Fl::scheme(const char *s) {
}
int Fl::reload_scheme() {
Fl_Window *w;
Fl_Window *win;
get_system_colors();
@@ -270,7 +270,7 @@ int Fl::reload_scheme() {
tile.mask = 0;
}
if (!scheme_bg_) scheme_bg_ = new Fl_Tiled_Image(&tile, Fl::w(), Fl::h());
if (!scheme_bg_) scheme_bg_ = new Fl_Tiled_Image(&tile, w(), h());
// Load plastic buttons, etc...
set_boxtype(FL_UP_FRAME, FL_PLASTIC_UP_FRAME);
@@ -305,11 +305,11 @@ int Fl::reload_scheme() {
}
// Set (or clear) the background tile for all windows...
for (w = first_window(); w; w = next_window(w)) {
w->labeltype(scheme_bg_ ? FL_NORMAL_LABEL : FL_NO_LABEL);
w->align(FL_ALIGN_CENTER | FL_ALIGN_INSIDE | FL_ALIGN_CLIP);
w->image(scheme_bg_);
w->redraw();
for (win = first_window(); win; win = next_window(win)) {
win->labeltype(scheme_bg_ ? FL_NORMAL_LABEL : FL_NO_LABEL);
win->align(FL_ALIGN_CENTER | FL_ALIGN_INSIDE | FL_ALIGN_CLIP);
win->image(scheme_bg_);
win->redraw();
}
return 1;
@@ -317,5 +317,5 @@ int Fl::reload_scheme() {
//
// End of "$Id: Fl_get_system_colors.cxx,v 1.6.2.7.2.12 2002/07/17 15:23:58 easysw Exp $".
// End of "$Id: Fl_get_system_colors.cxx,v 1.6.2.7.2.13 2002/08/09 03:17:30 easysw Exp $".
//
+5 -5
View File
@@ -1,5 +1,5 @@
//
// "$Id: Fl_grab.cxx,v 1.1.2.4.2.6 2002/01/03 08:08:21 matthiaswm Exp $"
// "$Id: Fl_grab.cxx,v 1.1.2.4.2.7 2002/08/09 03:17:30 easysw Exp $"
//
// Grab/release code for the Fast Light Tool Kit (FLTK).
//
@@ -49,8 +49,8 @@ extern HWND fl_capture;
extern WindowRef fl_capture;
#endif
void Fl::grab(Fl_Window* w) {
if (w) {
void Fl::grab(Fl_Window* win) {
if (win) {
if (!grab_) {
#ifdef WIN32
SetActiveWindow(fl_capture = fl_xid(first_window()));
@@ -77,7 +77,7 @@ void Fl::grab(Fl_Window* w) {
fl_event_time);
#endif
}
grab_ = w;
grab_ = win;
} else {
if (grab_) {
#ifdef WIN32
@@ -100,5 +100,5 @@ void Fl::grab(Fl_Window* w) {
}
//
// End of "$Id: Fl_grab.cxx,v 1.1.2.4.2.6 2002/01/03 08:08:21 matthiaswm Exp $".
// End of "$Id: Fl_grab.cxx,v 1.1.2.4.2.7 2002/08/09 03:17:30 easysw Exp $".
//
+69 -69
View File
File diff suppressed because it is too large Load Diff
+4 -4
View File
@@ -1,5 +1,5 @@
//
// "$Id: fl_boxtype.cxx,v 1.8.2.4.2.9 2002/07/30 14:57:02 easysw Exp $"
// "$Id: fl_boxtype.cxx,v 1.8.2.4.2.10 2002/08/09 03:17:30 easysw Exp $"
//
// Box drawing code for the Fast Light Tool Kit (FLTK).
//
@@ -287,13 +287,13 @@ void Fl_Widget::draw_box(Fl_Boxtype b, Fl_Color c) const {
draw_box(b, x_, y_, w_, h_, c);
}
void Fl_Widget::draw_box(Fl_Boxtype b, int x, int y, int w, int h, Fl_Color c)
void Fl_Widget::draw_box(Fl_Boxtype b, int X, int Y, int W, int H, Fl_Color c)
const {
draw_it_active = active_r();
fl_box_table[b].f(x, y, w, h, c);
fl_box_table[b].f(X, Y, W, H, c);
draw_it_active = 1;
}
//
// End of "$Id: fl_boxtype.cxx,v 1.8.2.4.2.9 2002/07/30 14:57:02 easysw Exp $".
// End of "$Id: fl_boxtype.cxx,v 1.8.2.4.2.10 2002/08/09 03:17:30 easysw Exp $".
//
+9 -9
View File
@@ -1,5 +1,5 @@
//
// "$Id: fl_cursor.cxx,v 1.6.2.6.2.6 2002/08/05 17:50:25 easysw Exp $"
// "$Id: fl_cursor.cxx,v 1.6.2.6.2.7 2002/08/09 03:17:30 easysw Exp $"
//
// Mouse cursor support for the Fast Light Tool Kit (FLTK).
//
@@ -265,7 +265,7 @@ static struct TableEntry {
void Fl_Window::cursor(Fl_Cursor c, Fl_Color fg, Fl_Color bg) {
if (!shown()) return;
Cursor cursor;
Cursor xc;
int deleteit = 0;
if (c == FL_CURSOR_DEFAULT) {
c = cursor_default;
@@ -274,7 +274,7 @@ void Fl_Window::cursor(Fl_Cursor c, Fl_Color fg, Fl_Color bg) {
}
if (!c) {
cursor = None;
xc = None;
} else {
if (c >= FL_CURSOR_NS) {
TableEntry *q = (c > FL_CURSOR_NESW) ? table+4 : table+(c-FL_CURSOR_NS);
@@ -291,9 +291,9 @@ void Fl_Window::cursor(Fl_Cursor c, Fl_Color fg, Fl_Color bg) {
XFreePixmap(fl_display, m);
XFreePixmap(fl_display, p);
}
cursor = q->cursor;
xc = q->cursor;
} else {
cursor = XCreateFontCursor(fl_display, (c-1)*2);
xc = XCreateFontCursor(fl_display, (c-1)*2);
deleteit = 1;
}
XColor fgc;
@@ -303,14 +303,14 @@ void Fl_Window::cursor(Fl_Cursor c, Fl_Color fg, Fl_Color bg) {
XColor bgc;
Fl::get_color(bg,r,g,b);
bgc.red = r<<8; bgc.green = g<<8; bgc.blue = b<<8;
XRecolorCursor(fl_display, cursor, &fgc, &bgc);
XRecolorCursor(fl_display, xc, &fgc, &bgc);
}
XDefineCursor(fl_display, fl_xid(this), cursor);
if (deleteit) XFreeCursor(fl_display, cursor);
XDefineCursor(fl_display, fl_xid(this), xc);
if (deleteit) XFreeCursor(fl_display, xc);
}
#endif
//
// End of "$Id: fl_cursor.cxx,v 1.6.2.6.2.6 2002/08/05 17:50:25 easysw Exp $".
// End of "$Id: fl_cursor.cxx,v 1.6.2.6.2.7 2002/08/09 03:17:30 easysw Exp $".
//
+8 -8
View File
@@ -1,5 +1,5 @@
//
// "$Id: fl_curve.cxx,v 1.4.2.4.2.3 2002/01/01 15:11:32 easysw Exp $"
// "$Id: fl_curve.cxx,v 1.4.2.4.2.4 2002/08/09 03:17:30 easysw Exp $"
//
// Bezier curve functions for the Fast Light Tool Kit (FLTK).
//
@@ -44,15 +44,15 @@ void fl_curve(double X0, double Y0,
fl_transformed_vertex(x,y);
double x1 = fl_transform_x(X1,Y1);
double y1 = fl_transform_y(X1,Y1);
double yy1 = fl_transform_y(X1,Y1);
double x2 = fl_transform_x(X2,Y2);
double y2 = fl_transform_y(X2,Y2);
double x3 = fl_transform_x(X3,Y3);
double y3 = fl_transform_y(X3,Y3);
// find the area:
double a = fabs((x-x2)*(y3-y1)-(y-y2)*(x3-x1));
double b = fabs((x-x3)*(y2-y1)-(y-y3)*(x2-x1));
double a = fabs((x-x2)*(y3-yy1)-(y-y2)*(x3-x1));
double b = fabs((x-x3)*(y2-yy1)-(y-y3)*(x2-x1));
if (b > a) a = b;
// use that to guess at the number of segments:
@@ -72,9 +72,9 @@ void fl_curve(double X0, double Y0,
double dx2 = dx3 + 2*xb*e*e;
// calculate the coefficients of 3rd order equation:
double ya = (y3-3*y2+3*y1-y);
double yb = 3*(y2-2*y1+y);
double yc = 3*(y1-y);
double ya = (y3-3*y2+3*yy1-y);
double yb = 3*(y2-2*yy1+y);
double yc = 3*(yy1-y);
// calculate the forward differences:
double dy1 = ((ya*e+yb)*e+yc)*e;
double dy3 = 6*ya*e*e*e;
@@ -100,5 +100,5 @@ void fl_curve(double X0, double Y0,
}
//
// End of "$Id: fl_curve.cxx,v 1.4.2.4.2.3 2002/01/01 15:11:32 easysw Exp $".
// End of "$Id: fl_curve.cxx,v 1.4.2.4.2.4 2002/08/09 03:17:30 easysw Exp $".
//
+12 -12
View File
@@ -1,5 +1,5 @@
//
// "$Id: fl_dnd_x.cxx,v 1.5.2.4 2002/04/10 19:22:45 easysw Exp $"
// "$Id: fl_dnd_x.cxx,v 1.5.2.5 2002/08/09 03:17:30 easysw Exp $"
//
// Drag & Drop code for the Fast Light Tool Kit (FLTK).
//
@@ -86,7 +86,7 @@ int Fl::dnd() {
fl_local_grab = grabfunc;
Window target_window = 0;
Fl_Window* local_window = 0;
int version = 4; int dest_x, dest_y;
int dndversion = 4; int dest_x, dest_y;
XSetSelectionOwner(fl_display, fl_XdndSelection, fl_message_window, fl_event_time);
while (Fl::pushed()) {
@@ -110,25 +110,25 @@ int Fl::dnd() {
if (new_window != target_window) {
if (local_window) {
local_handle(FL_DND_LEAVE, local_window);
} else if (version) {
} else if (dndversion) {
fl_sendClientMessage(target_window, fl_XdndLeave, source_window);
}
version = new_version;
dndversion = new_version;
target_window = new_window;
local_window = new_local_window;
if (local_window) {
local_handle(FL_DND_ENTER, local_window);
} else if (version) {
} else if (dndversion) {
fl_sendClientMessage(target_window, fl_XdndEnter, source_window,
version<<24, XA_STRING, 0, 0);
dndversion<<24, XA_STRING, 0, 0);
}
}
if (local_window) {
local_handle(FL_DND_DRAG, local_window);
} else if (version) {
} else if (dndversion) {
fl_sendClientMessage(target_window, fl_XdndPosition, source_window,
0, (e_x_root<<16)|e_y_root, fl_event_time,
fl_XdndActionCopy);
0, (e_x_root<<16)|e_y_root, fl_event_time,
fl_XdndActionCopy);
}
Fl::wait();
}
@@ -136,9 +136,9 @@ int Fl::dnd() {
if (local_window) {
fl_i_own_selection[0] = 1;
if (local_handle(FL_DND_RELEASE, local_window)) paste(*belowmouse(), 0);
} else if (version) {
} else if (dndversion) {
fl_sendClientMessage(target_window, fl_XdndDrop, source_window,
0, fl_event_time);
0, fl_event_time);
} else if (target_window) {
// fake a drop by clicking the middle mouse button:
XButtonEvent msg;
@@ -167,5 +167,5 @@ int Fl::dnd() {
//
// End of "$Id: fl_dnd_x.cxx,v 1.5.2.4 2002/04/10 19:22:45 easysw Exp $".
// End of "$Id: fl_dnd_x.cxx,v 1.5.2.5 2002/08/09 03:17:30 easysw Exp $".
//
+24 -24
View File
@@ -1,5 +1,5 @@
//
// "$Id: fl_draw_image.cxx,v 1.5.2.6.2.4 2002/04/11 11:52:42 easysw Exp $"
// "$Id: fl_draw_image.cxx,v 1.5.2.6.2.5 2002/08/09 03:17:30 easysw Exp $"
//
// Image drawing routines for the Fast Light Tool Kit (FLTK).
//
@@ -63,7 +63,7 @@
# include "Fl_XColor.H"
# include "flstring.h"
static XImage i; // template used to pass info to X
static XImage xi; // template used to pass info to X
static int bytes_per_pixel;
static int scanline_add;
static int scanline_mask;
@@ -358,16 +358,16 @@ static void figure_out_visual() {
XPixmapFormatValues *pfv;
for (pfv = pfvlist; pfv < pfvlist+FL_NUM_pfv; pfv++)
if (pfv->depth == fl_visual->depth) break;
i.format = ZPixmap;
i.byte_order = ImageByteOrder(fl_display);
xi.format = ZPixmap;
xi.byte_order = ImageByteOrder(fl_display);
//i.bitmap_unit = 8;
//i.bitmap_bit_order = MSBFirst;
//i.bitmap_pad = 8;
i.depth = fl_visual->depth;
i.bits_per_pixel = pfv->bits_per_pixel;
xi.depth = fl_visual->depth;
xi.bits_per_pixel = pfv->bits_per_pixel;
if (i.bits_per_pixel & 7) bytes_per_pixel = 0; // produce fatal error
else bytes_per_pixel = i.bits_per_pixel/8;
if (xi.bits_per_pixel & 7) bytes_per_pixel = 0; // produce fatal error
else bytes_per_pixel = xi.bits_per_pixel/8;
unsigned int n = pfv->scanline_pad/8;
if (pfv->scanline_pad & 7 || (n&(n-1)))
@@ -383,7 +383,7 @@ static void figure_out_visual() {
return;
}
if (!fl_visual->red_mask)
Fl::fatal("Can't do %d bits_per_pixel colormap",i.bits_per_pixel);
Fl::fatal("Can't do %d bits_per_pixel colormap",xi.bits_per_pixel);
# endif
// otherwise it is a TrueColor visual:
@@ -398,9 +398,9 @@ static void figure_out_visual() {
// All 16-bit TrueColor visuals are supported on any machine with
// 24 or more bits per integer.
# ifdef U16
::i.byte_order = WORDS_BIGENDIAN;
xi.byte_order = WORDS_BIGENDIAN;
# else
::i.byte_order = 1;
xi.byte_order = 1;
# endif
if (rs == 11 && gs == 6 && bs == 0 && fl_extrashift == 3) {
converter = c565_converter;
@@ -412,7 +412,7 @@ static void figure_out_visual() {
break;
case 3:
if (::i.byte_order) {rs = 16-rs; gs = 16-gs; bs = 16-bs;}
if (xi.byte_order) {rs = 16-rs; gs = 16-gs; bs = 16-bs;}
if (rs == 0 && gs == 8 && bs == 16) {
converter = rgb_converter;
mono_converter = rrr_converter;
@@ -425,7 +425,7 @@ static void figure_out_visual() {
break;
case 4:
if ((::i.byte_order!=0) != WORDS_BIGENDIAN)
if ((xi.byte_order!=0) != WORDS_BIGENDIAN)
{rs = 24-rs; gs = 24-gs; bs = 24-bs;}
if (rs == 0 && gs == 8 && bs == 16) {
converter = xbgr_converter;
@@ -440,14 +440,14 @@ static void figure_out_visual() {
converter = xrgb_converter;
mono_converter = xrrr_converter;
} else {
::i.byte_order = WORDS_BIGENDIAN;
xi.byte_order = WORDS_BIGENDIAN;
converter = color32_converter;
mono_converter = mono32_converter;
}
break;
default:
Fl::fatal("Can't do %d bits_per_pixel",i.bits_per_pixel);
Fl::fatal("Can't do %d bits_per_pixel",xi.bits_per_pixel);
}
}
@@ -467,8 +467,8 @@ static void innards(const uchar *buf, int X, int Y, int W, int H,
dy -= Y;
if (!bytes_per_pixel) figure_out_visual();
i.width = w;
i.height = h;
xi.width = w;
xi.height = h;
void (*conv)(const uchar *from, uchar *to, int w, int delta) = converter;
if (mono) conv = mono_converter;
@@ -491,8 +491,8 @@ static void innards(const uchar *buf, int X, int Y, int W, int H,
# endif
conv == rgb_converter && delta==3
) && !(linedelta&scanline_add)) {
i.data = (char *)(buf+delta*dx+linedelta*dy);
i.bytes_per_line = linedelta;
xi.data = (char *)(buf+delta*dx+linedelta*dy);
xi.bytes_per_line = linedelta;
} else {
int linesize = ((w*bytes_per_pixel+scanline_add)&scanline_mask)/sizeof(STORETYPE);
@@ -509,8 +509,8 @@ static void innards(const uchar *buf, int X, int Y, int W, int H,
buffer_size = size;
buffer = new STORETYPE[size];
}}
i.data = (char *)buffer;
i.bytes_per_line = linesize*sizeof(STORETYPE);
xi.data = (char *)buffer;
xi.bytes_per_line = linesize*sizeof(STORETYPE);
if (buf) {
buf += delta*dx+linedelta*dy;
for (int j=0; j<h; ) {
@@ -521,7 +521,7 @@ static void innards(const uchar *buf, int X, int Y, int W, int H,
buf += linedelta;
to += linesize;
}
XPutImage(fl_display,fl_window,fl_gc, &i, 0, 0, X+dx, Y+dy+j-k, w, k);
XPutImage(fl_display,fl_window,fl_gc, &xi, 0, 0, X+dx, Y+dy+j-k, w, k);
}
} else {
STORETYPE* linebuf = new STORETYPE[(W*delta+(sizeof(STORETYPE)-1))/sizeof(STORETYPE)];
@@ -533,7 +533,7 @@ static void innards(const uchar *buf, int X, int Y, int W, int H,
conv((uchar*)linebuf, (uchar*)to, w, delta);
to += linesize;
}
XPutImage(fl_display,fl_window,fl_gc, &i, 0, 0, X+dx, Y+dy+j-k, w, k);
XPutImage(fl_display,fl_window,fl_gc, &xi, 0, 0, X+dx, Y+dy+j-k, w, k);
}
delete[] linebuf;
@@ -570,5 +570,5 @@ void fl_rectf(int x, int y, int w, int h, uchar r, uchar g, uchar b) {
#endif
//
// End of "$Id: fl_draw_image.cxx,v 1.5.2.6.2.4 2002/04/11 11:52:42 easysw Exp $".
// End of "$Id: fl_draw_image.cxx,v 1.5.2.6.2.5 2002/08/09 03:17:30 easysw Exp $".
//
+17 -17
View File
@@ -1,5 +1,5 @@
//
// "$Id: fl_draw_pixmap.cxx,v 1.4.2.8.2.9 2002/05/25 13:38:25 easysw Exp $"
// "$Id: fl_draw_pixmap.cxx,v 1.4.2.8.2.10 2002/08/09 03:17:30 easysw Exp $"
//
// Pixmap drawing code for the Fast Light Tool Kit (FLTK).
//
@@ -178,20 +178,20 @@ int fl_draw_pixmap(const char*const* di, int x, int y, Fl_Color bg) {
for (int i=0; i<ncolors; i++) {
const uchar *p = *data++;
// the first 1 or 2 characters are the color index:
int index = *p++;
int ind = *p++;
uchar* c;
if (chars_per_pixel>1) {
#ifdef U64
U64* colors = d.byte1[index];
if (!colors) colors = d.byte1[index] = new U64[256];
U64* colors = d.byte1[ind];
if (!colors) colors = d.byte1[ind] = new U64[256];
#else
U32* colors = d.byte1[index];
if (!colors) colors = d.byte1[index] = new U32[256];
U32* colors = d.byte1[ind];
if (!colors) colors = d.byte1[ind] = new U32[256];
#endif
c = (uchar*)&colors[*p];
index = (index<<8)+*p++;
ind = (ind<<8)+*p++;
} else {
c = (uchar *)&d.colors[index];
c = (uchar *)&d.colors[ind];
}
// look for "c word", or last word if none:
const uchar *previous_word = p;
@@ -215,7 +215,7 @@ int fl_draw_pixmap(const char*const* di, int x, int y, Fl_Color bg) {
// assume "None" or "#transparent" for any errors
// "bg" should be transparent...
Fl::get_color(bg, c[0], c[1], c[2]);
transparent_index = index;
transparent_index = ind;
}
}
}
@@ -226,10 +226,10 @@ int fl_draw_pixmap(const char*const* di, int x, int y, Fl_Color bg) {
int W = (d.w+7)/8;
uchar* bitmap = new uchar[W * d.h];
*fl_mask_bitmap = bitmap;
for (int y = 0; y < d.h; y++) {
const uchar* p = data[y];
for (int Y = 0; Y < d.h; Y++) {
const uchar* p = data[Y];
if (chars_per_pixel <= 1) {
for (int x = 0; x < W; x++) {
for (int X = 0; X < W; X++) {
int b = (*p++ != transparent_index);
if (*p++ != transparent_index) b |= 2;
if (*p++ != transparent_index) b |= 4;
@@ -241,12 +241,12 @@ int fl_draw_pixmap(const char*const* di, int x, int y, Fl_Color bg) {
*bitmap++ = b;
}
} else {
for (int x = 0; x < W; x++) {
for (int X = 0; X < W; X++) {
int b = 0;
for (int i = 0; i < 8; i++) {
int index = *p++;
index = (index<<8) | (*p++);
if (index != transparent_index) b |= (1<<i);
int ind = *p++;
ind = (ind<<8) | (*p++);
if (ind != transparent_index) b |= (1<<i);
}
*bitmap++ = b;
}
@@ -260,5 +260,5 @@ int fl_draw_pixmap(const char*const* di, int x, int y, Fl_Color bg) {
}
//
// End of "$Id: fl_draw_pixmap.cxx,v 1.4.2.8.2.9 2002/05/25 13:38:25 easysw Exp $".
// End of "$Id: fl_draw_pixmap.cxx,v 1.4.2.8.2.10 2002/08/09 03:17:30 easysw Exp $".
//
+8 -8
View File
@@ -1,5 +1,5 @@
//
// "$Id: fl_shortcut.cxx,v 1.4.2.9.2.6 2002/06/26 02:01:33 matthiaswm Exp $"
// "$Id: fl_shortcut.cxx,v 1.4.2.9.2.7 2002/08/09 03:17:30 easysw Exp $"
//
// Shortcut support routines for the Fast Light Tool Kit (FLTK).
//
@@ -181,14 +181,14 @@ int fl_old_shortcut(const char* s) {
// Tests for &x shortcuts in button labels:
int Fl_Widget::test_shortcut(const char *label) {
int Fl_Widget::test_shortcut(const char *l) {
char c = Fl::event_text()[0];
if (!c || !label) return 0;
if (!c || !l) return 0;
for (;;) {
if (!*label) return 0;
if (*label++ == '&' && *label) {
if (*label == '&') label++;
else if (*label == c) return 1;
if (!*l) return 0;
if (*l++ == '&' && *l) {
if (*l == '&') l++;
else if (*l == c) return 1;
else return 0;
}
}
@@ -200,5 +200,5 @@ int Fl_Widget::test_shortcut() {
}
//
// End of "$Id: fl_shortcut.cxx,v 1.4.2.9.2.6 2002/06/26 02:01:33 matthiaswm Exp $".
// End of "$Id: fl_shortcut.cxx,v 1.4.2.9.2.7 2002/08/09 03:17:30 easysw Exp $".
//
+7 -7
View File
@@ -1,5 +1,5 @@
//
// "$Id: fl_show_colormap.cxx,v 1.5.2.4.2.1 2002/01/01 15:11:32 easysw Exp $"
// "$Id: fl_show_colormap.cxx,v 1.5.2.4.2.2 2002/08/09 03:17:30 easysw Exp $"
//
// Colormap color selection dialog for the Fast Light Tool Kit (FLTK).
//
@@ -56,14 +56,14 @@ ColorMenu::ColorMenu(Fl_Color oldcol) :
void ColorMenu::drawbox(Fl_Color c) {
if (c < 0 || c > 255) return;
int x = (c%8)*BOXSIZE+BORDER;
int y = (c/8)*BOXSIZE+BORDER;
int X = (c%8)*BOXSIZE+BORDER;
int Y = (c/8)*BOXSIZE+BORDER;
#if BORDER_WIDTH < 3
if (c == which) fl_draw_box(FL_DOWN_BOX, x+1, y+1, BOXSIZE-1, BOXSIZE-1, c);
else fl_draw_box(FL_BORDER_BOX, x, y, BOXSIZE+1, BOXSIZE+1, c);
if (c == which) fl_draw_box(FL_DOWN_BOX, X+1, Y+1, BOXSIZE-1, BOXSIZE-1, c);
else fl_draw_box(FL_BORDER_BOX, X, Y, BOXSIZE+1, BOXSIZE+1, c);
#else
fl_draw_box(c == which ? FL_DOWN_BOX : FL_BORDER_BOX,
x, y, BOXSIZE+1, BOXSIZE+1, c);
X, Y, BOXSIZE+1, BOXSIZE+1, c);
#endif
}
@@ -150,5 +150,5 @@ Fl_Color fl_show_colormap(Fl_Color oldcol) {
}
//
// End of "$Id: fl_show_colormap.cxx,v 1.5.2.4.2.1 2002/01/01 15:11:32 easysw Exp $".
// End of "$Id: fl_show_colormap.cxx,v 1.5.2.4.2.2 2002/08/09 03:17:30 easysw Exp $".
//
+4 -4
View File
@@ -1,5 +1,5 @@
//
// "$Id: forms_bitmap.cxx,v 1.4.2.3.2.1 2002/01/01 15:11:32 easysw Exp $"
// "$Id: forms_bitmap.cxx,v 1.4.2.3.2.2 2002/08/09 03:17:30 easysw Exp $"
//
// Forms compatible bitmap function for the Fast Light Tool Kit (FLTK).
//
@@ -26,8 +26,8 @@
#include <FL/forms.H>
Fl_FormsBitmap::Fl_FormsBitmap(
Fl_Boxtype t, int x, int y, int w, int h, const char* l)
: Fl_Widget(x, y, w, h, l) {
Fl_Boxtype t, int X, int Y, int W, int H, const char* l)
: Fl_Widget(X, Y, W, H, l) {
box(t);
b = 0;
color(FL_BLACK);
@@ -46,5 +46,5 @@ void Fl_FormsBitmap::draw() {
}
//
// End of "$Id: forms_bitmap.cxx,v 1.4.2.3.2.1 2002/01/01 15:11:32 easysw Exp $".
// End of "$Id: forms_bitmap.cxx,v 1.4.2.3.2.2 2002/08/09 03:17:30 easysw Exp $".
//
+5 -5
View File
@@ -1,5 +1,5 @@
//
// "$Id: forms_compatability.cxx,v 1.5.2.3.2.2 2002/01/01 15:11:32 easysw Exp $"
// "$Id: forms_compatability.cxx,v 1.5.2.3.2.3 2002/08/09 03:17:30 easysw Exp $"
//
// Forms compatibility functions for the Fast Light Tool Kit (FLTK).
//
@@ -60,9 +60,9 @@ void Fl_Group::forms_end() {
int Y = o->h();
Fl_Widget*const* a = array();
for (int i=children(); i--;) {
Fl_Widget* o = *a++;
int newy = Y-o->y()-o->h();
o->y(newy);
Fl_Widget* ow = *a++;
int newy = Y-ow->y()-ow->h();
ow->y(newy);
}
}
end();
@@ -202,5 +202,5 @@ char *fl_show_simple_input(const char *str1, const char *defstr) {
}
//
// End of "$Id: forms_compatability.cxx,v 1.5.2.3.2.2 2002/01/01 15:11:32 easysw Exp $".
// End of "$Id: forms_compatability.cxx,v 1.5.2.3.2.3 2002/08/09 03:17:30 easysw Exp $".
//
+4 -4
View File
@@ -1,5 +1,5 @@
//
// "$Id: forms_free.cxx,v 1.4.2.4.2.1 2002/01/01 15:11:32 easysw Exp $"
// "$Id: forms_free.cxx,v 1.4.2.4.2.2 2002/08/09 03:17:30 easysw Exp $"
//
// Forms free widget routines for the Fast Light Tool Kit (FLTK).
//
@@ -37,9 +37,9 @@ void Fl_Free::step(void *v) {
Fl::add_timeout(.01,step,v);
}
Fl_Free::Fl_Free(uchar t,int x,int y,int w,int h,const char *l,
Fl_Free::Fl_Free(uchar t,int X, int Y, int W, int H,const char *l,
FL_HANDLEPTR hdl) :
Fl_Widget(x,y,w,h,l) {
Fl_Widget(X,Y,W,H,l) {
type(t);
hfunc = hdl;
if (t == FL_SLEEPING_FREE) set_flag(INACTIVE);
@@ -73,5 +73,5 @@ int Fl_Free::handle(int e) {
}
//
// End of "$Id: forms_free.cxx,v 1.4.2.4.2.1 2002/01/01 15:11:32 easysw Exp $".
// End of "$Id: forms_free.cxx,v 1.4.2.4.2.2 2002/08/09 03:17:30 easysw Exp $".
//
+4 -4
View File
@@ -1,5 +1,5 @@
//
// "$Id: forms_pixmap.cxx,v 1.4.2.3.2.1 2002/01/01 15:11:32 easysw Exp $"
// "$Id: forms_pixmap.cxx,v 1.4.2.3.2.2 2002/08/09 03:17:30 easysw Exp $"
//
// Forms pixmap drawing routines for the Fast Light Tool Kit (FLTK).
//
@@ -26,8 +26,8 @@
#include <FL/forms.H>
Fl_FormsPixmap::Fl_FormsPixmap(
Fl_Boxtype t, int x, int y, int w, int h, const char* l)
: Fl_Widget(x, y, w, h, l) {
Fl_Boxtype t, int X, int Y, int W, int H, const char* l)
: Fl_Widget(X, Y, W, H, l) {
box(t);
b = 0;
color(FL_BLACK);
@@ -46,5 +46,5 @@ void Fl_FormsPixmap::draw() {
}
//
// End of "$Id: forms_pixmap.cxx,v 1.4.2.3.2.1 2002/01/01 15:11:32 easysw Exp $".
// End of "$Id: forms_pixmap.cxx,v 1.4.2.3.2.2 2002/08/09 03:17:30 easysw Exp $".
//
+4 -4
View File
@@ -1,5 +1,5 @@
//
// "$Id: forms_timer.cxx,v 1.4.2.3.2.2 2002/06/29 00:10:04 matthiaswm Exp $"
// "$Id: forms_timer.cxx,v 1.4.2.3.2.3 2002/08/09 03:17:30 easysw Exp $"
//
// Forms timer object for the Fast Light Tool Kit (FLTK).
//
@@ -126,8 +126,8 @@ Fl_Timer::~Fl_Timer() {
Fl::remove_timeout(stepcb, this);
}
Fl_Timer::Fl_Timer(uchar t, int x, int y, int w, int h, const char* l)
: Fl_Widget(x, y, w, h, l) {
Fl_Timer::Fl_Timer(uchar t, int X, int Y, int W, int H, const char* l)
: Fl_Widget(X, Y, W, H, l) {
box(FL_DOWN_BOX);
selection_color(FL_RED);
delay = 0;
@@ -161,5 +161,5 @@ void Fl_Timer::suspended(char d) {
}
//
// End of "$Id: forms_timer.cxx,v 1.4.2.3.2.2 2002/06/29 00:10:04 matthiaswm Exp $".
// End of "$Id: forms_timer.cxx,v 1.4.2.3.2.3 2002/08/09 03:17:30 easysw Exp $".
//
+9 -9
View File
@@ -1,5 +1,5 @@
//
// "$Id: glut_compatability.cxx,v 1.4.2.5.2.2 2002/06/26 14:52:33 matthiaswm Exp $"
// "$Id: glut_compatability.cxx,v 1.4.2.5.2.3 2002/08/09 03:17:30 easysw Exp $"
//
// GLUT emulation routines for the Fast Light Tool Kit (FLTK).
//
@@ -127,9 +127,9 @@ int Fl_Glut_Window::handle(int event) {
break;
} else {
if (special) {
int i = Fl::event_key();
if (i > FL_F && i <= FL_F_Last) i = i-FL_F;
special(i,ex,ey);
int k = Fl::event_key();
if (k > FL_F && k <= FL_F_Last) k -= FL_F;
special(k,ex,ey);
return 1;
}
break;
@@ -167,11 +167,11 @@ void Fl_Glut_Window::_init() {
mode(glut_mode);
}
Fl_Glut_Window::Fl_Glut_Window(int w, int h, const char *t) :
Fl_Gl_Window(w,h,t) {_init();}
Fl_Glut_Window::Fl_Glut_Window(int W, int H, const char *t) :
Fl_Gl_Window(W,H,t) {_init();}
Fl_Glut_Window::Fl_Glut_Window(int x,int y,int w,int h, const char *t) :
Fl_Gl_Window(x,y,w,h,t) {_init();}
Fl_Glut_Window::Fl_Glut_Window(int X,int Y,int W,int H, const char *t) :
Fl_Gl_Window(X,Y,W,H,t) {_init();}
static int initargc;
static char **initargv;
@@ -402,5 +402,5 @@ int glutLayerGet(GLenum type) {
#endif
//
// End of "$Id: glut_compatability.cxx,v 1.4.2.5.2.2 2002/06/26 14:52:33 matthiaswm Exp $".
// End of "$Id: glut_compatability.cxx,v 1.4.2.5.2.3 2002/08/09 03:17:30 easysw Exp $".
//
+8 -8
View File
@@ -1,5 +1,5 @@
/*
* "$Id: numericsort.c,v 1.10.2.4.2.5 2002/05/04 18:41:55 easysw Exp $"
* "$Id: numericsort.c,v 1.10.2.4.2.6 2002/08/09 03:17:30 easysw Exp $"
*
* Numeric sorting routine for the Fast Light Tool Kit (FLTK).
*
@@ -60,15 +60,15 @@ static int numericsort(struct dirent **A, struct dirent **B, int cs) {
const char* b = (*B)->d_name;
int ret = 0;
for (;;) {
if (isdigit((unsigned)*a) && isdigit((unsigned)*b)) {
if (isdigit(*a & 255) && isdigit(*b & 255)) {
int diff,magdiff;
while (*a == '0') a++;
while (*b == '0') b++;
while (isdigit((unsigned)*a) && *a == *b) {a++; b++;}
diff = (isdigit((unsigned)*a) && isdigit((unsigned)*b)) ? *a - *b : 0;
while (isdigit(*a & 255) && *a == *b) {a++; b++;}
diff = (isdigit(*a & 255) && isdigit(*b & 255)) ? *a - *b : 0;
magdiff = 0;
while (isdigit((unsigned)*a)) {magdiff++; a++;}
while (isdigit((unsigned)*b)) {magdiff--; b++;}
while (isdigit(*a & 255)) {magdiff++; a++;}
while (isdigit(*b & 255)) {magdiff--; b++;}
if (magdiff) {ret = magdiff; break;} /* compare # of significant digits*/
if (diff) {ret = diff; break;} /* compare first non-zero digit */
} else {
@@ -77,7 +77,7 @@ static int numericsort(struct dirent **A, struct dirent **B, int cs) {
if ((ret = *a-*b)) break;
} else {
/* compare case-insensitve */
if ((ret = tolower((unsigned)*a)-tolower((unsigned)*b))) break;
if ((ret = tolower(*a & 255)-tolower(*b & 255))) break;
}
if (!*a) break;
@@ -105,5 +105,5 @@ int fl_numericsort(struct dirent **A, struct dirent **B) {
}
/*
* End of "$Id: numericsort.c,v 1.10.2.4.2.5 2002/05/04 18:41:55 easysw Exp $".
* End of "$Id: numericsort.c,v 1.10.2.4.2.6 2002/08/09 03:17:30 easysw Exp $".
*/