diff --git a/CHANGES b/CHANGES index 2c02e9565..0276c55f5 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,6 @@ CHANGES IN FLTK 1.3.0 + - Fixed all color related call to Fl_Color type (STR #2208) - File chooser preview now recognizes utf8 encoded text files (STR #2218) - Empty functions in Fluid no longer create an diff --git a/FL/Enumerations.H b/FL/Enumerations.H index 6e6cd0ef3..e3e53eb36 100644 --- a/FL/Enumerations.H +++ b/FL/Enumerations.H @@ -699,7 +699,7 @@ extern FL_EXPORT Fl_Fontsize FL_NORMAL_SIZE; ///< normal font size /** \name Colors */ /*@{*/ -/** The Fl_Color enumeration type holds a FLTK color value. +/** The Fl_Color type holds an FLTK color value. Colors are either 8-bit indexes into a virtual colormap or 24-bit RGB color values. @@ -707,75 +707,94 @@ extern FL_EXPORT Fl_Fontsize FL_NORMAL_SIZE; ///< normal font size Color indices occupy the lower 8 bits of the value, while RGB colors occupy the upper 24 bits, for a byte organization of RGBI. - \todo enum Fl_Color needs some more comments for values, - see Fl/Enumerations.H +
+ Fl_Color => 0xrrggbbii
+                | | | |
+                | | | +--- index between 0 and 255
+                | | +----- blue color component (8 bit)
+                | +------- green component (8 bit)
+                +--------- red component (8 bit)
+ 
+ + A color can have either an index or an rgb value. Colors with rgb set + and an index >0 are reserved for special use. + */ -enum Fl_Color { // standard colors - // These are used as default colors in widgets and altered as necessary - FL_FOREGROUND_COLOR = 0, ///< the default foreground color (0) used for labels and text - FL_BACKGROUND2_COLOR = 7, ///< the default background color for text, list, and valuator widgets - FL_INACTIVE_COLOR = 8, ///< the inactive foreground color - FL_SELECTION_COLOR = 15, ///< the default selection/highlight color +typedef unsigned int Fl_Color; + +// Standard colors. These are used as default colors in widgets and altered as necessary +const Fl_Color FL_FOREGROUND_COLOR = 0; ///< the default foreground color (0) used for labels and text +const Fl_Color FL_BACKGROUND2_COLOR = 7; ///< the default background color for text, list, and valuator widgets +const Fl_Color FL_INACTIVE_COLOR = 8; ///< the inactive foreground color +const Fl_Color FL_SELECTION_COLOR = 15; ///< the default selection/highlight color // boxtypes generally limit themselves to these colors so // the whole ramp is not allocated: - FL_GRAY0 = 32, // 'A' - FL_DARK3 = 39, // 'H' - FL_DARK2 = 45, // 'N' - FL_DARK1 = 47, // 'P' - FL_BACKGROUND_COLOR = 49, // 'R' default background color - FL_LIGHT1 = 50, // 'S' - FL_LIGHT2 = 52, // 'U' - FL_LIGHT3 = 54, // 'W' +const Fl_Color FL_GRAY0 = 32; // 'A' +const Fl_Color FL_DARK3 = 39; // 'H' +const Fl_Color FL_DARK2 = 45; // 'N' +const Fl_Color FL_DARK1 = 47; // 'P' +const Fl_Color FL_BACKGROUND_COLOR = 49; // 'R' default background color +const Fl_Color FL_LIGHT1 = 50; // 'S' +const Fl_Color FL_LIGHT2 = 52; // 'U' +const Fl_Color FL_LIGHT3 = 54; // 'W' // FLTK provides a 5x8x5 color cube that is used with colormap visuals - FL_BLACK = 56, - FL_RED = 88, - FL_GREEN = 63, - FL_YELLOW = 95, - FL_BLUE = 216, - FL_MAGENTA = 248, - FL_CYAN = 223, - FL_DARK_RED = 72, +const Fl_Color FL_BLACK = 56; +const Fl_Color FL_RED = 88; +const Fl_Color FL_GREEN = 63; +const Fl_Color FL_YELLOW = 95; +const Fl_Color FL_BLUE = 216; +const Fl_Color FL_MAGENTA = 248; +const Fl_Color FL_CYAN = 223; +const Fl_Color FL_DARK_RED = 72; - FL_DARK_GREEN = 60, - FL_DARK_YELLOW = 76, - FL_DARK_BLUE = 136, - FL_DARK_MAGENTA = 152, - FL_DARK_CYAN = 140, +const Fl_Color FL_DARK_GREEN = 60; +const Fl_Color FL_DARK_YELLOW = 76; +const Fl_Color FL_DARK_BLUE = 136; +const Fl_Color FL_DARK_MAGENTA = 152; +const Fl_Color FL_DARK_CYAN = 140; - FL_WHITE = 255 -}; +const Fl_Color FL_WHITE = 255; -#define FL_FREE_COLOR (Fl_Color)16 -#define FL_NUM_FREE_COLOR 16 -#define FL_GRAY_RAMP (Fl_Color)32 -#define FL_NUM_GRAY 24 -#define FL_GRAY FL_BACKGROUND_COLOR -#define FL_COLOR_CUBE (Fl_Color)56 -#define FL_NUM_RED 5 -#define FL_NUM_GREEN 8 -#define FL_NUM_BLUE 5 + +#define FL_FREE_COLOR (Fl_Color)16 +#define FL_NUM_FREE_COLOR 16 +#define FL_GRAY_RAMP (Fl_Color)32 +#define FL_NUM_GRAY 24 +#define FL_GRAY FL_BACKGROUND_COLOR +#define FL_COLOR_CUBE (Fl_Color)56 +#define FL_NUM_RED 5 +#define FL_NUM_GREEN 8 +#define FL_NUM_BLUE 5 FL_EXPORT Fl_Color fl_inactive(Fl_Color c); + 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); } + /** return 24-bit color value closest to \p r, \p g, \p b. */ inline Fl_Color fl_rgb_color(uchar r, uchar g, uchar b) { if (!r && !g && !b) return FL_BLACK; else return (Fl_Color)(((((r << 8) | g) << 8) | b) << 8); } + /** return 24-bit color value closest to \p grayscale */ inline Fl_Color fl_rgb_color(uchar g) { if (!g) return FL_BLACK; else return (Fl_Color)(((((g << 8) | g) << 8) | g) << 8); } + inline Fl_Color fl_gray_ramp(int i) {return (Fl_Color)(i+FL_GRAY_RAMP);} + inline Fl_Color fl_color_cube(int r, int g, int b) { return (Fl_Color)((b*FL_NUM_RED + r) * FL_NUM_GREEN + g + FL_COLOR_CUBE);} diff --git a/FL/Fl_Browser_.H b/FL/Fl_Browser_.H index 26db76358..725564485 100644 --- a/FL/Fl_Browser_.H +++ b/FL/Fl_Browser_.H @@ -74,7 +74,7 @@ class FL_EXPORT Fl_Browser_ : public Fl_Group { uchar has_scrollbar_; // which scrollbars are enabled Fl_Font textfont_; Fl_Fontsize textsize_; - unsigned textcolor_; + Fl_Color 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 @@ -297,11 +297,11 @@ public: /** Gets the default text color for the lines in the browser. */ - Fl_Color textcolor() const { return (Fl_Color)textcolor_; } + Fl_Color textcolor() const { return textcolor_; } /** Sets the default text color for the lines in the browser to color \p col. */ - void textcolor(unsigned col) { textcolor_ = col; } + void textcolor(Fl_Color col) { textcolor_ = col; } /** Gets the current size of the scrollbars' troughs, in pixels. diff --git a/FL/Fl_Chart.H b/FL/Fl_Chart.H index 5e6dcb38c..7d6434d3e 100644 --- a/FL/Fl_Chart.H +++ b/FL/Fl_Chart.H @@ -87,7 +87,7 @@ class FL_EXPORT Fl_Chart : public Fl_Widget { uchar autosize_; Fl_Font textfont_; Fl_Fontsize textsize_; - unsigned textcolor_; + Fl_Color textcolor_; protected: void draw(); public: @@ -136,9 +136,9 @@ public: void textsize(Fl_Fontsize s) {textsize_ = s;} /** Gets the chart's text color */ - Fl_Color textcolor() const {return (Fl_Color)textcolor_;} + Fl_Color textcolor() const {return textcolor_;} /** gets the chart's text color to \p n. */ - void textcolor(unsigned n) {textcolor_ = n;} + void textcolor(Fl_Color n) {textcolor_ = n;} /** Get whether the chart will automatically adjust the bounds of the chart. diff --git a/FL/Fl_Counter.H b/FL/Fl_Counter.H index 3e96c6537..be301f743 100644 --- a/FL/Fl_Counter.H +++ b/FL/Fl_Counter.H @@ -58,7 +58,7 @@ class FL_EXPORT Fl_Counter : public Fl_Valuator { Fl_Font textfont_; Fl_Fontsize textsize_; - unsigned textcolor_; + Fl_Color textcolor_; double lstep_; uchar mouseobj; static void repeat_callback(void *); @@ -111,9 +111,9 @@ public: void textsize(Fl_Fontsize s) {textsize_ = s;} /** Gets the font color */ - Fl_Color textcolor() const {return (Fl_Color)textcolor_;} + Fl_Color textcolor() const {return textcolor_;} /** Sets the font color to \p s */ - void textcolor(unsigned s) {textcolor_ = s;} + void textcolor(Fl_Color s) {textcolor_ = s;} }; diff --git a/FL/Fl_Input_.H b/FL/Fl_Input_.H index dc7a319d1..e93dd4c13 100644 --- a/FL/Fl_Input_.H +++ b/FL/Fl_Input_.H @@ -143,10 +143,10 @@ class FL_EXPORT Fl_Input_ : public Fl_Widget { Fl_Fontsize textsize_; /** \internal color of the entire text */ - unsigned textcolor_; + Fl_Color textcolor_; /** \internal color of the text cursor */ - unsigned cursor_color_; + Fl_Color cursor_color_; /** \internal Horizontal cursor position in pixels while movin up or down. */ static double up_down_pos; @@ -397,23 +397,23 @@ public: /** Gets the color of the text in the input field. \return the text color - \see textcolor(unsigned) */ - Fl_Color textcolor() const {return (Fl_Color)textcolor_;} + \see textcolor(Fl_Color) */ + Fl_Color textcolor() const {return textcolor_;} /** Sets the color of the text in the input field. The text color defaults to \c FL_FOREGROUND_COLOR. \param [in] n new text color \see textcolor() */ - void textcolor(unsigned n) {textcolor_ = n;} + void textcolor(Fl_Color n) {textcolor_ = n;} /** Gets the color of the cursor. \return the current cursor color */ - Fl_Color cursor_color() const {return (Fl_Color)cursor_color_;} + Fl_Color cursor_color() const {return cursor_color_;} /** Sets the color of the cursor. The default color for the cursor is \c FL_BLACK. \param [in] n the new cursor color */ - void cursor_color(unsigned n) {cursor_color_ = n;} + void cursor_color(Fl_Color n) {cursor_color_ = n;} /** Gets the input field type. \return the current input type */ diff --git a/FL/Fl_Menu_.H b/FL/Fl_Menu_.H index c6e339a0d..27812bb80 100644 --- a/FL/Fl_Menu_.H +++ b/FL/Fl_Menu_.H @@ -56,7 +56,7 @@ protected: uchar down_box_; Fl_Font textfont_; Fl_Fontsize textsize_; - unsigned textcolor_; + Fl_Color textcolor_; public: Fl_Menu_(int,int,int,int,const char * =0); @@ -119,9 +119,9 @@ public: /** Sets the font size of menu item labels. */ void textsize(Fl_Fontsize c) {textsize_=c;} /** Get the current color of menu item labels. */ - Fl_Color textcolor() const {return (Fl_Color)textcolor_;} + Fl_Color textcolor() const {return textcolor_;} /** Sets the current color of menu item labels. */ - void textcolor(unsigned c) {textcolor_=c;} + void textcolor(Fl_Color c) {textcolor_=c;} /** This box type is used to surround the currently-selected items in the diff --git a/FL/Fl_Menu_Item.H b/FL/Fl_Menu_Item.H index 6a10e5781..0ea5c792f 100644 --- a/FL/Fl_Menu_Item.H +++ b/FL/Fl_Menu_Item.H @@ -124,7 +124,7 @@ struct FL_EXPORT Fl_Menu_Item { uchar labeltype_; ///< how the menu item text looks like Fl_Font labelfont_; ///< which font for this menu item text Fl_Fontsize labelsize_; ///< size of menu item text - unsigned labelcolor_; ///< menu item text color + Fl_Color labelcolor_; ///< menu item text color // advance N items, skipping submenus: const Fl_Menu_Item *next(int=1) const; @@ -181,10 +181,10 @@ struct FL_EXPORT Fl_Menu_Item { color is not black fltk will not use overlay bitplanes to draw the menu - this is so that images put in the menu draw correctly. */ - Fl_Color labelcolor() const {return (Fl_Color)labelcolor_;} + Fl_Color labelcolor() const {return labelcolor_;} /** See Fl_Color Fl_Menu_Item::labelcolor() const */ - void labelcolor(unsigned a) {labelcolor_ = a;} + void labelcolor(Fl_Color a) {labelcolor_ = a;} /** Fonts are identified by small 8-bit indexes into a table. See the enumeration list for predefined fonts. The default value is a diff --git a/FL/Fl_Text_Display.H b/FL/Fl_Text_Display.H index 2e9a0a0d9..08dc8dad1 100644 --- a/FL/Fl_Text_Display.H +++ b/FL/Fl_Text_Display.H @@ -165,9 +165,9 @@ class FL_EXPORT Fl_Text_Display: public Fl_Group { /** Sets the default size of text in the widget. */ void textsize(Fl_Fontsize s) {textsize_ = s;} /** Gets the default color of text in the widget. */ - Fl_Color textcolor() const {return (Fl_Color)textcolor_;} + Fl_Color textcolor() const {return textcolor_;} /** Sets the default color of text in the widget. */ - void textcolor(unsigned n) {textcolor_ = n;} + void textcolor(Fl_Color n) {textcolor_ = n;} int wrapped_column(int row, int column) const; int wrapped_row(int row) const; @@ -327,7 +327,7 @@ class FL_EXPORT Fl_Text_Display: public Fl_Group { Fl_Font textfont_; Fl_Fontsize textsize_; - unsigned textcolor_; + Fl_Color textcolor_; // The following are not presently used from the original NEdit code, // but are being put here so that future versions of Fl_Text_Display diff --git a/FL/Fl_Tooltip.H b/FL/Fl_Tooltip.H index 911145b39..d83e03a20 100644 --- a/FL/Fl_Tooltip.H +++ b/FL/Fl_Tooltip.H @@ -76,13 +76,13 @@ public: /** Sets the size of the tooltip text. */ static void size(Fl_Fontsize s) { size_ = s; } /** Gets the background color for tooltips. The default background color is a pale yellow. */ - static Fl_Color color() { return (Fl_Color)color_; } + static Fl_Color color() { return color_; } /** Sets the background color for tooltips. The default background color is a pale yellow. */ - static void color(unsigned c) { color_ = c; } + static void color(Fl_Color c) { color_ = c; } /** Gets the color of the text in the tooltip. The default is black. */ - static Fl_Color textcolor() { return (Fl_Color)textcolor_; } + static Fl_Color textcolor() { return textcolor_; } /** Sets the color of the text in the tooltip. The default is black. */ - static void textcolor(unsigned c) { textcolor_ = c; } + static void textcolor(Fl_Color c) { textcolor_ = c; } // These should not be public, but Fl_Widget::tooltip() needs them... // fabien: made it private with only a friend function access @@ -95,8 +95,8 @@ private: static float delay_; //!< delay before a tooltip is shown static float hoverdelay_; //!< delay between tooltips static int enabled_; - static unsigned color_; - static unsigned textcolor_; + static Fl_Color color_; + static Fl_Color textcolor_; static Fl_Font font_; static Fl_Fontsize size_; static Fl_Widget* widget_; //!< Keeps track of the current target widget diff --git a/FL/Fl_Value_Input.H b/FL/Fl_Value_Input.H index cdbcd86f4..32cc33226 100644 --- a/FL/Fl_Value_Input.H +++ b/FL/Fl_Value_Input.H @@ -120,11 +120,11 @@ public: /** Gets the color of the text in the value box. */ Fl_Color textcolor() const {return input.textcolor();} /** Sets the color of the text in the value box.*/ - void textcolor(unsigned n) {input.textcolor(n);} + void textcolor(Fl_Color n) {input.textcolor(n);} /** Gets the color of the text cursor. The text cursor is black by default. */ Fl_Color cursor_color() const {return input.cursor_color();} /** Sets the color of the text cursor. The text cursor is black by default. */ - void cursor_color(unsigned n) {input.cursor_color(n);} + void cursor_color(Fl_Color n) {input.cursor_color(n);} }; diff --git a/FL/Fl_Value_Output.H b/FL/Fl_Value_Output.H index 72371d846..29eaf7348 100644 --- a/FL/Fl_Value_Output.H +++ b/FL/Fl_Value_Output.H @@ -51,7 +51,7 @@ class FL_EXPORT Fl_Value_Output : public Fl_Valuator { Fl_Font textfont_; Fl_Fontsize textsize_; uchar soft_; - unsigned textcolor_; + Fl_Color textcolor_; protected: void draw(); @@ -83,9 +83,9 @@ public: Fl_Fontsize textsize() const {return textsize_;} void textsize(Fl_Fontsize s) {textsize_ = s;} /** Sets the color of the text in the value box. */ - Fl_Color textcolor() const {return (Fl_Color)textcolor_;} + Fl_Color textcolor() const {return textcolor_;} /** Gets the color of the text in the value box. */ - void textcolor(unsigned s) {textcolor_ = s;} + void textcolor(Fl_Color s) {textcolor_ = s;} }; #endif diff --git a/FL/Fl_Value_Slider.H b/FL/Fl_Value_Slider.H index bf9ae1ef6..d1f3c3c4b 100644 --- a/FL/Fl_Value_Slider.H +++ b/FL/Fl_Value_Slider.H @@ -42,7 +42,7 @@ class FL_EXPORT Fl_Value_Slider : public Fl_Slider { Fl_Font textfont_; Fl_Fontsize textsize_; - unsigned textcolor_; + Fl_Color textcolor_; protected: void draw(); public: @@ -57,9 +57,9 @@ public: /** Sets the size of the text in the value box. */ void textsize(Fl_Fontsize s) {textsize_ = s;} /** Gets the color of the text in the value box. */ - Fl_Color textcolor() const {return (Fl_Color)textcolor_;} + Fl_Color textcolor() const {return textcolor_;} /** Sets the color of the text in the value box. */ - void textcolor(unsigned s) {textcolor_ = s;} + void textcolor(Fl_Color s) {textcolor_ = s;} }; #endif diff --git a/FL/Fl_Widget.H b/FL/Fl_Widget.H index 00feef450..23035ed74 100644 --- a/FL/Fl_Widget.H +++ b/FL/Fl_Widget.H @@ -69,7 +69,7 @@ struct FL_EXPORT Fl_Label { /** size of label font */ Fl_Fontsize size; /** text color */ - unsigned color; + Fl_Color color; /** Draws the label aligned to the given box */ void draw(int,int,int,int, Fl_Align) const ; void measure(int &w, int &h) const ; @@ -97,8 +97,8 @@ class FL_EXPORT Fl_Widget { int x_,y_,w_,h_; Fl_Label label_; int flags_; - unsigned color_; - unsigned color2_; + Fl_Color color_; + Fl_Color color2_; uchar type_; uchar damage_; uchar box_; @@ -343,9 +343,9 @@ public: /** Gets the background color of the widget. \return current background color - \see color(unsigned), color(unsigned, unsigned) + \see color(Fl_Color), color(Fl_Color, Fl_Color) */ - Fl_Color color() const {return (Fl_Color)color_;} + Fl_Color color() const {return color_;} /** Sets the background color of the widget. The color is passed to the box routine. The color is either an index into @@ -355,25 +355,25 @@ public: The default for most widgets is FL_BACKGROUND_COLOR. Use Fl::set_color() to redefine colors in the color map. \param[in] bg background color - \see color(), color(unsigned, unsigned), selection_color(unsigned) + \see color(), color(Fl_Color, Fl_Color), selection_color(Fl_Color) */ - void color(unsigned bg) {color_ = bg;} + void color(Fl_Color bg) {color_ = bg;} /** Gets the selection color. \return the current selection color - \see selection_color(unsigned), color(unsigned, unsigned) + \see selection_color(Fl_Color), color(Fl_Color, Fl_Color) */ - Fl_Color selection_color() const {return (Fl_Color)color2_;} + Fl_Color selection_color() const {return color2_;} /** Sets the selection color. The selection color is defined for Forms compatibility and is usually used to color the widget when it is selected, although some widgets use this color for other purposes. You can set both colors at once - with color(unsigned bg, unsigned sel). + with color(Fl_Color bg, Fl_Color sel). \param[in] a the new selection color - \see selection_color(), color(unsigned, unsigned) + \see selection_color(), color(Fl_Color, Fl_Color) */ - void selection_color(unsigned a) {color2_ = a;} + void selection_color(Fl_Color a) {color2_ = a;} /** Sets the background and selection color of the widget. @@ -382,7 +382,7 @@ public: \param[in] sel selection color \see color(unsigned), selection_color(unsigned) */ - void color(unsigned bg, unsigned sel) {color_=bg; color2_=sel;} + void color(Fl_Color bg, Fl_Color sel) {color_=bg; color2_=sel;} /** Gets the current label text. \return a pointer to the current label text @@ -439,13 +439,13 @@ public: The default color is FL_FOREGROUND_COLOR. \return the current label color */ - Fl_Color labelcolor() const {return (Fl_Color)label_.color;} + Fl_Color labelcolor() const {return label_.color;} /** Sets the label color. The default color is FL_FOREGROUND_COLOR. \param[in] c the new label color */ - void labelcolor(unsigned c) {label_.color=c;} + void labelcolor(Fl_Color c) {label_.color=c;} /** Gets the font to use. Fonts are identified by indexes into a table. The default value diff --git a/FL/forms.H b/FL/forms.H index 62ef6461b..a168049fb 100644 --- a/FL/forms.H +++ b/FL/forms.H @@ -212,11 +212,11 @@ inline void fl_set_object_lsize(Fl_Widget* o,int s) {o->labelsize(s);} /* forms lib font indexes must be byte sized - extract correct byte from style word */ inline void fl_set_object_lstyle(Fl_Widget* o,int a) { o->labelfont((Fl_Font)(a&0xff)); o->labeltype((Fl_Labeltype)(a>>8));} -inline void fl_set_object_lcol(Fl_Widget* o, unsigned a) {o->labelcolor(a);} +inline void fl_set_object_lcol(Fl_Widget* o, Fl_Color 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,unsigned a,unsigned b) {o->color(a,b);} +inline void fl_set_object_color(Fl_Widget* o,Fl_Color a,Fl_Color 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);} @@ -532,7 +532,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, unsigned v) { +inline void fl_set_chart_lcolor(Fl_Widget* o, Fl_Color v) { ((Fl_Chart*)o)->textcolor(v);} #define fl_set_chart_lcol fl_set_chart_lcolor @@ -688,7 +688,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, unsigned a, unsigned b) { +inline void fl_set_input_color(Fl_Widget* o, Fl_Color a, Fl_Color b) { ((Fl_Input*)o)->textcolor(a); ((Fl_Input*)o)->cursor_color(b); } diff --git a/ide/Xcode3.1/FLTK.xcodeproj/project.pbxproj b/ide/Xcode3.1/FLTK.xcodeproj/project.pbxproj index 48d501648..eea296c0c 100644 --- a/ide/Xcode3.1/FLTK.xcodeproj/project.pbxproj +++ b/ide/Xcode3.1/FLTK.xcodeproj/project.pbxproj @@ -10196,7 +10196,7 @@ GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h"; HEADER_SEARCH_PATHS = ../../; - INFOPLIST_FILE = "/Users/matt/dev/fltk-1.3-utf8/ide/Xcode3.0/plists/symbols-Info copy.plist"; + INFOPLIST_FILE = "plists/utf8-Info.plist"; INSTALL_PATH = "$(HOME)/Applications"; OTHER_LDFLAGS = ( "-framework", @@ -10408,7 +10408,7 @@ C99E1EB70E78628800AECCF6 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; + ALWAYS_SEARCH_USER_PATHS = YES; COPY_PHASE_STRIP = NO; GCC_DYNAMIC_NO_PIC = NO; GCC_ENABLE_FIX_AND_CONTINUE = YES; @@ -10416,6 +10416,7 @@ GCC_OPTIMIZATION_LEVEL = 0; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h"; + HEADER_SEARCH_PATHS = ../../; INFOPLIST_FILE = "plists/curve-Info.plist"; INSTALL_PATH = "$(HOME)/Applications"; OTHER_LDFLAGS = ( @@ -10430,14 +10431,15 @@ C99E1EB80E78628800AECCF6 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; + ALWAYS_SEARCH_USER_PATHS = YES; COPY_PHASE_STRIP = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; GCC_ENABLE_FIX_AND_CONTINUE = NO; GCC_MODEL_TUNING = G5; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h"; - INFOPLIST_FILE = "curve-Info.plist"; + HEADER_SEARCH_PATHS = ../../; + INFOPLIST_FILE = "plists/curve-Info.plist"; INSTALL_PATH = "$(HOME)/Applications"; OTHER_LDFLAGS = ( "-framework", @@ -11535,7 +11537,7 @@ C9EAC2DF0E786726004F64F7 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; + ALWAYS_SEARCH_USER_PATHS = YES; COPY_PHASE_STRIP = NO; GCC_DYNAMIC_NO_PIC = NO; GCC_ENABLE_FIX_AND_CONTINUE = YES; @@ -11544,6 +11546,7 @@ GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h"; GCC_PREPROCESSOR_DEFINITIONS = USING_XCODE; + HEADER_SEARCH_PATHS = ../../; INFOPLIST_FILE = "plists/colbrowser-Info.plist"; INSTALL_PATH = "$(HOME)/Applications"; OTHER_LDFLAGS = ( @@ -11558,7 +11561,7 @@ C9EAC2E00E786726004F64F7 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; + ALWAYS_SEARCH_USER_PATHS = YES; COPY_PHASE_STRIP = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; GCC_ENABLE_FIX_AND_CONTINUE = NO; @@ -11566,7 +11569,8 @@ GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h"; GCC_PREPROCESSOR_DEFINITIONS = USING_XCODE; - INFOPLIST_FILE = "colbrowser-Info.plist"; + HEADER_SEARCH_PATHS = ../../; + INFOPLIST_FILE = "plists/colbrowser-Info.plist"; INSTALL_PATH = "$(HOME)/Applications"; OTHER_LDFLAGS = ( "-framework", diff --git a/src/Fl_Tooltip.cxx b/src/Fl_Tooltip.cxx index 0ca2178de..1ba661a0f 100644 --- a/src/Fl_Tooltip.cxx +++ b/src/Fl_Tooltip.cxx @@ -34,10 +34,10 @@ float Fl_Tooltip::delay_ = 1.0f; float Fl_Tooltip::hoverdelay_ = 0.2f; int Fl_Tooltip::enabled_ = 1; -unsigned Fl_Tooltip::color_ = fl_color_cube(FL_NUM_RED - 1, +Fl_Color Fl_Tooltip::color_ = fl_color_cube(FL_NUM_RED - 1, FL_NUM_GREEN - 1, FL_NUM_BLUE - 2); -unsigned Fl_Tooltip::textcolor_ = FL_BLACK; +Fl_Color Fl_Tooltip::textcolor_ = FL_BLACK; Fl_Font Fl_Tooltip::font_ = FL_HELVETICA; Fl_Fontsize Fl_Tooltip::size_ = FL_NORMAL_SIZE; diff --git a/src/fl_boxtype.cxx b/src/fl_boxtype.cxx index 7162b1232..f4ae05941 100644 --- a/src/fl_boxtype.cxx +++ b/src/fl_boxtype.cxx @@ -406,7 +406,7 @@ void Fl_Widget::draw_box() const { // if (t == FL_FLAT_BOX) return; // t += 2; // convert box to frame // } - draw_box((Fl_Boxtype)t, x_, y_, w_, h_, (Fl_Color)color_); + draw_box((Fl_Boxtype)t, x_, y_, w_, h_, color_); } /** Draws a box of type t, of color c at the widget's position and size. */ void Fl_Widget::draw_box(Fl_Boxtype t, Fl_Color c) const { diff --git a/src/glut_font.cxx b/src/glut_font.cxx index 474689f33..ce25d06b3 100644 --- a/src/glut_font.cxx +++ b/src/glut_font.cxx @@ -115,8 +115,7 @@ void glutStrokeString(void* fontID, const unsigned char *string) { * point back to the start of the line and down one line. */ -#if defined(__GNUC__) -#warning FIXME This needs to be UTF aware now +#if defined(__GNUC__)#warning FIXME This needs to be UTF aware now #endif /*__GNUC__*/ while ((c = *string++) != 0) {