diff --git a/plugins/zynaddsubfx/fltk/CHANGES b/plugins/zynaddsubfx/fltk/CHANGES index d483336fff..9d9ba34272 100644 --- a/plugins/zynaddsubfx/fltk/CHANGES +++ b/plugins/zynaddsubfx/fltk/CHANGES @@ -1,5 +1,22 @@ CHANGES IN FLTK 1.3.0 + - Managing all Widget flags in a single location now (STR #2161) + - 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 + implementation (STR #2259) + - Fixed Fluid dependency on X11 (STR #2261) + - Updated the bundled libpng to v1.2.40 (released Sep. 10, 2009) + - Fixed Fl_Choice contrast with light-on-dark settings (STR #2219) + - Fixed X server "lock", if a modal dialog window is opened + while a menu is active (STR #1986) + - Updated mirror sites in documentation (STR #2220) + - Setting a default font for Xft (STR #2216) + - Temporarily limited builds to 32-bit on OX S to stay + compatible to Snow Leopard + - Fixed Windows compile bug with "#define USE_COLORMAP 0" + (STR #2241) - Fixed glibc 2.10 compiler problems (Fedora 11 and others) with scandir() and strchr() (STR #2222) - Corrected const methods of Fl_Text_{Buffer|Display|Selection} @@ -27,7 +44,6 @@ CHANGES IN FLTK 1.3.0 - Added drop box to utf8 test that will show the utf8 encoding for the first dropped character - Restructured the unittest application - - Updated the bundled libpng to v1.2.35 (released 18 Feb. 2009) - Fl_Preferences.H now doesn't include windows.h any more (Windows only, STR #2173). - Fl_Window::draw() now doesn't reset its x/y-coordinates to 0 diff --git a/plugins/zynaddsubfx/fltk/CMake/PlatformTests.cxx b/plugins/zynaddsubfx/fltk/CMake/PlatformTests.cxx index 9e92850a73..bfe97ac951 100644 --- a/plugins/zynaddsubfx/fltk/CMake/PlatformTests.cxx +++ b/plugins/zynaddsubfx/fltk/CMake/PlatformTests.cxx @@ -29,7 +29,7 @@ int main() { struct jpeg_decompress_struct cinfo; jpeg_create_decompress(&cinfo); - jpeg_read_header(&cinfo, true); + jpeg_read_header(&cinfo, TRUE); return 1; } diff --git a/plugins/zynaddsubfx/fltk/CMakeLists.txt b/plugins/zynaddsubfx/fltk/CMakeLists.txt index 70892eb5ec..d877e6c184 100644 --- a/plugins/zynaddsubfx/fltk/CMakeLists.txt +++ b/plugins/zynaddsubfx/fltk/CMakeLists.txt @@ -67,6 +67,7 @@ IF(UNIX) ENDIF(UNIX) +# OS X with X11 is not currently supported! SET(FLTK_X11 1) SET(FLTK_APPLE 0) IF(APPLE) @@ -92,7 +93,7 @@ ENDIF(CYGWIN) IF(MINGW) ADD_DEFINITIONS(-DWIN32) - SET( FLTK_PLATFORM_DEPENDENT_LIBS ole32 uuid wsock32 gdi32 comdlg32) + SET( FLTK_PLATFORM_DEPENDENT_LIBS ole32 uuid comctl32 gdi32 comdlg32) ENDIF(MINGW) INCLUDE(CheckIncludeFiles) diff --git a/plugins/zynaddsubfx/fltk/FL/Enumerations.H b/plugins/zynaddsubfx/fltk/FL/Enumerations.H index a9b71b4637..ba92ec2b09 100644 --- a/plugins/zynaddsubfx/fltk/FL/Enumerations.H +++ b/plugins/zynaddsubfx/fltk/FL/Enumerations.H @@ -1,5 +1,5 @@ // -// "$Id: Enumerations.H 6735 2009-04-01 22:11:57Z engelsman $" +// "$Id: Enumerations.H 6902 2009-09-27 11:06:56Z matt $" // // Enumerations for the Fast Light Tool Kit (FLTK). // @@ -330,6 +330,8 @@ enum Fl_When { // Fl_Widget::when(): /*@{*/ +// FIXME: These codes collide with valid Unicode keys + #define FL_Button 0xfee8 ///< A mouse button; use Fl_Button + n for mouse button n. #define FL_BackSpace 0xff08 ///< The backspace key. #define FL_Tab 0xff09 ///< The tab key. @@ -391,6 +393,9 @@ enum Fl_When { // Fl_Widget::when(): /*@{*/ // group: Event States +// FIXME: it would be nice to have the modifiers in the upper 8 bit so that +// a unicode ke (24bit) can be sent as an unsigned with the modifiers. + #define FL_SHIFT 0x00010000 ///< One of the shift keys is down #define FL_CAPS_LOCK 0x00020000 ///< The caps lock is on #define FL_CTRL 0x00040000 ///< One of the ctrl keys is down @@ -407,10 +412,15 @@ enum Fl_When { // Fl_Widget::when(): #define FL_BUTTONS 0x7f000000 ///< Any mouse button is pushed #define FL_BUTTON(n) (0x00800000<<(n)) ///< Mouse button n (n > 0) is pushed +#define FL_KEY_MASK 0x0000ffff ///< All keys are 16 bit for now + // FIXME: Unicode needs 24 bits! + #ifdef __APPLE__ -# define FL_COMMAND FL_META ///< An alias for FL_CTRL on WIN32 and X11, or FL_META on MacOS X +# define FL_COMMAND FL_META ///< An alias for FL_CTRL on WIN32 and X11, or FL_META on MacOS X +# define FL_CONTROL FL_CTRL ///< An alias for FL_META on WIN32 and X11, or FL_META on MacOS X #else # define FL_COMMAND FL_CTRL ///< An alias for FL_CTRL on WIN32 and X11, or FL_META on MacOS X +# define FL_CONTROL FL_META ///< An alias for FL_META on WIN32 and X11, or FL_META on MacOS X #endif // __APPLE__ /*@}*/ // group: Event States @@ -689,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. @@ -697,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);} @@ -857,5 +886,5 @@ enum Fl_Damage { #endif // -// End of "$Id: Enumerations.H 6735 2009-04-01 22:11:57Z engelsman $". +// End of "$Id: Enumerations.H 6902 2009-09-27 11:06:56Z matt $". // diff --git a/plugins/zynaddsubfx/fltk/FL/Fl.H b/plugins/zynaddsubfx/fltk/FL/Fl.H index d9f8e77e1b..700f519368 100644 --- a/plugins/zynaddsubfx/fltk/FL/Fl.H +++ b/plugins/zynaddsubfx/fltk/FL/Fl.H @@ -1,5 +1,5 @@ // -// "$Id: Fl.H 6771 2009-04-19 12:47:36Z matt $" +// "$Id: Fl.H 6903 2009-09-27 11:09:03Z matt $" // // Main header file for the Fast Light Tool Kit (FLTK). // @@ -489,18 +489,25 @@ public: static int event_state() {return e_state;} /** See int event_state() */ static int event_state(int i) {return e_state&i;} - /** Gets which key on the keyboard was last pushed. - \retval 0 if the last event was not a key press or release. - \see int event_key(int) */ + /** + Gets which key on the keyboard was last pushed. + + The returned integer 'key code' is not necessarily a text + equivalent for the keystroke. For instance: if someone presses '5' on the + numeric keypad with numlock on, Fl::event_key() may return the 'key code' + for this key, and NOT the character '5'. To always get the '5', use Fl::event_text() instead. + + \returns an integer 'key code', or 0 if the last event was not a key press or release. + \see int event_key(int), event_text(), compose(int&). + */ static int event_key() {return e_keysym;} /** Returns the keycode of the last key event, regardless of the NumLock state. - + If NumLock is deactivated, FLTK translates events from the numeric keypad into the corresponding arrow key events. event_key() returns the translated key code, whereas - event_original_key() returns the keycode before - NumLock translation. + event_original_key() returns the keycode before NumLock translation. */ static int event_original_key(){return e_original_keysym;} /** @@ -548,7 +555,20 @@ public: slower than Fl::event_key(int). \see event_key(int) */ static int get_key(int key); // platform dependent - /** Returns the text associated with the current FL_PASTE or FL_DND_RELEASE event. */ + /** + Returns the text associated with the current event, including FL_PASTE or FL_DND_RELEASE events. + This can be used in response to FL_KEYUP, FL_KEYDOWN, FL_PASTE, FL_DND_RELEASE. + + When responding to FL_KEYUP/FL_KEYDOWN, use this function instead of Fl::event_key() + to get the text equivalent of keystrokes suitable for inserting into strings + and text widgets. + + The returned string is guaranteed to be be NULL terminated. + However, see Fl::event_length() for the actual length of the string, + in case the string itself contains NULLs that are part of the text data. + + \returns A NULL terminated text string equivalent of the last keystroke. + */ static const char* event_text() {return e_text;} /** Returns the length of the text in Fl::event_text(). There @@ -568,7 +588,7 @@ public: static void compose_reset() {compose_state = 0;} static int event_inside(int,int,int,int); static int event_inside(const Fl_Widget*); - static int test_shortcut(int); + static int test_shortcut(Fl_Shortcut); // event destinations: static int handle(int, Fl_Window*); @@ -660,7 +680,7 @@ public: 8-bit RGB color. The color is not allocated until fl_color(i) is used. */ static void set_color(Fl_Color, unsigned); // platform dependent - static unsigned get_color(Fl_Color); + static Fl_Color get_color(Fl_Color); static void get_color(Fl_Color, uchar&, uchar&, uchar&); /** Frees the specified color from the colormap, if applicable. @@ -1022,5 +1042,5 @@ public: #endif // !Fl_H // -// End of "$Id: Fl.H 6771 2009-04-19 12:47:36Z matt $". +// End of "$Id: Fl.H 6903 2009-09-27 11:09:03Z matt $". // diff --git a/plugins/zynaddsubfx/fltk/FL/Fl_Browser.H b/plugins/zynaddsubfx/fltk/FL/Fl_Browser.H index d8f920d4e1..a2f8b00cee 100644 --- a/plugins/zynaddsubfx/fltk/FL/Fl_Browser.H +++ b/plugins/zynaddsubfx/fltk/FL/Fl_Browser.H @@ -1,5 +1,5 @@ // -// "$Id: Fl_Browser.H 6726 2009-03-27 16:52:31Z greg.ercolano $" +// "$Id: Fl_Browser.H 6850 2009-09-07 02:25:51Z greg.ercolano $" // // Browser header file for the Fast Light Tool Kit (FLTK). // @@ -36,6 +36,7 @@ #define Fl_Browser_H #include "Fl_Browser_.H" +#include "Fl_Image.H" struct FL_BLINE; @@ -306,6 +307,11 @@ public: else Fl_Browser_::display(find_line(line)); } + // icon support + void icon(int line, Fl_Image* icon); + Fl_Image* icon(int line) const; + void remove_icon(int line); + /** For back compatibility only. */ void replace(int a, const char* b) { text(a, b); } void display(int line, int val=1); @@ -314,5 +320,5 @@ public: #endif // -// End of "$Id: Fl_Browser.H 6726 2009-03-27 16:52:31Z greg.ercolano $". +// End of "$Id: Fl_Browser.H 6850 2009-09-07 02:25:51Z greg.ercolano $". // diff --git a/plugins/zynaddsubfx/fltk/FL/Fl_Browser_.H b/plugins/zynaddsubfx/fltk/FL/Fl_Browser_.H index 3d89a8ec94..4068ae48b4 100644 --- a/plugins/zynaddsubfx/fltk/FL/Fl_Browser_.H +++ b/plugins/zynaddsubfx/fltk/FL/Fl_Browser_.H @@ -1,5 +1,5 @@ // -// "$Id: Fl_Browser_.H 6737 2009-04-02 06:44:34Z greg.ercolano $" +// "$Id: Fl_Browser_.H 6902 2009-09-27 11:06:56Z matt $" // // Common browser header file for the Fast Light Tool Kit (FLTK). // @@ -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. @@ -374,5 +374,5 @@ public: #endif // -// End of "$Id: Fl_Browser_.H 6737 2009-04-02 06:44:34Z greg.ercolano $". +// End of "$Id: Fl_Browser_.H 6902 2009-09-27 11:06:56Z matt $". // diff --git a/plugins/zynaddsubfx/fltk/FL/Fl_Button.H b/plugins/zynaddsubfx/fltk/FL/Fl_Button.H index d71c066725..73d6e4b0dc 100644 --- a/plugins/zynaddsubfx/fltk/FL/Fl_Button.H +++ b/plugins/zynaddsubfx/fltk/FL/Fl_Button.H @@ -1,5 +1,5 @@ // -// "$Id: Fl_Button.H 6614 2009-01-01 16:11:32Z matt $" +// "$Id: Fl_Button.H 6878 2009-09-17 22:12:24Z matt $" // // Button header file for the Fast Light Tool Kit (FLTK). // @@ -45,7 +45,7 @@ #define FL_HIDDEN_BUTTON 3 ///< for Forms compatibility #ifndef FL_DOXYGEN -extern FL_EXPORT int fl_old_shortcut(const char*); +extern FL_EXPORT Fl_Shortcut fl_old_shortcut(const char*); #endif /** @@ -172,5 +172,5 @@ public: #endif // -// End of "$Id: Fl_Button.H 6614 2009-01-01 16:11:32Z matt $". +// End of "$Id: Fl_Button.H 6878 2009-09-17 22:12:24Z matt $". // diff --git a/plugins/zynaddsubfx/fltk/FL/Fl_Chart.H b/plugins/zynaddsubfx/fltk/FL/Fl_Chart.H index 29b68ed441..e94c1a02a9 100644 --- a/plugins/zynaddsubfx/fltk/FL/Fl_Chart.H +++ b/plugins/zynaddsubfx/fltk/FL/Fl_Chart.H @@ -1,5 +1,5 @@ // -// "$Id: Fl_Chart.H 6614 2009-01-01 16:11:32Z matt $" +// "$Id: Fl_Chart.H 6902 2009-09-27 11:06:56Z matt $" // // Forms chart header file for the Fast Light Tool Kit (FLTK). // @@ -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. @@ -156,5 +156,5 @@ public: #endif // -// End of "$Id: Fl_Chart.H 6614 2009-01-01 16:11:32Z matt $". +// End of "$Id: Fl_Chart.H 6902 2009-09-27 11:06:56Z matt $". // diff --git a/plugins/zynaddsubfx/fltk/FL/Fl_Clock.H b/plugins/zynaddsubfx/fltk/FL/Fl_Clock.H index afaa2f4463..c4cf6c21b6 100644 --- a/plugins/zynaddsubfx/fltk/FL/Fl_Clock.H +++ b/plugins/zynaddsubfx/fltk/FL/Fl_Clock.H @@ -1,5 +1,5 @@ // -// "$Id: Fl_Clock.H 6754 2009-04-12 11:32:22Z AlbrechtS $" +// "$Id: Fl_Clock.H 6812 2009-07-01 07:27:25Z AlbrechtS $" // // Clock header file for the Fast Light Tool Kit (FLTK). // @@ -133,5 +133,5 @@ public: #endif // -// End of "$Id: Fl_Clock.H 6754 2009-04-12 11:32:22Z AlbrechtS $". +// End of "$Id: Fl_Clock.H 6812 2009-07-01 07:27:25Z AlbrechtS $". // diff --git a/plugins/zynaddsubfx/fltk/FL/Fl_Counter.H b/plugins/zynaddsubfx/fltk/FL/Fl_Counter.H index e52c092c52..24930779a7 100644 --- a/plugins/zynaddsubfx/fltk/FL/Fl_Counter.H +++ b/plugins/zynaddsubfx/fltk/FL/Fl_Counter.H @@ -1,5 +1,5 @@ // -// "$Id: Fl_Counter.H 6716 2009-03-24 01:40:44Z fabien $" +// "$Id: Fl_Counter.H 6902 2009-09-27 11:06:56Z matt $" // // Counter header file for the Fast Light Tool Kit (FLTK). // @@ -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,14 +111,14 @@ 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;} }; #endif // -// End of "$Id: Fl_Counter.H 6716 2009-03-24 01:40:44Z fabien $". +// End of "$Id: Fl_Counter.H 6902 2009-09-27 11:06:56Z matt $". // diff --git a/plugins/zynaddsubfx/fltk/FL/Fl_Group.H b/plugins/zynaddsubfx/fltk/FL/Fl_Group.H index 2db9d79926..5ba61ad258 100644 --- a/plugins/zynaddsubfx/fltk/FL/Fl_Group.H +++ b/plugins/zynaddsubfx/fltk/FL/Fl_Group.H @@ -1,5 +1,5 @@ // -// "$Id: Fl_Group.H 6716 2009-03-24 01:40:44Z fabien $" +// "$Id: Fl_Group.H 6907 2009-09-28 14:34:52Z matt $" // // Group header file for the Fast Light Tool Kit (FLTK). // @@ -58,8 +58,6 @@ class FL_EXPORT Fl_Group : public Fl_Widget { Fl_Group& operator=(const Fl_Group&); protected: - enum { CLIP_CHILDREN = 2048 }; - void draw(); void draw_child(Fl_Widget& widget) const; void draw_children(); @@ -176,7 +174,7 @@ public: \see void Fl_Group::clip_children(int c) */ - int clip_children() { return (flags() & CLIP_CHILDREN) != 0; } + unsigned int clip_children() { return (flags() & CLIP_CHILDREN) != 0; } // back compatibility functions: @@ -224,5 +222,5 @@ public: #endif // -// End of "$Id: Fl_Group.H 6716 2009-03-24 01:40:44Z fabien $". +// End of "$Id: Fl_Group.H 6907 2009-09-28 14:34:52Z matt $". // diff --git a/plugins/zynaddsubfx/fltk/FL/Fl_Input_.H b/plugins/zynaddsubfx/fltk/FL/Fl_Input_.H index 7217bb6603..26dab7d1ae 100644 --- a/plugins/zynaddsubfx/fltk/FL/Fl_Input_.H +++ b/plugins/zynaddsubfx/fltk/FL/Fl_Input_.H @@ -1,5 +1,5 @@ // -// "$Id: Fl_Input_.H 6777 2009-04-23 15:32:19Z matt $" +// "$Id: Fl_Input_.H 6902 2009-09-27 11:06:56Z matt $" // // Input base class header file for the Fast Light Tool Kit (FLTK). // @@ -120,7 +120,7 @@ class FL_EXPORT Fl_Input_ : public Fl_Widget { \p mark_, no text is selected */ int mark_; - /** \internal Offset to text origin within wdget bounds */ + /** \internal Offset to text origin within widget bounds */ int xscroll_, yscroll_; /** \internal Minimal update pointer. Display requirs redraw from here to the end @@ -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; @@ -206,6 +206,7 @@ protected: /** \internal Vertical offset of text to top edge of widget. */ int yscroll() const {return yscroll_;} + void yscroll(int y) { yscroll_ = y; damage(FL_DAMAGE_EXPOSE);} /* Return the number of lines displayed on a single page. */ int linesPerPage(); @@ -396,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 */ @@ -450,5 +451,5 @@ public: #endif // -// End of "$Id: Fl_Input_.H 6777 2009-04-23 15:32:19Z matt $". +// End of "$Id: Fl_Input_.H 6902 2009-09-27 11:06:56Z matt $". // diff --git a/plugins/zynaddsubfx/fltk/FL/Fl_Menu_.H b/plugins/zynaddsubfx/fltk/FL/Fl_Menu_.H index 41bcd5c14f..89ced65f62 100644 --- a/plugins/zynaddsubfx/fltk/FL/Fl_Menu_.H +++ b/plugins/zynaddsubfx/fltk/FL/Fl_Menu_.H @@ -1,5 +1,5 @@ // -// "$Id: Fl_Menu_.H 6614 2009-01-01 16:11:32Z matt $" +// "$Id: Fl_Menu_.H 6902 2009-09-27 11:06:56Z matt $" // // Menu base class header file for the Fast Light Tool Kit (FLTK). // @@ -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 @@ -142,5 +142,5 @@ public: #endif // -// End of "$Id: Fl_Menu_.H 6614 2009-01-01 16:11:32Z matt $". +// End of "$Id: Fl_Menu_.H 6902 2009-09-27 11:06:56Z matt $". // diff --git a/plugins/zynaddsubfx/fltk/FL/Fl_Menu_Item.H b/plugins/zynaddsubfx/fltk/FL/Fl_Menu_Item.H index b4052b8c85..be81b8cc0d 100644 --- a/plugins/zynaddsubfx/fltk/FL/Fl_Menu_Item.H +++ b/plugins/zynaddsubfx/fltk/FL/Fl_Menu_Item.H @@ -1,5 +1,5 @@ // -// "$Id: Fl_Menu_Item.H 6614 2009-01-01 16:11:32Z matt $" +// "$Id: Fl_Menu_Item.H 6902 2009-09-27 11:06:56Z matt $" // // Menu item header file for the Fast Light Tool Kit (FLTK). // @@ -36,18 +36,18 @@ # endif enum { // values for flags: - FL_MENU_INACTIVE = 1, - FL_MENU_TOGGLE= 2, - FL_MENU_VALUE = 4, - FL_MENU_RADIO = 8, - FL_MENU_INVISIBLE = 0x10, - FL_SUBMENU_POINTER = 0x20, - FL_SUBMENU = 0x40, - FL_MENU_DIVIDER = 0x80, - FL_MENU_HORIZONTAL = 0x100 + FL_MENU_INACTIVE = 1, ///< Deactivate menu item (gray out) + FL_MENU_TOGGLE= 2, ///< Item is a checkbox toggle (shows checkbox for on/off state) + FL_MENU_VALUE = 4, ///< The on/off state for checkbox/radio buttons (if set, state is 'on') + FL_MENU_RADIO = 8, ///< Item is a radio button (one checkbox of many can be on) + FL_MENU_INVISIBLE = 0x10, ///< Item will not show up (shortcut will work) + FL_SUBMENU_POINTER = 0x20, ///< Indicates user_data() is a pointer to another menu array + FL_SUBMENU = 0x40, ///< This item is a submenu to other items + FL_MENU_DIVIDER = 0x80, ///< Creates divider line below this item. Also ends a group of radio buttons. + FL_MENU_HORIZONTAL = 0x100 ///< ??? -- reserved }; -extern FL_EXPORT int fl_old_shortcut(const char*); +extern FL_EXPORT Fl_Shortcut fl_old_shortcut(const char*); class Fl_Menu_; @@ -68,15 +68,15 @@ class Fl_Menu_; }; enum { // values for flags: - FL_MENU_INACTIVE = 1, - FL_MENU_TOGGLE = 2, - FL_MENU_VALUE = 4, - FL_MENU_RADIO = 8, - FL_MENU_INVISIBLE = 0x10, - FL_SUBMENU_POINTER = 0x20, - FL_SUBMENU = 0x40, - FL_MENU_DIVIDER = 0x80, - FL_MENU_HORIZONTAL = 0x100 + FL_MENU_INACTIVE = 1, // Deactivate menu item (gray out) + FL_MENU_TOGGLE = 2, // Item is a checkbox toggle (shows checkbox for on/off state) + FL_MENU_VALUE = 4, // The on/off state for checkbox/radio buttons (if set, state is 'on') + FL_MENU_RADIO = 8, // Item is a radio button (one checkbox of many can be on) + FL_MENU_INVISIBLE = 0x10, // Item will not show up (shortcut will work) + FL_SUBMENU_POINTER = 0x20, // Indicates user_data() is a pointer to another menu array + FL_SUBMENU = 0x40, // This item is a submenu to other items + FL_MENU_DIVIDER = 0x80, // Creates divider line below this item. Also ends a group of radio buttons. + FL_MENU_HORIZONTAL = 0x100 // ??? -- reserved }; \endcode Typically menu items are statically defined; for example: @@ -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 @@ -414,5 +414,5 @@ enum { // back-compatibility enum: #endif // -// End of "$Id: Fl_Menu_Item.H 6614 2009-01-01 16:11:32Z matt $". +// End of "$Id: Fl_Menu_Item.H 6902 2009-09-27 11:06:56Z matt $". // diff --git a/plugins/zynaddsubfx/fltk/FL/Fl_Menu_Window.H b/plugins/zynaddsubfx/fltk/FL/Fl_Menu_Window.H index e2e77f1ea4..217e224afb 100644 --- a/plugins/zynaddsubfx/fltk/FL/Fl_Menu_Window.H +++ b/plugins/zynaddsubfx/fltk/FL/Fl_Menu_Window.H @@ -1,5 +1,5 @@ // -// "$Id: Fl_Menu_Window.H 6614 2009-01-01 16:11:32Z matt $" +// "$Id: Fl_Menu_Window.H 6909 2009-09-28 14:41:43Z matt $" // // Menu window header file for the Fast Light Tool Kit (FLTK). // @@ -40,14 +40,13 @@ redraw. */ class FL_EXPORT Fl_Menu_Window : public Fl_Single_Window { - enum {NO_OVERLAY = 128}; public: void show(); void erase(); void flush(); void hide(); /** Tells if hardware overlay mode is set */ - int overlay() {return !(flags()&NO_OVERLAY);} + unsigned int overlay() {return !(flags()&NO_OVERLAY);} /** Tells FLTK to use hardware overlay planes if they are available. */ void set_overlay() {clear_flag(NO_OVERLAY);} /** Tells FLTK to use normal drawing planes instead of overlay planes. @@ -65,5 +64,5 @@ public: #endif // -// End of "$Id: Fl_Menu_Window.H 6614 2009-01-01 16:11:32Z matt $". +// End of "$Id: Fl_Menu_Window.H 6909 2009-09-28 14:41:43Z matt $". // diff --git a/plugins/zynaddsubfx/fltk/FL/Fl_Multiline_Input.H b/plugins/zynaddsubfx/fltk/FL/Fl_Multiline_Input.H index feec464989..5f46624be5 100644 --- a/plugins/zynaddsubfx/fltk/FL/Fl_Multiline_Input.H +++ b/plugins/zynaddsubfx/fltk/FL/Fl_Multiline_Input.H @@ -1,5 +1,5 @@ // -// "$Id: Fl_Multiline_Input.H 6614 2009-01-01 16:11:32Z matt $" +// "$Id: Fl_Multiline_Input.H 6889 2009-09-19 22:09:00Z greg.ercolano $" // // Multiline input header file for the Fast Light Tool Kit (FLTK). // @@ -38,11 +38,15 @@ This input field displays '\n' characters as new lines rather than ^J, and accepts the Return, Tab, and up and down arrow keys. This is for editing multiline text. -
This is far from the nirvana of text editors, and is probably only - good for small bits of text, 10 lines at most. I think FLTK can be - used to write a powerful text editor, but it is not going to be a - built-in feature. Powerful text editors in a toolkit are a big source - of bloat. +
+ This is far from the nirvana of text editors, and is probably only + good for small bits of text, 10 lines at most. Note that this widget + does not support scrollbars or per-character color control. +
+ If you are presenting large amounts of text and need scrollbars + or full color control of characters, you probably want Fl_Text_Editor + instead. +
*/ class Fl_Multiline_Input : public Fl_Input { public: @@ -58,5 +62,5 @@ public: #endif // -// End of "$Id: Fl_Multiline_Input.H 6614 2009-01-01 16:11:32Z matt $". +// End of "$Id: Fl_Multiline_Input.H 6889 2009-09-19 22:09:00Z greg.ercolano $". // diff --git a/plugins/zynaddsubfx/fltk/FL/Fl_Multiline_Output.H b/plugins/zynaddsubfx/fltk/FL/Fl_Multiline_Output.H index 0dbcb06dce..f0edf63d06 100644 --- a/plugins/zynaddsubfx/fltk/FL/Fl_Multiline_Output.H +++ b/plugins/zynaddsubfx/fltk/FL/Fl_Multiline_Output.H @@ -1,5 +1,5 @@ // -// "$Id: Fl_Multiline_Output.H 6614 2009-01-01 16:11:32Z matt $" +// "$Id: Fl_Multiline_Output.H 6889 2009-09-19 22:09:00Z greg.ercolano $" // // Multi line output header file for the Fast Light Tool Kit (FLTK). // @@ -37,6 +37,14 @@ This widget is a subclass of Fl_Output that displays multiple lines of text. It also displays tab characters as whitespace to the next column. +
+ Note that this widget does not support scrollbars, or per-character + color control. +
+ If you are presenting large amounts of read-only text + and need scrollbars, or full color control of characters, + then use Fl_Text_Display. If you want to display HTML text, + use Fl_Help_View. */ class Fl_Multiline_Output : public Fl_Output { public: @@ -52,5 +60,5 @@ public: #endif // -// End of "$Id: Fl_Multiline_Output.H 6614 2009-01-01 16:11:32Z matt $". +// End of "$Id: Fl_Multiline_Output.H 6889 2009-09-19 22:09:00Z greg.ercolano $". // diff --git a/plugins/zynaddsubfx/fltk/FL/Fl_Output.H b/plugins/zynaddsubfx/fltk/FL/Fl_Output.H index 0d02d82d58..58b33378f5 100644 --- a/plugins/zynaddsubfx/fltk/FL/Fl_Output.H +++ b/plugins/zynaddsubfx/fltk/FL/Fl_Output.H @@ -1,5 +1,5 @@ // -// "$Id: Fl_Output.H 6614 2009-01-01 16:11:32Z matt $" +// "$Id: Fl_Output.H 6898 2009-09-23 20:43:27Z matt $" // // Output header file for the Fast Light Tool Kit (FLTK). // @@ -42,7 +42,8 @@ \image latex text.eps "Fl_Output" width=8cm
There is a single subclass, Fl_Multiline_Output, which allows you to display multiple lines of - text.
+ text. Fl_Multiline_Output does not provide scroll bars. If a more + complete text editing widget is needed, use Fl_Text_Display instead.The text may contain any characters except \\0, and will correctly
display anything, using ^X notation for unprintable control characters
and \\nnn notation for unprintable characters with the high bit set. It
@@ -63,5 +64,5 @@ public:
#endif
//
-// End of "$Id: Fl_Output.H 6614 2009-01-01 16:11:32Z matt $".
+// End of "$Id: Fl_Output.H 6898 2009-09-23 20:43:27Z matt $".
//
diff --git a/plugins/zynaddsubfx/fltk/FL/Fl_Scroll.H b/plugins/zynaddsubfx/fltk/FL/Fl_Scroll.H
index e36be6d234..a8bbdb4800 100644
--- a/plugins/zynaddsubfx/fltk/FL/Fl_Scroll.H
+++ b/plugins/zynaddsubfx/fltk/FL/Fl_Scroll.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Scroll.H 6614 2009-01-01 16:11:32Z matt $"
+// "$Id: Fl_Scroll.H 6828 2009-07-12 00:15:06Z greg.ercolano $"
//
// Scroll header file for the Fast Light Tool Kit (FLTK).
//
@@ -193,5 +193,5 @@ public:
#endif
//
-// End of "$Id: Fl_Scroll.H 6614 2009-01-01 16:11:32Z matt $".
+// End of "$Id: Fl_Scroll.H 6828 2009-07-12 00:15:06Z greg.ercolano $".
//
diff --git a/plugins/zynaddsubfx/fltk/FL/Fl_Text_Buffer.H b/plugins/zynaddsubfx/fltk/FL/Fl_Text_Buffer.H
index 7efca467c9..a4d85139cf 100644
--- a/plugins/zynaddsubfx/fltk/FL/Fl_Text_Buffer.H
+++ b/plugins/zynaddsubfx/fltk/FL/Fl_Text_Buffer.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Text_Buffer.H 6618 2009-01-01 21:54:10Z matt $"
+// "$Id: Fl_Text_Buffer.H 6822 2009-07-04 00:24:26Z fabien $"
//
// Header file for Fl_Text_Buffer class.
//
@@ -322,5 +322,5 @@ class FL_EXPORT Fl_Text_Buffer {
#endif
//
-// End of "$Id: Fl_Text_Buffer.H 6618 2009-01-01 21:54:10Z matt $".
+// End of "$Id: Fl_Text_Buffer.H 6822 2009-07-04 00:24:26Z fabien $".
//
diff --git a/plugins/zynaddsubfx/fltk/FL/Fl_Text_Display.H b/plugins/zynaddsubfx/fltk/FL/Fl_Text_Display.H
index 2986b1cd72..495737718c 100644
--- a/plugins/zynaddsubfx/fltk/FL/Fl_Text_Display.H
+++ b/plugins/zynaddsubfx/fltk/FL/Fl_Text_Display.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Text_Display.H 6614 2009-01-01 16:11:32Z matt $"
+// "$Id: Fl_Text_Display.H 6902 2009-09-27 11:06:56Z matt $"
//
// Header file for Fl_Text_Display class.
//
@@ -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
@@ -340,5 +340,5 @@ class FL_EXPORT Fl_Text_Display: public Fl_Group {
#endif
//
-// End of "$Id: Fl_Text_Display.H 6614 2009-01-01 16:11:32Z matt $".
+// End of "$Id: Fl_Text_Display.H 6902 2009-09-27 11:06:56Z matt $".
//
diff --git a/plugins/zynaddsubfx/fltk/FL/Fl_Text_Editor.H b/plugins/zynaddsubfx/fltk/FL/Fl_Text_Editor.H
index 85f3611db0..be3b718a3b 100644
--- a/plugins/zynaddsubfx/fltk/FL/Fl_Text_Editor.H
+++ b/plugins/zynaddsubfx/fltk/FL/Fl_Text_Editor.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Text_Editor.H 6614 2009-01-01 16:11:32Z matt $"
+// "$Id: Fl_Text_Editor.H 6893 2009-09-20 19:24:24Z greg.ercolano $"
//
// Header file for Fl_Text_Editor class.
//
@@ -103,6 +103,8 @@ class FL_EXPORT Fl_Text_Editor : public Fl_Text_Display {
static int kf_shift_move(int c, Fl_Text_Editor* e);
static int kf_ctrl_move(int c, Fl_Text_Editor* e);
static int kf_c_s_move(int c, Fl_Text_Editor* e);
+ static int kf_meta_move(int c, Fl_Text_Editor* e);
+ static int kf_m_s_move(int c, Fl_Text_Editor* e);
static int kf_home(int, Fl_Text_Editor* e);
static int kf_end(int c, Fl_Text_Editor* e);
static int kf_left(int c, Fl_Text_Editor* e);
@@ -134,6 +136,6 @@ class FL_EXPORT Fl_Text_Editor : public Fl_Text_Display {
#endif
//
-// End of "$Id: Fl_Text_Editor.H 6614 2009-01-01 16:11:32Z matt $".
+// End of "$Id: Fl_Text_Editor.H 6893 2009-09-20 19:24:24Z greg.ercolano $".
//
diff --git a/plugins/zynaddsubfx/fltk/FL/Fl_Tooltip.H b/plugins/zynaddsubfx/fltk/FL/Fl_Tooltip.H
index 033e83f2b3..c5ec206416 100644
--- a/plugins/zynaddsubfx/fltk/FL/Fl_Tooltip.H
+++ b/plugins/zynaddsubfx/fltk/FL/Fl_Tooltip.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Tooltip.H 6614 2009-01-01 16:11:32Z matt $"
+// "$Id: Fl_Tooltip.H 6902 2009-09-27 11:06:56Z matt $"
//
// Tooltip header file for the Fast Light Tool Kit (FLTK).
//
@@ -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
@@ -105,5 +105,5 @@ private:
#endif
//
-// End of "$Id: Fl_Tooltip.H 6614 2009-01-01 16:11:32Z matt $".
+// End of "$Id: Fl_Tooltip.H 6902 2009-09-27 11:06:56Z matt $".
//
diff --git a/plugins/zynaddsubfx/fltk/FL/Fl_Value_Input.H b/plugins/zynaddsubfx/fltk/FL/Fl_Value_Input.H
index 52d9f31d13..4ed1b10115 100644
--- a/plugins/zynaddsubfx/fltk/FL/Fl_Value_Input.H
+++ b/plugins/zynaddsubfx/fltk/FL/Fl_Value_Input.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Value_Input.H 6664 2009-02-18 09:27:54Z AlbrechtS $"
+// "$Id: Fl_Value_Input.H 6902 2009-09-27 11:06:56Z matt $"
//
// Value input header file for the Fast Light Tool Kit (FLTK).
//
@@ -120,16 +120,16 @@ 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);}
};
#endif
//
-// End of "$Id: Fl_Value_Input.H 6664 2009-02-18 09:27:54Z AlbrechtS $".
+// End of "$Id: Fl_Value_Input.H 6902 2009-09-27 11:06:56Z matt $".
//
diff --git a/plugins/zynaddsubfx/fltk/FL/Fl_Value_Output.H b/plugins/zynaddsubfx/fltk/FL/Fl_Value_Output.H
index 1654219c6a..5dda0ca892 100644
--- a/plugins/zynaddsubfx/fltk/FL/Fl_Value_Output.H
+++ b/plugins/zynaddsubfx/fltk/FL/Fl_Value_Output.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Value_Output.H 6664 2009-02-18 09:27:54Z AlbrechtS $"
+// "$Id: Fl_Value_Output.H 6902 2009-09-27 11:06:56Z matt $"
//
// Value output header file for the Fast Light Tool Kit (FLTK).
//
@@ -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,13 +83,13 @@ 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
//
-// End of "$Id: Fl_Value_Output.H 6664 2009-02-18 09:27:54Z AlbrechtS $".
+// End of "$Id: Fl_Value_Output.H 6902 2009-09-27 11:06:56Z matt $".
//
diff --git a/plugins/zynaddsubfx/fltk/FL/Fl_Value_Slider.H b/plugins/zynaddsubfx/fltk/FL/Fl_Value_Slider.H
index c2b5afe507..ec886428ad 100644
--- a/plugins/zynaddsubfx/fltk/FL/Fl_Value_Slider.H
+++ b/plugins/zynaddsubfx/fltk/FL/Fl_Value_Slider.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Value_Slider.H 6664 2009-02-18 09:27:54Z AlbrechtS $"
+// "$Id: Fl_Value_Slider.H 6902 2009-09-27 11:06:56Z matt $"
//
// Value slider header file for the Fast Light Tool Kit (FLTK).
//
@@ -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,13 +57,13 @@ 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
//
-// End of "$Id: Fl_Value_Slider.H 6664 2009-02-18 09:27:54Z AlbrechtS $".
+// End of "$Id: Fl_Value_Slider.H 6902 2009-09-27 11:06:56Z matt $".
//
diff --git a/plugins/zynaddsubfx/fltk/FL/Fl_Widget.H b/plugins/zynaddsubfx/fltk/FL/Fl_Widget.H
index 426156137b..f36ca38c75 100644
--- a/plugins/zynaddsubfx/fltk/FL/Fl_Widget.H
+++ b/plugins/zynaddsubfx/fltk/FL/Fl_Widget.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Widget.H 6753 2009-04-12 09:40:59Z AlbrechtS $"
+// "$Id: Fl_Widget.H 6912 2009-10-02 19:08:55Z matt $"
//
// Widget header file for the Fast Light Tool Kit (FLTK).
//
@@ -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 ;
@@ -96,9 +96,9 @@ class FL_EXPORT Fl_Widget {
void* user_data_;
int x_,y_,w_,h_;
Fl_Label label_;
- int flags_;
- unsigned color_;
- unsigned color2_;
+ unsigned int flags_;
+ Fl_Color color_;
+ Fl_Color color2_;
uchar type_;
uchar damage_;
uchar box_;
@@ -135,23 +135,37 @@ protected:
/** Internal use only. Use position(int,int), size(int,int) or resize(int,int,int,int) instead. */
void h(int v) {h_ = v;}
/** Gets the widget flags mask */
- int flags() const {return flags_;}
+ unsigned int flags() const {return flags_;}
/** Sets a flag in the flags mask */
- void set_flag(int c) {flags_ |= c;}
+ void set_flag(unsigned int c) {flags_ |= c;}
/** Clears a flag in the flags mask */
- void clear_flag(int c) {flags_ &= ~c;}
+ void clear_flag(unsigned int c) {flags_ &= ~c;}
/** flags possible values enumeration.
See activate(), output(), visible(), changed(), set_visible_focus()
*/
enum {
- INACTIVE=1, ///< the widget can't receive focus, and is disabled but potentially visible
- INVISIBLE=2, ///< the widget is not drawn but can receive events
- OUTPUT=4, ///< for output only
- SHORTCUT_LABEL=64, ///< the label contains a shortcut we need to draw
- CHANGED=128, ///< the widget value changed
- VISIBLE_FOCUS=512, ///< accepts keyboard focus navigation if the widget can have the focus
- COPIED_LABEL=1024 ///< the widget label is internally copied, its destruction is handled by the widget
- };
+ INACTIVE = 1<<0, ///< the widget can't receive focus, and is disabled but potentially visible
+ INVISIBLE = 1<<1, ///< the widget is not drawn but can receive events
+ OUTPUT = 1<<2, ///< for output only
+ NOBORDER = 1<<3, ///< don't draw a decoration (Fl_Window)
+ FORCE_POSITION = 1<<4, ///< don't let the window manager position the window (Fl_Window)
+ NON_MODAL = 1<<5, ///< thisis a hovering toolbar window (Fl_Window)
+ SHORTCUT_LABEL = 1<<6, ///< the label contains a shortcut we need to draw
+ CHANGED = 1<<7, ///< the widget value changed
+ OVERRIDE = 1<<8, ///< position window on top (Fl_Window)
+ VISIBLE_FOCUS = 1<<9, ///< accepts keyboard focus navigation if the widget can have the focus
+ COPIED_LABEL = 1<<10, ///< the widget label is internally copied, its destruction is handled by the widget
+ CLIP_CHILDREN = 1<<11, ///< all drawing within this widget will be clipped (Fl_Group)
+ MENU_WINDOW = 1<<12, ///< a temporary popup window, dismissed by clicking outside (Fl_Window)
+ TOOLTIP_WINDOW = 1<<13, ///< a temporary popup, transparent to events, and dismissed easily (Fl_Window)
+ MODAL = 1<<14, ///< a window blocking input to all other winows (Fl_Window)
+ NO_OVERLAY = 1<<15, ///< window not using a hardware overlay plane (Fl_Menu_Window)
+ GROUP_RELATIVE = 1<<16, ///< position this idget relative to the parent group, not to the window
+ // (space for more flags)
+ USERFLAG3 = 1<<29, ///< reserved for 3rd party extensions
+ USERFLAG2 = 1<<30, ///< reserved for 3rd party extensions
+ USERFLAG1 = 1<<31 ///< reserved for 3rd party extensions
+ };
void draw_box() const;
void draw_box(Fl_Boxtype t, Fl_Color c) const;
void draw_box(Fl_Boxtype t, int x,int y,int w,int h, Fl_Color c) const;
@@ -343,9 +357,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 +369,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 +396,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 +453,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
@@ -633,7 +647,7 @@ public:
\retval 0 if the widget is not drawn and hence invisible.
\see show(), hide(), visible_r()
*/
- int visible() const {return !(flags_&INVISIBLE);}
+ unsigned int visible() const {return !(flags_&INVISIBLE);}
/** Returns whether a widget and all its parents are visible.
\retval 0 if the widget or any of its parents are invisible.
@@ -678,7 +692,7 @@ public:
\retval 0 if the widget is inactive
\see active_r(), activate(), deactivate()
*/
- int active() const {return !(flags_&INACTIVE);}
+ unsigned int active() const {return !(flags_&INACTIVE);}
/** Returns whether the widget and all of its parents are active.
\retval 0 if this or any of the parent widgets are inactive
@@ -717,7 +731,7 @@ public:
\retval 0 if the widget is used for input and output
\see set_output(), clear_output()
*/
- int output() const {return (flags_&OUTPUT);}
+ unsigned int output() const {return (flags_&OUTPUT);}
/** Sets a widget to output only.
\see output(), clear_output()
@@ -734,7 +748,7 @@ public:
&& visible()) but is faster.
\retval 0 if the widget takes no events
*/
- int takesevents() const {return !(flags_&(INACTIVE|INVISIBLE|OUTPUT));}
+ unsigned int takesevents() const {return !(flags_&(INACTIVE|INVISIBLE|OUTPUT));}
/**
Checks if the widget value changed since the last callback.
@@ -751,7 +765,7 @@ public:
\retval 0 if the value did not change
\see set_changed(), clear_changed()
*/
- int changed() const {return flags_&CHANGED;}
+ unsigned int changed() const {return flags_&CHANGED;}
/** Marks the value of the widget as changed.
\see changed(), clear_changed()
@@ -796,7 +810,7 @@ public:
\retval 0 if this widget has no visible focus.
\see visible_focus(int), set_visible_focus(), clear_visible_focus()
*/
- int visible_focus() { return flags_ & VISIBLE_FOCUS; }
+ unsigned int visible_focus() { return flags_ & VISIBLE_FOCUS; }
/** Sets the default callback for all widgets.
Sets the default callback, which puts a pointer to the widget on the queue
@@ -828,7 +842,7 @@ public:
/** Internal use only. */
int test_shortcut();
/** Internal use only. */
- static char label_shortcut(const char *t);
+ static Fl_Shortcut label_shortcut(const char *t);
/** Internal use only. */
static int test_shortcut(const char*);
@@ -866,9 +880,16 @@ public:
*/
uchar damage() const {return damage_;}
- /** Clears the damage flags.
+ /** Clears or sets the damage flags.
Damage flags are cleared when parts of the widget drawing is repaired.
- \param[in] c bitmask of flags to clear
+
+ The optional argument \p c specifies the bits that are set
+ after the call (default: 0) and \b not the bits that are cleared!
+
+ \note Therefore it is possible to set damage bits with this method, but
+ this should be avoided. Use damage(uchar) instead.
+
+ \param[in] c new bitmask of damage flags (default: 0)
\see damage(uchar), damage()
*/
void clear_damage(uchar c = 0) {damage_ = c;}
@@ -923,5 +944,5 @@ public:
#endif
//
-// End of "$Id: Fl_Widget.H 6753 2009-04-12 09:40:59Z AlbrechtS $".
+// End of "$Id: Fl_Widget.H 6912 2009-10-02 19:08:55Z matt $".
//
diff --git a/plugins/zynaddsubfx/fltk/FL/Fl_Window.H b/plugins/zynaddsubfx/fltk/FL/Fl_Window.H
index a55521db54..952a527936 100644
--- a/plugins/zynaddsubfx/fltk/FL/Fl_Window.H
+++ b/plugins/zynaddsubfx/fltk/FL/Fl_Window.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Window.H 6614 2009-01-01 16:11:32Z matt $"
+// "$Id: Fl_Window.H 6907 2009-09-28 14:34:52Z matt $"
//
// Window header file for the Fast Light Tool Kit (FLTK).
//
@@ -69,16 +69,6 @@ class FL_EXPORT Fl_Window : public Fl_Group {
Fl_Cursor cursor_default;
Fl_Color cursor_fg, cursor_bg;
void size_range_();
- // values for flags():
- enum {
- FL_MODAL = 64,
- FL_NOBORDER = 8,
- FL_FORCE_POSITION = 16,
- FL_NON_MODAL = 32,
- FL_OVERRIDE = 256,
- FL_MENU_WINDOW = 4096,
- FL_TOOLTIP_WINDOW = 8192
- };
void _Fl_Window(); // constructor innards
// unimplemented copy ctor and assignment operator
@@ -167,13 +157,13 @@ public:
Fast inline function to turn the border
off. It only works before show() is called.
*/
- void clear_border() {set_flag(FL_NOBORDER);}
+ void clear_border() {set_flag(NOBORDER);}
/** See int Fl_Window::border(int) */
- int border() const {return !(flags() & FL_NOBORDER);}
- /** Activate the flags FL_NOBORDER|FL_OVERRIDE */
- void set_override() {set_flag(FL_NOBORDER|FL_OVERRIDE);}
+ unsigned int border() const {return !(flags() & NOBORDER);}
+ /** Activate the flags NOBORDER|FL_OVERRIDE */
+ void set_override() {set_flag(NOBORDER|OVERRIDE);}
/** Returns non zero if FL_OVERRIDE flag is set, 0 otherwise. */
- int override() const { return flags()&FL_OVERRIDE; }
+ unsigned int override() const { return flags()&OVERRIDE; }
/**
A "modal" window, when shown(), will prevent any events from
being delivered to other windows in the same program, and will also
@@ -183,18 +173,18 @@ public:
which window (if any) is modal by calling
Fl::modal().
*/
- void set_modal() {set_flag(FL_MODAL);}
+ void set_modal() {set_flag(MODAL);}
/** Returns true if this window is modal. */
- int modal() const {return flags() & FL_MODAL;}
+ unsigned int modal() const {return flags() & MODAL;}
/**
A "non-modal" window (terminology borrowed from Microsoft Windows)
acts like a modal() one in that it remains on top, but it has
no effect on event delivery. There are three states for a
window: modal, non-modal, and normal.
*/
- void set_non_modal() {set_flag(FL_NON_MODAL);}
+ void set_non_modal() {set_flag(NON_MODAL);}
/** Returns true if this window is modal or non-modal. */
- int non_modal() const {return flags() & (FL_NON_MODAL|FL_MODAL);}
+ unsigned int non_modal() const {return flags() & (NON_MODAL|MODAL);}
/**
Marks the window as a menu window.
@@ -209,10 +199,10 @@ public:
This must be called before the window is shown and cannot be changed
later.
*/
- void set_menu_window() {set_flag(FL_MENU_WINDOW);}
+ void set_menu_window() {set_flag(MENU_WINDOW);}
/** Returns true if this window is a menu window. */
- int menu_window() const {return flags() & FL_MENU_WINDOW;}
+ unsigned int menu_window() const {return flags() & MENU_WINDOW;}
/**
Marks the window as a tooltip window.
@@ -230,10 +220,10 @@ public:
\note Since Fl_Tooltip_Window is derived from Fl_Menu_Window, this
also \b clears the menu_window() state.
*/
- void set_tooltip_window() { set_flag(FL_TOOLTIP_WINDOW);
- clear_flag(FL_MENU_WINDOW); }
+ void set_tooltip_window() { set_flag(TOOLTIP_WINDOW);
+ clear_flag(MENU_WINDOW); }
/** Returns true if this window is a tooltip window. */
- int tooltip_window() const {return flags() & FL_TOOLTIP_WINDOW;}
+ unsigned int tooltip_window() const {return flags() & TOOLTIP_WINDOW;}
/**
Position the window so that the mouse is pointing at the
@@ -252,7 +242,7 @@ public:
so that the next time show() is called the window manager is
free to position the window.
*/
- void free_position() {clear_flag(FL_FORCE_POSITION);}
+ void free_position() {clear_flag(FORCE_POSITION);}
/**
Set the allowable range the user can resize this window to. This only
works for top-level windows.
@@ -410,5 +400,5 @@ public:
#endif
//
-// End of "$Id: Fl_Window.H 6614 2009-01-01 16:11:32Z matt $".
+// End of "$Id: Fl_Window.H 6907 2009-09-28 14:34:52Z matt $".
//
diff --git a/plugins/zynaddsubfx/fltk/FL/fl_draw.H b/plugins/zynaddsubfx/fltk/FL/fl_draw.H
index fab90b477a..69ecaf49c4 100644
--- a/plugins/zynaddsubfx/fltk/FL/fl_draw.H
+++ b/plugins/zynaddsubfx/fltk/FL/fl_draw.H
@@ -1,5 +1,5 @@
//
-// "$Id: fl_draw.H 6779 2009-04-24 09:28:30Z yuri $"
+// "$Id: fl_draw.H 6878 2009-09-17 22:12:24Z matt $"
//
// Portable drawing function header file for the Fast Light Tool Kit (FLTK).
//
@@ -203,14 +203,7 @@ inline Fl_Fontsize fl_size() {return fl_size_;}
You can also use the value of \p size passed to fl_font()
*/
FL_EXPORT int fl_height(); // using "size" should work ok
-/**
- Dummy passthru function called only in Fl_Text_Display that simply returns
- the font height as given by the \p size parameter in the same call!
-
- \todo Is fl_height(int, int size) required for Fl_Text_Dispay?
- Why not use \p size parameter directly?
-*/
-inline int fl_height(int, int size) {return size;}
+FL_EXPORT int fl_height(int font, int size);
/**
Returns the recommended distance above the bottom of a fl_height() tall box to
draw the text at so it looks centered vertically in that box.
@@ -448,8 +441,8 @@ FL_EXPORT int fl_measure_pixmap(const char* const* cdata, int &w, int &h);
// other:
FL_EXPORT void fl_scroll(int X, int Y, int W, int H, int dx, int dy,
void (*draw_area)(void*, int,int,int,int), void* data);
-FL_EXPORT const char* fl_shortcut_label(int shortcut);
-FL_EXPORT const char* fl_shortcut_label(int shortcuti, const char **eom);
+FL_EXPORT const char* fl_shortcut_label(Fl_Shortcut shortcut);
+FL_EXPORT const char* fl_shortcut_label(Fl_Shortcut shortcut, const char **eom);
FL_EXPORT void fl_overlay_rect(int x,int y,int w,int h);
FL_EXPORT void fl_overlay_clear();
FL_EXPORT void fl_cursor(Fl_Cursor, Fl_Color fg=FL_BLACK, Fl_Color bg=FL_WHITE);
@@ -475,5 +468,5 @@ FL_EXPORT int fl_add_symbol(const char* name, void (*drawit)(Fl_Color), int scal
#endif
//
-// End of "$Id: fl_draw.H 6779 2009-04-24 09:28:30Z yuri $".
+// End of "$Id: fl_draw.H 6878 2009-09-17 22:12:24Z matt $".
//
diff --git a/plugins/zynaddsubfx/fltk/FL/fl_types.h b/plugins/zynaddsubfx/fltk/FL/fl_types.h
index e676a621e6..d87cd73873 100644
--- a/plugins/zynaddsubfx/fltk/FL/fl_types.h
+++ b/plugins/zynaddsubfx/fltk/FL/fl_types.h
@@ -52,6 +52,9 @@ typedef char *Fl_String;
typedef const char *Fl_CString;
/** 24-bit Unicode character + 8-bit indicator for keyboard flags */
+typedef unsigned int Fl_Shortcut;
+
+/** 24-bit Unicode character - upper 8-bits are unused */
typedef unsigned int Fl_Char;
/*@}*/ /* group: Miscellaneous */
diff --git a/plugins/zynaddsubfx/fltk/README.123 b/plugins/zynaddsubfx/fltk/README.123
new file mode 100644
index 0000000000..1ab0c4f47c
--- /dev/null
+++ b/plugins/zynaddsubfx/fltk/README.123
@@ -0,0 +1,686 @@
+
+ R E A D M E . 1 2 3
+ =====================
+
+This file listst the differences between FLTK 1 and FLTK 2 with annotations
+for a possible implementation of FLTK 3. The all new and improved FLTK 3
+needs to be compatible with 1 and 2. It must have a moder API, plenty of
+widgets, lots of options, customization at run-time, but still be easily
+portable, fast, and of course light.
+
+FLTK 1 has become a nice starting point for the first steps in GUI
+programming. It runs on al major platform (and on many minor ones
+as well), is small, compact, and easy to use. FLTK 2 was the
+attempt to continue the success of FLTK 1 with a much cleaber API
+and many important details improved. Unfortunately many users never
+made the jump to FLTK 2 and so it not only ended in a crawling slow
+branch, it also became instable and at last unmaintainable.
+
+FLTK 3 sets out to surprise FLTK 1 users and satisfy FLTK 2 junkies.
+It will basically be the improved FLTK 2 API combined with the quite
+stable innards of FLTK 1. As an extra bonus, FLTK 3 will be compatible
+to 1 and 2. Just prepend your code with the "coding_style" instruction
+and FLTK 3 will do the rest. It is even possible to intermix F1 and
+F2 coding styles at any place.
+
+Nice challange, eh? So let's get going:
+
+
+ The Big Differences
+---------------------
+
+FLTK 2 is based on FLTK 1 in many ways, and while the FLTK 1 API was based
+on the Forms Library, FLTK 2 is Bill's take on how FLTK 1 should have been.
+This chapter outlines the biggest differences between version.
+
+(1) Coordinate System: FLTK 1 child coordinates are always relative to the
+window, not as most would expect to the parent. FLTK 2 does the logical
+thing and uses group-relative origins. This is somewhat difficult to port
+if we want to stay downward compatible. Fl_Widget will need an additional
+flag indicating absolute or relative coordinates.
+
+(2) Pulldown Menus: The developers of the Forms Library did not implement
+the idea of hierarchies all the way through. Pulldown menus, which are
+hierarchical by nature, were instead implemented as a list with lots of
+tricks and cludges to make them usable. FLTK 2 went half way by using the
+existing Windget/Group relation to create menus, however, menu items are
+still specialized widgets. For FLTK 3, I would like to allow any widget
+inside a pulldown menu.
+
+(3) Browsers and Tree Views: Browsers in FLTK1 are implemented even worse
+than Pulldown Menus. FLTK 2 solved the issues in a similar way, and here
+again, I prefer the FLTK 2 way very mch, but also would like to extend
+functionality to allow arbitrary widgets as list items. A Tree-like
+widget comes free with the FLTK 2 concept. FLTK 1 has no such thing and
+even Fluid had to hack the library badly to generate a tree view.
+
+(4) Namespaces: this is a minr issue that I include for completeness. FLTK 2
+introduces the ftk namespace, renaming all widgets. FLTK 3 will use the
+FLTK 2 naming scheme and map FLTK 1 class names using typedefs. This is, as
+most things in programming are, a compromise. The "coding_style" function
+must be used to switch between FLTK 1 and FLTK 2 code. No worries though,
+it's easy and straight forward.
+
+(5) Layout: FLTK 1 uses a top-down approach for widget layout in which the
+parent widget decides about the childs size "resize(x, y, w, h)". In FLTK 2
+any widget can call "layout()" which will query children for their preffered
+size and propagate the information up. This is a great concept that FLTK 3
+should adapt, plus it is compatible.
+
+(6) Ractangle: FLTK 2's base class is fltk::Rectangle. This is nice and
+easy to implement. The API is pretty much the same in both versions.
+
+(7) Styles: FLTK 2 uses a minimal number of styles to define the basic
+(and often repeated) parameters of every widget. API's are similar though,
+so this is luckily another pretty straight-forward upgrade.
+
+
+ Comparison Chart by Class
+---------------------------
+
+This chart contains a list of all classes in FLTK 1 and 2, how they
+correspond, and how they could be implemented in FLTK 3.
+
+1: class Fl
+2: namespace fltk
+*: this is a pretty straight-forward mapping of functions. The actual work
+ lies in finding and listing all global functions and adapting those.
+
+1: class Fl_Adjuster
+2: class Adjuster
+*: should map easily
+
+1:
+2: class AlignGroup
+*: undocumented in FLTK 2. Minimal code. Can be transfered easily.
+
+1:
+2: class AnsiWidget
+*: There is no equvalet in FLTK 1, but the widget may be easily ported.
+
+1:
+2: class AssociationFunctor
+*: Associations are a new and rarly used concept in FLTK 2. We need to
+ decide if these should be moved into FLTK 3
+
+1:
+2: class AssociationType
+*: Associations are a new and rarly used concept in FLTK 2. We need to
+ decide if these should be moved into FLTK 3
+
+1:
+2: class BarGroup
+*: undocumented in FLTK 2. Minimal code. Can be transfered easily.
+
+1: class Fl_BMP_Image
+2: class bmpImage
+*: should map easily
+
+1: class Fl_Bitmap
+2:
+
+1: class Fl_Box
+2: class Widget
+*: This actually maps pretty much exactly to fltk::Widget. FLTK 2 provides
+ a bunch of other box-like classes which have some predefined properties,
+ however this is the best match for FLTK 1. fltk::InvisibleBox can be used
+ as well.
+
+1: class Fl_Browser
+2: class Browser
+
+1: class Fl_Browser_
+2:
+
+1: class Fl_Button
+2: class Button
+*: should map easily
+
+1: class Fl_Cairo_State
+2:
+
+1: class Fl_Cairo_Window
+2:
+
+1: class Fl_Chart
+2:
+
+1: class Fl_Check_Browser
+2:
+
+1: class Fl_Check_Button
+2: class CheckButton
+*: should map easily
+
+1: class Fl_Choice
+2: class Choice
+*: should map easily
+
+1: class Fl_Clock
+2: class Clock
+*: should map easily
+
+1: class Fl_Clock_Output
+2: class ClockOutput
+*: should map easily
+
+1: class Fl_Color_Chooser
+2: class ColorChooser
+*: should map easily
+
+1:
+2: class ComboBrowser
+
+1:
+2: class ComboWindow
+
+1:
+2: class CycleButton
+
+1: class Fl_Counter
+2:
+
+1: class Fl_Dial
+2: class Dial
+*: should map easily
+
+1:
+2: class Divider
+
+1: class Fl_Double_Window
+2: class DoubleBufferWindow
+*: should map easily
+
+1: class Fl_End
+2:
+
+1:
+2: class EngravedLabel
+
+1: class Fl_File_Browser
+2: class FileBrowser
+*: should map easily
+
+1: class Fl_File_Chooser
+2: class FileChooser
+*: should map easily
+
+1: class Fl_File_Icon
+2: class FileIcon
+*: should map easily
+
+1: class Fl_File_Input
+2: class FileInput
+*: should map easily
+
+1: class Fl_Fill_Dial
+2: class FillDial
+*: should map easily
+
+1: class Fl_Fill_Slider
+2: class FillSlider
+*: should map easily
+
+1:
+2: class FlatBox
+
+1: class Fl_Float_Input
+2: class FloatInput
+*: should map easily
+
+1: class Fl_FormsBitmap
+2:
+
+1: class Fl_FormsPixmap
+2:
+
+1: class Fl_FormsText
+2: class Fl_FormsText
+*: should map easily
+
+1:
+2: class FrameBox
+
+1: class Fl_Free
+2:
+
+1: class Fl_GIF_Image
+2: class gifImage
+*: should map easily
+
+1: class Fl_Gl_Choice
+2: class GlChoice
+*: should map easily
+
+1: class Fl_Gl_Window
+2: class GlWindow
+*: should map easily
+
+1:
+2: class GlOverlay
+
+1: class Fl_Glut_Window
+2: class GlutWindow
+
+1: class Fl_Group
+2: class Group
+*: should map easily, must manage coordinate systems
+
+1:
+2: class GSave
+
+1:
+2: class Guard
+
+1: class Fl_Help_Dialog
+2: class HelpDialog
+*: should map easily
+
+1: class Fl_Help_View
+2: class HelpView
+*: should map easily
+
+1:
+2: class HighlightBox
+
+1:
+2: class HighlightButton
+
+1: class Fl_Hold_Browser
+2:
+
+1: class Fl_Hor_Fill_Slider
+2:
+
+1: class Fl_Hor_Nice_Slider
+2:
+
+1: class Fl_Hor_Slider
+2:
+
+1: class Fl_Hor_Value_Slider
+2:
+
+1: class Fl_Image
+2: class Image
+*: should map easily
+
+1: class Fl_Input
+2: class Input
+*: should map easily
+
+1: class Fl_Input_
+2:
+
+1:
+2: class InputBrowser
+
+1: class Fl_Input_Choice
+2: class ComboBox
+*: should map easily
+
+1: class Fl_Int_Input
+2: class IntInput
+*: should map easily
+
+1:
+2: class InvisibleBox
+
+1:
+2: class Item
+
+1:
+2: class ItemGroup
+
+1: class Fl_JPEG_Image
+2: class jpegImage
+*: should map easily
+
+1:
+2: class LabelType
+
+1: class Fl_Light_Button
+2: class LightButton
+*: should map easily
+
+1: class Fl_Line_Dial
+2: class LineDial
+*: should map easily
+
+1:
+2: class List
+
+1: class Fl_Menu_
+2: class Menu
+
+1: class Fl_Menu_Bar
+2: class MenuBar
+
+1: class Fl_Menu_Button
+2: class PopupMenu
+
+1:
+2: class MenuSection
+
+1: class Fl_Menu_Window
+2: class MenuWindow
+
+1:
+2: class Monitor
+
+1: class Fl_Multi_Browser
+2: class MultiBrowser
+
+1:
+2: class MultiImage
+
+1: class Fl_Multiline_Input
+2: class MultiLineInput
+*: should map easily
+
+1: class Fl_Multiline_Output
+2: class MultiLineOutput
+*: should map easily
+
+1:
+2: class Mutex
+
+1: class Fl_Nice_Slider
+2:
+
+1:
+2: class NumericInput
+
+1: class Fl_Output
+2: class Output
+*: should map easily
+
+1: class Fl_Overlay_Window
+2:
+
+1: class Fl_PNG_Image
+2: class pngImage
+*: should map easily
+
+1: class Fl_PNM_Image
+2: class pnmImage
+*: should map easily
+
+1: class Fl_Pack
+2: class PackedGroup
+*: should map easily, FLTK 2 has soem additional functionaity
+
+1: class Fl_Pixmap
+2:
+
+1: class Fl_Positioner
+2:
+
+1: class Fl_Preferences
+2: class Preferences
+*: should map easily
+
+1: class Fl_Progress
+2: class ProgressBar
+*: should map easily
+
+1: class Fl_RGB_Image
+2: class rgbImage
+*: should map easily
+
+1: class Fl_Radio_Button
+2: class RadioButton
+*: should map easily
+
+1:
+2: class RadioItem
+
+1: class Fl_Radio_Light_Button
+2: class RadioLightButton
+*: should map easily
+
+1: class Fl_Radio_Round_Button
+2:
+
+1:
+2: class Rectangle
+
+1:
+2: class RecursiveMutex
+
+1: class Fl_Repeat_Button
+2: class RepeatButton
+*: should map easily
+
+1: class Fl_Return_Button
+2: class ReturnButton
+*: should map easily
+
+1: class Fl_Roller
+2: class ThumbWheel
+*: should map easily
+
+1: class Fl_Round_Button
+2:
+
+1: class Fl_Round_Clock
+2:
+
+1: class Fl_Scroll
+2: class ScrollGroup
+*: should map easily
+
+1: class Fl_Scrollbar
+2: class Scrollbar
+*: should map easily
+
+1: class Fl_Secret_Input
+2: class SecretInput
+*: should map easily
+
+1: class Fl_Select_Browser
+2:
+
+1:
+2: class ShapedWindow
+
+1: class Fl_Shared_Image
+2: class SharedImage
+*: should map easily
+
+1:
+2: class ShortcutFunctor
+
+1: class Fl_Simple_Counter
+2:
+
+1: class Fl_Single_Window
+2:
+
+1:
+2: class SignalMutex
+
+1: class Fl_Slider
+2: class Slider
+*: should map easily
+
+1: class Fl_Spinner
+2:
+
+1:
+2: class StatusBarGroup
+
+1:
+2: class StringArray
+
+1:
+2: class StringHierarchy
+
+1:
+2: class StringList
+
+1:
+2: class Style
+
+1:
+2: class StyleSet
+
+1:
+2: class Symbol
+
+1: class Fl_Sys_Menu_Bar
+2: class SystemMenuBar
+*: should map easily
+
+1: class Fl_Tabs
+2: class TabGroup
+*: should map easily
+
+1:
+2: class TabGroupPager
+
+1: class Fl_Text_Buffer
+2: class TextBuffer
+*: should map easily
+
+1: class Fl_Text_Display
+2: class TextDisplay
+*: should map easily
+
+1: class Fl_Text_Editor
+2: class TextEditor
+*: should map easily
+
+1: class Fl_Text_Selection
+2: class TextSelection
+*: should map easily
+
+1: class Fl_Tile
+2: class TiledGroup
+*: should map easily
+
+1: class Fl_Tiled_Image
+2: class TiledImage
+*: should map easily
+
+1: class Fl_Timer
+2:
+
+1: class Fl_Toggle_Button
+2: class ToggleButton
+*: should map easily
+
+1:
+2: class ToggleItem
+
+1: class Fl_Tooltip
+2: class Tooltip
+*: should map easily
+
+1:
+2: class WordwrapInput
+
+1:
+2: class WordwrapOutput
+
+1: class Fl_Valuator
+2: class Valuator
+*: should map easily
+
+1: class Fl_Value_Input
+2: class ValueInput
+*: should map easily
+
+1: class Fl_Value_Output
+2: class ValueOutput
+*: should map easily
+
+1: class Fl_Value_Slider
+2: class ValueSlider
+*: should map easily
+
+1: class Fl_Widget
+2: class Widget
+*: should map easily for the most part
+
+1: class Fl_Widget_Tracker
+2:
+
+1: class Fl_Window
+2: class Window
+*: should map easily
+
+1: class Fl_Wizard
+2: class WizardGroup
+*: should map easily
+
+1: class Fl_X
+2: class CreatedWindow
+*: should map easily
+
+1: class Fl_XBM_Image
+2: class xbmImage
+*: should map easily
+
+1: class Fl_XPM_Image
+2: class xpmImage
+*: should map easily
+
+1:
+2: class xpmFileImage
+
+1:
+2: struct Cursor
+
+1:
+2: struct Font
+
+1: struct Fl_Glut_Bitmap_Font
+2:
+
+1: struct Fl_Glut_StrokeChar
+2:
+
+1: struct Fl_Glut_StrokeFont
+2:
+
+1: struct Fl_Glut_StrokeStrip
+2:
+
+1: struct Fl_Glut_StrokeVertex
+2:
+
+1: struct Fl_Help_Block
+2: struct HelpBlock
+*: should map easily
+
+1: struct Fl_Help_Font_Stack
+2:
+
+1: struct Fl_Help_Font_Style
+2:
+
+1: struct Fl_Help_Link
+2: struct HelpLink
+*: should map easily
+
+1: struct Fl_Help_Target
+2: struct HelpTarget
+*: should map easily
+
+1:
+2: struct ImageType
+
+1: struct Fl_Label
+2:
+
+1: struct Fl_Menu_Item
+2:
+
+1: struct Fl_Multi_Label
+2:
+
+1:
+2: struct NamedStyle
+
+
diff --git a/plugins/zynaddsubfx/fltk/src/CMakeLists.txt b/plugins/zynaddsubfx/fltk/src/CMakeLists.txt
index 7b628bd012..d12f04db21 100644
--- a/plugins/zynaddsubfx/fltk/src/CMakeLists.txt
+++ b/plugins/zynaddsubfx/fltk/src/CMakeLists.txt
@@ -34,7 +34,7 @@ SET(CPPFILES
Fl_Menu.cxx
Fl_Menu_.cxx
Fl_Menu_Bar.cxx
- Fl_Sys_Menu_Bar.cxx
+ Fl_Sys_Menu_Bar.cxx
Fl_Menu_Button.cxx
Fl_Menu_Window.cxx
Fl_Menu_add.cxx
@@ -130,6 +130,8 @@ SET(CPPFILES
fl_vertex.cxx
screen_xywh.cxx
fl_utf8.cxx
+ fl_encoding_latin1.cxx
+ fl_encoding_mac_roman.cxx
)
SET(FLCPPFILES
forms_compatability.cxx
@@ -165,18 +167,18 @@ SET(IMGCPPFILES
SET(CFILES
fl_call_main.c
- fl_utf.c
flstring.c
scandir.c
numericsort.c
vsnprintf.c
- xutf8/case.c
xutf8/is_right2left.c
xutf8/is_spacing.c
- xutf8/keysym2Ucs.c
+ xutf8/case.c
xutf8/utf8Input.c
xutf8/utf8Utils.c
xutf8/utf8Wrap.c
+ xutf8/keysym2Ucs.c
+ fl_utf.c
)
ADD_LIBRARY(fltk ${CPPFILES} ${CFILES})
diff --git a/plugins/zynaddsubfx/fltk/src/Fl.cxx b/plugins/zynaddsubfx/fltk/src/Fl.cxx
index d621d23181..2d6e03fe39 100644
--- a/plugins/zynaddsubfx/fltk/src/Fl.cxx
+++ b/plugins/zynaddsubfx/fltk/src/Fl.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl.cxx 6787 2009-05-14 20:16:09Z engelsman $"
+// "$Id: Fl.cxx 6836 2009-07-25 12:56:16Z AlbrechtS $"
//
// Main event handling code for the Fast Light Tool Kit (FLTK).
//
@@ -1699,5 +1699,5 @@ Fl_Widget_Tracker::~Fl_Widget_Tracker() {
}
//
-// End of "$Id: Fl.cxx 6787 2009-05-14 20:16:09Z engelsman $".
+// End of "$Id: Fl.cxx 6836 2009-07-25 12:56:16Z AlbrechtS $".
//
diff --git a/plugins/zynaddsubfx/fltk/src/Fl_Browser.cxx b/plugins/zynaddsubfx/fltk/src/Fl_Browser.cxx
index 14a2db47ca..0db0092459 100644
--- a/plugins/zynaddsubfx/fltk/src/Fl_Browser.cxx
+++ b/plugins/zynaddsubfx/fltk/src/Fl_Browser.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Browser.cxx 6726 2009-03-27 16:52:31Z greg.ercolano $"
+// "$Id: Fl_Browser.cxx 6895 2009-09-21 06:35:08Z greg.ercolano $"
//
// Browser widget for the Fast Light Tool Kit (FLTK).
//
@@ -44,10 +44,16 @@
#define SELECTED 1
#define NOTDISPLAYED 2
+// WARNING:
+// Fl_File_Chooser.cxx also has a definition of this structure (FL_BLINE).
+// Changes to FL_BLINE *must* be reflected in Fl_File_Chooser.cxx as well.
+// This hack in Fl_File_Chooser should be solved.
+//
struct FL_BLINE { // data is in a linked list of these
FL_BLINE* prev;
FL_BLINE* next;
void* data;
+ Fl_Image* icon;
short length; // sizeof(txt)-1, may be longer than string
char flags; // selected, displayed
char txt[1]; // start of allocated array
@@ -138,7 +144,8 @@ const char *Fl_Browser::item_text(void *item) const {
item_next(), etc. to access the internal linked list more efficiently.
\param[in] line The line number of the item to return. (1 based)
- \returns The returned item.
+ \retval item that was found.
+ \retval NULL if line is out of range.
\see item_at(), find_line(), lineno()
*/
FL_BLINE* Fl_Browser::find_line(int line) const {
@@ -287,6 +294,7 @@ void Fl_Browser::insert(int line, const char* newtext, void* d) {
t->flags = 0;
strcpy(t->txt, newtext);
t->data = d;
+ t->icon = 0;
insert(line, t);
}
@@ -321,6 +329,7 @@ void Fl_Browser::text(int line, const char* newtext) {
replacing(t, n);
cache = n;
n->data = t->data;
+ n->icon = t->icon;
n->length = (short)l;
n->flags = t->flags;
n->prev = t->prev;
@@ -364,8 +373,7 @@ int Fl_Browser::item_height(void *item) const {
fl_font(textfont(), textsize());
int hh = fl_height();
if (hh > hmax) hmax = hh;
- }
- else {
+ } else {
const int* i = column_widths();
// do each column separately as they may all set different fonts:
for (char* str = l->txt; str && *str; str++) {
@@ -400,6 +408,9 @@ int Fl_Browser::item_height(void *item) const {
}
}
+ if (l->icon && (l->icon->h()+2)>hmax) {
+ hmax = l->icon->h() + 2; // leave 2px above/below
+ }
return hmax; // previous version returned hmax+2!
}
@@ -412,7 +423,8 @@ int Fl_Browser::item_height(void *item) const {
incr_height(), full_height()
*/
int Fl_Browser::item_width(void *item) const {
- char* str = ((FL_BLINE*)item)->txt;
+ FL_BLINE* l=(FL_BLINE*)item;
+ char* str = l->txt;
const int* i = column_widths();
int ww = 0;
@@ -457,6 +469,8 @@ int Fl_Browser::item_width(void *item) const {
if (*str == format_char_ && str[1])
str ++;
+ if (ww==0 && l->icon) ww = l->icon->w();
+
fl_font(font, tsize);
return ww + int(fl_width(str)) + 6;
}
@@ -492,9 +506,11 @@ int Fl_Browser::incr_height() const {
\param[in] X,Y,W,H position and size.
*/
void Fl_Browser::item_draw(void* item, int X, int Y, int W, int H) const {
- char* str = ((FL_BLINE*)item)->txt;
+ FL_BLINE* l = (FL_BLINE*)item;
+ char* str = l->txt;
const int* i = column_widths();
+ bool first = true; // for icon
while (W > 6) { // do each tab-separated field
int w1 = W; // width for this field
char* e = 0; // pointer to end of field or null if none
@@ -502,6 +518,15 @@ void Fl_Browser::item_draw(void* item, int X, int Y, int W, int H) const {
e = strchr(str, column_char());
if (e) {*e = 0; w1 = *i++;}
}
+ // Icon drawing code
+ if (first) {
+ first = false;
+ if (l->icon) {
+ l->icon->draw(X+2,Y+1); // leave 2px left, 1px above
+ int iconw = l->icon->w()+2;
+ X += iconw; W -= iconw; w1 -= iconw;
+ }
+ }
int tsize = textsize();
Fl_Font font = textfont();
Fl_Color lcol = textcolor();
@@ -521,7 +546,7 @@ void Fl_Browser::item_draw(void* item, int X, int Y, int W, int H) const {
case 'c': talign = FL_ALIGN_CENTER; break;
case 'r': talign = FL_ALIGN_RIGHT; break;
case 'B':
- if (!(((FL_BLINE*)item)->flags & SELECTED)) {
+ if (!(l->flags & SELECTED)) {
fl_color((Fl_Color)strtol(str, &str, 10));
fl_rectf(X, Y, w1, H);
} else strtol(str, &str, 10);
@@ -557,7 +582,7 @@ void Fl_Browser::item_draw(void* item, int X, int Y, int W, int H) const {
}
BREAK:
fl_font(font, tsize);
- if (((FL_BLINE*)item)->flags & SELECTED)
+ if (l->flags & SELECTED)
lcol = fl_contrast(lcol, selection_color());
if (!active_r()) lcol = fl_inactive(lcol);
fl_color(lcol);
@@ -592,8 +617,7 @@ Fl_Browser::Fl_Browser(int X, int Y, int W, int H, const char *L)
Updates the browser so that \p line is shown at position \p pos.
\param[in] line line number. (1 based)
\param[in] pos position.
- \see topline(), middleline(), bottomline(), \n
-+: Command not found.
+ \see topline(), middleline(), bottomline()
*/
void Fl_Browser::lineposition(int line, Fl_Line_Position pos) {
if (line<1) line = 1;
@@ -835,6 +859,58 @@ void Fl_Browser::swap(int a, int b) {
swap(ai,bi);
}
+/**
+ Set the image icon for \p line to the value \p icon.
+ Caller is responsible for keeping the icon allocated.
+ The \p line is automatically redrawn.
+ \param[in] line The line to be modified. If out of range, nothing is done.
+ \param[in] icon The image icon to be assigned to the \p line.
+ If NULL, any previous icon is removed.
+*/
+void Fl_Browser::icon(int line, Fl_Image* icon) {
+
+ if (line<1 || line > lines) return;
+
+ FL_BLINE* bl = find_line(line);
+
+ int old_h = bl->icon ? bl->icon->h()+2 : 0; // init with *old* icon height
+ bl->icon = 0; // remove icon, if any
+ int th = item_height(bl); // height of text only
+ int new_h = icon ? icon->h()+2 : 0; // init with *new* icon height
+ if (th > old_h) old_h = th;
+ if (th > new_h) new_h = th;
+ int dh = new_h - old_h;
+ full_height_ += dh; // do this *always*
+
+ bl->icon = icon; // set new icon
+ if (dh>0) {
+ redraw(); // icon larger than item? must redraw widget
+ } else {
+ redraw_line(bl); // icon same or smaller? can redraw just this line
+ }
+ replacing(bl,bl); // recalc Fl_Browser_::max_width et al
+}
+
+/**
+ Returns the icon currently defined for \p line.
+ If no icon is defined, NULL is returned.
+ \param[in] line The line whose icon is returned.
+ \returns The icon defined, or NULL if none.
+*/
+Fl_Image* Fl_Browser::icon(int line) const {
+ FL_BLINE* l = find_line(line);
+ return(l ? l->icon : NULL);
+}
+
+/**
+ Removes the icon for \p line.
+ It's ok to remove an icon if none has been defined.
+ \param[in] line The line whose icon is to be removed.
+*/
+void Fl_Browser::remove_icon(int line) {
+ icon(line,0);
+}
+
//
-// End of "$Id: Fl_Browser.cxx 6726 2009-03-27 16:52:31Z greg.ercolano $".
+// End of "$Id: Fl_Browser.cxx 6895 2009-09-21 06:35:08Z greg.ercolano $".
//
diff --git a/plugins/zynaddsubfx/fltk/src/Fl_Choice.cxx b/plugins/zynaddsubfx/fltk/src/Fl_Choice.cxx
index 22054e8215..a31bdc8737 100644
--- a/plugins/zynaddsubfx/fltk/src/Fl_Choice.cxx
+++ b/plugins/zynaddsubfx/fltk/src/Fl_Choice.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Choice.cxx 6616 2009-01-01 21:28:26Z matt $"
+// "$Id: Fl_Choice.cxx 6873 2009-09-16 07:06:41Z AlbrechtS $"
//
// Choice widget for the Fast Light Tool Kit (FLTK).
//
@@ -209,5 +209,5 @@ int Fl_Choice::handle(int e) {
}
//
-// End of "$Id: Fl_Choice.cxx 6616 2009-01-01 21:28:26Z matt $".
+// End of "$Id: Fl_Choice.cxx 6873 2009-09-16 07:06:41Z AlbrechtS $".
//
diff --git a/plugins/zynaddsubfx/fltk/src/Fl_Double_Window.cxx b/plugins/zynaddsubfx/fltk/src/Fl_Double_Window.cxx
index 8e31149c36..f26951e4df 100644
--- a/plugins/zynaddsubfx/fltk/src/Fl_Double_Window.cxx
+++ b/plugins/zynaddsubfx/fltk/src/Fl_Double_Window.cxx
@@ -128,7 +128,7 @@ HDC fl_makeDC(HBITMAP bitmap) {
SetTextAlign(new_gc, TA_BASELINE|TA_LEFT);
SetBkMode(new_gc, TRANSPARENT);
#if USE_COLORMAP
- if (fl_palette) SelectPalette(new_gc, fl_palette, false);
+ if (fl_palette) SelectPalette(new_gc, fl_palette, FALSE);
#endif
SelectObject(new_gc, bitmap);
return new_gc;
diff --git a/plugins/zynaddsubfx/fltk/src/Fl_File_Browser.cxx b/plugins/zynaddsubfx/fltk/src/Fl_File_Browser.cxx
index 1834185a4a..00b182ccff 100644
--- a/plugins/zynaddsubfx/fltk/src/Fl_File_Browser.cxx
+++ b/plugins/zynaddsubfx/fltk/src/Fl_File_Browser.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_File_Browser.cxx 6616 2009-01-01 21:28:26Z matt $"
+// "$Id: Fl_File_Browser.cxx 6853 2009-09-09 05:16:41Z greg.ercolano $"
//
// Fl_File_Browser routines.
//
@@ -42,6 +42,7 @@
#include