From f2f22e9f98a6275fbb34e9f8f7c9044650767bc8 Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Mon, 26 Oct 2009 01:00:52 +0100 Subject: [PATCH] Revert "ZynAddSubFX/FLTK: updated to SVN revision 6909" I mistakenly updated FLTK in master branch too so everything's a mess when merging in master. Reverting bbe967e3a00c2f67ff0e7163a497bce64cc9a257 allows easy merge of master branch later. --- plugins/zynaddsubfx/fltk/CHANGES | 18 +-- plugins/zynaddsubfx/fltk/FL/Enumerations.H | 117 +++++++----------- plugins/zynaddsubfx/fltk/FL/Fl.H | 42 ++----- plugins/zynaddsubfx/fltk/FL/Fl_Browser.H | 10 +- plugins/zynaddsubfx/fltk/FL/Fl_Browser_.H | 10 +- plugins/zynaddsubfx/fltk/FL/Fl_Button.H | 6 +- plugins/zynaddsubfx/fltk/FL/Fl_Chart.H | 10 +- plugins/zynaddsubfx/fltk/FL/Fl_Clock.H | 4 +- plugins/zynaddsubfx/fltk/FL/Fl_Counter.H | 10 +- plugins/zynaddsubfx/fltk/FL/Fl_Group.H | 8 +- plugins/zynaddsubfx/fltk/FL/Fl_Input_.H | 21 ++-- plugins/zynaddsubfx/fltk/FL/Fl_Menu_.H | 10 +- plugins/zynaddsubfx/fltk/FL/Fl_Menu_Item.H | 48 +++---- plugins/zynaddsubfx/fltk/FL/Fl_Menu_Window.H | 7 +- .../zynaddsubfx/fltk/FL/Fl_Multiline_Input.H | 18 ++- .../zynaddsubfx/fltk/FL/Fl_Multiline_Output.H | 12 +- plugins/zynaddsubfx/fltk/FL/Fl_Output.H | 7 +- plugins/zynaddsubfx/fltk/FL/Fl_Scroll.H | 4 +- plugins/zynaddsubfx/fltk/FL/Fl_Text_Buffer.H | 4 +- plugins/zynaddsubfx/fltk/FL/Fl_Text_Display.H | 10 +- plugins/zynaddsubfx/fltk/FL/Fl_Text_Editor.H | 6 +- plugins/zynaddsubfx/fltk/FL/Fl_Tooltip.H | 16 +-- plugins/zynaddsubfx/fltk/FL/Fl_Value_Input.H | 8 +- plugins/zynaddsubfx/fltk/FL/Fl_Value_Output.H | 10 +- plugins/zynaddsubfx/fltk/FL/Fl_Value_Slider.H | 10 +- plugins/zynaddsubfx/fltk/FL/Fl_Widget.H | 96 ++++++-------- plugins/zynaddsubfx/fltk/FL/Fl_Window.H | 44 ++++--- plugins/zynaddsubfx/fltk/FL/fl_draw.H | 17 ++- plugins/zynaddsubfx/fltk/FL/fl_types.h | 3 - plugins/zynaddsubfx/fltk/src/CMakeLists.txt | 64 +++++----- plugins/zynaddsubfx/fltk/src/Fl.cxx | 4 +- plugins/zynaddsubfx/fltk/src/Fl_Browser.cxx | 98 ++------------- plugins/zynaddsubfx/fltk/src/Fl_Choice.cxx | 4 +- .../zynaddsubfx/fltk/src/Fl_Double_Window.cxx | 2 +- .../zynaddsubfx/fltk/src/Fl_File_Browser.cxx | 11 +- .../zynaddsubfx/fltk/src/Fl_File_Chooser2.cxx | 41 ++---- .../zynaddsubfx/fltk/src/Fl_File_Input.cxx | 8 +- plugins/zynaddsubfx/fltk/src/Fl_Image.cxx | 4 +- plugins/zynaddsubfx/fltk/src/Fl_Input.cxx | 16 +-- plugins/zynaddsubfx/fltk/src/Fl_Input_.cxx | 15 ++- plugins/zynaddsubfx/fltk/src/Fl_Menu.cxx | 4 +- plugins/zynaddsubfx/fltk/src/Fl_Menu_.cxx | 12 +- plugins/zynaddsubfx/fltk/src/Fl_Menu_add.cxx | 99 +++++---------- plugins/zynaddsubfx/fltk/src/Fl_Progress.cxx | 4 +- plugins/zynaddsubfx/fltk/src/Fl_Scroll.cxx | 4 +- .../zynaddsubfx/fltk/src/Fl_Text_Buffer.cxx | 4 +- .../zynaddsubfx/fltk/src/Fl_Text_Display.cxx | 8 +- .../zynaddsubfx/fltk/src/Fl_Text_Editor.cxx | 46 +------ plugins/zynaddsubfx/fltk/src/Fl_Tooltip.cxx | 8 +- plugins/zynaddsubfx/fltk/src/Fl_Window.cxx | 9 +- .../fltk/src/Fl_Window_fullscreen.cxx | 8 +- plugins/zynaddsubfx/fltk/src/Fl_arg.cxx | 4 +- plugins/zynaddsubfx/fltk/src/Fl_mac.cxx | 68 +++++----- plugins/zynaddsubfx/fltk/src/Fl_win32.cxx | 16 +-- plugins/zynaddsubfx/fltk/src/Fl_x.cxx | 10 +- plugins/zynaddsubfx/fltk/src/fl_ask.cxx | 7 +- plugins/zynaddsubfx/fltk/src/fl_boxtype.cxx | 6 +- plugins/zynaddsubfx/fltk/src/fl_color.cxx | 4 +- .../zynaddsubfx/fltk/src/fl_color_win32.cxx | 2 +- plugins/zynaddsubfx/fltk/src/fl_dnd_win32.cxx | 4 +- plugins/zynaddsubfx/fltk/src/fl_draw.cxx | 29 +---- .../fltk/src/fl_draw_image_win32.cxx | 8 +- .../zynaddsubfx/fltk/src/fl_font_win32.cxx | 4 +- plugins/zynaddsubfx/fltk/src/fl_font_xft.cxx | 19 ++- plugins/zynaddsubfx/fltk/src/fl_open_uri.cxx | 10 +- plugins/zynaddsubfx/fltk/src/fl_shortcut.cxx | 75 ++++++----- plugins/zynaddsubfx/fltk/src/fl_utf.c | 12 +- plugins/zynaddsubfx/fltk/src/screen_xywh.cxx | 4 +- 68 files changed, 524 insertions(+), 817 deletions(-) diff --git a/plugins/zynaddsubfx/fltk/CHANGES b/plugins/zynaddsubfx/fltk/CHANGES index 9d9ba3427..d483336ff 100644 --- a/plugins/zynaddsubfx/fltk/CHANGES +++ b/plugins/zynaddsubfx/fltk/CHANGES @@ -1,22 +1,5 @@ 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} @@ -44,6 +27,7 @@ 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/FL/Enumerations.H b/plugins/zynaddsubfx/fltk/FL/Enumerations.H index ba92ec2b0..a9b71b463 100644 --- a/plugins/zynaddsubfx/fltk/FL/Enumerations.H +++ b/plugins/zynaddsubfx/fltk/FL/Enumerations.H @@ -1,5 +1,5 @@ // -// "$Id: Enumerations.H 6902 2009-09-27 11:06:56Z matt $" +// "$Id: Enumerations.H 6735 2009-04-01 22:11:57Z engelsman $" // // Enumerations for the Fast Light Tool Kit (FLTK). // @@ -330,8 +330,6 @@ 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. @@ -393,9 +391,6 @@ 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 @@ -412,15 +407,10 @@ 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_CONTROL FL_CTRL ///< An alias for FL_META 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 #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 @@ -699,7 +689,7 @@ extern FL_EXPORT Fl_Fontsize FL_NORMAL_SIZE; ///< normal font size /** \name Colors */ /*@{*/ -/** The Fl_Color type holds an FLTK color value. +/** The Fl_Color enumeration type holds a FLTK color value. Colors are either 8-bit indexes into a virtual colormap or 24-bit RGB color values. @@ -707,94 +697,75 @@ 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. -
- 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. - + \todo enum Fl_Color needs some more comments for values, + see Fl/Enumerations.H */ -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 +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 // boxtypes generally limit themselves to these colors so // the whole ramp is not allocated: -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' + 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' // FLTK provides a 5x8x5 color cube that is used with colormap visuals -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_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_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_DARK_GREEN = 60, + FL_DARK_YELLOW = 76, + FL_DARK_BLUE = 136, + FL_DARK_MAGENTA = 152, + FL_DARK_CYAN = 140, -const Fl_Color FL_WHITE = 255; + 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);} @@ -886,5 +857,5 @@ enum Fl_Damage { #endif // -// End of "$Id: Enumerations.H 6902 2009-09-27 11:06:56Z matt $". +// End of "$Id: Enumerations.H 6735 2009-04-01 22:11:57Z engelsman $". // diff --git a/plugins/zynaddsubfx/fltk/FL/Fl.H b/plugins/zynaddsubfx/fltk/FL/Fl.H index 700f51936..d9f8e77e1 100644 --- a/plugins/zynaddsubfx/fltk/FL/Fl.H +++ b/plugins/zynaddsubfx/fltk/FL/Fl.H @@ -1,5 +1,5 @@ // -// "$Id: Fl.H 6903 2009-09-27 11:09:03Z matt $" +// "$Id: Fl.H 6771 2009-04-19 12:47:36Z matt $" // // Main header file for the Fast Light Tool Kit (FLTK). // @@ -489,25 +489,18 @@ 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. - - 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&). - */ + /** 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) */ 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;} /** @@ -555,20 +548,7 @@ 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 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. - */ + /** Returns the text associated with the current FL_PASTE or FL_DND_RELEASE event. */ static const char* event_text() {return e_text;} /** Returns the length of the text in Fl::event_text(). There @@ -588,7 +568,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(Fl_Shortcut); + static int test_shortcut(int); // event destinations: static int handle(int, Fl_Window*); @@ -680,7 +660,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 Fl_Color get_color(Fl_Color); + static unsigned get_color(Fl_Color); static void get_color(Fl_Color, uchar&, uchar&, uchar&); /** Frees the specified color from the colormap, if applicable. @@ -1042,5 +1022,5 @@ public: #endif // !Fl_H // -// End of "$Id: Fl.H 6903 2009-09-27 11:09:03Z matt $". +// End of "$Id: Fl.H 6771 2009-04-19 12:47:36Z matt $". // diff --git a/plugins/zynaddsubfx/fltk/FL/Fl_Browser.H b/plugins/zynaddsubfx/fltk/FL/Fl_Browser.H index a2f8b00ce..d8f920d4e 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 6850 2009-09-07 02:25:51Z greg.ercolano $" +// "$Id: Fl_Browser.H 6726 2009-03-27 16:52:31Z greg.ercolano $" // // Browser header file for the Fast Light Tool Kit (FLTK). // @@ -36,7 +36,6 @@ #define Fl_Browser_H #include "Fl_Browser_.H" -#include "Fl_Image.H" struct FL_BLINE; @@ -307,11 +306,6 @@ 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); @@ -320,5 +314,5 @@ public: #endif // -// End of "$Id: Fl_Browser.H 6850 2009-09-07 02:25:51Z greg.ercolano $". +// End of "$Id: Fl_Browser.H 6726 2009-03-27 16:52:31Z greg.ercolano $". // diff --git a/plugins/zynaddsubfx/fltk/FL/Fl_Browser_.H b/plugins/zynaddsubfx/fltk/FL/Fl_Browser_.H index 4068ae48b..3d89a8ec9 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 6902 2009-09-27 11:06:56Z matt $" +// "$Id: Fl_Browser_.H 6737 2009-04-02 06:44:34Z greg.ercolano $" // // 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_; - Fl_Color textcolor_; + unsigned textcolor_; void* top_; // which item scrolling position is in void* selection_; // which is selected (except for FL_MULTI_BROWSER) void *redraw1,*redraw2; // minimal update pointers @@ -297,11 +297,11 @@ public: /** Gets the default text color for the lines in the browser. */ - Fl_Color textcolor() const { return textcolor_; } + Fl_Color textcolor() const { return (Fl_Color)textcolor_; } /** Sets the default text color for the lines in the browser to color \p col. */ - void textcolor(Fl_Color col) { textcolor_ = col; } + void textcolor(unsigned 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 6902 2009-09-27 11:06:56Z matt $". +// End of "$Id: Fl_Browser_.H 6737 2009-04-02 06:44:34Z greg.ercolano $". // diff --git a/plugins/zynaddsubfx/fltk/FL/Fl_Button.H b/plugins/zynaddsubfx/fltk/FL/Fl_Button.H index 73d6e4b0d..d71c06672 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 6878 2009-09-17 22:12:24Z matt $" +// "$Id: Fl_Button.H 6614 2009-01-01 16:11:32Z 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 Fl_Shortcut fl_old_shortcut(const char*); +extern FL_EXPORT int fl_old_shortcut(const char*); #endif /** @@ -172,5 +172,5 @@ public: #endif // -// End of "$Id: Fl_Button.H 6878 2009-09-17 22:12:24Z matt $". +// End of "$Id: Fl_Button.H 6614 2009-01-01 16:11:32Z matt $". // diff --git a/plugins/zynaddsubfx/fltk/FL/Fl_Chart.H b/plugins/zynaddsubfx/fltk/FL/Fl_Chart.H index e94c1a02a..29b68ed44 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 6902 2009-09-27 11:06:56Z matt $" +// "$Id: Fl_Chart.H 6614 2009-01-01 16:11:32Z 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_; - Fl_Color textcolor_; + unsigned 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 textcolor_;} + Fl_Color textcolor() const {return (Fl_Color)textcolor_;} /** gets the chart's text color to \p n. */ - void textcolor(Fl_Color n) {textcolor_ = n;} + void textcolor(unsigned 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 6902 2009-09-27 11:06:56Z matt $". +// End of "$Id: Fl_Chart.H 6614 2009-01-01 16:11:32Z matt $". // diff --git a/plugins/zynaddsubfx/fltk/FL/Fl_Clock.H b/plugins/zynaddsubfx/fltk/FL/Fl_Clock.H index c4cf6c21b..afaa2f446 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 6812 2009-07-01 07:27:25Z AlbrechtS $" +// "$Id: Fl_Clock.H 6754 2009-04-12 11:32:22Z AlbrechtS $" // // Clock header file for the Fast Light Tool Kit (FLTK). // @@ -133,5 +133,5 @@ public: #endif // -// End of "$Id: Fl_Clock.H 6812 2009-07-01 07:27:25Z AlbrechtS $". +// End of "$Id: Fl_Clock.H 6754 2009-04-12 11:32:22Z AlbrechtS $". // diff --git a/plugins/zynaddsubfx/fltk/FL/Fl_Counter.H b/plugins/zynaddsubfx/fltk/FL/Fl_Counter.H index 24930779a..e52c092c5 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 6902 2009-09-27 11:06:56Z matt $" +// "$Id: Fl_Counter.H 6716 2009-03-24 01:40:44Z fabien $" // // 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_; - Fl_Color textcolor_; + unsigned 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 textcolor_;} + Fl_Color textcolor() const {return (Fl_Color)textcolor_;} /** Sets the font color to \p s */ - void textcolor(Fl_Color s) {textcolor_ = s;} + void textcolor(unsigned s) {textcolor_ = s;} }; #endif // -// End of "$Id: Fl_Counter.H 6902 2009-09-27 11:06:56Z matt $". +// End of "$Id: Fl_Counter.H 6716 2009-03-24 01:40:44Z fabien $". // diff --git a/plugins/zynaddsubfx/fltk/FL/Fl_Group.H b/plugins/zynaddsubfx/fltk/FL/Fl_Group.H index 5ba61ad25..2db9d7992 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 6907 2009-09-28 14:34:52Z matt $" +// "$Id: Fl_Group.H 6716 2009-03-24 01:40:44Z fabien $" // // Group header file for the Fast Light Tool Kit (FLTK). // @@ -58,6 +58,8 @@ 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(); @@ -174,7 +176,7 @@ public: \see void Fl_Group::clip_children(int c) */ - unsigned int clip_children() { return (flags() & CLIP_CHILDREN) != 0; } + int clip_children() { return (flags() & CLIP_CHILDREN) != 0; } // back compatibility functions: @@ -222,5 +224,5 @@ public: #endif // -// End of "$Id: Fl_Group.H 6907 2009-09-28 14:34:52Z matt $". +// End of "$Id: Fl_Group.H 6716 2009-03-24 01:40:44Z fabien $". // diff --git a/plugins/zynaddsubfx/fltk/FL/Fl_Input_.H b/plugins/zynaddsubfx/fltk/FL/Fl_Input_.H index 26dab7d1a..7217bb660 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 6902 2009-09-27 11:06:56Z matt $" +// "$Id: Fl_Input_.H 6777 2009-04-23 15:32:19Z 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 widget bounds */ + /** \internal Offset to text origin within wdget 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 */ - Fl_Color textcolor_; + unsigned textcolor_; /** \internal color of the text cursor */ - Fl_Color cursor_color_; + unsigned cursor_color_; /** \internal Horizontal cursor position in pixels while movin up or down. */ static double up_down_pos; @@ -206,7 +206,6 @@ 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(); @@ -397,23 +396,23 @@ public: /** Gets the color of the text in the input field. \return the text color - \see textcolor(Fl_Color) */ - Fl_Color textcolor() const {return textcolor_;} + \see textcolor(unsigned) */ + Fl_Color textcolor() const {return (Fl_Color)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(Fl_Color n) {textcolor_ = n;} + void textcolor(unsigned n) {textcolor_ = n;} /** Gets the color of the cursor. \return the current cursor color */ - Fl_Color cursor_color() const {return cursor_color_;} + Fl_Color cursor_color() const {return (Fl_Color)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(Fl_Color n) {cursor_color_ = n;} + void cursor_color(unsigned n) {cursor_color_ = n;} /** Gets the input field type. \return the current input type */ @@ -451,5 +450,5 @@ public: #endif // -// End of "$Id: Fl_Input_.H 6902 2009-09-27 11:06:56Z matt $". +// End of "$Id: Fl_Input_.H 6777 2009-04-23 15:32:19Z matt $". // diff --git a/plugins/zynaddsubfx/fltk/FL/Fl_Menu_.H b/plugins/zynaddsubfx/fltk/FL/Fl_Menu_.H index 89ced65f6..41bcd5c14 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 6902 2009-09-27 11:06:56Z matt $" +// "$Id: Fl_Menu_.H 6614 2009-01-01 16:11:32Z 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_; - Fl_Color textcolor_; + unsigned 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 textcolor_;} + Fl_Color textcolor() const {return (Fl_Color)textcolor_;} /** Sets the current color of menu item labels. */ - void textcolor(Fl_Color c) {textcolor_=c;} + void textcolor(unsigned 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 6902 2009-09-27 11:06:56Z matt $". +// End of "$Id: Fl_Menu_.H 6614 2009-01-01 16:11:32Z matt $". // diff --git a/plugins/zynaddsubfx/fltk/FL/Fl_Menu_Item.H b/plugins/zynaddsubfx/fltk/FL/Fl_Menu_Item.H index be81b8cc0..b4052b8c8 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 6902 2009-09-27 11:06:56Z matt $" +// "$Id: Fl_Menu_Item.H 6614 2009-01-01 16:11:32Z 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, ///< 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 + 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 }; -extern FL_EXPORT Fl_Shortcut fl_old_shortcut(const char*); +extern FL_EXPORT int fl_old_shortcut(const char*); class Fl_Menu_; @@ -68,15 +68,15 @@ class Fl_Menu_; }; enum { // values for flags: - 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 + 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 }; \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 - Fl_Color labelcolor_; ///< menu item text color + unsigned 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 labelcolor_;} + Fl_Color labelcolor() const {return (Fl_Color)labelcolor_;} /** See Fl_Color Fl_Menu_Item::labelcolor() const */ - void labelcolor(Fl_Color a) {labelcolor_ = a;} + void labelcolor(unsigned 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 6902 2009-09-27 11:06:56Z matt $". +// End of "$Id: Fl_Menu_Item.H 6614 2009-01-01 16:11:32Z matt $". // diff --git a/plugins/zynaddsubfx/fltk/FL/Fl_Menu_Window.H b/plugins/zynaddsubfx/fltk/FL/Fl_Menu_Window.H index 217e224af..e2e77f1ea 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 6909 2009-09-28 14:41:43Z matt $" +// "$Id: Fl_Menu_Window.H 6614 2009-01-01 16:11:32Z matt $" // // Menu window header file for the Fast Light Tool Kit (FLTK). // @@ -40,13 +40,14 @@ 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 */ - unsigned int overlay() {return !(flags()&NO_OVERLAY);} + 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. @@ -64,5 +65,5 @@ public: #endif // -// End of "$Id: Fl_Menu_Window.H 6909 2009-09-28 14:41:43Z matt $". +// End of "$Id: Fl_Menu_Window.H 6614 2009-01-01 16:11:32Z matt $". // diff --git a/plugins/zynaddsubfx/fltk/FL/Fl_Multiline_Input.H b/plugins/zynaddsubfx/fltk/FL/Fl_Multiline_Input.H index 5f46624be..feec46498 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 6889 2009-09-19 22:09:00Z greg.ercolano $" +// "$Id: Fl_Multiline_Input.H 6614 2009-01-01 16:11:32Z matt $" // // Multiline input header file for the Fast Light Tool Kit (FLTK). // @@ -38,15 +38,11 @@ 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. 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. -

+

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. */ class Fl_Multiline_Input : public Fl_Input { public: @@ -62,5 +58,5 @@ public: #endif // -// End of "$Id: Fl_Multiline_Input.H 6889 2009-09-19 22:09:00Z greg.ercolano $". +// End of "$Id: Fl_Multiline_Input.H 6614 2009-01-01 16:11:32Z matt $". // diff --git a/plugins/zynaddsubfx/fltk/FL/Fl_Multiline_Output.H b/plugins/zynaddsubfx/fltk/FL/Fl_Multiline_Output.H index f0edf63d0..0dbcb06dc 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 6889 2009-09-19 22:09:00Z greg.ercolano $" +// "$Id: Fl_Multiline_Output.H 6614 2009-01-01 16:11:32Z matt $" // // Multi line output header file for the Fast Light Tool Kit (FLTK). // @@ -37,14 +37,6 @@ 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: @@ -60,5 +52,5 @@ public: #endif // -// End of "$Id: Fl_Multiline_Output.H 6889 2009-09-19 22:09:00Z greg.ercolano $". +// End of "$Id: Fl_Multiline_Output.H 6614 2009-01-01 16:11:32Z matt $". // diff --git a/plugins/zynaddsubfx/fltk/FL/Fl_Output.H b/plugins/zynaddsubfx/fltk/FL/Fl_Output.H index 58b33378f..0d02d82d5 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 6898 2009-09-23 20:43:27Z matt $" +// "$Id: Fl_Output.H 6614 2009-01-01 16:11:32Z matt $" // // Output header file for the Fast Light Tool Kit (FLTK). // @@ -42,8 +42,7 @@ \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. Fl_Multiline_Output does not provide scroll bars. If a more - complete text editing widget is needed, use Fl_Text_Display instead.

+ text.

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 @@ -64,5 +63,5 @@ public: #endif // -// End of "$Id: Fl_Output.H 6898 2009-09-23 20:43:27Z matt $". +// End of "$Id: Fl_Output.H 6614 2009-01-01 16:11:32Z matt $". // diff --git a/plugins/zynaddsubfx/fltk/FL/Fl_Scroll.H b/plugins/zynaddsubfx/fltk/FL/Fl_Scroll.H index a8bbdb480..e36be6d23 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 6828 2009-07-12 00:15:06Z greg.ercolano $" +// "$Id: Fl_Scroll.H 6614 2009-01-01 16:11:32Z matt $" // // Scroll header file for the Fast Light Tool Kit (FLTK). // @@ -193,5 +193,5 @@ public: #endif // -// End of "$Id: Fl_Scroll.H 6828 2009-07-12 00:15:06Z greg.ercolano $". +// End of "$Id: Fl_Scroll.H 6614 2009-01-01 16:11:32Z matt $". // diff --git a/plugins/zynaddsubfx/fltk/FL/Fl_Text_Buffer.H b/plugins/zynaddsubfx/fltk/FL/Fl_Text_Buffer.H index a4d85139c..7efca467c 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 6822 2009-07-04 00:24:26Z fabien $" +// "$Id: Fl_Text_Buffer.H 6618 2009-01-01 21:54:10Z matt $" // // 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 6822 2009-07-04 00:24:26Z fabien $". +// End of "$Id: Fl_Text_Buffer.H 6618 2009-01-01 21:54:10Z matt $". // diff --git a/plugins/zynaddsubfx/fltk/FL/Fl_Text_Display.H b/plugins/zynaddsubfx/fltk/FL/Fl_Text_Display.H index 495737718..2986b1cd7 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 6902 2009-09-27 11:06:56Z matt $" +// "$Id: Fl_Text_Display.H 6614 2009-01-01 16:11:32Z 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 textcolor_;} + Fl_Color textcolor() const {return (Fl_Color)textcolor_;} /** Sets the default color of text in the widget. */ - void textcolor(Fl_Color n) {textcolor_ = n;} + void textcolor(unsigned 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_; - Fl_Color textcolor_; + unsigned 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 6902 2009-09-27 11:06:56Z matt $". +// End of "$Id: Fl_Text_Display.H 6614 2009-01-01 16:11:32Z matt $". // diff --git a/plugins/zynaddsubfx/fltk/FL/Fl_Text_Editor.H b/plugins/zynaddsubfx/fltk/FL/Fl_Text_Editor.H index be3b718a3..85f3611db 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 6893 2009-09-20 19:24:24Z greg.ercolano $" +// "$Id: Fl_Text_Editor.H 6614 2009-01-01 16:11:32Z matt $" // // Header file for Fl_Text_Editor class. // @@ -103,8 +103,6 @@ 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); @@ -136,6 +134,6 @@ class FL_EXPORT Fl_Text_Editor : public Fl_Text_Display { #endif // -// End of "$Id: Fl_Text_Editor.H 6893 2009-09-20 19:24:24Z greg.ercolano $". +// End of "$Id: Fl_Text_Editor.H 6614 2009-01-01 16:11:32Z matt $". // diff --git a/plugins/zynaddsubfx/fltk/FL/Fl_Tooltip.H b/plugins/zynaddsubfx/fltk/FL/Fl_Tooltip.H index c5ec20641..033e83f2b 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 6902 2009-09-27 11:06:56Z matt $" +// "$Id: Fl_Tooltip.H 6614 2009-01-01 16:11:32Z 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 color_; } + static Fl_Color color() { return (Fl_Color)color_; } /** Sets the background color for tooltips. The default background color is a pale yellow. */ - static void color(Fl_Color c) { color_ = c; } + static void color(unsigned c) { color_ = c; } /** Gets the color of the text in the tooltip. The default is black. */ - static Fl_Color textcolor() { return textcolor_; } + static Fl_Color textcolor() { return (Fl_Color)textcolor_; } /** Sets the color of the text in the tooltip. The default is black. */ - static void textcolor(Fl_Color c) { textcolor_ = c; } + static void textcolor(unsigned 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 Fl_Color color_; - static Fl_Color textcolor_; + static unsigned color_; + static unsigned 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 6902 2009-09-27 11:06:56Z matt $". +// End of "$Id: Fl_Tooltip.H 6614 2009-01-01 16:11:32Z matt $". // diff --git a/plugins/zynaddsubfx/fltk/FL/Fl_Value_Input.H b/plugins/zynaddsubfx/fltk/FL/Fl_Value_Input.H index 4ed1b1011..52d9f31d1 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 6902 2009-09-27 11:06:56Z matt $" +// "$Id: Fl_Value_Input.H 6664 2009-02-18 09:27:54Z AlbrechtS $" // // 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(Fl_Color n) {input.textcolor(n);} + void textcolor(unsigned 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(Fl_Color n) {input.cursor_color(n);} + void cursor_color(unsigned n) {input.cursor_color(n);} }; #endif // -// End of "$Id: Fl_Value_Input.H 6902 2009-09-27 11:06:56Z matt $". +// End of "$Id: Fl_Value_Input.H 6664 2009-02-18 09:27:54Z AlbrechtS $". // diff --git a/plugins/zynaddsubfx/fltk/FL/Fl_Value_Output.H b/plugins/zynaddsubfx/fltk/FL/Fl_Value_Output.H index 5dda0ca89..1654219c6 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 6902 2009-09-27 11:06:56Z matt $" +// "$Id: Fl_Value_Output.H 6664 2009-02-18 09:27:54Z AlbrechtS $" // // 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_; - Fl_Color textcolor_; + unsigned 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 textcolor_;} + Fl_Color textcolor() const {return (Fl_Color)textcolor_;} /** Gets the color of the text in the value box. */ - void textcolor(Fl_Color s) {textcolor_ = s;} + void textcolor(unsigned s) {textcolor_ = s;} }; #endif // -// End of "$Id: Fl_Value_Output.H 6902 2009-09-27 11:06:56Z matt $". +// End of "$Id: Fl_Value_Output.H 6664 2009-02-18 09:27:54Z AlbrechtS $". // diff --git a/plugins/zynaddsubfx/fltk/FL/Fl_Value_Slider.H b/plugins/zynaddsubfx/fltk/FL/Fl_Value_Slider.H index ec886428a..c2b5afe50 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 6902 2009-09-27 11:06:56Z matt $" +// "$Id: Fl_Value_Slider.H 6664 2009-02-18 09:27:54Z AlbrechtS $" // // 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_; - Fl_Color textcolor_; + unsigned 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 textcolor_;} + Fl_Color textcolor() const {return (Fl_Color)textcolor_;} /** Sets the color of the text in the value box. */ - void textcolor(Fl_Color s) {textcolor_ = s;} + void textcolor(unsigned s) {textcolor_ = s;} }; #endif // -// End of "$Id: Fl_Value_Slider.H 6902 2009-09-27 11:06:56Z matt $". +// End of "$Id: Fl_Value_Slider.H 6664 2009-02-18 09:27:54Z AlbrechtS $". // diff --git a/plugins/zynaddsubfx/fltk/FL/Fl_Widget.H b/plugins/zynaddsubfx/fltk/FL/Fl_Widget.H index 367d7a337..426156137 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 6908 2009-09-28 14:41:22Z matt $" +// "$Id: Fl_Widget.H 6753 2009-04-12 09:40:59Z AlbrechtS $" // // 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 */ - Fl_Color color; + unsigned 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_; - unsigned int flags_; - Fl_Color color_; - Fl_Color color2_; + int flags_; + unsigned color_; + unsigned color2_; uchar type_; uchar damage_; uchar box_; @@ -135,36 +135,23 @@ 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 */ - unsigned int flags() const {return flags_;} + int flags() const {return flags_;} /** Sets a flag in the flags mask */ - void set_flag(unsigned int c) {flags_ |= c;} + void set_flag(int c) {flags_ |= c;} /** Clears a flag in the flags mask */ - void clear_flag(unsigned int c) {flags_ &= ~c;} + void clear_flag(int c) {flags_ &= ~c;} /** flags possible values enumeration. See activate(), output(), visible(), changed(), set_visible_focus() */ enum { - 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 thi 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) - // (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 - }; + 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 + }; 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; @@ -356,9 +343,9 @@ public: /** Gets the background color of the widget. \return current background color - \see color(Fl_Color), color(Fl_Color, Fl_Color) + \see color(unsigned), color(unsigned, unsigned) */ - Fl_Color color() const {return color_;} + Fl_Color color() const {return (Fl_Color)color_;} /** Sets the background color of the widget. The color is passed to the box routine. The color is either an index into @@ -368,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(Fl_Color, Fl_Color), selection_color(Fl_Color) + \see color(), color(unsigned, unsigned), selection_color(unsigned) */ - void color(Fl_Color bg) {color_ = bg;} + void color(unsigned bg) {color_ = bg;} /** Gets the selection color. \return the current selection color - \see selection_color(Fl_Color), color(Fl_Color, Fl_Color) + \see selection_color(unsigned), color(unsigned, unsigned) */ - Fl_Color selection_color() const {return color2_;} + Fl_Color selection_color() const {return (Fl_Color)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(Fl_Color bg, Fl_Color sel). + with color(unsigned bg, unsigned sel). \param[in] a the new selection color - \see selection_color(), color(Fl_Color, Fl_Color) + \see selection_color(), color(unsigned, unsigned) */ - void selection_color(Fl_Color a) {color2_ = a;} + void selection_color(unsigned a) {color2_ = a;} /** Sets the background and selection color of the widget. @@ -395,7 +382,7 @@ public: \param[in] sel selection color \see color(unsigned), selection_color(unsigned) */ - void color(Fl_Color bg, Fl_Color sel) {color_=bg; color2_=sel;} + void color(unsigned bg, unsigned sel) {color_=bg; color2_=sel;} /** Gets the current label text. \return a pointer to the current label text @@ -452,13 +439,13 @@ public: The default color is FL_FOREGROUND_COLOR. \return the current label color */ - Fl_Color labelcolor() const {return label_.color;} + Fl_Color labelcolor() const {return (Fl_Color)label_.color;} /** Sets the label color. The default color is FL_FOREGROUND_COLOR. \param[in] c the new label color */ - void labelcolor(Fl_Color c) {label_.color=c;} + void labelcolor(unsigned c) {label_.color=c;} /** Gets the font to use. Fonts are identified by indexes into a table. The default value @@ -646,7 +633,7 @@ public: \retval 0 if the widget is not drawn and hence invisible. \see show(), hide(), visible_r() */ - unsigned int visible() const {return !(flags_&INVISIBLE);} + 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. @@ -691,7 +678,7 @@ public: \retval 0 if the widget is inactive \see active_r(), activate(), deactivate() */ - unsigned int active() const {return !(flags_&INACTIVE);} + 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 @@ -730,7 +717,7 @@ public: \retval 0 if the widget is used for input and output \see set_output(), clear_output() */ - unsigned int output() const {return (flags_&OUTPUT);} + int output() const {return (flags_&OUTPUT);} /** Sets a widget to output only. \see output(), clear_output() @@ -747,7 +734,7 @@ public: && visible()) but is faster. \retval 0 if the widget takes no events */ - unsigned int takesevents() const {return !(flags_&(INACTIVE|INVISIBLE|OUTPUT));} + int takesevents() const {return !(flags_&(INACTIVE|INVISIBLE|OUTPUT));} /** Checks if the widget value changed since the last callback. @@ -764,7 +751,7 @@ public: \retval 0 if the value did not change \see set_changed(), clear_changed() */ - unsigned int changed() const {return flags_&CHANGED;} + int changed() const {return flags_&CHANGED;} /** Marks the value of the widget as changed. \see changed(), clear_changed() @@ -809,7 +796,7 @@ public: \retval 0 if this widget has no visible focus. \see visible_focus(int), set_visible_focus(), clear_visible_focus() */ - unsigned int visible_focus() { return flags_ & VISIBLE_FOCUS; } + 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 @@ -841,7 +828,7 @@ public: /** Internal use only. */ int test_shortcut(); /** Internal use only. */ - static Fl_Shortcut label_shortcut(const char *t); + static char label_shortcut(const char *t); /** Internal use only. */ static int test_shortcut(const char*); @@ -879,16 +866,9 @@ public: */ uchar damage() const {return damage_;} - /** Clears or sets the damage flags. + /** Clears the damage flags. Damage flags are cleared when parts of the widget drawing is repaired. - - 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) + \param[in] c bitmask of flags to clear \see damage(uchar), damage() */ void clear_damage(uchar c = 0) {damage_ = c;} @@ -943,5 +923,5 @@ public: #endif // -// End of "$Id: Fl_Widget.H 6908 2009-09-28 14:41:22Z matt $". +// End of "$Id: Fl_Widget.H 6753 2009-04-12 09:40:59Z AlbrechtS $". // diff --git a/plugins/zynaddsubfx/fltk/FL/Fl_Window.H b/plugins/zynaddsubfx/fltk/FL/Fl_Window.H index 952a52793..a55521db5 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 6907 2009-09-28 14:34:52Z matt $" +// "$Id: Fl_Window.H 6614 2009-01-01 16:11:32Z matt $" // // Window header file for the Fast Light Tool Kit (FLTK). // @@ -69,6 +69,16 @@ 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 @@ -157,13 +167,13 @@ public: Fast inline function to turn the border off. It only works before show() is called. */ - void clear_border() {set_flag(NOBORDER);} + void clear_border() {set_flag(FL_NOBORDER);} /** See int Fl_Window::border(int) */ - unsigned int border() const {return !(flags() & NOBORDER);} - /** Activate the flags NOBORDER|FL_OVERRIDE */ - void set_override() {set_flag(NOBORDER|OVERRIDE);} + int border() const {return !(flags() & FL_NOBORDER);} + /** Activate the flags FL_NOBORDER|FL_OVERRIDE */ + void set_override() {set_flag(FL_NOBORDER|FL_OVERRIDE);} /** Returns non zero if FL_OVERRIDE flag is set, 0 otherwise. */ - unsigned int override() const { return flags()&OVERRIDE; } + int override() const { return flags()&FL_OVERRIDE; } /** A "modal" window, when shown(), will prevent any events from being delivered to other windows in the same program, and will also @@ -173,18 +183,18 @@ public: which window (if any) is modal by calling Fl::modal(). */ - void set_modal() {set_flag(MODAL);} + void set_modal() {set_flag(FL_MODAL);} /** Returns true if this window is modal. */ - unsigned int modal() const {return flags() & MODAL;} + int modal() const {return flags() & FL_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(NON_MODAL);} + void set_non_modal() {set_flag(FL_NON_MODAL);} /** Returns true if this window is modal or non-modal. */ - unsigned int non_modal() const {return flags() & (NON_MODAL|MODAL);} + int non_modal() const {return flags() & (FL_NON_MODAL|FL_MODAL);} /** Marks the window as a menu window. @@ -199,10 +209,10 @@ public: This must be called before the window is shown and cannot be changed later. */ - void set_menu_window() {set_flag(MENU_WINDOW);} + void set_menu_window() {set_flag(FL_MENU_WINDOW);} /** Returns true if this window is a menu window. */ - unsigned int menu_window() const {return flags() & MENU_WINDOW;} + int menu_window() const {return flags() & FL_MENU_WINDOW;} /** Marks the window as a tooltip window. @@ -220,10 +230,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(TOOLTIP_WINDOW); - clear_flag(MENU_WINDOW); } + void set_tooltip_window() { set_flag(FL_TOOLTIP_WINDOW); + clear_flag(FL_MENU_WINDOW); } /** Returns true if this window is a tooltip window. */ - unsigned int tooltip_window() const {return flags() & TOOLTIP_WINDOW;} + int tooltip_window() const {return flags() & FL_TOOLTIP_WINDOW;} /** Position the window so that the mouse is pointing at the @@ -242,7 +252,7 @@ public: so that the next time show() is called the window manager is free to position the window. */ - void free_position() {clear_flag(FORCE_POSITION);} + void free_position() {clear_flag(FL_FORCE_POSITION);} /** Set the allowable range the user can resize this window to. This only works for top-level windows. @@ -400,5 +410,5 @@ public: #endif // -// End of "$Id: Fl_Window.H 6907 2009-09-28 14:34:52Z matt $". +// End of "$Id: Fl_Window.H 6614 2009-01-01 16:11:32Z matt $". // diff --git a/plugins/zynaddsubfx/fltk/FL/fl_draw.H b/plugins/zynaddsubfx/fltk/FL/fl_draw.H index 69ecaf49c..fab90b477 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 6878 2009-09-17 22:12:24Z matt $" +// "$Id: fl_draw.H 6779 2009-04-24 09:28:30Z yuri $" // // Portable drawing function header file for the Fast Light Tool Kit (FLTK). // @@ -203,7 +203,14 @@ 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 -FL_EXPORT int fl_height(int font, int size); +/** + 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;} /** 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. @@ -441,8 +448,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(Fl_Shortcut shortcut); -FL_EXPORT const char* fl_shortcut_label(Fl_Shortcut shortcut, const char **eom); +FL_EXPORT const char* fl_shortcut_label(int shortcut); +FL_EXPORT const char* fl_shortcut_label(int shortcuti, 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); @@ -468,5 +475,5 @@ FL_EXPORT int fl_add_symbol(const char* name, void (*drawit)(Fl_Color), int scal #endif // -// End of "$Id: fl_draw.H 6878 2009-09-17 22:12:24Z matt $". +// End of "$Id: fl_draw.H 6779 2009-04-24 09:28:30Z yuri $". // diff --git a/plugins/zynaddsubfx/fltk/FL/fl_types.h b/plugins/zynaddsubfx/fltk/FL/fl_types.h index d87cd7387..e676a621e 100644 --- a/plugins/zynaddsubfx/fltk/FL/fl_types.h +++ b/plugins/zynaddsubfx/fltk/FL/fl_types.h @@ -52,9 +52,6 @@ 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/src/CMakeLists.txt b/plugins/zynaddsubfx/fltk/src/CMakeLists.txt index 9a7289777..7b628bd01 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,8 +130,6 @@ 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 @@ -167,18 +165,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/case.c + xutf8/keysym2Ucs.c xutf8/utf8Input.c xutf8/utf8Utils.c xutf8/utf8Wrap.c - xutf8/keysym2Ucs.c - fl_utf.c ) ADD_LIBRARY(fltk ${CPPFILES} ${CFILES}) @@ -194,32 +192,30 @@ IF(X11_FOUND) TARGET_LINK_LIBRARIES(fltk ${X11_LIBRARIES}) ENDIF(X11_FOUND) -SET(OPENGL_FOUND 0) -IF(OPENGL_FOUND) - ADD_LIBRARY(fltk_gl ${GLCPPFILES}) - INSTALL_TARGETS(/lib fltk_gl) - TARGET_LINK_LIBRARIES(fltk_gl fltk ${OPENGL_LIBRARIES}) - SET_TARGET_PROPERTIES(fltk_gl - PROPERTIES - VERSION ${FLTK_VERSION_MAJOR}.${FLTK_VERSION_MINOR} - SOVERSION ${FLTK_VERSION_PATCH}) -ENDIF(OPENGL_FOUND) +#IF(OPENGL_FOUND) +# ADD_LIBRARY(fltk_gl ${GLCPPFILES}) +# INSTALL_TARGETS(/lib fltk_gl) +# TARGET_LINK_LIBRARIES(fltk_gl fltk ${OPENGL_LIBRARIES}) +# SET_TARGET_PROPERTIES(fltk_gl +# PROPERTIES +# VERSION ${FLTK_VERSION_MAJOR}.${FLTK_VERSION_MINOR} +# SOVERSION ${FLTK_VERSION_PATCH}) +#ENDIF(OPENGL_FOUND) -IF(0) -ADD_LIBRARY(fltk_forms ${FLCPPFILES}) -INSTALL_TARGETS(/lib fltk_forms) -TARGET_LINK_LIBRARIES(fltk_forms fltk) -SET_TARGET_PROPERTIES(fltk_forms - PROPERTIES - VERSION ${FLTK_VERSION_MAJOR}.${FLTK_VERSION_MINOR} - SOVERSION ${FLTK_VERSION_PATCH}) - -ADD_LIBRARY(fltk_images ${IMGCPPFILES}) -INSTALL_TARGETS(/lib fltk_images) -TARGET_LINK_LIBRARIES(fltk_images fltk ${FLTK_PNG_LIBRARIES} - ${FLTK_JPEG_LIBRARIES} ${FLTK_ZLIB_LIBRARIES}) -SET_TARGET_PROPERTIES(fltk_images - PROPERTIES - VERSION ${FLTK_VERSION_MAJOR}.${FLTK_VERSION_MINOR} - SOVERSION ${FLTK_VERSION_PATCH}) -ENDIF(0) +#ADD_LIBRARY(fltk_forms ${FLCPPFILES}) +#INSTALL_TARGETS(/lib fltk_forms) +#TARGET_LINK_LIBRARIES(fltk_forms fltk) +#SET_TARGET_PROPERTIES(fltk_forms +# PROPERTIES +# VERSION ${FLTK_VERSION_MAJOR}.${FLTK_VERSION_MINOR} +# SOVERSION ${FLTK_VERSION_PATCH}) +# +#ADD_LIBRARY(fltk_images ${IMGCPPFILES}) +#INSTALL_TARGETS(/lib fltk_images) +#TARGET_LINK_LIBRARIES(fltk_images fltk ${FLTK_PNG_LIBRARIES} +# ${FLTK_JPEG_LIBRARIES} ${FLTK_ZLIB_LIBRARIES}) +#SET_TARGET_PROPERTIES(fltk_images +# PROPERTIES +# VERSION ${FLTK_VERSION_MAJOR}.${FLTK_VERSION_MINOR} +# SOVERSION ${FLTK_VERSION_PATCH}) +# diff --git a/plugins/zynaddsubfx/fltk/src/Fl.cxx b/plugins/zynaddsubfx/fltk/src/Fl.cxx index 2d6e03fe3..d621d2318 100644 --- a/plugins/zynaddsubfx/fltk/src/Fl.cxx +++ b/plugins/zynaddsubfx/fltk/src/Fl.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl.cxx 6836 2009-07-25 12:56:16Z AlbrechtS $" +// "$Id: Fl.cxx 6787 2009-05-14 20:16:09Z engelsman $" // // 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 6836 2009-07-25 12:56:16Z AlbrechtS $". +// End of "$Id: Fl.cxx 6787 2009-05-14 20:16:09Z engelsman $". // diff --git a/plugins/zynaddsubfx/fltk/src/Fl_Browser.cxx b/plugins/zynaddsubfx/fltk/src/Fl_Browser.cxx index 0db009245..14a2db47c 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 6895 2009-09-21 06:35:08Z greg.ercolano $" +// "$Id: Fl_Browser.cxx 6726 2009-03-27 16:52:31Z greg.ercolano $" // // Browser widget for the Fast Light Tool Kit (FLTK). // @@ -44,16 +44,10 @@ #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 @@ -144,8 +138,7 @@ 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) - \retval item that was found. - \retval NULL if line is out of range. + \returns The returned item. \see item_at(), find_line(), lineno() */ FL_BLINE* Fl_Browser::find_line(int line) const { @@ -294,7 +287,6 @@ 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); } @@ -329,7 +321,6 @@ 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; @@ -373,7 +364,8 @@ 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++) { @@ -408,9 +400,6 @@ 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! } @@ -423,8 +412,7 @@ int Fl_Browser::item_height(void *item) const { incr_height(), full_height() */ int Fl_Browser::item_width(void *item) const { - FL_BLINE* l=(FL_BLINE*)item; - char* str = l->txt; + char* str = ((FL_BLINE*)item)->txt; const int* i = column_widths(); int ww = 0; @@ -469,8 +457,6 @@ 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; } @@ -506,11 +492,9 @@ 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 { - FL_BLINE* l = (FL_BLINE*)item; - char* str = l->txt; + char* str = ((FL_BLINE*)item)->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 @@ -518,15 +502,6 @@ 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(); @@ -546,7 +521,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 (!(l->flags & SELECTED)) { + if (!(((FL_BLINE*)item)->flags & SELECTED)) { fl_color((Fl_Color)strtol(str, &str, 10)); fl_rectf(X, Y, w1, H); } else strtol(str, &str, 10); @@ -582,7 +557,7 @@ void Fl_Browser::item_draw(void* item, int X, int Y, int W, int H) const { } BREAK: fl_font(font, tsize); - if (l->flags & SELECTED) + if (((FL_BLINE*)item)->flags & SELECTED) lcol = fl_contrast(lcol, selection_color()); if (!active_r()) lcol = fl_inactive(lcol); fl_color(lcol); @@ -617,7 +592,8 @@ 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() + \see topline(), middleline(), bottomline(), \n ++: Command not found. */ void Fl_Browser::lineposition(int line, Fl_Line_Position pos) { if (line<1) line = 1; @@ -859,58 +835,6 @@ 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 6895 2009-09-21 06:35:08Z greg.ercolano $". +// End of "$Id: Fl_Browser.cxx 6726 2009-03-27 16:52:31Z greg.ercolano $". // diff --git a/plugins/zynaddsubfx/fltk/src/Fl_Choice.cxx b/plugins/zynaddsubfx/fltk/src/Fl_Choice.cxx index a31bdc873..22054e821 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 6873 2009-09-16 07:06:41Z AlbrechtS $" +// "$Id: Fl_Choice.cxx 6616 2009-01-01 21:28:26Z matt $" // // 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 6873 2009-09-16 07:06:41Z AlbrechtS $". +// End of "$Id: Fl_Choice.cxx 6616 2009-01-01 21:28:26Z matt $". // diff --git a/plugins/zynaddsubfx/fltk/src/Fl_Double_Window.cxx b/plugins/zynaddsubfx/fltk/src/Fl_Double_Window.cxx index f26951e4d..8e31149c3 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 00b182ccf..1834185a4 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 6853 2009-09-09 05:16:41Z greg.ercolano $" +// "$Id: Fl_File_Browser.cxx 6616 2009-01-01 21:28:26Z matt $" // // Fl_File_Browser routines. // @@ -42,7 +42,6 @@ #include #include #include -#include // icon #include #include #include "flstring.h" @@ -81,17 +80,11 @@ #define SELECTED 1 #define NOTDISPLAYED 2 -// TODO -- Warning: The definition of FL_BLINE here is a hack. -// Fl_File_Browser should not do this. PLEASE FIX. -// FL_BLINE should be private to Fl_Browser, and not re-defined here. -// For now, make sure this struct is precisely consistent with Fl_Browser.cxx. -// struct FL_BLINE // data is in a linked list of these { FL_BLINE *prev; // Previous item in list FL_BLINE *next; // Next item in list void *data; // Pointer to data (function) - Fl_Image *icon; // Pointer to optional icon short length; // sizeof(txt)-1, may be longer than string char flags; // selected, displayed char txt[1]; // start of allocated array @@ -642,5 +635,5 @@ Fl_File_Browser::filter(const char *pattern) // I - Pattern string // -// End of "$Id: Fl_File_Browser.cxx 6853 2009-09-09 05:16:41Z greg.ercolano $". +// End of "$Id: Fl_File_Browser.cxx 6616 2009-01-01 21:28:26Z matt $". // diff --git a/plugins/zynaddsubfx/fltk/src/Fl_File_Chooser2.cxx b/plugins/zynaddsubfx/fltk/src/Fl_File_Chooser2.cxx index 58df478be..03e070e16 100644 --- a/plugins/zynaddsubfx/fltk/src/Fl_File_Chooser2.cxx +++ b/plugins/zynaddsubfx/fltk/src/Fl_File_Chooser2.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_File_Chooser2.cxx 6899 2009-09-23 21:32:23Z matt $" +// "$Id: Fl_File_Chooser2.cxx 6678 2009-03-13 23:36:09Z AlbrechtS $" // // More Fl_File_Chooser routines. // @@ -858,7 +858,7 @@ Fl_File_Chooser::fileNameCB() } } else { // File doesn't exist, so beep at and alert the user... - fl_alert(existing_file_label); + fl_alert("%s", existing_file_label); } } else if (Fl::event_key() != FL_Delete && @@ -1046,7 +1046,7 @@ Fl_File_Chooser::newdir() // Get a directory name from the user - if ((dir = fl_input(new_directory_label, NULL)) == NULL) + if ((dir = fl_input("%s", new_directory_label, (char *)NULL)) == NULL) return; // Make it relative to the current directory as needed... @@ -1213,7 +1213,7 @@ Fl_File_Chooser::showChoiceCB() item = showChoice->text(showChoice->value()); if (strcmp(item, custom_filter_label) == 0) { - if ((item = fl_input(custom_filter_label, pattern_)) != NULL) { + if ((item = fl_input("%s",custom_filter_label, pattern_)) != NULL) { strlcpy(pattern_, item, sizeof(pattern_)); quote_pathname(temp, item, sizeof(temp)); @@ -1332,37 +1332,10 @@ Fl_File_Chooser::update_preview() window->cursor(FL_CURSOR_DEFAULT); Fl::check(); - // Scan the buffer for printable UTF8 chars... - for (ptr = preview_text_; *ptr; ptr++) { - uchar c = uchar(*ptr); - if ( (c&0x80)==0 ) { - if (!isprint(c&255) && !isspace(c&255)) break; - } else if ( (c&0xe0)==0xc0 ) { - if (ptr[1] && (ptr[1]&0xc0)!=0x80) break; - ptr++; - } else if ( (c&0xf0)==0xe0 ) { - if (ptr[1] && (ptr[1]&0xc0)!=0x80) break; - ptr++; - if (ptr[1] && (ptr[1]&0xc0)!=0x80) break; - ptr++; - } else if ( (c&0xf8)==0xf0 ) { - if (ptr[1] && (ptr[1]&0xc0)!=0x80) break; - ptr++; - if (ptr[1] && (ptr[1]&0xc0)!=0x80) break; - ptr++; - if (ptr[1] && (ptr[1]&0xc0)!=0x80) break; - ptr++; - } - } -// *ptr && (isprint(*ptr & 255) || isspace(*ptr & 255)); -// ptr ++); - - // Scan the buffer for printable characters in 8 bit - if (*ptr || ptr == preview_text_) { - for (ptr = preview_text_; + // Scan the buffer for printable chars... + for (ptr = preview_text_; *ptr && (isprint(*ptr & 255) || isspace(*ptr & 255)); ptr ++); - } if (*ptr || ptr == preview_text_) { // Non-printable file, just show a big ?... @@ -1616,5 +1589,5 @@ unquote_pathname(char *dst, // O - Destination string // -// End of "$Id: Fl_File_Chooser2.cxx 6899 2009-09-23 21:32:23Z matt $". +// End of "$Id: Fl_File_Chooser2.cxx 6678 2009-03-13 23:36:09Z AlbrechtS $". // diff --git a/plugins/zynaddsubfx/fltk/src/Fl_File_Input.cxx b/plugins/zynaddsubfx/fltk/src/Fl_File_Input.cxx index d46c98452..6ed5a0759 100644 --- a/plugins/zynaddsubfx/fltk/src/Fl_File_Input.cxx +++ b/plugins/zynaddsubfx/fltk/src/Fl_File_Input.cxx @@ -144,7 +144,7 @@ void Fl_File_Input::update_buttons() { \param[in] str new string value \param[in] len lengh of value */ -int // O - TRUE on success +int // O - true on success Fl_File_Input::value(const char *str, // I - New string value int len) { // I - Length of value damage(FL_DAMAGE_BAR); @@ -157,7 +157,7 @@ Fl_File_Input::value(const char *str, // I - New string value Returns non 0 on success. \param[in] str new string value */ -int // O - TRUE on success +int // O - true on success Fl_File_Input::value(const char *str) { // I - New string value damage(FL_DAMAGE_BAR); return Fl_Input::value(str); @@ -187,7 +187,7 @@ void Fl_File_Input::draw() { Return non zero if event is handled. \param[in] event */ -int // O - TRUE if we handled event +int // O - true if we handled event Fl_File_Input::handle(int event) // I - Event { // printf("handle(event = %d)\n", event); @@ -230,7 +230,7 @@ Fl_File_Input::handle(int event) // I - Event Return non zero if event is handled. \param[in] event */ -int // O - TRUE if we handled event +int // O - true if we handled event Fl_File_Input::handle_button(int event) // I - Event { int i, // Looping var diff --git a/plugins/zynaddsubfx/fltk/src/Fl_Image.cxx b/plugins/zynaddsubfx/fltk/src/Fl_Image.cxx index e0ffc14fe..79c8762b1 100644 --- a/plugins/zynaddsubfx/fltk/src/Fl_Image.cxx +++ b/plugins/zynaddsubfx/fltk/src/Fl_Image.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Image.cxx 6804 2009-06-29 07:44:25Z AlbrechtS $" +// "$Id: Fl_Image.cxx 6773 2009-04-21 09:25:22Z AlbrechtS $" // // Image drawing code for the Fast Light Tool Kit (FLTK). // @@ -551,5 +551,5 @@ void Fl_RGB_Image::label(Fl_Menu_Item* m) { // -// End of "$Id: Fl_Image.cxx 6804 2009-06-29 07:44:25Z AlbrechtS $". +// End of "$Id: Fl_Image.cxx 6773 2009-04-21 09:25:22Z AlbrechtS $". // diff --git a/plugins/zynaddsubfx/fltk/src/Fl_Input.cxx b/plugins/zynaddsubfx/fltk/src/Fl_Input.cxx index 7be68aafa..1b25a6898 100644 --- a/plugins/zynaddsubfx/fltk/src/Fl_Input.cxx +++ b/plugins/zynaddsubfx/fltk/src/Fl_Input.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Input.cxx 6888 2009-09-19 21:16:21Z matt $" +// "$Id: Fl_Input.cxx 6765 2009-04-15 08:35:28Z matt $" // // Input widget for the Fast Light Tool Kit (FLTK). // @@ -621,18 +621,6 @@ int Fl_Input::handle(int event) { take_focus(); return 1; -/* TODO: this will scroll the area, but stop if the cursor would become invisible. - That clipping happens in drawtext(). Do we change the clipping or should - we move the cursor (ouch)? - case FL_MOUSEWHEEL: - if (Fl::e_dy > 0) { - yscroll( yscroll() - Fl::e_dy*15 ); - } else if (Fl::e_dy < 0) { - yscroll( yscroll() - Fl::e_dy*15 ); - } - return 1; -*/ - } Fl_Boxtype b = box(); return Fl_Input_::handletext(event, @@ -649,5 +637,5 @@ Fl_Input::Fl_Input(int X, int Y, int W, int H, const char *l) } // -// End of "$Id: Fl_Input.cxx 6888 2009-09-19 21:16:21Z matt $". +// End of "$Id: Fl_Input.cxx 6765 2009-04-15 08:35:28Z matt $". // diff --git a/plugins/zynaddsubfx/fltk/src/Fl_Input_.cxx b/plugins/zynaddsubfx/fltk/src/Fl_Input_.cxx index ca6638c60..3868255b1 100644 --- a/plugins/zynaddsubfx/fltk/src/Fl_Input_.cxx +++ b/plugins/zynaddsubfx/fltk/src/Fl_Input_.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Input_.cxx 6887 2009-09-19 20:57:48Z matt $" +// "$Id: Fl_Input_.cxx 6777 2009-04-23 15:32:19Z matt $" // // Common input widget routines for the Fast Light Tool Kit (FLTK). // @@ -134,7 +134,7 @@ double Fl_Input_::expandpos( if (c < ' ' || c == 127) { if (c == '\t' && input_type()==FL_MULTILINE_INPUT) { n += 8-(chr%8); - chr += 7-(chr%8); + chr += 8-(chr%8); } else n += 2; } else { n++; @@ -239,7 +239,6 @@ void Fl_Input_::drawtext(int X, int Y, int W, int H) { // count how many lines and put the last one into the buffer: // And figure out where the cursor is: int height = fl_height(); - int threshold = height/2; int lines; int curx, cury; for (p=value(), curx=cury=lines=0; ;) { @@ -249,15 +248,15 @@ void Fl_Input_::drawtext(int X, int Y, int W, int H) { if (Fl::focus()==this && !was_up_down) up_down_pos = curx; cury = lines*height; int newscroll = xscroll_; - if (curx > newscroll+W-threshold) { + if (curx > newscroll+W-20) { // figure out scrolling so there is space after the cursor: - newscroll = curx+threshold-W; + newscroll = curx+20-W; // figure out the furthest left we ever want to scroll: int ex = int(expandpos(p, e, buf, 0))+2-W; // use minimum of both amounts: if (ex < newscroll) newscroll = ex; - } else if (curx < newscroll+threshold) { - newscroll = curx-threshold; + } else if (curx < newscroll+20) { + newscroll = curx-20; } if (newscroll < 0) newscroll = 0; if (newscroll != xscroll_) { @@ -1254,5 +1253,5 @@ Fl_Char Fl_Input_::index(int i) const } // -// End of "$Id: Fl_Input_.cxx 6887 2009-09-19 20:57:48Z matt $". +// End of "$Id: Fl_Input_.cxx 6777 2009-04-23 15:32:19Z matt $". // diff --git a/plugins/zynaddsubfx/fltk/src/Fl_Menu.cxx b/plugins/zynaddsubfx/fltk/src/Fl_Menu.cxx index f49d89668..4e71f0775 100644 --- a/plugins/zynaddsubfx/fltk/src/Fl_Menu.cxx +++ b/plugins/zynaddsubfx/fltk/src/Fl_Menu.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Menu.cxx 6841 2009-08-03 06:26:32Z AlbrechtS $" +// "$Id: Fl_Menu.cxx 6757 2009-04-12 20:00:45Z matt $" // // Menu code for the Fast Light Tool Kit (FLTK). // @@ -1014,5 +1014,5 @@ const Fl_Menu_Item* Fl_Menu_Item::test_shortcut() const { } // -// End of "$Id: Fl_Menu.cxx 6841 2009-08-03 06:26:32Z AlbrechtS $". +// End of "$Id: Fl_Menu.cxx 6757 2009-04-12 20:00:45Z matt $". // diff --git a/plugins/zynaddsubfx/fltk/src/Fl_Menu_.cxx b/plugins/zynaddsubfx/fltk/src/Fl_Menu_.cxx index 3c83ae7b9..ce7c89e10 100644 --- a/plugins/zynaddsubfx/fltk/src/Fl_Menu_.cxx +++ b/plugins/zynaddsubfx/fltk/src/Fl_Menu_.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Menu_.cxx 6904 2009-09-27 11:39:02Z matt $" +// "$Id: Fl_Menu_.cxx 6660 2009-02-15 18:58:03Z AlbrechtS $" // // Common menu code for the Fast Light Tool Kit (FLTK). // @@ -172,11 +172,11 @@ void Fl_Menu_Item::setonly() { } } -/** - Creates a new Fl_Menu_ widget using the given position, size, - and label string. menu() is initialized to null. - */ Fl_Menu_::Fl_Menu_(int X,int Y,int W,int H,const char* l) +/** + Creates a new Fl_Menu_ widget using the given position, size, + and label string. menu() is initialized to null. +*/ : Fl_Widget(X,Y,W,H,l) { set_flag(SHORTCUT_LABEL); box(FL_UP_BOX); @@ -262,5 +262,5 @@ void Fl_Menu_::clear() { } // -// End of "$Id: Fl_Menu_.cxx 6904 2009-09-27 11:39:02Z matt $". +// End of "$Id: Fl_Menu_.cxx 6660 2009-02-15 18:58:03Z AlbrechtS $". // diff --git a/plugins/zynaddsubfx/fltk/src/Fl_Menu_add.cxx b/plugins/zynaddsubfx/fltk/src/Fl_Menu_add.cxx index cbeeb631a..9a3d4be08 100644 --- a/plugins/zynaddsubfx/fltk/src/Fl_Menu_add.cxx +++ b/plugins/zynaddsubfx/fltk/src/Fl_Menu_add.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Menu_add.cxx 6878 2009-09-17 22:12:24Z matt $" +// "$Id: Fl_Menu_add.cxx 6716 2009-03-24 01:40:44Z fabien $" // // Menu utilities for the Fast Light Tool Kit (FLTK). // @@ -177,95 +177,56 @@ int Fl_Menu_Item::add( } /** - Adds a new menu item. - - \param[in] label The text label for the menu item. - \param[in] shortcut Optional keyboard shortcut that can be an int or string; (FL_CTRL+'a') or "^a". Default 0 if none. - \param[in] callback Optional callback invoked when user clicks the item. Default 0 if none. - \param[in] userdata Optional user data passed as an argument to the callback. Default 0 if none. - \param[in] flags Optional flags that control the type of menu item; see below. Default is 0 for none. - \returns The index into the menu() array, where the entry was added. - - \par Description + Adds a new menu item, with a title string, shortcut int (or string), + callback, argument to the callback, and flags. If the menu array was directly set with menu(x), then copy() is done to make a private array. - \par - A menu item's callback must not add() items to its parent menu during the callback. - - Detailed Description of Parameters - \par label - The menu item's label. This option is required. - \par - The characters "&", "/", "\", and "_" are treated as special characters in the label string. - The "&" character specifies that the following character is an accelerator and will be underlined. - The "\" character is used to escape the next character in the string. - Labels starting with the "_" character cause a divider to be placed after that menu item. - \par - A label of the form "File/Quit" will create the submenu "File" - with a menu item called "Quit". The "/" character is ignored if it appears - as the first character of the label string, e.g. "/File/Quit". - \par + + The characters "&", "/", "\", and "_" are treated as + special characters in the label string. The "&" character + specifies that the following character is an accelerator and + will be underlined. The "\" character is used to escape the next + character in the string. Labels starting with the "_" character + cause a divider to be placed after that menu item. + + A label of the form "foo/bar/baz" will create submenus called + "foo" and "bar" with an entry called "baz". The "/" character is + ignored if it appears as the first character of the label string, e.g. + "/foo/bar/baz". + The label string is copied to new memory and can be freed. The other arguments (including the shortcut) are copied into the menu item unchanged. - \par + If an item exists already with that name then it is replaced with this new one. Otherwise this new one is added to the end of the correct menu or submenu. The return value is the offset into the array that the new entry was placed at. - \par shortcut - The keyboard shortcut for this menu item. - \par - This parameter is optional, and defaults to 0 to indicate no shortcut. - \par Shortcut can be 0L, or either a modifier/key combination (for example FL_CTRL+'A') or a string describing the shortcut in one of two ways: - \verbatim + + \code [#+^] e.g. "97", "^97", "+97", "#97" [#+^] e.g. "a", "^a", "+a", "#a" - \endverbatim + \endcode ..where \ is a decimal value representing an ascii character (eg. 97 is the ascii for 'a'), and the optional prefixes enhance the value that follows. Multiple prefixes must appear in the above order. - \verbatim + \code # - Alt + - Shift ^ - Control - \endverbatim - Text shortcuts are converted to integer shortcut by calling - Fl_Shortcut fl_old_shortcut(const char*). - - \par callback - The callback to invoke when this menu item is selected. - \par - This parameter is optional, and defaults to 0 for no callback. - - \par userdata - The callback's 'user data' that is passed to the callback. - \par - This parameter is optional, and defaults to 0. - - \par flags - These are bit flags to define what kind of menu item this is. - \par - This parameter is optional, and defaults to 0 to define a 'regular' menu item. - \par - These flags can be 'OR'ed together: - \code - FL_MENU_INACTIVE // Deactivate menu item (gray out) - FL_MENU_TOGGLE // Item is a checkbox toggle (shows checkbox for on/off state) - FL_MENU_VALUE // The on/off state for checkbox/radio buttons (if set, state is 'on') - FL_MENU_RADIO // Item is a radio button (one checkbox of many can be on) - FL_MENU_INVISIBLE // Item will not show up (shortcut will work) - FL_SUBMENU_POINTER // Indicates user_data() is a pointer to another menu array - FL_SUBMENU // This item is a submenu to other items - FL_MENU_DIVIDER // Creates divider line below this item. Also ends a group of radio buttons. \endcode - + Text shortcuts are converted to integer shortcut by calling + int fl_old_shortcut(const char*). + + The return value is the index into the array that the entry was put. + + No items must be added to a menu during a callback to the same menu. */ -int Fl_Menu_::add(const char *label,int shortcut,Fl_Callback *callback,void *userdata,int flags) { +int Fl_Menu_::add(const char *t, int s, Fl_Callback *c,void *v,int f) { // make this widget own the local array: if (this != fl_menu_array_owner) { if (fl_menu_array_owner) { @@ -299,7 +260,7 @@ int Fl_Menu_::add(const char *label,int shortcut,Fl_Callback *callback,void *use } fl_menu_array_owner = this; } - int r = menu_->add(label,shortcut,callback,userdata,flags); + int r = menu_->add(t,s,c,v,f); // if it rellocated array we must fix the pointer: int value_offset = value_-menu_; menu_ = local_array; // in case it reallocated it @@ -374,5 +335,5 @@ void Fl_Menu_::remove(int i) { } // -// End of "$Id: Fl_Menu_add.cxx 6878 2009-09-17 22:12:24Z matt $". +// End of "$Id: Fl_Menu_add.cxx 6716 2009-03-24 01:40:44Z fabien $". // diff --git a/plugins/zynaddsubfx/fltk/src/Fl_Progress.cxx b/plugins/zynaddsubfx/fltk/src/Fl_Progress.cxx index d7dee6885..227c90f57 100644 --- a/plugins/zynaddsubfx/fltk/src/Fl_Progress.cxx +++ b/plugins/zynaddsubfx/fltk/src/Fl_Progress.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Progress.cxx 6794 2009-06-27 09:29:36Z AlbrechtS $" +// "$Id: Fl_Progress.cxx 6616 2009-01-01 21:28:26Z matt $" // // Progress bar widget routines. // @@ -119,5 +119,5 @@ Fl_Progress::Fl_Progress(int X, int Y, int W, int H, const char* L) // -// End of "$Id: Fl_Progress.cxx 6794 2009-06-27 09:29:36Z AlbrechtS $". +// End of "$Id: Fl_Progress.cxx 6616 2009-01-01 21:28:26Z matt $". // diff --git a/plugins/zynaddsubfx/fltk/src/Fl_Scroll.cxx b/plugins/zynaddsubfx/fltk/src/Fl_Scroll.cxx index f9a03027a..07ebcc28f 100644 --- a/plugins/zynaddsubfx/fltk/src/Fl_Scroll.cxx +++ b/plugins/zynaddsubfx/fltk/src/Fl_Scroll.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Scroll.cxx 6828 2009-07-12 00:15:06Z greg.ercolano $" +// "$Id: Fl_Scroll.cxx 6654 2009-02-08 18:47:37Z AlbrechtS $" // // Scroll widget for the Fast Light Tool Kit (FLTK). // @@ -413,5 +413,5 @@ int Fl_Scroll::handle(int event) { } // -// End of "$Id: Fl_Scroll.cxx 6828 2009-07-12 00:15:06Z greg.ercolano $". +// End of "$Id: Fl_Scroll.cxx 6654 2009-02-08 18:47:37Z AlbrechtS $". // diff --git a/plugins/zynaddsubfx/fltk/src/Fl_Text_Buffer.cxx b/plugins/zynaddsubfx/fltk/src/Fl_Text_Buffer.cxx index 73f72f121..91c33f4bc 100644 --- a/plugins/zynaddsubfx/fltk/src/Fl_Text_Buffer.cxx +++ b/plugins/zynaddsubfx/fltk/src/Fl_Text_Buffer.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Text_Buffer.cxx 6825 2009-07-04 05:18:29Z fabien $" +// "$Id: Fl_Text_Buffer.cxx 6765 2009-04-15 08:35:28Z matt $" // // Copyright 2001-2009 by Bill Spitzak and others. // Original code Copyright Mark Edel. Permission to distribute under @@ -2502,5 +2502,5 @@ Fl_Text_Buffer::outputfile(const char *file, int start, int end, int buflen) { // -// End of "$Id: Fl_Text_Buffer.cxx 6825 2009-07-04 05:18:29Z fabien $". +// End of "$Id: Fl_Text_Buffer.cxx 6765 2009-04-15 08:35:28Z matt $". // diff --git a/plugins/zynaddsubfx/fltk/src/Fl_Text_Display.cxx b/plugins/zynaddsubfx/fltk/src/Fl_Text_Display.cxx index 3e09584e8..5a01f7462 100644 --- a/plugins/zynaddsubfx/fltk/src/Fl_Text_Display.cxx +++ b/plugins/zynaddsubfx/fltk/src/Fl_Text_Display.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Text_Display.cxx 6909 2009-09-28 14:41:43Z matt $" +// "$Id: Fl_Text_Display.cxx 6765 2009-04-15 08:35:28Z matt $" // // Copyright 2001-2009 by Bill Spitzak and others. // Original code Copyright Mark Edel. Permission to distribute under @@ -387,8 +387,8 @@ void Fl_Text_Display::resize(int X, int Y, int W, int H) { mMaxsize = max(mMaxsize, fl_height(mStyleTable[i].font, mStyleTable[i].size)); // did we have scrollbars initially? - unsigned int hscrollbarvisible = mHScrollBar->visible(); - unsigned int vscrollbarvisible = mVScrollBar->visible(); + int hscrollbarvisible = mHScrollBar->visible(); + int vscrollbarvisible = mVScrollBar->visible(); // try without scrollbars first mVScrollBar->clear_visible(); @@ -3439,5 +3439,5 @@ int Fl_Text_Display::handle(int event) { // -// End of "$Id: Fl_Text_Display.cxx 6909 2009-09-28 14:41:43Z matt $". +// End of "$Id: Fl_Text_Display.cxx 6765 2009-04-15 08:35:28Z matt $". // diff --git a/plugins/zynaddsubfx/fltk/src/Fl_Text_Editor.cxx b/plugins/zynaddsubfx/fltk/src/Fl_Text_Editor.cxx index dc471cafe..5e5ea41af 100644 --- a/plugins/zynaddsubfx/fltk/src/Fl_Text_Editor.cxx +++ b/plugins/zynaddsubfx/fltk/src/Fl_Text_Editor.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Text_Editor.cxx 6894 2009-09-20 21:55:21Z greg.ercolano $" +// "$Id: Fl_Text_Editor.cxx 6765 2009-04-15 08:35:28Z matt $" // // Copyright 2001-2009 by Bill Spitzak and others. // Original code Copyright Mark Edel. Permission to distribute under @@ -156,14 +156,6 @@ static struct { { 'c', FL_COMMAND, Fl_Text_Editor::kf_copy }, { 'v', FL_COMMAND, Fl_Text_Editor::kf_paste }, { 'a', FL_COMMAND, Fl_Text_Editor::kf_select_all }, - { FL_Left, FL_COMMAND, Fl_Text_Editor::kf_meta_move }, - { FL_Right, FL_COMMAND, Fl_Text_Editor::kf_meta_move }, - { FL_Up, FL_COMMAND, Fl_Text_Editor::kf_meta_move }, - { FL_Down, FL_COMMAND, Fl_Text_Editor::kf_meta_move }, - { FL_Left, FL_COMMAND|FL_SHIFT, Fl_Text_Editor::kf_m_s_move }, - { FL_Right, FL_COMMAND|FL_SHIFT, Fl_Text_Editor::kf_m_s_move }, - { FL_Up, FL_COMMAND|FL_SHIFT, Fl_Text_Editor::kf_m_s_move }, - { FL_Down, FL_COMMAND|FL_SHIFT, Fl_Text_Editor::kf_m_s_move }, #endif // __APPLE__ { 0, 0, 0 } @@ -360,40 +352,6 @@ int Fl_Text_Editor::kf_ctrl_move(int c, Fl_Text_Editor* e) { return 1; } -/** Moves the current text cursor in the direction indicated by meta key */ -int Fl_Text_Editor::kf_meta_move(int c, Fl_Text_Editor* e) { - if (!e->buffer()->selected()) - e->dragPos = e->insert_position(); - if (c != FL_Up && c != FL_Down) { - e->buffer()->unselect(); - e->show_insert_position(); - } - switch (c) { - case FL_Up: // top of buffer - e->insert_position(0); - e->scroll(0, 0); - break; - case FL_Down: // end of buffer - e->insert_position(e->buffer()->length()); - e->scroll(e->count_lines(0, e->buffer()->length(), 1), 0); - break; - case FL_Left: // beginning of line - kf_move(FL_Home, e); - break; - case FL_Right: // end of line - kf_move(FL_End, e); - break; - } - return 1; -} - -/** Extends the current selection in the direction indicated by meta key c. */ -int Fl_Text_Editor::kf_m_s_move(int c, Fl_Text_Editor* e) { - kf_meta_move(c, e); - fl_text_drag_me(e->insert_position(), e); - return 1; -} - /** Extends the current selection in the direction indicated by control key c. */ int Fl_Text_Editor::kf_c_s_move(int c, Fl_Text_Editor* e) { kf_ctrl_move(c, e); @@ -614,5 +572,5 @@ int Fl_Text_Editor::handle(int event) { } // -// End of "$Id: Fl_Text_Editor.cxx 6894 2009-09-20 21:55:21Z greg.ercolano $". +// End of "$Id: Fl_Text_Editor.cxx 6765 2009-04-15 08:35:28Z matt $". // diff --git a/plugins/zynaddsubfx/fltk/src/Fl_Tooltip.cxx b/plugins/zynaddsubfx/fltk/src/Fl_Tooltip.cxx index ee02ac88d..ef533a0dc 100644 --- a/plugins/zynaddsubfx/fltk/src/Fl_Tooltip.cxx +++ b/plugins/zynaddsubfx/fltk/src/Fl_Tooltip.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Tooltip.cxx 6902 2009-09-27 11:06:56Z matt $" +// "$Id: Fl_Tooltip.cxx 6712 2009-03-22 19:21:34Z AlbrechtS $" // // Tooltip source file for the Fast Light Tool Kit (FLTK). // @@ -34,10 +34,10 @@ float Fl_Tooltip::delay_ = 1.0f; float Fl_Tooltip::hoverdelay_ = 0.2f; int Fl_Tooltip::enabled_ = 1; -Fl_Color Fl_Tooltip::color_ = fl_color_cube(FL_NUM_RED - 1, +unsigned Fl_Tooltip::color_ = fl_color_cube(FL_NUM_RED - 1, FL_NUM_GREEN - 1, FL_NUM_BLUE - 2); -Fl_Color Fl_Tooltip::textcolor_ = FL_BLACK; +unsigned Fl_Tooltip::textcolor_ = FL_BLACK; Fl_Font Fl_Tooltip::font_ = FL_HELVETICA; Fl_Fontsize Fl_Tooltip::size_ = FL_NORMAL_SIZE; @@ -278,5 +278,5 @@ void Fl_Widget::tooltip(const char *tt) { } // -// End of "$Id: Fl_Tooltip.cxx 6902 2009-09-27 11:06:56Z matt $". +// End of "$Id: Fl_Tooltip.cxx 6712 2009-03-22 19:21:34Z AlbrechtS $". // diff --git a/plugins/zynaddsubfx/fltk/src/Fl_Window.cxx b/plugins/zynaddsubfx/fltk/src/Fl_Window.cxx index 558a8d2e1..c0fa1a945 100644 --- a/plugins/zynaddsubfx/fltk/src/Fl_Window.cxx +++ b/plugins/zynaddsubfx/fltk/src/Fl_Window.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Window.cxx 6905 2009-09-27 12:06:35Z matt $" +// "$Id: Fl_Window.cxx 6669 2009-02-25 08:44:54Z AlbrechtS $" // // Window widget class for the Fast Light Tool Kit (FLTK). // @@ -66,7 +66,7 @@ Fl_Window::Fl_Window(int X,int Y,int W, int H, const char *l) cursor_bg = FL_WHITE; _Fl_Window(); - set_flag(FORCE_POSITION); + set_flag(FL_FORCE_POSITION); } Fl_Window::Fl_Window(int W, int H, const char *l) @@ -151,7 +151,8 @@ void Fl_Window::copy_label(const char *a) { void Fl_Window::iconlabel(const char *iname) { - unsigned saveflags = flags(); + // FIXME: 'flags' is 32 bit large! + uchar saveflags = flags(); label(label(), iname); set_flag(saveflags); } @@ -178,5 +179,5 @@ Fl_Window *Fl_Window::current() { // -// End of "$Id: Fl_Window.cxx 6905 2009-09-27 12:06:35Z matt $". +// End of "$Id: Fl_Window.cxx 6669 2009-02-25 08:44:54Z AlbrechtS $". // diff --git a/plugins/zynaddsubfx/fltk/src/Fl_Window_fullscreen.cxx b/plugins/zynaddsubfx/fltk/src/Fl_Window_fullscreen.cxx index 6635133fd..67f9877c8 100644 --- a/plugins/zynaddsubfx/fltk/src/Fl_Window_fullscreen.cxx +++ b/plugins/zynaddsubfx/fltk/src/Fl_Window_fullscreen.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Window_fullscreen.cxx 6905 2009-09-27 12:06:35Z matt $" +// "$Id: Fl_Window_fullscreen.cxx 6660 2009-02-15 18:58:03Z AlbrechtS $" // // Fullscreen window support for the Fast Light Tool Kit (FLTK). // @@ -43,10 +43,10 @@ void Fl_Window::border(int b) { if (b) { if (border()) return; - clear_flag(NOBORDER); + clear_flag(FL_NOBORDER); } else { if (!border()) return; - set_flag(NOBORDER); + set_flag(FL_NOBORDER); } #if defined(USE_X11) if (shown()) Fl_X::i(this)->sendxjunk(); @@ -91,5 +91,5 @@ void Fl_Window::fullscreen_off(int X,int Y,int W,int H) { } // -// End of "$Id: Fl_Window_fullscreen.cxx 6905 2009-09-27 12:06:35Z matt $". +// End of "$Id: Fl_Window_fullscreen.cxx 6660 2009-02-15 18:58:03Z AlbrechtS $". // diff --git a/plugins/zynaddsubfx/fltk/src/Fl_arg.cxx b/plugins/zynaddsubfx/fltk/src/Fl_arg.cxx index b2ed5b36c..d0d1b6f45 100644 --- a/plugins/zynaddsubfx/fltk/src/Fl_arg.cxx +++ b/plugins/zynaddsubfx/fltk/src/Fl_arg.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_arg.cxx 6813 2009-07-01 07:32:14Z AlbrechtS $" +// "$Id: Fl_arg.cxx 6712 2009-03-22 19:21:34Z AlbrechtS $" // // Optional argument initialization code for the Fast Light Tool Kit (FLTK). // @@ -538,5 +538,5 @@ int XParseGeometry(const char* string, int* x, int* y, #endif // ifdef WIN32 // -// End of "$Id: Fl_arg.cxx 6813 2009-07-01 07:32:14Z AlbrechtS $". +// End of "$Id: Fl_arg.cxx 6712 2009-03-22 19:21:34Z AlbrechtS $". // diff --git a/plugins/zynaddsubfx/fltk/src/Fl_mac.cxx b/plugins/zynaddsubfx/fltk/src/Fl_mac.cxx index 28541652c..5e181fc6c 100644 --- a/plugins/zynaddsubfx/fltk/src/Fl_mac.cxx +++ b/plugins/zynaddsubfx/fltk/src/Fl_mac.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_mac.cxx 6905 2009-09-27 12:06:35Z matt $" +// "$Id: Fl_mac.cxx 6758 2009-04-13 07:32:01Z matt $" // // MacOS specific code for the Fast Light Tool Kit (FLTK). // @@ -1496,10 +1496,10 @@ void fl_open_display() { beenHereDoneThat = 1; FlushEvents(everyEvent,0); - + MoreMasters(); // \todo Carbon suggests MoreMasterPointers() AEInstallEventHandler( kCoreEventClass, kAEQuitApplication, NewAEEventHandlerUPP((AEEventHandlerProcPtr)QuitAppleEventHandler), 0, false ); - + // create the Mac Handle for the default cursor (a pointer to a pointer) GetQDGlobalsArrow(&default_cursor); default_cursor_ptr = &default_cursor; @@ -1508,12 +1508,12 @@ void fl_open_display() { ClearMenuBar(); AppendResMenu( GetMenuHandle( 1 ), 'DRVR' ); DrawMenuBar(); - + // bring the application into foreground without a 'CARB' resource Boolean same_psn; ProcessSerialNumber cur_psn, front_psn; if( !GetCurrentProcess( &cur_psn ) && !GetFrontProcess( &front_psn ) && - !SameProcess( &front_psn, &cur_psn, &same_psn ) && !same_psn ) + !SameProcess( &front_psn, &cur_psn, &same_psn ) && !same_psn ) { // only transform the application type for unbundled apps CFBundleRef bundle = CFBundleGetMainBundle(); @@ -1522,16 +1522,35 @@ void fl_open_display() { FSRef execFs; CFURLRef execUrl = CFBundleCopyExecutableURL( bundle ); CFURLGetFSRef( execUrl, &execFs ); - + FSRef bundleFs; GetProcessBundleLocation( &cur_psn, &bundleFs ); - + if( !FSCompareFSRefs( &execFs, &bundleFs ) ) bundle = NULL; - + CFRelease(execUrl); } - + + // imm: keycode handler stub setting - use Gestalt to determine the running system version, + // then set the keycode_function pointer accordingly + SInt32 MacVersion; + if (Gestalt(gestaltSystemVersion, &MacVersion) == noErr) + { +// SInt32 maj, min, fix; +// Gestalt(gestaltSystemVersionMajor, &maj); // e.g. 10 +// Gestalt(gestaltSystemVersionMinor, &min); // e.g. 4 +// Gestalt(gestaltSystemVersionBugFix, &fix); // e.g. 11 + if(MacVersion >= 0x1050) { // 10.5.0 or later + keycode_function = keycodeToUnicode; + } + else { + keycode_function = keycode_wrap_old; // pre-10.5 mechanism + } + } + // else our default handler will be used (keycode_wrap_old) + + if( !bundle ) { // Earlier versions of this code tried to use weak linking, however it @@ -1539,30 +1558,19 @@ void fl_open_display() { // both TransformProcessType and CPSEnableForegroundOperation, the following // conditional code compiled on 10.2 will still work on newer releases... OSErr err; - + #if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_2 if (TransformProcessType != NULL) { - err = TransformProcessType(&cur_psn, kProcessTransformToForegroundApplication); - } else + err = TransformProcessType(&cur_psn, kProcessTransformToForegroundApplication); + } else #endif // MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_2 - err = CPSEnableForegroundOperation(&cur_psn, 0x03, 0x3C, 0x2C, 0x1103); - + err = CPSEnableForegroundOperation(&cur_psn, 0x03, 0x3C, 0x2C, 0x1103); + if (err == noErr) { - SetFrontProcess( &cur_psn ); + SetFrontProcess( &cur_psn ); } } } - - // imm: keycode handler stub setting - use Gestalt to determine the running system version, - // then set the keycode_function pointer accordingly - keycode_function = keycode_wrap_old; // default to pre-10.5 mechanism - SInt32 MacVersion; - if (Gestalt(gestaltSystemVersion, &MacVersion) == noErr) - { - if(MacVersion >= 0x1050) { // 10.5.0 or later - keycode_function = keycodeToUnicode; - } - } } } @@ -2177,7 +2185,7 @@ void Fl_X::make(Fl_Window* w) wp += 2*bx; hp += 2*by+bt; } - if (!(w->flags() & Fl_Widget::FORCE_POSITION)) { + if (!(w->flags() & Fl_Window::FL_FORCE_POSITION)) { // use the Carbon functions below for default window positioning w->x(xyPos+Fl::x()); w->y(xyPos+Fl::y()); @@ -2224,7 +2232,7 @@ void Fl_X::make(Fl_Window* w) SetWindowClass(x->xid, kFloatingWindowClass); SetWindowActivationScope(x->xid, kWindowActivationScopeAll); } - if (!(w->flags() & Fl_Widget::FORCE_POSITION)) + if (!(w->flags() & Fl_Window::FL_FORCE_POSITION)) { WindowRef pw = Fl_X::first ? Fl_X::first->xid : 0 ; if (w->modal()) { @@ -2404,7 +2412,7 @@ void Fl_Window::resize(int X,int Y,int W,int H) { int is_a_resize = (W != w() || H != h()); // printf("Fl_Winodw::resize(X=%d, Y=%d, W=%d, H=%d), is_a_resize=%d, resize_from_system=%p, this=%p\n", // X, Y, W, H, is_a_resize, resize_from_system, this); - if (X != x() || Y != y()) set_flag(FORCE_POSITION); + if (X != x() || Y != y()) set_flag(FL_FORCE_POSITION); else if (!is_a_resize) return; if ( (resize_from_system!=this) && (!parent()) && shown()) { if (is_a_resize) { @@ -2873,5 +2881,5 @@ void MacUnmapWindow(Fl_Window *w, WindowPtr p) { #endif // FL_DOXYGEN // -// End of "$Id: Fl_mac.cxx 6905 2009-09-27 12:06:35Z matt $". +// End of "$Id: Fl_mac.cxx 6758 2009-04-13 07:32:01Z matt $". // diff --git a/plugins/zynaddsubfx/fltk/src/Fl_win32.cxx b/plugins/zynaddsubfx/fltk/src/Fl_win32.cxx index a97a082da..be96d311f 100644 --- a/plugins/zynaddsubfx/fltk/src/Fl_win32.cxx +++ b/plugins/zynaddsubfx/fltk/src/Fl_win32.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_win32.cxx 6905 2009-09-27 12:06:35Z matt $" +// "$Id: Fl_win32.cxx 6668 2009-02-21 10:18:47Z AlbrechtS $" // // WIN32-specific code for the Fast Light Tool Kit (FLTK). // @@ -398,7 +398,7 @@ int fl_wait(double time_to_wait) { time_to_wait = (time_to_wait > 10000 ? 10000 : time_to_wait); int t_msec = (int) (time_to_wait * 1000.0 + 0.5); - MsgWaitForMultipleObjects(0, NULL, FALSE, t_msec, QS_ALLINPUT); + MsgWaitForMultipleObjects(0, NULL, false, t_msec, QS_ALLINPUT); fl_lock_function(); @@ -1127,7 +1127,7 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar #if USE_COLORMAP case WM_QUERYNEWPALETTE : fl_GetDC(hWnd); - if (fl_select_palette()) InvalidateRect(hWnd, NULL, FALSE); + if (fl_select_palette()) InvalidateRect(hWnd, NULL, false); break; case WM_PALETTECHANGED: @@ -1215,7 +1215,7 @@ int Fl_X::fake_X_wm(const Fl_Window* w,int &X,int &Y, int &bt,int &bx, int &by) r.right = w->x()+w->w(); r.bottom = w->y()+w->h(); // get the decoration rectangle for the desired client rectangle - BOOL ok = AdjustWindowRectEx(&r, style, FALSE, exstyle); + BOOL ok = AdjustWindowRectEx(&r, style, false, exstyle); if (ok) { X = r.left; Y = r.top; @@ -1292,7 +1292,7 @@ void Fl_Window::resize(int X,int Y,int W,int H) { int resize_from_program = (this != resize_bug_fix); if (!resize_from_program) resize_bug_fix = 0; if (X != x() || Y != y()) { - set_flag(FORCE_POSITION); + set_flag(FL_FORCE_POSITION); } else { if (!is_a_resize) return; flags |= SWP_NOMOVE; @@ -1474,7 +1474,7 @@ Fl_X* Fl_X::make(Fl_Window* w) { wp += 2*bx; hp += 2*by+bt; } - if (!(w->flags() & Fl_Widget::FORCE_POSITION)) { + if (!(w->flags() & Fl_Window::FL_FORCE_POSITION)) { xp = yp = CW_USEDEFAULT; } else { if (!Fl::grab()) { @@ -1557,7 +1557,7 @@ Fl_X* Fl_X::make(Fl_Window* w) { CoCreateInstance(CLSID_CActiveIMM, NULL, CLSCTX_INPROC_SERVER, IID_IActiveIMMApp, (void**) &fl_aimm); if (fl_aimm) { - fl_aimm->Activate(TRUE); + fl_aimm->Activate(true); } } #endif // !__GNUC__ || __GNUC__ >= 3 @@ -1916,5 +1916,5 @@ void fl_cleanup_dc_list(void) { // clean up the list #endif // FL_DOXYGEN // -// End of "$Id: Fl_win32.cxx 6905 2009-09-27 12:06:35Z matt $". +// End of "$Id: Fl_win32.cxx 6668 2009-02-21 10:18:47Z AlbrechtS $". // diff --git a/plugins/zynaddsubfx/fltk/src/Fl_x.cxx b/plugins/zynaddsubfx/fltk/src/Fl_x.cxx index 468333831..9cb834a4b 100644 --- a/plugins/zynaddsubfx/fltk/src/Fl_x.cxx +++ b/plugins/zynaddsubfx/fltk/src/Fl_x.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_x.cxx 6905 2009-09-27 12:06:35Z matt $" +// "$Id: Fl_x.cxx 6767 2009-04-16 22:23:36Z AlbrechtS $" // // X specific code for the Fast Light Tool Kit (FLTK). // @@ -1352,7 +1352,7 @@ void Fl_Window::resize(int X,int Y,int W,int H) { int is_a_resize = (W != w() || H != h()); int resize_from_program = (this != resize_bug_fix); if (!resize_from_program) resize_bug_fix = 0; - if (is_a_move && resize_from_program) set_flag(FORCE_POSITION); + if (is_a_move && resize_from_program) set_flag(FL_FORCE_POSITION); else if (!is_a_resize && !is_a_move) return; if (is_a_resize) { Fl_Group::resize(X,Y,W,H); @@ -1430,7 +1430,7 @@ void Fl_X::make_xid(Fl_Window* win, XVisualInfo *visual, Colormap colormap) if (!win->parent() && !Fl::grab()) { // center windows in case window manager does not do anything: #ifdef FL_CENTER_WINDOWS - if (!(win->flags() & Fl_Widget::FORCE_POSITION)) { + if (!(win->flags() & Fl_Window::FL_FORCE_POSITION)) { win->x(X = scr_x+(scr_w-W)/2); win->y(Y = scr_y+(scr_h-H)/2); } @@ -1636,7 +1636,7 @@ void Fl_X::sendxjunk() { prop[1] = 1|2|16; // MWM_FUNC_ALL | MWM_FUNC_RESIZE | MWM_FUNC_MAXIMIZE } - if (w->flags() & Fl_Widget::FORCE_POSITION) { + if (w->flags() & Fl_Window::FL_FORCE_POSITION) { hints->flags |= USPosition; hints->x = w->x(); hints->y = w->y(); @@ -1741,5 +1741,5 @@ void Fl_Window::make_current() { #endif // -// End of "$Id: Fl_x.cxx 6905 2009-09-27 12:06:35Z matt $". +// End of "$Id: Fl_x.cxx 6767 2009-04-16 22:23:36Z AlbrechtS $". // diff --git a/plugins/zynaddsubfx/fltk/src/fl_ask.cxx b/plugins/zynaddsubfx/fltk/src/fl_ask.cxx index 0abb379ad..897f6d8f8 100644 --- a/plugins/zynaddsubfx/fltk/src/fl_ask.cxx +++ b/plugins/zynaddsubfx/fltk/src/fl_ask.cxx @@ -1,5 +1,5 @@ // -// "$Id: fl_ask.cxx 6869 2009-09-13 21:57:46Z AlbrechtS $" +// "$Id: fl_ask.cxx 6763 2009-04-13 22:47:21Z AlbrechtS $" // // Standard dialog functions for the Fast Light Tool Kit (FLTK). // @@ -215,7 +215,8 @@ static int innards(const char* fmt, va_list ap, message_form->show(); // deactivate Fl::grab(), because it is incompatible with Fl::readqueue() Fl_Window* g = Fl::grab(); - if (g) Fl::grab(0); + if (g) // do an alternative grab to avoid floating menus, if possible + Fl::grab(message_form); int r = 0; for (;;) { Fl_Widget *o = Fl::readqueue(); @@ -460,5 +461,5 @@ const char *fl_password(const char *fmt, const char *defstr, ...) { /** @} */ // -// End of "$Id: fl_ask.cxx 6869 2009-09-13 21:57:46Z AlbrechtS $". +// End of "$Id: fl_ask.cxx 6763 2009-04-13 22:47:21Z AlbrechtS $". // diff --git a/plugins/zynaddsubfx/fltk/src/fl_boxtype.cxx b/plugins/zynaddsubfx/fltk/src/fl_boxtype.cxx index 6f8222ee0..32d597cbe 100644 --- a/plugins/zynaddsubfx/fltk/src/fl_boxtype.cxx +++ b/plugins/zynaddsubfx/fltk/src/fl_boxtype.cxx @@ -1,5 +1,5 @@ // -// "$Id: fl_boxtype.cxx 6902 2009-09-27 11:06:56Z matt $" +// "$Id: fl_boxtype.cxx 6716 2009-03-24 01:40:44Z fabien $" // // Box drawing code for the Fast Light Tool Kit (FLTK). // @@ -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_, color_); + draw_box((Fl_Boxtype)t, x_, y_, w_, h_, (Fl_Color)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 { @@ -420,5 +420,5 @@ void Fl_Widget::draw_box(Fl_Boxtype t, int X, int Y, int W, int H, Fl_Color c) c } // -// End of "$Id: fl_boxtype.cxx 6902 2009-09-27 11:06:56Z matt $". +// End of "$Id: fl_boxtype.cxx 6716 2009-03-24 01:40:44Z fabien $". // diff --git a/plugins/zynaddsubfx/fltk/src/fl_color.cxx b/plugins/zynaddsubfx/fltk/src/fl_color.cxx index c1d182227..f611d31ff 100644 --- a/plugins/zynaddsubfx/fltk/src/fl_color.cxx +++ b/plugins/zynaddsubfx/fltk/src/fl_color.cxx @@ -1,5 +1,5 @@ // -// "$Id: fl_color.cxx 6813 2009-07-01 07:32:14Z AlbrechtS $" +// "$Id: fl_color.cxx 6716 2009-03-24 01:40:44Z fabien $" // // Color functions for the Fast Light Tool Kit (FLTK). // @@ -484,5 +484,5 @@ Fl_Color fl_contrast(Fl_Color fg, Fl_Color bg) { @} */ // -// End of "$Id: fl_color.cxx 6813 2009-07-01 07:32:14Z AlbrechtS $". +// End of "$Id: fl_color.cxx 6716 2009-03-24 01:40:44Z fabien $". // diff --git a/plugins/zynaddsubfx/fltk/src/fl_color_win32.cxx b/plugins/zynaddsubfx/fltk/src/fl_color_win32.cxx index 48ce3a9fe..a1564628c 100644 --- a/plugins/zynaddsubfx/fltk/src/fl_color_win32.cxx +++ b/plugins/zynaddsubfx/fltk/src/fl_color_win32.cxx @@ -241,7 +241,7 @@ fl_select_palette(void) fl_palette = CreatePalette(pPal); } if (fl_palette) { - SelectPalette(fl_gc, fl_palette, FALSE); + SelectPalette(fl_gc, fl_palette, false); RealizePalette(fl_gc); } return fl_palette; diff --git a/plugins/zynaddsubfx/fltk/src/fl_dnd_win32.cxx b/plugins/zynaddsubfx/fltk/src/fl_dnd_win32.cxx index 133bb7ae6..c65cec389 100644 --- a/plugins/zynaddsubfx/fltk/src/fl_dnd_win32.cxx +++ b/plugins/zynaddsubfx/fltk/src/fl_dnd_win32.cxx @@ -434,14 +434,14 @@ public: // df->pFiles = sizeof(DROPFILES); // df->pt.x = 0; // df->pt.y = 0; -// df->fNC = FALSE; +// df->fNC = false; // for (int i = 0; i < fl_selection_length[0]; i++) { // if (fl_selection_buffer[0][i] == '\n') { // fl_selection_buffer[0][i] = '\0'; // } // } // -// df->fWide = TRUE; +// df->fWide = true; // l = fl_utf2unicode((unsigned char*)fl_selection_buffer[0], // fl_selection_length[0], (xchar*)(((char*)pMem) // + sizeof(DROPFILES))); diff --git a/plugins/zynaddsubfx/fltk/src/fl_draw.cxx b/plugins/zynaddsubfx/fltk/src/fl_draw.cxx index 5d8e57475..a501c27ee 100644 --- a/plugins/zynaddsubfx/fltk/src/fl_draw.cxx +++ b/plugins/zynaddsubfx/fltk/src/fl_draw.cxx @@ -1,5 +1,5 @@ // -// "$Id: fl_draw.cxx 6845 2009-08-28 20:14:41Z greg.ercolano $" +// "$Id: fl_draw.cxx 6735 2009-04-01 22:11:57Z engelsman $" // // Label drawing code for the Fast Light Tool Kit (FLTK). // @@ -422,31 +422,6 @@ void fl_measure(const char* str, int& w, int& h, int draw_symbols) { h = lines*h; } -/** - This function returns the actual height of the specified \p font - and \p size. Normally the font height should always be 'size', - but with the advent of XFT, there are (currently) complexities - that seem to only be solved by asking the font what its actual - font height is. (See STR#2115) - - This function was originally undocumented in 1.1.x, and was used - only by Fl_Text_Display. We're now documenting it in 1.3.x so that - apps that need precise height info can get it with this function. - - \returns the height of the font in pixels. - - \todo In the future, when the XFT issues are resolved, this function - should simply return the 'size' value. -*/ -int fl_height(int font, int size) { - if ( font == fl_font() && size == fl_size() ) return(fl_height()); - int tf = fl_font(), ts = fl_size(); // save - fl_font(font,size); - int height = fl_height(); - fl_font(tf,ts); // restore - return(height); -} - // -// End of "$Id: fl_draw.cxx 6845 2009-08-28 20:14:41Z greg.ercolano $". +// End of "$Id: fl_draw.cxx 6735 2009-04-01 22:11:57Z engelsman $". // diff --git a/plugins/zynaddsubfx/fltk/src/fl_draw_image_win32.cxx b/plugins/zynaddsubfx/fltk/src/fl_draw_image_win32.cxx index d94e8b3b2..15dce417c 100644 --- a/plugins/zynaddsubfx/fltk/src/fl_draw_image_win32.cxx +++ b/plugins/zynaddsubfx/fltk/src/fl_draw_image_win32.cxx @@ -1,5 +1,5 @@ // -// "$Id: fl_draw_image_win32.cxx 6844 2009-08-24 19:55:29Z AlbrechtS $" +// "$Id: fl_draw_image_win32.cxx 6616 2009-01-01 21:28:26Z matt $" // // WIN32 image drawing code for the Fast Light Tool Kit (FLTK). // @@ -115,10 +115,8 @@ static void innards(const uchar *buf, int X, int Y, int W, int H, int delta, int linedelta, int depth, Fl_Draw_Image_Cb cb, void* userdata) { - char indexed = 0; - #if USE_COLORMAP - indexed = (fl_palette != 0); + char indexed = (fl_palette != 0); #endif if (depth==0) depth = 3; @@ -321,5 +319,5 @@ void fl_rectf(int x, int y, int w, int h, uchar r, uchar g, uchar b) { } // -// End of "$Id: fl_draw_image_win32.cxx 6844 2009-08-24 19:55:29Z AlbrechtS $". +// End of "$Id: fl_draw_image_win32.cxx 6616 2009-01-01 21:28:26Z matt $". // diff --git a/plugins/zynaddsubfx/fltk/src/fl_font_win32.cxx b/plugins/zynaddsubfx/fltk/src/fl_font_win32.cxx index fc708a8ca..db7ef6b3c 100644 --- a/plugins/zynaddsubfx/fltk/src/fl_font_win32.cxx +++ b/plugins/zynaddsubfx/fltk/src/fl_font_win32.cxx @@ -44,8 +44,8 @@ Fl_Font_Descriptor::Fl_Font_Descriptor(const char* name, Fl_Fontsize size) { fl_angle_*10, // base-line orientation angle weight, italic, - FALSE, // underline attribute flag - FALSE, // strikeout attribute flag + false, // underline attribute flag + false, // strikeout attribute flag DEFAULT_CHARSET, // character set identifier OUT_DEFAULT_PRECIS, // output precision CLIP_DEFAULT_PRECIS,// clipping precision diff --git a/plugins/zynaddsubfx/fltk/src/fl_font_xft.cxx b/plugins/zynaddsubfx/fltk/src/fl_font_xft.cxx index 616331302..c101675a3 100644 --- a/plugins/zynaddsubfx/fltk/src/fl_font_xft.cxx +++ b/plugins/zynaddsubfx/fltk/src/fl_font_xft.cxx @@ -1,5 +1,5 @@ // -// "$Id: fl_font_xft.cxx 6862 2009-09-13 10:15:42Z matt $" +// "$Id: fl_font_xft.cxx 6779 2009-04-24 09:28:30Z yuri $" // // Xft font code for the Fast Light Tool Kit (FLTK). // @@ -128,6 +128,8 @@ void fl_font(Fl_Font fnum, Fl_Fontsize size, int angle) { fl_fontsize = f; #if XFT_MAJOR < 2 fl_xfont = f->font->u.core.font; +#else + fl_xfont = NULL; // invalidate #endif // XFT_MAJOR < 2 fl_xftfont = (void*)f->font; } @@ -413,6 +415,19 @@ static XFontStruct* load_xfont_for_xft2(void) { default: name--; // no prefix, restore name } + // map generic Xft names to customary XLFD faces + if (!strcmp(name, "sans")) { + name = "helvetica"; + } else if (!strcmp(name, "mono")) { + name = "courier"; + } else if (!strcmp(name, "serif")) { + name = "times"; + } else if (!strcmp(name, "screen")) { + name = "lucidatypewriter"; + } else if (!strcmp(name, "dingbats")) { + name = "zapf dingbats"; + } + // first, we do a query with no prefered size, to see if the font exists at all snprintf(xlfd, 128, "-*-*%s*-%s-%c-*--*-*-*-*-*-*-*-*", name, weight, slant); // make up xlfd style name xgl_font = XLoadQueryFont(fl_display, xlfd); @@ -620,5 +635,5 @@ void fl_rtl_draw(const char* c, int n, int x, int y) { #endif // -// End of "$Id: fl_font_xft.cxx 6862 2009-09-13 10:15:42Z matt $" +// End of "$Id: fl_font_xft.cxx 6779 2009-04-24 09:28:30Z yuri $" // diff --git a/plugins/zynaddsubfx/fltk/src/fl_open_uri.cxx b/plugins/zynaddsubfx/fltk/src/fl_open_uri.cxx index e882e1936..ea97de6c9 100644 --- a/plugins/zynaddsubfx/fltk/src/fl_open_uri.cxx +++ b/plugins/zynaddsubfx/fltk/src/fl_open_uri.cxx @@ -1,5 +1,5 @@ // -// "$Id: fl_open_uri.cxx 6901 2009-09-26 13:56:04Z matt $" +// "$Id: fl_open_uri.cxx 6641 2009-01-20 11:10:29Z fabien $" // // fl_open_uri() code for FLTK. // @@ -117,9 +117,9 @@ fl_open_uri(const char *uri, char *msg, int msglen) { #elif defined(__APPLE__) char *argv[3]; // Command-line arguments - argv[0] = (char*)"open"; - argv[1] = (char*)uri; - argv[2] = (char*)0; + argv[0] = "open"; + argv[1] = (char *)uri; + argv[2] = 0; if (msg) snprintf(msg, msglen, "open %s", uri); @@ -364,5 +364,5 @@ int main(int argc, char **argv) { // -// End of "$Id: fl_open_uri.cxx 6901 2009-09-26 13:56:04Z matt $". +// End of "$Id: fl_open_uri.cxx 6641 2009-01-20 11:10:29Z fabien $". // diff --git a/plugins/zynaddsubfx/fltk/src/fl_shortcut.cxx b/plugins/zynaddsubfx/fltk/src/fl_shortcut.cxx index 56b03241d..f2f400d8a 100644 --- a/plugins/zynaddsubfx/fltk/src/fl_shortcut.cxx +++ b/plugins/zynaddsubfx/fltk/src/fl_shortcut.cxx @@ -1,5 +1,5 @@ // -// "$Id: fl_shortcut.cxx 6878 2009-09-17 22:12:24Z matt $" +// "$Id: fl_shortcut.cxx 6760 2009-04-13 11:32:58Z matt $" // // Shortcut support routines for the Fast Light Tool Kit (FLTK). // @@ -39,7 +39,7 @@ // It also checks against the first character of Fl::event_text(), // and zero for FL_SHIFT means "don't care". // This allows punctuation shortcuts like "#" to work (rather than -// calling it "shift+3" on a US keyboard) +// calling it "shift+3") #include #include @@ -58,12 +58,19 @@ be confused with Fl_Widget::test_shortcut(). */ -int Fl::test_shortcut(Fl_Shortcut shortcut) { +int Fl::test_shortcut(int shortcut) { if (!shortcut) return 0; - Fl_Char v = shortcut & FL_KEY_MASK; - if (fl_tolower(v)!=v) { - shortcut |= FL_SHIFT; + int v = shortcut & 0xffff; +#ifdef __APPLE__ + if (v > 32 && v < 0x7f || v >= 0x80 && v <= 0xff) { +#else + // most X11 use MSWindows Latin-1 if set to Western encoding, so 0x80 to 0xa0 are defined + if (v > 32 && v < 0x7f || v >= 0x80 && v <= 0xff) { +#endif + if (isupper(v)) { + shortcut |= FL_SHIFT; + } } int shift = Fl::event_state(); @@ -74,18 +81,17 @@ int Fl::test_shortcut(Fl_Shortcut shortcut) { // these three must always be correct: if (mismatch&(FL_META|FL_ALT|FL_CTRL)) return 0; - Fl_Char key = shortcut & FL_KEY_MASK; + int key = shortcut & 0xffff; // if shift is also correct, check for exactly equal keysyms: if (!(mismatch&(FL_SHIFT)) && key == Fl::event_key()) return 1; - // try matching utf8, ignore shift: - Fl_Char firstChar = fl_utf8decode(Fl::event_text(), Fl::event_text()+Fl::event_length(), 0); - if (key==firstChar) return 1; + // try matching ascii, ignore shift: + if (key == event_text()[0]) return 1; // kludge so that Ctrl+'_' works (as opposed to Ctrl+'^_'): if ((shift&FL_CTRL) && key >= 0x3f && key <= 0x5F - && firstChar==(key^0x40)) return 1; // firstChar should be within a-z + && event_text()[0]==(key^0x40)) return 1; return 0; } @@ -174,7 +180,7 @@ static Keyname table[] = { \param [in] shortcut the integer value containing the ascii charcter or extended keystroke plus modifiers \return a pointer to a static buffer containing human readable text for the shortcut */ -const char* fl_shortcut_label(Fl_Shortcut shortcut) { +const char* fl_shortcut_label(int shortcut) { return fl_shortcut_label(shortcut, 0L); } @@ -184,17 +190,23 @@ const char* fl_shortcut_label(Fl_Shortcut shortcut) { \param [in] shortcut the integer value containing the ascii charcter or extended keystroke plus modifiers \param [in] eom if this pointer is set, it will receive a pointer to the end of the modifier text \return a pointer to a static buffer containing human readable text for the shortcut - \see fl_shortcut_label(Fl_Shortcut shortcut) + \see fl_shortcut_label(int shortcut) */ -const char* fl_shortcut_label(Fl_Shortcut shortcut, const char **eom) { +const char* fl_shortcut_label(int shortcut, const char **eom) { static char buf[20]; char *p = buf; if (eom) *eom = p; if (!shortcut) {*p = 0; return buf;} // fix upper case shortcuts - Fl_Char v = shortcut & FL_KEY_MASK; - if (fl_tolower(v)!=v) { - shortcut |= FL_SHIFT; + int v = shortcut & 0xffff; +#ifdef __APPLE__ + if (v > 32 && v < 0x7f || v >= 0x80 && v <= 0xff) { +#else + if (v > 32 && v < 0x7f || v >= 0xa0 && v <= 0xff) { +#endif + if (isupper(v)) { + shortcut |= FL_SHIFT; + } } #ifdef __APPLE__ // this column contains utf8 characters - v @@ -209,7 +221,7 @@ const char* fl_shortcut_label(Fl_Shortcut shortcut, const char **eom) { if (shortcut & FL_CTRL) {strcpy(p,"Ctrl+"); p += 5;} #endif // __APPLE__ if (eom) *eom = p; - Fl_Char key = shortcut & FL_KEY_MASK; + int key = shortcut & 0xFFFF; #if defined(WIN32) || defined(__APPLE__) // if not X if (key >= FL_F && key <= FL_F_Last) { *p++ = 'F'; @@ -222,7 +234,7 @@ const char* fl_shortcut_label(Fl_Shortcut shortcut, const char **eom) { while (a < b) { int c = (a+b)/2; if (table[c].key == key) { - if (p > buf) { + if (p > buf) { strcpy(p,table[c].name); return buf; } else { @@ -240,7 +252,7 @@ const char* fl_shortcut_label(Fl_Shortcut shortcut, const char **eom) { *p++ = uchar(key & 127); } else { // if none found, use the keystroke as a match: - p += fl_utf8encode(fl_toupper(key), p); + *p++ = uchar(toupper(key & 255)); } } *p = 0; @@ -250,11 +262,7 @@ const char* fl_shortcut_label(Fl_Shortcut shortcut, const char **eom) { if (key == FL_Enter || key == '\r') q="Enter"; // don't use Xlib's "Return": else if (key > 32 && key < 0x100) q = 0; else q = XKeysymToString(key); - if (!q) { - p += fl_utf8encode(fl_toupper(key), p); - *p = 0; - return buf; - } + if (!q) {*p++ = uchar(toupper(key & 255)); *p = 0; return buf;} if (p > buf) { strcpy(p,q); return buf; @@ -270,9 +278,9 @@ const char* fl_shortcut_label(Fl_Shortcut shortcut, const char **eom) { /** Emulation of XForms named shortcuts. */ -Fl_Shortcut fl_old_shortcut(const char* s) { +int fl_old_shortcut(const char* s) { if (!s || !*s) return 0; - Fl_Shortcut n = 0; + int n = 0; if (*s == '#') {n |= FL_ALT; s++;} if (*s == '+') {n |= FL_SHIFT; s++;} if (*s == '^') {n |= FL_CTRL; s++;} @@ -282,14 +290,14 @@ Fl_Shortcut fl_old_shortcut(const char* s) { // Tests for &x shortcuts in button labels: -Fl_Shortcut Fl_Widget::label_shortcut(const char *t) { +char Fl_Widget::label_shortcut(const char *t) { if (!t) return 0; for (;;) { if (*t==0) return 0; if (*t=='&') { - Fl_Shortcut s = fl_utf8decode(t+1, 0, 0); + char s = t[1]; if (s==0) return 0; - else if (s==(Fl_Char)'&') t++; + else if (s=='&') t++; else return s; } t++; @@ -301,9 +309,8 @@ int Fl_Widget::test_shortcut(const char *t) { // on MSWindows, users expect shortcuts to work only when the Alt modifier is pressed if (Fl::event_state(FL_ALT)==0) return 0; #endif - if (!t) return 0; - Fl_Shortcut c = fl_utf8decode(Fl::event_text(), Fl::event_text()+Fl::event_length(), 0); - if (!c) return 0; + char c = Fl::event_text()[0]; + if (!c || !t) return 0; if (c == label_shortcut(t)) return 1; return 0; @@ -315,5 +322,5 @@ int Fl_Widget::test_shortcut() { } // -// End of "$Id: fl_shortcut.cxx 6878 2009-09-17 22:12:24Z matt $". +// End of "$Id: fl_shortcut.cxx 6760 2009-04-13 11:32:58Z matt $". // diff --git a/plugins/zynaddsubfx/fltk/src/fl_utf.c b/plugins/zynaddsubfx/fltk/src/fl_utf.c index cc2059ce5..1362ef755 100644 --- a/plugins/zynaddsubfx/fltk/src/fl_utf.c +++ b/plugins/zynaddsubfx/fltk/src/fl_utf.c @@ -138,11 +138,11 @@ unsigned fl_utf8decode(const char* p, const char* end, int* len) { unsigned char c = *(unsigned char*)p; if (c < 0x80) { - if (len) *len = 1; + *len = 1; return c; #if ERRORS_TO_CP1252 } else if (c < 0xa0) { - if (len) *len = 1; + *len = 1; return cp1252[c-0x80]; #endif } else if (c < 0xc2) { @@ -150,7 +150,7 @@ unsigned fl_utf8decode(const char* p, const char* end, int* len) } if (p+1 >= end || (p[1]&0xc0) != 0x80) goto FAIL; if (c < 0xe0) { - if (len) *len = 2; + *len = 2; return ((p[0] & 0x1f) << 6) + ((p[1] & 0x3f)); @@ -171,7 +171,7 @@ unsigned fl_utf8decode(const char* p, const char* end, int* len) } else if (c < 0xf0) { UTF8_3: if (p+2 >= end || (p[2]&0xc0) != 0x80) goto FAIL; - if (len) *len = 3; + *len = 3; return ((p[0] & 0x0f) << 12) + ((p[1] & 0x3f) << 6) + @@ -182,7 +182,7 @@ unsigned fl_utf8decode(const char* p, const char* end, int* len) } else if (c < 0xf4) { UTF8_4: if (p+3 >= end || (p[2]&0xc0) != 0x80 || (p[3]&0xc0) != 0x80) goto FAIL; - if (len) *len = 4; + *len = 4; #if STRICT_RFC3629 /* RFC 3629 says all codes ending in fffe or ffff are illegal: */ if ((p[1]&0xf)==0xf && @@ -199,7 +199,7 @@ unsigned fl_utf8decode(const char* p, const char* end, int* len) goto UTF8_4; } else { FAIL: - if (len) *len = 1; + *len = 1; #if ERRORS_TO_ISO8859_1 return c; #else diff --git a/plugins/zynaddsubfx/fltk/src/screen_xywh.cxx b/plugins/zynaddsubfx/fltk/src/screen_xywh.cxx index fa7e1e139..adfaa1dd9 100644 --- a/plugins/zynaddsubfx/fltk/src/screen_xywh.cxx +++ b/plugins/zynaddsubfx/fltk/src/screen_xywh.cxx @@ -58,7 +58,7 @@ static fl_gmi_func fl_gmi = NULL; // used to get a proc pointer for GetMonitorIn static RECT screens[16]; static BOOL CALLBACK screen_cb(HMONITOR mon, HDC, LPRECT r, LPARAM) { - if (num_screens >= 16) return TRUE; + if (num_screens >= 16) return true; MONITORINFO mi; mi.cbSize = sizeof(mi); @@ -69,7 +69,7 @@ static BOOL CALLBACK screen_cb(HMONITOR mon, HDC, LPRECT r, LPARAM) { screens[num_screens] = mi.rcWork; num_screens ++; } - return TRUE; + return true; } static void screen_init() {