summaryrefslogtreecommitdiff
path: root/FL
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2001-10-29 03:44:33 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2001-10-29 03:44:33 +0000
commit079082ef7c67377f8e24fcec6cadaa4c49e3af2b (patch)
tree6967ed6788ff20429fd5fd9c132517c676cb942f /FL
parenta00b52a6760c83414a518a69d91761389d9db322 (diff)
32-bit color (RGB0 or 000I), a la FLTK 2.0, including fl_rgb_color()
function to generate an RGB Fl_Color value. Sort button names in FLUID. Fix focus and scroll problems in Fl_Text_Display/Editor. Fix radio/button demo. Removed D2 menubar.H header... git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1663 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL')
-rw-r--r--FL/Enumerations.H10
-rw-r--r--FL/Fl_Browser_.H9
-rw-r--r--FL/Fl_Button.H6
-rw-r--r--FL/Fl_Chart.H17
-rw-r--r--FL/Fl_Counter.H9
-rw-r--r--FL/Fl_File_Icon.H19
-rw-r--r--FL/Fl_Help_View.H10
-rw-r--r--FL/Fl_Input_.H14
-rw-r--r--FL/Fl_Menu_.H12
-rw-r--r--FL/Fl_Menu_Item.H8
-rw-r--r--FL/Fl_Text_Display.H8
-rw-r--r--FL/Fl_Tooltip.H10
-rw-r--r--FL/Fl_Value_Input.H8
-rw-r--r--FL/Fl_Value_Output.H9
-rw-r--r--FL/Fl_Value_Slider.H9
-rw-r--r--FL/Fl_Widget.H22
-rw-r--r--FL/forms.H12
-rw-r--r--FL/menubar.h64
18 files changed, 102 insertions, 154 deletions
diff --git a/FL/Enumerations.H b/FL/Enumerations.H
index 83db4a5e3..93c15afa9 100644
--- a/FL/Enumerations.H
+++ b/FL/Enumerations.H
@@ -1,5 +1,5 @@
//
-// "$Id: Enumerations.H,v 1.18.2.14.2.5 2001/08/06 03:17:43 easysw Exp $"
+// "$Id: Enumerations.H,v 1.18.2.14.2.6 2001/10/29 03:44:31 easysw Exp $"
//
// Enumerations for the Fast Light Tool Kit (FLTK).
//
@@ -288,14 +288,14 @@ enum Fl_Color { // standard colors
FL_COLOR_CUBE = 56
};
-#define inactive fl_inactive
FL_EXPORT Fl_Color fl_inactive(Fl_Color c);
-#define contrast fl_contrast
FL_EXPORT Fl_Color fl_contrast(Fl_Color fg, Fl_Color bg);
FL_EXPORT Fl_Color fl_color_average(Fl_Color c1, Fl_Color c2, float weight);
inline Fl_Color fl_lighter(Fl_Color c) { return fl_color_average(c, FL_WHITE, .67f); }
inline Fl_Color fl_darker(Fl_Color c) { return fl_color_average(c, FL_BLACK, .67f); }
-
+inline Fl_Color fl_rgb_color(uchar r, uchar g, uchar b) {
+ return (Fl_Color)(((((r << 8) | g) << 8) | b) << 8);
+}
#define FL_NUM_GRAY 24
inline Fl_Color fl_gray_ramp(int i) {return (Fl_Color)(i+FL_GRAY_RAMP);}
#define FL_NUM_RED 5
@@ -364,5 +364,5 @@ enum Fl_Damage {
#endif
//
-// End of "$Id: Enumerations.H,v 1.18.2.14.2.5 2001/08/06 03:17:43 easysw Exp $".
+// End of "$Id: Enumerations.H,v 1.18.2.14.2.6 2001/10/29 03:44:31 easysw Exp $".
//
diff --git a/FL/Fl_Browser_.H b/FL/Fl_Browser_.H
index 61aa17c53..1e169530c 100644
--- a/FL/Fl_Browser_.H
+++ b/FL/Fl_Browser_.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Browser_.H,v 1.6.2.4 2001/01/22 15:13:37 easysw Exp $"
+// "$Id: Fl_Browser_.H,v 1.6.2.4.2.1 2001/10/29 03:44:31 easysw Exp $"
//
// Common browser header file for the Fast Light Tool Kit (FLTK).
//
@@ -50,8 +50,9 @@ class Fl_Browser_ : public Fl_Group {
int real_hposition_; // the current horizontal scrolling position
int offset_; // how far down top_ item the real_position is
int max_width; // widest object seen so far
- uchar textfont_, textsize_, textcolor_;
uchar has_scrollbar_; // which scrollbars are enabled
+ uchar textfont_, textsize_;
+ unsigned textcolor_;
void* top_; // which item scrolling position is in
void* selection_; // which is selected (except for FL_MULTI_BROWSER)
void *redraw1,*redraw2; // minimal update pointers
@@ -132,7 +133,7 @@ public:
uchar textsize() const {return textsize_;}
void textsize(uchar s) {textsize_ = s;}
Fl_Color textcolor() const {return (Fl_Color)textcolor_;}
- void textcolor(uchar n) {textcolor_ = n;}
+ void textcolor(unsigned n) {textcolor_ = n;}
static void scrollbar_width(int b) {scrollbar_width_ = b;}
static int scrollbar_width() {return scrollbar_width_;}
@@ -146,5 +147,5 @@ public:
#endif
//
-// End of "$Id: Fl_Browser_.H,v 1.6.2.4 2001/01/22 15:13:37 easysw Exp $".
+// End of "$Id: Fl_Browser_.H,v 1.6.2.4.2.1 2001/10/29 03:44:31 easysw Exp $".
//
diff --git a/FL/Fl_Button.H b/FL/Fl_Button.H
index 32a361099..d16e3e2d2 100644
--- a/FL/Fl_Button.H
+++ b/FL/Fl_Button.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Button.H,v 1.5.2.3 2001/01/22 15:13:37 easysw Exp $"
+// "$Id: Fl_Button.H,v 1.5.2.3.2.1 2001/10/29 03:44:31 easysw Exp $"
//
// Button header file for the Fast Light Tool Kit (FLTK).
//
@@ -65,11 +65,11 @@ public:
// back compatability:
void shortcut(const char *s) {shortcut(fl_old_shortcut(s));}
Fl_Color down_color() const {return selection_color();}
- void down_color(uchar c) {selection_color(c);}
+ void down_color(unsigned c) {selection_color(c);}
};
#endif
//
-// End of "$Id: Fl_Button.H,v 1.5.2.3 2001/01/22 15:13:37 easysw Exp $".
+// End of "$Id: Fl_Button.H,v 1.5.2.3.2.1 2001/10/29 03:44:31 easysw Exp $".
//
diff --git a/FL/Fl_Chart.H b/FL/Fl_Chart.H
index 4ae92d0c9..54f3c3c56 100644
--- a/FL/Fl_Chart.H
+++ b/FL/Fl_Chart.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Chart.H,v 1.6.2.3 2001/01/22 15:13:37 easysw Exp $"
+// "$Id: Fl_Chart.H,v 1.6.2.3.2.1 2001/10/29 03:44:31 easysw Exp $"
//
// Forms chart header file for the Fast Light Tool Kit (FLTK).
//
@@ -46,7 +46,7 @@
struct FL_CHART_ENTRY {
float val;
- uchar col;
+ unsigned col;
char str[FL_CHART_LABEL_MAX+1];
};
@@ -57,15 +57,16 @@ class Fl_Chart : public Fl_Widget {
FL_CHART_ENTRY *entries;
double min,max;
uchar autosize_;
- uchar textfont_,textsize_,textcolor_;
+ uchar textfont_,textsize_;
+ unsigned textcolor_;
protected:
FL_EXPORT void draw();
public:
FL_EXPORT Fl_Chart(int,int,int,int,const char * = 0);
FL_EXPORT void clear();
- FL_EXPORT void add(double, const char * =0, uchar=0);
- FL_EXPORT void insert(int, double, const char * =0, uchar=0);
- FL_EXPORT void replace(int, double, const char * =0, uchar=0);
+ FL_EXPORT void add(double, const char * =0, unsigned=0);
+ FL_EXPORT void insert(int, double, const char * =0, unsigned=0);
+ FL_EXPORT void replace(int, double, const char * =0, unsigned=0);
void bounds(double *a,double *b) const {*a = min; *b = max;}
FL_EXPORT void bounds(double a,double b);
int size() const {return numb;}
@@ -76,7 +77,7 @@ public:
uchar textsize() const {return textsize_;}
void textsize(uchar s) {textsize_ = s;}
Fl_Color textcolor() const {return (Fl_Color)textcolor_;}
- void textcolor(uchar n) {textcolor_ = n;}
+ void textcolor(unsigned n) {textcolor_ = n;}
uchar autosize() const {return autosize_;}
void autosize(uchar n) {autosize_ = n;}
};
@@ -84,5 +85,5 @@ public:
#endif
//
-// End of "$Id: Fl_Chart.H,v 1.6.2.3 2001/01/22 15:13:37 easysw Exp $".
+// End of "$Id: Fl_Chart.H,v 1.6.2.3.2.1 2001/10/29 03:44:31 easysw Exp $".
//
diff --git a/FL/Fl_Counter.H b/FL/Fl_Counter.H
index 4453c9f1c..f209f3f22 100644
--- a/FL/Fl_Counter.H
+++ b/FL/Fl_Counter.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Counter.H,v 1.5.2.3 2001/01/22 15:13:37 easysw Exp $"
+// "$Id: Fl_Counter.H,v 1.5.2.3.2.1 2001/10/29 03:44:31 easysw Exp $"
//
// Counter header file for the Fast Light Tool Kit (FLTK).
//
@@ -38,7 +38,8 @@
class Fl_Counter : public Fl_Valuator {
- uchar textfont_, textsize_, textcolor_;
+ uchar textfont_, textsize_;
+ unsigned textcolor_;
double lstep_;
uchar mouseobj;
static FL_EXPORT void repeat_callback(void *);
@@ -62,12 +63,12 @@ public:
uchar textsize() const {return textsize_;}
void textsize(uchar s) {textsize_ = s;}
Fl_Color textcolor() const {return (Fl_Color)textcolor_;}
- void textcolor(uchar s) {textcolor_ = s;}
+ void textcolor(unsigned s) {textcolor_ = s;}
};
#endif
//
-// End of "$Id: Fl_Counter.H,v 1.5.2.3 2001/01/22 15:13:37 easysw Exp $".
+// End of "$Id: Fl_Counter.H,v 1.5.2.3.2.1 2001/10/29 03:44:31 easysw Exp $".
//
diff --git a/FL/Fl_File_Icon.H b/FL/Fl_File_Icon.H
index 0bdbe7870..6838e4e31 100644
--- a/FL/Fl_File_Icon.H
+++ b/FL/Fl_File_Icon.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_File_Icon.H,v 1.1.2.1 2001/09/29 14:38:58 easysw Exp $"
+// "$Id: Fl_File_Icon.H,v 1.1.2.2 2001/10/29 03:44:31 easysw Exp $"
//
// Fl_File_Icon definitions.
//
@@ -34,6 +34,13 @@
//
+// Special color value for the icon color.
+//
+
+# define FL_ICON_COLOR (Fl_Color)0xffffffff
+
+
+//
// Fl_File_Icon class...
//
@@ -62,11 +69,11 @@ class Fl_File_Icon //// Icon data
enum // Data opcodes
{
END, // End of primitive/icon
- COLOR, // Followed by color index
+ COLOR, // Followed by color value (2 shorts)
LINE, // Start of line
CLOSEDLINE, // Start of closed line
POLYGON, // Start of polygon
- OUTLINEPOLYGON, // Followed by outline color
+ OUTLINEPOLYGON, // Followed by outline color (2 shorts)
VERTEX // Followed by scaled X,Y
};
@@ -74,8 +81,8 @@ class Fl_File_Icon //// Icon data
FL_EXPORT ~Fl_File_Icon();
FL_EXPORT short *add(short d);
- short *add_color(short c)
- { short *d = add(COLOR); add(c); return (d); }
+ short *add_color(Fl_Color c)
+ { short *d = add(COLOR); add(c >> 16); add(c); return (d); }
short *add_vertex(int x, int y)
{ short *d = add(VERTEX); add(x); add(y); return (d); }
short *add_vertex(float x, float y)
@@ -101,5 +108,5 @@ class Fl_File_Icon //// Icon data
#endif // !_Fl_Fl_File_Icon_H_
//
-// End of "$Id: Fl_File_Icon.H,v 1.1.2.1 2001/09/29 14:38:58 easysw Exp $".
+// End of "$Id: Fl_File_Icon.H,v 1.1.2.2 2001/10/29 03:44:31 easysw Exp $".
//
diff --git a/FL/Fl_Help_View.H b/FL/Fl_Help_View.H
index 3098535f2..c81bb059c 100644
--- a/FL/Fl_Help_View.H
+++ b/FL/Fl_Help_View.H
@@ -1,10 +1,10 @@
//
-// "$Id: Fl_Help_View.H,v 1.1.2.2 2001/10/27 03:29:25 easysw Exp $"
+// "$Id: Fl_Help_View.H,v 1.1.2.3 2001/10/29 03:44:31 easysw Exp $"
//
-// Help Viewer widget definitions.
+// Help Viewer widget definitions.
//
-// Copyright 1997-2001 by Easy Software Products.
-// Image support donated by Matthias Melcher, Copyright 2000.
+// Copyright 1997-2001 by Easy Software Products.
+// Image support donated by Matthias Melcher, Copyright 2000.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
@@ -210,5 +210,5 @@ class Fl_Help_View : public Fl_Group //// Help viewer widget
#endif // !_Fl_Help_View_H_
//
-// End of "$Id: Fl_Help_View.H,v 1.1.2.2 2001/10/27 03:29:25 easysw Exp $".
+// End of "$Id: Fl_Help_View.H,v 1.1.2.3 2001/10/29 03:44:31 easysw Exp $".
//
diff --git a/FL/Fl_Input_.H b/FL/Fl_Input_.H
index d44a3f8e3..d8146348a 100644
--- a/FL/Fl_Input_.H
+++ b/FL/Fl_Input_.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Input_.H,v 1.6.2.4 2001/01/22 15:13:37 easysw Exp $"
+// "$Id: Fl_Input_.H,v 1.6.2.4.2.1 2001/10/29 03:44:31 easysw Exp $"
//
// Input base class header file for the Fast Light Tool Kit (FLTK).
//
@@ -50,11 +50,11 @@ class Fl_Input_ : public Fl_Widget {
int mu_p;
int maximum_size_;
+ uchar erase_cursor_only;
uchar textfont_;
uchar textsize_;
- uchar textcolor_;
- uchar cursor_color_;
- uchar erase_cursor_only;
+ unsigned textcolor_;
+ unsigned cursor_color_;
FL_EXPORT const char* expand(const char*, char*) const;
FL_EXPORT double expandpos(const char*, const char*, const char*, int*) const;
@@ -114,13 +114,13 @@ public:
uchar textsize() const {return textsize_;}
void textsize(uchar s) {textsize_ = s;}
Fl_Color textcolor() const {return (Fl_Color)textcolor_;}
- void textcolor(uchar n) {textcolor_ = n;}
+ void textcolor(unsigned n) {textcolor_ = n;}
Fl_Color cursor_color() const {return (Fl_Color)cursor_color_;}
- void cursor_color(uchar n) {cursor_color_ = n;}
+ void cursor_color(unsigned n) {cursor_color_ = n;}
};
#endif
//
-// End of "$Id: Fl_Input_.H,v 1.6.2.4 2001/01/22 15:13:37 easysw Exp $".
+// End of "$Id: Fl_Input_.H,v 1.6.2.4.2.1 2001/10/29 03:44:31 easysw Exp $".
//
diff --git a/FL/Fl_Menu_.H b/FL/Fl_Menu_.H
index 5850e9421..37bd88f9c 100644
--- a/FL/Fl_Menu_.H
+++ b/FL/Fl_Menu_.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Menu_.H,v 1.7.2.4 2001/01/22 15:13:37 easysw Exp $"
+// "$Id: Fl_Menu_.H,v 1.7.2.4.2.1 2001/10/29 03:44:31 easysw Exp $"
//
// Menu base class header file for the Fast Light Tool Kit (FLTK).
//
@@ -38,11 +38,11 @@ class Fl_Menu_ : public Fl_Widget {
protected:
+ uchar alloc;
uchar down_box_;
uchar textfont_;
uchar textsize_;
- uchar textcolor_;
- uchar alloc;
+ unsigned textcolor_;
public:
FL_EXPORT const Fl_Menu_Item* picked(const Fl_Menu_Item*);
@@ -80,18 +80,18 @@ public:
uchar textsize() const {return textsize_;}
void textsize(uchar c) {textsize_=c;}
Fl_Color textcolor() const {return (Fl_Color)textcolor_;}
- void textcolor(uchar c) {textcolor_=c;}
+ void textcolor(unsigned c) {textcolor_=c;}
Fl_Boxtype down_box() const {return (Fl_Boxtype)down_box_;}
void down_box(Fl_Boxtype b) {down_box_ = b;}
// back compatability:
Fl_Color down_color() const {return selection_color();}
- void down_color(uchar c) {selection_color(c);}
+ void down_color(unsigned c) {selection_color(c);}
};
#endif
//
-// End of "$Id: Fl_Menu_.H,v 1.7.2.4 2001/01/22 15:13:37 easysw Exp $".
+// End of "$Id: Fl_Menu_.H,v 1.7.2.4.2.1 2001/10/29 03:44:31 easysw Exp $".
//
diff --git a/FL/Fl_Menu_Item.H b/FL/Fl_Menu_Item.H
index 2f4e2cb8d..de4e58740 100644
--- a/FL/Fl_Menu_Item.H
+++ b/FL/Fl_Menu_Item.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Menu_Item.H,v 1.5.2.4 2001/01/22 15:13:37 easysw Exp $"
+// "$Id: Fl_Menu_Item.H,v 1.5.2.4.2.1 2001/10/29 03:44:31 easysw Exp $"
//
// Menu item header file for the Fast Light Tool Kit (FLTK).
//
@@ -56,7 +56,7 @@ struct Fl_Menu_Item {
uchar labeltype_;
uchar labelfont_;
uchar labelsize_;
- uchar labelcolor_;
+ unsigned labelcolor_;
// advance N items, skipping submenus:
FL_EXPORT const Fl_Menu_Item *next(int=1) const;
@@ -70,7 +70,7 @@ struct Fl_Menu_Item {
Fl_Labeltype labeltype() const {return (Fl_Labeltype)labeltype_;}
void labeltype(Fl_Labeltype a) {labeltype_ = a;}
Fl_Color labelcolor() const {return (Fl_Color)labelcolor_;}
- void labelcolor(uchar a) {labelcolor_ = a;}
+ void labelcolor(unsigned a) {labelcolor_ = a;}
Fl_Font labelfont() const {return (Fl_Font)labelfont_;}
void labelfont(uchar a) {labelfont_ = a;}
uchar labelsize() const {return labelsize_;}
@@ -153,5 +153,5 @@ enum { // back-compatability enum:
#endif
//
-// End of "$Id: Fl_Menu_Item.H,v 1.5.2.4 2001/01/22 15:13:37 easysw Exp $".
+// End of "$Id: Fl_Menu_Item.H,v 1.5.2.4.2.1 2001/10/29 03:44:31 easysw Exp $".
//
diff --git a/FL/Fl_Text_Display.H b/FL/Fl_Text_Display.H
index bd6654d9e..880eab64a 100644
--- a/FL/Fl_Text_Display.H
+++ b/FL/Fl_Text_Display.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Text_Display.H,v 1.4.2.2 2001/08/06 23:51:39 easysw Exp $"
+// "$Id: Fl_Text_Display.H,v 1.4.2.3 2001/10/29 03:44:31 easysw Exp $"
//
// Header file for Fl_Text_Display class.
//
@@ -106,7 +106,7 @@ class Fl_Text_Display: public Fl_Group {
uchar textsize() const {return textsize_;}
void textsize(uchar s) {textsize_ = s;}
Fl_Color textcolor() const {return (Fl_Color)textcolor_;}
- void textcolor(uchar n) {textcolor_ = n;}
+ void textcolor(unsigned n) {textcolor_ = n;}
protected:
// Most (all?) of this stuff should only be called from resize() or
@@ -219,11 +219,11 @@ class Fl_Text_Display: public Fl_Group {
uchar textfont_;
uchar textsize_;
- uchar textcolor_;
+ unsigned textcolor_;
};
#endif
//
-// End of "$Id: Fl_Text_Display.H,v 1.4.2.2 2001/08/06 23:51:39 easysw Exp $".
+// End of "$Id: Fl_Text_Display.H,v 1.4.2.3 2001/10/29 03:44:31 easysw Exp $".
//
diff --git a/FL/Fl_Tooltip.H b/FL/Fl_Tooltip.H
index 19dba0cf7..4d29a0834 100644
--- a/FL/Fl_Tooltip.H
+++ b/FL/Fl_Tooltip.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Tooltip.H,v 1.16.2.3 2001/08/03 02:28:32 easysw Exp $"
+// "$Id: Fl_Tooltip.H,v 1.16.2.4 2001/10/29 03:44:31 easysw Exp $"
//
// Tooltip header file for the Fast Light Tool Kit (FLTK).
//
@@ -43,7 +43,7 @@ class FL_EXPORT Fl_Tooltip {
static Fl_Menu_Window *window;
static Fl_Widget *widget;
static int shown;
- static uchar color_;
+ static unsigned color_;
static int font_;
static int size_;
@@ -62,8 +62,8 @@ public:
static int size() { return size_; }
static void font(int i) { font_ = i; }
static void size(int s) { size_ = s; }
- static void color(uchar c) { color_ = c; }
- static uchar color() { return color_; }
+ static void color(unsigned c) { color_ = c; }
+ static Fl_Color color() { return (Fl_Color)color_; }
static void enter(Fl_Widget *w);
static void exit(Fl_Widget *w);
@@ -76,5 +76,5 @@ public:
#endif
//
-// End of "$Id: Fl_Tooltip.H,v 1.16.2.3 2001/08/03 02:28:32 easysw Exp $".
+// End of "$Id: Fl_Tooltip.H,v 1.16.2.4 2001/10/29 03:44:31 easysw Exp $".
//
diff --git a/FL/Fl_Value_Input.H b/FL/Fl_Value_Input.H
index 7a079bb85..c9ac2e02c 100644
--- a/FL/Fl_Value_Input.H
+++ b/FL/Fl_Value_Input.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Value_Input.H,v 1.5.2.3 2001/01/22 15:13:38 easysw Exp $"
+// "$Id: Fl_Value_Input.H,v 1.5.2.3.2.1 2001/10/29 03:44:31 easysw Exp $"
//
// Value input header file for the Fast Light Tool Kit (FLTK).
//
@@ -50,14 +50,14 @@ public:
uchar textsize() const {return input.textsize();}
void textsize(uchar s) {input.textsize(s);}
Fl_Color textcolor() const {return input.textcolor();}
- void textcolor(uchar n) {input.textcolor(n);}
+ void textcolor(unsigned n) {input.textcolor(n);}
Fl_Color cursor_color() const {return input.cursor_color();}
- void cursor_color(uchar n) {input.cursor_color(n);}
+ void cursor_color(unsigned n) {input.cursor_color(n);}
};
#endif
//
-// End of "$Id: Fl_Value_Input.H,v 1.5.2.3 2001/01/22 15:13:38 easysw Exp $".
+// End of "$Id: Fl_Value_Input.H,v 1.5.2.3.2.1 2001/10/29 03:44:31 easysw Exp $".
//
diff --git a/FL/Fl_Value_Output.H b/FL/Fl_Value_Output.H
index 29dc108b0..1a4f4530a 100644
--- a/FL/Fl_Value_Output.H
+++ b/FL/Fl_Value_Output.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Value_Output.H,v 1.5.2.3 2001/01/22 15:13:38 easysw Exp $"
+// "$Id: Fl_Value_Output.H,v 1.5.2.3.2.1 2001/10/29 03:44:31 easysw Exp $"
//
// Value output header file for the Fast Light Tool Kit (FLTK).
//
@@ -31,7 +31,8 @@
#endif
class Fl_Value_Output : public Fl_Valuator {
- uchar textfont_, textsize_, textcolor_, soft_;
+ uchar textfont_, textsize_, soft_;
+ unsigned textcolor_;
public:
FL_EXPORT int handle(int);
FL_EXPORT void draw();
@@ -45,11 +46,11 @@ public:
uchar textsize() const {return textsize_;}
void textsize(uchar s) {textsize_ = s;}
Fl_Color textcolor() const {return (Fl_Color)textcolor_;}
- void textcolor(uchar s) {textcolor_ = s;}
+ void textcolor(unsigned s) {textcolor_ = s;}
};
#endif
//
-// End of "$Id: Fl_Value_Output.H,v 1.5.2.3 2001/01/22 15:13:38 easysw Exp $".
+// End of "$Id: Fl_Value_Output.H,v 1.5.2.3.2.1 2001/10/29 03:44:31 easysw Exp $".
//
diff --git a/FL/Fl_Value_Slider.H b/FL/Fl_Value_Slider.H
index 49a38ddbf..9875dfe08 100644
--- a/FL/Fl_Value_Slider.H
+++ b/FL/Fl_Value_Slider.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Value_Slider.H,v 1.5.2.3 2001/01/22 15:13:38 easysw Exp $"
+// "$Id: Fl_Value_Slider.H,v 1.5.2.3.2.1 2001/10/29 03:44:31 easysw Exp $"
//
// Value slider header file for the Fast Light Tool Kit (FLTK).
//
@@ -29,7 +29,8 @@
#include "Fl_Slider.H"
class Fl_Value_Slider : public Fl_Slider {
- uchar textfont_, textsize_, textcolor_;
+ uchar textfont_, textsize_;
+ unsigned textcolor_;
public:
FL_EXPORT void draw();
FL_EXPORT int handle(int);
@@ -39,11 +40,11 @@ public:
uchar textsize() const {return textsize_;}
void textsize(uchar s) {textsize_ = s;}
Fl_Color textcolor() const {return (Fl_Color)textcolor_;}
- void textcolor(uchar s) {textcolor_ = s;}
+ void textcolor(unsigned s) {textcolor_ = s;}
};
#endif
//
-// End of "$Id: Fl_Value_Slider.H,v 1.5.2.3 2001/01/22 15:13:38 easysw Exp $".
+// End of "$Id: Fl_Value_Slider.H,v 1.5.2.3.2.1 2001/10/29 03:44:31 easysw Exp $".
//
diff --git a/FL/Fl_Widget.H b/FL/Fl_Widget.H
index 68fb8c599..6281d133c 100644
--- a/FL/Fl_Widget.H
+++ b/FL/Fl_Widget.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Widget.H,v 1.6.2.4.2.8 2001/10/22 21:15:11 easysw Exp $"
+// "$Id: Fl_Widget.H,v 1.6.2.4.2.9 2001/10/29 03:44:31 easysw Exp $"
//
// Widget header file for the Fast Light Tool Kit (FLTK).
//
@@ -45,7 +45,7 @@ struct Fl_Label {
uchar type;
uchar font;
uchar size;
- uchar color;
+ unsigned color;
FL_EXPORT void draw(int,int,int,int, Fl_Align) const ;
FL_EXPORT void measure(int&, int&) const ;
};
@@ -58,12 +58,12 @@ class Fl_Widget {
void* user_data_;
short x_,y_,w_,h_;
Fl_Label label_;
- uchar type_;
int flags_;
+ unsigned color_;
+ unsigned color2_;
+ uchar type_;
uchar damage_;
uchar box_;
- uchar color_;
- uchar color2_;
uchar align_;
uchar when_;
@@ -121,17 +121,17 @@ public:
Fl_Boxtype box() const {return (Fl_Boxtype)box_;}
void box(Fl_Boxtype a) {box_ = a;}
Fl_Color color() const {return (Fl_Color)color_;}
- void color(uchar a) {color_ = a;}
+ void color(unsigned a) {color_ = a;}
Fl_Color selection_color() const {return (Fl_Color)color2_;}
- void selection_color(uchar a) {color2_ = a;}
- void color(uchar a, uchar b) {color_=a; color2_=b;}
+ void selection_color(unsigned a) {color2_ = a;}
+ void color(unsigned a, unsigned b) {color_=a; color2_=b;}
const char* label() const {return label_.value;}
void label(const char* a) {label_.value=a;}
void label(Fl_Labeltype a,const char* b) {label_.type = a; label_.value = b;}
Fl_Labeltype labeltype() const {return (Fl_Labeltype)label_.type;}
void labeltype(Fl_Labeltype a) {label_.type = a;}
Fl_Color labelcolor() const {return (Fl_Color)label_.color;}
- void labelcolor(uchar a) {label_.color=a;}
+ void labelcolor(unsigned a) {label_.color=a;}
Fl_Font labelfont() const {return (Fl_Font)label_.font;}
void labelfont(uchar a) {label_.font=a;}
uchar labelsize() const {return label_.size;}
@@ -196,7 +196,7 @@ public:
// back compatability only:
Fl_Color color2() const {return (Fl_Color)color2_;}
- void color2(uchar a) {color2_ = a;}
+ void color2(unsigned a) {color2_ = a;}
};
// reserved type numbers (necessary for my cheapo RTTI) start here.
@@ -207,5 +207,5 @@ public:
#endif
//
-// End of "$Id: Fl_Widget.H,v 1.6.2.4.2.8 2001/10/22 21:15:11 easysw Exp $".
+// End of "$Id: Fl_Widget.H,v 1.6.2.4.2.9 2001/10/29 03:44:31 easysw Exp $".
//
diff --git a/FL/forms.H b/FL/forms.H
index 5c26c4fd8..8f11b13dc 100644
--- a/FL/forms.H
+++ b/FL/forms.H
@@ -1,5 +1,5 @@
//
-// "$Id: forms.H,v 1.7.2.7.2.1 2001/09/30 17:37:06 easysw Exp $"
+// "$Id: forms.H,v 1.7.2.7.2.2 2001/10/29 03:44:31 easysw Exp $"
//
// Forms emulation header file for the Fast Light Tool Kit (FLTK).
//
@@ -208,11 +208,11 @@ inline void fl_set_object_boxtype(Fl_Widget* o, Fl_Boxtype a) {o->box(a);}
inline void fl_set_object_lsize(Fl_Widget* o,int s) {o->labelsize(s);}
inline void fl_set_object_lstyle(Fl_Widget* o,int a) {
o->labelfont((uchar)a); o->labeltype((Fl_Labeltype)(a>>8));}
-inline void fl_set_object_lcol(Fl_Widget* o, uchar a) {o->labelcolor(a);}
+inline void fl_set_object_lcol(Fl_Widget* o, unsigned a) {o->labelcolor(a);}
#define fl_set_object_lcolor fl_set_object_lcol
inline void fl_set_object_lalign(Fl_Widget* o, Fl_Align a) {o->align(a);}
#define fl_set_object_align fl_set_object_lalign
-inline void fl_set_object_color(Fl_Widget* o,uchar a,uchar b) {o->color(a,b);}
+inline void fl_set_object_color(Fl_Widget* o,unsigned a,unsigned b) {o->color(a,b);}
inline void fl_set_object_label(Fl_Widget* o, const char* a) {o->label(a); o->redraw();}
inline void fl_set_object_position(Fl_Widget*o,int x,int y) {o->position(x,y);}
inline void fl_set_object_size(Fl_Widget* o, int w, int h) {o->size(w,h);}
@@ -528,7 +528,7 @@ inline void fl_set_chart_lstyle(Fl_Widget* o, Fl_Font v) {
((Fl_Chart*)o)->textfont(v);}
inline void fl_set_chart_lsize(Fl_Widget* o, int v) {
((Fl_Chart*)o)->textsize(v);}
-inline void fl_set_chart_lcolor(Fl_Widget* o, uchar v) {
+inline void fl_set_chart_lcolor(Fl_Widget* o, unsigned v) {
((Fl_Chart*)o)->textcolor(v);}
#define fl_set_chart_lcol fl_set_chart_lcolor
@@ -684,7 +684,7 @@ inline void fl_set_input(Fl_Widget* o, const char* v) {
((Fl_Input*)o)->value(v);}
inline void fl_set_input_return(Fl_Widget* o, int x) {
((Fl_Input*)o)->when((Fl_When)(x | FL_WHEN_RELEASE));}
-inline void fl_set_input_color(Fl_Widget* o, uchar a, uchar b) {
+inline void fl_set_input_color(Fl_Widget* o, unsigned a, unsigned b) {
((Fl_Input*)o)->textcolor(a);
((Fl_Input*)o)->cursor_color(b);
}
@@ -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.1 2001/09/30 17:37:06 easysw Exp $".
+// End of "$Id: forms.H,v 1.7.2.7.2.2 2001/10/29 03:44:31 easysw Exp $".
//
diff --git a/FL/menubar.h b/FL/menubar.h
deleted file mode 100644
index 1dc7cc8bd..000000000
--- a/FL/menubar.h
+++ /dev/null
@@ -1,64 +0,0 @@
-// This is an additional header file for "DDForms", which was our internal
-// enhancement of Forms. This defines the precursor of the Fl_Menu class.
-//
-// Unfortunately it defined the callbacks as taking a long rather
-// than a void* argument, requiring some dubious casts to emulate it:
-
-#include "Fl_Menu_Bar.H"
-
-struct MenuEntry {
- const char *text; /*initial character indicates "type", 0 = end of menu*/
- ulong bind; /* key binding in forms format (#x, etc) */
- void (*cb)(Fl_Widget *,long); /* callback */
- long data; /* value for callback */
- int flags; /* see below for flags */
- uchar labeltype;
- uchar labelfont;
- uchar labelsize;
- uchar labelcolor;
-};
-
-#define CHECKED FL_MENU_CHECK
-#define UNCHECKED FL_MENU_BOX
-#define DISABLED FL_MENU_INACTIVE
-
-/* Turn a box into a menu bar: */
-inline void MenuBar(Fl_Widget *o,MenuEntry *m) {
- Fl_Menu_Bar *mb = new Fl_Menu_Bar(o->x(),o->y(),o->w(),o->h());
- mb->menu((Fl_Menu_Item*)m);
- mb->box(0);
- Fl_Group *g = (Fl_Group *)(o->parent());
- int i = g->find(*o);
- g->insert(*mb, i<g->children()-1 ? g->child(i+1) : 0);
-}
-
-/* advance to the Nth item in menu, skipping submenus: */
-inline MenuEntry *MenuGetEntry(MenuEntry *m,int i) {
- return (MenuEntry*)(((Fl_Menu_Item*)m)->next(i));
-}
-
-/* Init the shortcuts for a widget with a popup menu: */
-inline void MenuSetShortcuts(Fl_Widget *, MenuEntry *) {}
-
-inline void MenuAdd(
- MenuEntry m[],
- int, /* number of entries in menutable, ignored here */
- const char *text,
- const char *bind,
- void (*cb)(Fl_Widget *,long),
- long data,
- int flags) {
- ((Fl_Menu_Item*)m)->add(text,bind,(Fl_Callback*)cb,(void *)data,flags);
-}
-
-inline MenuEntry *MenuPopup(Fl_Widget *o,const char *title,MenuEntry *m,double x,double y) {
- const Fl_Menu_Item* v = ((Fl_Menu_Item*)m)->popup(x,y,title);
- if (v && v->callback_) v->do_callback(o);
- return (MenuEntry *)v;
-}
-
-inline MenuEntry *MenuHandleShortcut(Fl_Widget *o,MenuEntry *m,char) {
- const Fl_Menu_Item* v = ((Fl_Menu_Item*)m)->test_shortcut();
- if (v && v->callback_) v->do_callback(o);
- return (MenuEntry *)v;
-}