diff options
Diffstat (limited to 'FL')
152 files changed, 2843 insertions, 3743 deletions
diff --git a/FL/Enumerations.H b/FL/Enumerations.H index cc718aa34..fad9dd964 100644 --- a/FL/Enumerations.H +++ b/FL/Enumerations.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Enumerations for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2020 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /** \file @@ -51,21 +49,21 @@ The major release version of this FLTK library. \see FL_VERSION */ -#define FL_MAJOR_VERSION 1 +#define FL_MAJOR_VERSION 1 /** The minor release version for this library. FLTK remains mostly source-code compatible between minor version changes. */ -#define FL_MINOR_VERSION 4 +#define FL_MINOR_VERSION 4 /** The patch version for this library. FLTK remains binary compatible between patches. */ -#define FL_PATCH_VERSION 0 +#define FL_PATCH_VERSION 0 /** The FLTK version number as a \em double. @@ -88,9 +86,9 @@ \see FL_API_VERSION \see Fl::api_version() */ -#define FL_VERSION ( (double)FL_MAJOR_VERSION + \ - (double)FL_MINOR_VERSION * 0.01 + \ - (double)FL_PATCH_VERSION * 0.0001 ) +#define FL_VERSION ( (double)FL_MAJOR_VERSION + \ + (double)FL_MINOR_VERSION * 0.01 + \ + (double)FL_PATCH_VERSION * 0.0001 ) /** The FLTK API version number as an \em int. @@ -127,7 +125,7 @@ \verbatim FLTK Version FL_API_VERSION FL_ABI_VERSION FL_VERSION (deprecated) 1.3.0 10300 10300 1.0300 - 1.3.4 10304 10300 1.0304 + 1.3.4 10304 10300 1.0304 \endverbatim Version 1.2.3 is actually stored as 10203 to allow for more than 9 @@ -152,7 +150,7 @@ This is done to prevent users from defining an illegal ABI version. Rule: FL_MAJOR_VERSION * 10000 + FL_MINOR_VERSION * 100 - <= FL_ABI_VERSION <= FL_API_VERSION. + <= FL_ABI_VERSION <= FL_API_VERSION. Example (FLTK 1.3.4): @@ -174,19 +172,19 @@ #endif -/*@}*/ // group: Version Numbers +/*@}*/ // group: Version Numbers /** Every time a user moves the mouse pointer, clicks a button, or presses a key, an event is generated and sent to your application. Events can also come from other programs like the window manager. - - Events are identified by the integer argument passed to the - Fl_Widget::handle() virtual method. Other information about the - most recent event is stored in static locations and acquired by - calling the Fl::event_*() methods. This static information remains - valid until the next event is read from the window system, so it + + Events are identified by the integer argument passed to the + Fl_Widget::handle() virtual method. Other information about the + most recent event is stored in static locations and acquired by + calling the Fl::event_*() methods. This static information remains + valid until the next event is read from the window system, so it is ok to look at it outside of the handle() method. Event numbers can be converted to their actual names using the @@ -195,203 +193,203 @@ \see Fl::event_text(), Fl::event_key(), class Fl:: */ // DEV NOTE: Keep this list in sync with FL/names.h -enum Fl_Event { // events +enum Fl_Event { // events /** No event. */ - FL_NO_EVENT = 0, + FL_NO_EVENT = 0, /** A mouse button has gone down with the mouse pointing at this - widget. You can find out what button by calling Fl::event_button(). + widget. You can find out what button by calling Fl::event_button(). You find out the mouse position by calling Fl::event_x() and Fl::event_y(). - A widget indicates that it "wants" the mouse click by returning non-zero - from its Fl_Widget::handle() method. It will then become the - Fl::pushed() widget and will get FL_DRAG and the matching FL_RELEASE events. - If Fl_Widget::handle() returns zero then FLTK will try sending the FL_PUSH - to another widget. + A widget indicates that it "wants" the mouse click by returning non-zero + from its Fl_Widget::handle() method. It will then become the + Fl::pushed() widget and will get FL_DRAG and the matching FL_RELEASE events. + If Fl_Widget::handle() returns zero then FLTK will try sending the FL_PUSH + to another widget. */ - FL_PUSH = 1, + FL_PUSH = 1, - /** A mouse button has been released. You can find out what button by + /** A mouse button has been released. You can find out what button by calling Fl::event_button(). - In order to receive the FL_RELEASE event, the widget must return + In order to receive the FL_RELEASE event, the widget must return non-zero when handling FL_PUSH. */ - FL_RELEASE = 2, + FL_RELEASE = 2, /** The mouse has been moved to point at this widget. This can be used for highlighting feedback. If a widget wants to highlight or otherwise track the mouse, it indicates this by returning non-zero from its handle() method. It then - becomes the Fl::belowmouse() widget and will receive + becomes the Fl::belowmouse() widget and will receive FL_MOVE and FL_LEAVE events. */ - FL_ENTER = 3, + FL_ENTER = 3, /** The mouse has moved out of the widget. - In order to receive the FL_LEAVE event, the widget must + In order to receive the FL_LEAVE event, the widget must return non-zero when handling FL_ENTER. */ - FL_LEAVE = 4, + FL_LEAVE = 4, - /** The mouse has moved with a button held down. The current button state - is in Fl::event_state(). The mouse position is in Fl::event_x() and + /** The mouse has moved with a button held down. The current button state + is in Fl::event_state(). The mouse position is in Fl::event_x() and Fl::event_y(). - In order to receive FL_DRAG events, the widget must return non-zero + In order to receive FL_DRAG events, the widget must return non-zero when handling FL_PUSH. */ - FL_DRAG = 5, + FL_DRAG = 5, /** This indicates an <I>attempt</I> to give a widget the keyboard focus. - If a widget wants the focus, it should change itself to display the + If a widget wants the focus, it should change itself to display the fact that it has the focus, and return non-zero from its handle() method. - It then becomes the Fl::focus() widget and gets FL_KEYDOWN, FL_KEYUP, + It then becomes the Fl::focus() widget and gets FL_KEYDOWN, FL_KEYUP, and FL_UNFOCUS events. - The focus will change either because the window manager changed which - window gets the focus, or because the user tried to navigate using tab, - arrows, or other keys. You can check Fl::event_key() to figure out why - it moved. For navigation it will be the key pressed and for interaction + The focus will change either because the window manager changed which + window gets the focus, or because the user tried to navigate using tab, + arrows, or other keys. You can check Fl::event_key() to figure out why + it moved. For navigation it will be the key pressed and for interaction with the window manager it will be zero. */ - FL_FOCUS = 6, - - /** This event is sent to the previous Fl::focus() widget when another + FL_FOCUS = 6, + + /** This event is sent to the previous Fl::focus() widget when another widget gets the focus or the window loses focus. */ - FL_UNFOCUS = 7, + FL_UNFOCUS = 7, - /** A key was pressed (FL_KEYDOWN) or released (FL_KEYUP). + /** A key was pressed (FL_KEYDOWN) or released (FL_KEYUP). Fl_KEYBOARD is a synonym for FL_KEYDOWN. The key can be found in Fl::event_key(). - The text that the key should insert can be found with Fl::event_text() + The text that the key should insert can be found with Fl::event_text() and its length is in Fl::event_length(). If you use the key handle() - should return 1. If you return zero then FLTK assumes you ignored the - key and will then attempt to send it to a parent widget. If none of + should return 1. If you return zero then FLTK assumes you ignored the + key and will then attempt to send it to a parent widget. If none of them want it, it will change the event into a FL_SHORTCUT event. To receive FL_KEYBOARD events you must also respond to the FL_FOCUS and FL_UNFOCUS events. - If you are writing a text-editing widget you may also want to call - the Fl::compose() function to translate individual keystrokes into + If you are writing a text-editing widget you may also want to call + the Fl::compose() function to translate individual keystrokes into non-ASCII characters. - FL_KEYUP events are sent to the widget that currently has focus. This - is not necessarily the same widget that received the corresponding + FL_KEYUP events are sent to the widget that currently has focus. This + is not necessarily the same widget that received the corresponding FL_KEYDOWN event because focus may have changed between events. */ - FL_KEYDOWN = 8, + FL_KEYDOWN = 8, /** Equivalent to FL_KEYDOWN. \see FL_KEYDOWN */ - FL_KEYBOARD = 8, - + FL_KEYBOARD = 8, + /** Key release event. \see FL_KEYDOWN */ - FL_KEYUP = 9, + FL_KEYUP = 9, /** The user clicked the close button of a window. This event is used internally only to trigger the callback of - Fl_Window derived classed. The default callback closes the + Fl_Window derived classed. The default callback closes the window calling Fl_Window::hide(). */ - FL_CLOSE = 10, + FL_CLOSE = 10, - /** The mouse has moved without any mouse buttons held down. + /** The mouse has moved without any mouse buttons held down. This event is sent to the Fl::belowmouse() widget. - In order to receive FL_MOVE events, the widget must return + In order to receive FL_MOVE events, the widget must return non-zero when handling FL_ENTER. */ - FL_MOVE = 11, + FL_MOVE = 11, /** If the Fl::focus() widget is zero or ignores an FL_KEYBOARD - event then FLTK tries sending this event to every widget it - can, until one of them returns non-zero. FL_SHORTCUT is first - sent to the Fl::belowmouse() widget, then its parents and siblings, - and eventually to every widget in the window, trying to find an - object that returns non-zero. FLTK tries really hard to not to ignore + event then FLTK tries sending this event to every widget it + can, until one of them returns non-zero. FL_SHORTCUT is first + sent to the Fl::belowmouse() widget, then its parents and siblings, + and eventually to every widget in the window, trying to find an + object that returns non-zero. FLTK tries really hard to not to ignore any keystrokes! - You can also make "global" shortcuts by using Fl::add_handler(). A - global shortcut will work no matter what windows are displayed or + You can also make "global" shortcuts by using Fl::add_handler(). A + global shortcut will work no matter what windows are displayed or which one has the focus. */ - FL_SHORTCUT = 12, + FL_SHORTCUT = 12, - /** This widget is no longer active, due to Fl_Widget::deactivate() - being called on it or one of its parents. Fl_Widget::active() may + /** This widget is no longer active, due to Fl_Widget::deactivate() + being called on it or one of its parents. Fl_Widget::active() may still be true after this, the widget is only active if Fl_Widget::active() is true on it and all its parents (use Fl_Widget::active_r() to check this). */ - FL_DEACTIVATE = 13, + FL_DEACTIVATE = 13, - /** This widget is now active, due to Fl_Widget::activate() being + /** This widget is now active, due to Fl_Widget::activate() being called on it or one of its parents. */ - FL_ACTIVATE = 14, + FL_ACTIVATE = 14, - /** This widget is no longer visible, due to Fl_Widget::hide() being - called on it or one of its parents, or due to a parent window being - minimized. Fl_Widget::visible() may still be true after this, but the - widget is visible only if visible() is true for it and all its + /** This widget is no longer visible, due to Fl_Widget::hide() being + called on it or one of its parents, or due to a parent window being + minimized. Fl_Widget::visible() may still be true after this, but the + widget is visible only if visible() is true for it and all its parents (use Fl_Widget::visible_r() to check this). */ - FL_HIDE = 15, + FL_HIDE = 15, - /** This widget is visible again, due to Fl_Widget::show() being called on - it or one of its parents, or due to a parent window being restored. - Child Fl_Windows respond to this by actually creating the window if not - done already, so if you subclass a window, be sure to pass FL_SHOW + /** This widget is visible again, due to Fl_Widget::show() being called on + it or one of its parents, or due to a parent window being restored. + Child Fl_Windows respond to this by actually creating the window if not + done already, so if you subclass a window, be sure to pass FL_SHOW to the base class Fl_Widget::handle() method! */ - FL_SHOW = 16, + FL_SHOW = 16, - /** You should get this event some time after you call Fl::paste(). - The contents of Fl::event_text() is the text to insert and the number + /** You should get this event some time after you call Fl::paste(). + The contents of Fl::event_text() is the text to insert and the number of characters is in Fl::event_length(). */ - FL_PASTE = 17, + FL_PASTE = 17, - /** The Fl::selection_owner() will get this event before the selection is - moved to another widget. This indicates that some other widget or program - has claimed the selection. Motif programs used this to clear the selection + /** The Fl::selection_owner() will get this event before the selection is + moved to another widget. This indicates that some other widget or program + has claimed the selection. Motif programs used this to clear the selection indication. Most modern programs ignore this. */ - FL_SELECTIONCLEAR = 18, + FL_SELECTIONCLEAR = 18, /** The user has moved the mouse wheel. The Fl::event_dx() and Fl::event_dy() methods can be used to find the amount to scroll horizontally and vertically. */ - FL_MOUSEWHEEL = 19, + FL_MOUSEWHEEL = 19, - /** The mouse has been moved to point at this widget. A widget that is - interested in receiving drag'n'drop data must return 1 to receive + /** The mouse has been moved to point at this widget. A widget that is + interested in receiving drag'n'drop data must return 1 to receive FL_DND_DRAG, FL_DND_LEAVE and FL_DND_RELEASE events. */ - FL_DND_ENTER = 20, + FL_DND_ENTER = 20, - /** The mouse has been moved inside a widget while dragging data. A - widget that is interested in receiving drag'n'drop data should + /** The mouse has been moved inside a widget while dragging data. A + widget that is interested in receiving drag'n'drop data should indicate the possible drop position. */ - FL_DND_DRAG = 21, + FL_DND_DRAG = 21, /** The mouse has moved out of the widget. */ - FL_DND_LEAVE = 22, + FL_DND_LEAVE = 22, - /** The user has released the mouse button dropping data into the widget. - If the widget returns 1, it will receive the data in the immediately + /** The user has released the mouse button dropping data into the widget. + If the widget returns 1, it will receive the data in the immediately following FL_PASTE event. */ - FL_DND_RELEASE = 23, + FL_DND_RELEASE = 23, /** The screen configuration (number, positions) was changed. Use Fl::add_handler() to be notified of this event. */ @@ -405,7 +403,7 @@ enum Fl_Event { // events Fl::event_x() and Fl::event_y() are set as well. This event is sent to the window's handle method. */ - FL_ZOOM_GESTURE = 26, + FL_ZOOM_GESTURE = 26, /** A zoom event (ctrl/+/-/0/ or cmd/+/-/0/) was processed. Use Fl::add_handler() to be notified of this event. */ @@ -421,17 +419,17 @@ enum Fl_Event { // events \todo doxygen comments for values are incomplete and maybe wrong or unclear */ enum Fl_When { // Fl_Widget::when(): - FL_WHEN_NEVER = 0, ///< Never call the callback - FL_WHEN_CHANGED = 1, ///< Do the callback only when the widget value changes - FL_WHEN_NOT_CHANGED = 2, ///< Do the callback whenever the user interacts with the widget - FL_WHEN_RELEASE = 4, ///< Do the callback when the button or key is released and the value changes - FL_WHEN_RELEASE_ALWAYS= 6, ///< Do the callback when the button or key is released, even if the value doesn't change - FL_WHEN_ENTER_KEY = 8, ///< Do the callback when the user presses the ENTER key and the value changes - FL_WHEN_ENTER_KEY_ALWAYS=10, ///< Do the callback when the user presses the ENTER key, even if the value doesn't change - FL_WHEN_ENTER_KEY_CHANGED=11 ///< ? + FL_WHEN_NEVER = 0, ///< Never call the callback + FL_WHEN_CHANGED = 1, ///< Do the callback only when the widget value changes + FL_WHEN_NOT_CHANGED = 2, ///< Do the callback whenever the user interacts with the widget + FL_WHEN_RELEASE = 4, ///< Do the callback when the button or key is released and the value changes + FL_WHEN_RELEASE_ALWAYS= 6, ///< Do the callback when the button or key is released, even if the value doesn't change + FL_WHEN_ENTER_KEY = 8, ///< Do the callback when the user presses the ENTER key and the value changes + FL_WHEN_ENTER_KEY_ALWAYS=10, ///< Do the callback when the user presses the ENTER key, even if the value doesn't change + FL_WHEN_ENTER_KEY_CHANGED=11 ///< ? }; -/*@}*/ // group: When Conditions +/*@}*/ // group: When Conditions /** \name Mouse and Keyboard Events @@ -441,53 +439,53 @@ enum Fl_When { // Fl_Widget::when(): \see Fl::event_key() and Fl::get_key(int) (use ASCII letters for all other keys): \todo FL_Button and FL_key... constants could be structured better - (use an enum or some doxygen grouping ?) + (use an enum or some doxygen grouping ?) */ /*@{*/ // 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. -#define FL_Iso_Key 0xff0c ///< The additional key of ISO keyboards. -#define FL_Enter 0xff0d ///< The enter key. -#define FL_Pause 0xff13 ///< The pause key. -#define FL_Scroll_Lock 0xff14 ///< The scroll lock key. -#define FL_Escape 0xff1b ///< The escape key. +#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. +#define FL_Iso_Key 0xff0c ///< The additional key of ISO keyboards. +#define FL_Enter 0xff0d ///< The enter key. +#define FL_Pause 0xff13 ///< The pause key. +#define FL_Scroll_Lock 0xff14 ///< The scroll lock key. +#define FL_Escape 0xff1b ///< The escape key. #define FL_Kana 0xff2e ///< The Kana key of JIS keyboards. #define FL_Eisu 0xff2f ///< The Eisu key of JIS keyboards. #define FL_Yen 0xff30 ///< The Yen key of JIS keyboards. #define FL_JIS_Underscore 0xff31 ///< The underscore key of JIS keyboards. -#define FL_Home 0xff50 ///< The home key. -#define FL_Left 0xff51 ///< The left arrow key. -#define FL_Up 0xff52 ///< The up arrow key. -#define FL_Right 0xff53 ///< The right arrow key. -#define FL_Down 0xff54 ///< The down arrow key. -#define FL_Page_Up 0xff55 ///< The page-up key. -#define FL_Page_Down 0xff56 ///< The page-down key. -#define FL_End 0xff57 ///< The end key. -#define FL_Print 0xff61 ///< The print (or print-screen) key. -#define FL_Insert 0xff63 ///< The insert key. -#define FL_Menu 0xff67 ///< The menu key. -#define FL_Help 0xff68 ///< The 'help' key on Mac keyboards -#define FL_Num_Lock 0xff7f ///< The num lock key. -#define FL_KP 0xff80 ///< One of the keypad numbers; use FL_KP + 'n' for digit n. -#define FL_KP_Enter 0xff8d ///< The enter key on the keypad, same as Fl_KP+'\\r'. -#define FL_KP_Last 0xffbd ///< The last keypad key; use to range-check keypad. -#define FL_F 0xffbd ///< One of the function keys; use FL_F + n for function key n. -#define FL_F_Last 0xffe0 ///< The last function key; use to range-check function keys. -#define FL_Shift_L 0xffe1 ///< The lefthand shift key. -#define FL_Shift_R 0xffe2 ///< The righthand shift key. -#define FL_Control_L 0xffe3 ///< The lefthand control key. -#define FL_Control_R 0xffe4 ///< The righthand control key. -#define FL_Caps_Lock 0xffe5 ///< The caps lock key. -#define FL_Meta_L 0xffe7 ///< The left meta/Windows key. -#define FL_Meta_R 0xffe8 ///< The right meta/Windows key. -#define FL_Alt_L 0xffe9 ///< The left alt key. -#define FL_Alt_R 0xffea ///< The right alt key. -#define FL_Delete 0xffff ///< The delete key. +#define FL_Home 0xff50 ///< The home key. +#define FL_Left 0xff51 ///< The left arrow key. +#define FL_Up 0xff52 ///< The up arrow key. +#define FL_Right 0xff53 ///< The right arrow key. +#define FL_Down 0xff54 ///< The down arrow key. +#define FL_Page_Up 0xff55 ///< The page-up key. +#define FL_Page_Down 0xff56 ///< The page-down key. +#define FL_End 0xff57 ///< The end key. +#define FL_Print 0xff61 ///< The print (or print-screen) key. +#define FL_Insert 0xff63 ///< The insert key. +#define FL_Menu 0xff67 ///< The menu key. +#define FL_Help 0xff68 ///< The 'help' key on Mac keyboards +#define FL_Num_Lock 0xff7f ///< The num lock key. +#define FL_KP 0xff80 ///< One of the keypad numbers; use FL_KP + 'n' for digit n. +#define FL_KP_Enter 0xff8d ///< The enter key on the keypad, same as Fl_KP+'\\r'. +#define FL_KP_Last 0xffbd ///< The last keypad key; use to range-check keypad. +#define FL_F 0xffbd ///< One of the function keys; use FL_F + n for function key n. +#define FL_F_Last 0xffe0 ///< The last function key; use to range-check function keys. +#define FL_Shift_L 0xffe1 ///< The lefthand shift key. +#define FL_Shift_R 0xffe2 ///< The righthand shift key. +#define FL_Control_L 0xffe3 ///< The lefthand control key. +#define FL_Control_R 0xffe4 ///< The righthand control key. +#define FL_Caps_Lock 0xffe5 ///< The caps lock key. +#define FL_Meta_L 0xffe7 ///< The left meta/Windows key. +#define FL_Meta_R 0xffe8 ///< The right meta/Windows key. +#define FL_Alt_L 0xffe9 ///< The left alt key. +#define FL_Alt_R 0xffea ///< The right alt key. +#define FL_Delete 0xffff ///< The delete key. // These use the Private Use Area (PUA) of the Basic Multilingual Plane // of Unicode. Guaranteed not to conflict with a proper Unicode character. @@ -510,7 +508,7 @@ enum Fl_When { // Fl_Widget::when(): #define FL_Sleep 0xEF2F /* Put system to sleep */ #define FL_Favorites 0xEF30 /* Show favorite locations */ -/*@}*/ // group: Mouse and Keyboard Events +/*@}*/ // group: Mouse and Keyboard Events /** \name Mouse Buttons @@ -521,43 +519,43 @@ enum Fl_When { // Fl_Widget::when(): /*@{*/ -#define FL_LEFT_MOUSE 1 ///< The left mouse button -#define FL_MIDDLE_MOUSE 2 ///< The middle mouse button -#define FL_RIGHT_MOUSE 3 ///< The right mouse button +#define FL_LEFT_MOUSE 1 ///< The left mouse button +#define FL_MIDDLE_MOUSE 2 ///< The middle mouse button +#define FL_RIGHT_MOUSE 3 ///< The right mouse button -/*@}*/ // group: Mouse Buttons +/*@}*/ // group: Mouse Buttons -/** \name Event States +/** \name Event States - The following constants define bits in the Fl::event_state() value. + The following constants define bits in the Fl::event_state() value. */ -/*@{*/ // group: Event States +/*@{*/ // group: Event States // FIXME: it would be nice to have the modifiers in the upper 8 bit so that // a unicode key (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 -#define FL_ALT 0x00080000 ///< One of the alt keys is down -#define FL_NUM_LOCK 0x00100000 ///< The num lock is on - // most X servers do this? -#define FL_META 0x00400000 ///< One of the meta/Windows keys is down - // correct for XFree86 -#define FL_SCROLL_LOCK 0x00800000 ///< The scroll lock is on - // correct for XFree86 -#define FL_BUTTON1 0x01000000 ///< Mouse button 1 is pushed -#define FL_BUTTON2 0x02000000 ///< Mouse button 2 is pushed -#define FL_BUTTON3 0x04000000 ///< Mouse button 3 is pushed -#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! - -/*@}*/ // group: Event States +#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 +#define FL_ALT 0x00080000 ///< One of the alt keys is down +#define FL_NUM_LOCK 0x00100000 ///< The num lock is on + // most X servers do this? +#define FL_META 0x00400000 ///< One of the meta/Windows keys is down + // correct for XFree86 +#define FL_SCROLL_LOCK 0x00800000 ///< The scroll lock is on + // correct for XFree86 +#define FL_BUTTON1 0x01000000 ///< Mouse button 1 is pushed +#define FL_BUTTON2 0x02000000 ///< Mouse button 2 is pushed +#define FL_BUTTON3 0x04000000 ///< Mouse button 3 is pushed +#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! + +/*@}*/ // group: Event States /** \name Box Types \brief FLTK standard box types @@ -570,20 +568,20 @@ enum Fl_When { // Fl_Widget::when(): leading underscore in your code! Enum values with leading underscores are reserved for internal use and subject to change without notice! - FL_NO_BOX means nothing is drawn at all, so whatever is already - on the screen remains. The FL_..._FRAME types only draw their edges, - leaving the interior unchanged. The blue color in Figure 1 + FL_NO_BOX means nothing is drawn at all, so whatever is already + on the screen remains. The FL_..._FRAME types only draw their edges, + leaving the interior unchanged. The blue color in Figure 1 is the area that is not drawn by the frame types. \image html boxtypes.png "Figure 1: FLTK standard box types" \image latex boxtypes.png "FLTK standard box types" width=10cm - \todo Description of boxtypes is incomplete. - See below for the defined enum Fl_Boxtype. - \see src/Fl_get_system_colors.cxx + \todo Description of boxtypes is incomplete. + See below for the defined enum Fl_Boxtype. + \see src/Fl_get_system_colors.cxx */ -/*@{*/ // group: Box Types +/*@{*/ // group: Box Types /** \brief FLTK standard box types @@ -599,63 +597,63 @@ enum Fl_When { // Fl_Widget::when(): */ enum Fl_Boxtype { // boxtypes (if you change these you must also change fl_boxtype.cxx): - FL_NO_BOX = 0, ///< nothing is drawn at all, this box is invisible - FL_FLAT_BOX, ///< a flat box - FL_UP_BOX, ///< see figure 1 - FL_DOWN_BOX, ///< see figure 1 - FL_UP_FRAME, ///< see figure 1 - FL_DOWN_FRAME, ///< see figure 1 - FL_THIN_UP_BOX, ///< see figure 1 - FL_THIN_DOWN_BOX, ///< see figure 1 - FL_THIN_UP_FRAME, ///< see figure 1 - FL_THIN_DOWN_FRAME, ///< see figure 1 - FL_ENGRAVED_BOX, ///< see figure 1 - FL_EMBOSSED_BOX, ///< see figure 1 - FL_ENGRAVED_FRAME, ///< see figure 1 - FL_EMBOSSED_FRAME, ///< see figure 1 - FL_BORDER_BOX, ///< see figure 1 - _FL_SHADOW_BOX, ///< see figure 1, use FL_SHADOW_BOX - FL_BORDER_FRAME, ///< see figure 1 - _FL_SHADOW_FRAME, ///< see figure 1, use FL_SHADOW_FRAME - _FL_ROUNDED_BOX, ///< see figure 1, use FL_ROUNDED_BOX - _FL_RSHADOW_BOX, ///< see figure 1, use FL_RSHADOW_BOX - _FL_ROUNDED_FRAME, ///< see figure 1, use FL_ROUNDED_FRAME - _FL_RFLAT_BOX, ///< see figure 1, use FL_RFLAT_BOX - _FL_ROUND_UP_BOX, ///< see figure 1, use FL_ROUND_UP_BOX - _FL_ROUND_DOWN_BOX, ///< see figure 1, use FL_ROUND_DOWN_BOX - _FL_DIAMOND_UP_BOX, ///< see figure 1, use FL_DIAMOND_UP_BOX - _FL_DIAMOND_DOWN_BOX, ///< see figure 1, use FL_DIAMOND_DOWN_BOX - _FL_OVAL_BOX, ///< see figure 1, use FL_OVAL_BOX - _FL_OSHADOW_BOX, ///< see figure 1, use FL_OSHADOW_BOX - _FL_OVAL_FRAME, ///< see figure 1, use FL_OVAL_FRAME - _FL_OFLAT_BOX, ///< see figure 1, use FL_OFLAT_BOX - _FL_PLASTIC_UP_BOX, ///< plastic version of FL_UP_BOX, use FL_PLASTIC_UP_BOX - _FL_PLASTIC_DOWN_BOX, ///< plastic version of FL_DOWN_BOX, use FL_PLASTIC_DOWN_BOX - _FL_PLASTIC_UP_FRAME, ///< plastic version of FL_UP_FRAME, use FL_PLASTIC_UP_FRAME - _FL_PLASTIC_DOWN_FRAME, ///< plastic version of FL_DOWN_FRAME, use FL_PLASTIC_DOWN_FRAME - _FL_PLASTIC_THIN_UP_BOX, ///< plastic version of FL_THIN_UP_BOX, use FL_PLASTIC_THIN_UP_BOX - _FL_PLASTIC_THIN_DOWN_BOX, ///< plastic version of FL_THIN_DOWN_BOX, use FL_PLASTIC_THIN_DOWN_BOX - _FL_PLASTIC_ROUND_UP_BOX, ///< plastic version of FL_ROUND_UP_BOX, use FL_PLASTIC_ROUND_UP_BOX - _FL_PLASTIC_ROUND_DOWN_BOX, ///< plastic version of FL_ROUND_DOWN_BOX, use FL_PLASTIC_ROUND_DOWN_BOX - _FL_GTK_UP_BOX, ///< gtk+ version of FL_UP_BOX, use FL_GTK_UP_BOX - _FL_GTK_DOWN_BOX, ///< gtk+ version of FL_DOWN_BOX, use FL_GTK_DOWN_BOX - _FL_GTK_UP_FRAME, ///< gtk+ version of FL_UP_FRAME, use FL_GTK_UP_FRAME - _FL_GTK_DOWN_FRAME, ///< gtk+ version of FL_DOWN_FRAME, use FL_GTK_DOWN_FRAME - _FL_GTK_THIN_UP_BOX, ///< gtk+ version of FL_THIN_UP_BOX, use FL_GTK_THIN_UP_BOX - _FL_GTK_THIN_DOWN_BOX, ///< gtk+ version of FL_THIN_DOWN_BOX, use FL_GTK_THIN_DOWN_BOX - _FL_GTK_THIN_UP_FRAME, ///< gtk+ version of FL_THIN_UP_FRAME, use FL_GTK_THIN_UP_FRAME - _FL_GTK_THIN_DOWN_FRAME, ///< gtk+ version of FL_THIN_DOWN_FRAME, use FL_GTK_THIN_DOWN_FRAME - _FL_GTK_ROUND_UP_BOX, ///< gtk+ version of FL_ROUND_UP_BOX, use FL_GTK_ROUND_UP_BOX - _FL_GTK_ROUND_DOWN_BOX, ///< gtk+ version of FL_ROUND_DOWN_BOX, use FL_GTK_ROUND_DOWN_BOX - _FL_GLEAM_UP_BOX, ///< gleam version of FL_UP_BOX, use FL_GLEAM_UP_BOX - _FL_GLEAM_DOWN_BOX, ///< gleam version of FL_DOWN_BOX, use FL_GLEAM_DOWN_BOX - _FL_GLEAM_UP_FRAME, ///< gleam version of FL_UP_FRAME, use FL_GLEAM_UP_FRAME - _FL_GLEAM_DOWN_FRAME, ///< gleam version of FL_DOWN_FRAME, use FL_GLEAM_DOWN_FRAME - _FL_GLEAM_THIN_UP_BOX, ///< gleam version of FL_THIN_UP_BOX, use FL_GLEAM_THIN_UP_BOX - _FL_GLEAM_THIN_DOWN_BOX, ///< gleam version of FL_THIN_DOWN_BOX, use FL_GLEAM_THIN_DOWN_BOX - _FL_GLEAM_ROUND_UP_BOX, ///< gleam version of FL_ROUND_UP_BOX, use FL_GLEAM_ROUND_UP_BOX - _FL_GLEAM_ROUND_DOWN_BOX, ///< gleam version of FL_ROUND_DOWN_BOX, use FL_GLEAM_ROUND_DOWN_BOX - FL_FREE_BOXTYPE ///< the first free box type for creation of new box types + FL_NO_BOX = 0, ///< nothing is drawn at all, this box is invisible + FL_FLAT_BOX, ///< a flat box + FL_UP_BOX, ///< see figure 1 + FL_DOWN_BOX, ///< see figure 1 + FL_UP_FRAME, ///< see figure 1 + FL_DOWN_FRAME, ///< see figure 1 + FL_THIN_UP_BOX, ///< see figure 1 + FL_THIN_DOWN_BOX, ///< see figure 1 + FL_THIN_UP_FRAME, ///< see figure 1 + FL_THIN_DOWN_FRAME, ///< see figure 1 + FL_ENGRAVED_BOX, ///< see figure 1 + FL_EMBOSSED_BOX, ///< see figure 1 + FL_ENGRAVED_FRAME, ///< see figure 1 + FL_EMBOSSED_FRAME, ///< see figure 1 + FL_BORDER_BOX, ///< see figure 1 + _FL_SHADOW_BOX, ///< see figure 1, use FL_SHADOW_BOX + FL_BORDER_FRAME, ///< see figure 1 + _FL_SHADOW_FRAME, ///< see figure 1, use FL_SHADOW_FRAME + _FL_ROUNDED_BOX, ///< see figure 1, use FL_ROUNDED_BOX + _FL_RSHADOW_BOX, ///< see figure 1, use FL_RSHADOW_BOX + _FL_ROUNDED_FRAME, ///< see figure 1, use FL_ROUNDED_FRAME + _FL_RFLAT_BOX, ///< see figure 1, use FL_RFLAT_BOX + _FL_ROUND_UP_BOX, ///< see figure 1, use FL_ROUND_UP_BOX + _FL_ROUND_DOWN_BOX, ///< see figure 1, use FL_ROUND_DOWN_BOX + _FL_DIAMOND_UP_BOX, ///< see figure 1, use FL_DIAMOND_UP_BOX + _FL_DIAMOND_DOWN_BOX, ///< see figure 1, use FL_DIAMOND_DOWN_BOX + _FL_OVAL_BOX, ///< see figure 1, use FL_OVAL_BOX + _FL_OSHADOW_BOX, ///< see figure 1, use FL_OSHADOW_BOX + _FL_OVAL_FRAME, ///< see figure 1, use FL_OVAL_FRAME + _FL_OFLAT_BOX, ///< see figure 1, use FL_OFLAT_BOX + _FL_PLASTIC_UP_BOX, ///< plastic version of FL_UP_BOX, use FL_PLASTIC_UP_BOX + _FL_PLASTIC_DOWN_BOX, ///< plastic version of FL_DOWN_BOX, use FL_PLASTIC_DOWN_BOX + _FL_PLASTIC_UP_FRAME, ///< plastic version of FL_UP_FRAME, use FL_PLASTIC_UP_FRAME + _FL_PLASTIC_DOWN_FRAME, ///< plastic version of FL_DOWN_FRAME, use FL_PLASTIC_DOWN_FRAME + _FL_PLASTIC_THIN_UP_BOX, ///< plastic version of FL_THIN_UP_BOX, use FL_PLASTIC_THIN_UP_BOX + _FL_PLASTIC_THIN_DOWN_BOX, ///< plastic version of FL_THIN_DOWN_BOX, use FL_PLASTIC_THIN_DOWN_BOX + _FL_PLASTIC_ROUND_UP_BOX, ///< plastic version of FL_ROUND_UP_BOX, use FL_PLASTIC_ROUND_UP_BOX + _FL_PLASTIC_ROUND_DOWN_BOX, ///< plastic version of FL_ROUND_DOWN_BOX, use FL_PLASTIC_ROUND_DOWN_BOX + _FL_GTK_UP_BOX, ///< gtk+ version of FL_UP_BOX, use FL_GTK_UP_BOX + _FL_GTK_DOWN_BOX, ///< gtk+ version of FL_DOWN_BOX, use FL_GTK_DOWN_BOX + _FL_GTK_UP_FRAME, ///< gtk+ version of FL_UP_FRAME, use FL_GTK_UP_FRAME + _FL_GTK_DOWN_FRAME, ///< gtk+ version of FL_DOWN_FRAME, use FL_GTK_DOWN_FRAME + _FL_GTK_THIN_UP_BOX, ///< gtk+ version of FL_THIN_UP_BOX, use FL_GTK_THIN_UP_BOX + _FL_GTK_THIN_DOWN_BOX, ///< gtk+ version of FL_THIN_DOWN_BOX, use FL_GTK_THIN_DOWN_BOX + _FL_GTK_THIN_UP_FRAME, ///< gtk+ version of FL_THIN_UP_FRAME, use FL_GTK_THIN_UP_FRAME + _FL_GTK_THIN_DOWN_FRAME, ///< gtk+ version of FL_THIN_DOWN_FRAME, use FL_GTK_THIN_DOWN_FRAME + _FL_GTK_ROUND_UP_BOX, ///< gtk+ version of FL_ROUND_UP_BOX, use FL_GTK_ROUND_UP_BOX + _FL_GTK_ROUND_DOWN_BOX, ///< gtk+ version of FL_ROUND_DOWN_BOX, use FL_GTK_ROUND_DOWN_BOX + _FL_GLEAM_UP_BOX, ///< gleam version of FL_UP_BOX, use FL_GLEAM_UP_BOX + _FL_GLEAM_DOWN_BOX, ///< gleam version of FL_DOWN_BOX, use FL_GLEAM_DOWN_BOX + _FL_GLEAM_UP_FRAME, ///< gleam version of FL_UP_FRAME, use FL_GLEAM_UP_FRAME + _FL_GLEAM_DOWN_FRAME, ///< gleam version of FL_DOWN_FRAME, use FL_GLEAM_DOWN_FRAME + _FL_GLEAM_THIN_UP_BOX, ///< gleam version of FL_THIN_UP_BOX, use FL_GLEAM_THIN_UP_BOX + _FL_GLEAM_THIN_DOWN_BOX, ///< gleam version of FL_THIN_DOWN_BOX, use FL_GLEAM_THIN_DOWN_BOX + _FL_GLEAM_ROUND_UP_BOX, ///< gleam version of FL_ROUND_UP_BOX, use FL_GLEAM_ROUND_UP_BOX + _FL_GLEAM_ROUND_DOWN_BOX, ///< gleam version of FL_ROUND_DOWN_BOX, use FL_GLEAM_ROUND_DOWN_BOX + FL_FREE_BOXTYPE ///< the first free box type for creation of new box types }; extern FL_EXPORT Fl_Boxtype fl_define_FL_ROUND_UP_BOX(); #define FL_ROUND_UP_BOX fl_define_FL_ROUND_UP_BOX() @@ -743,7 +741,7 @@ inline Fl_Boxtype fl_frame(Fl_Boxtype b) { #define FL_CIRCLE_BOX FL_ROUND_DOWN_BOX #define FL_DIAMOND_BOX FL_DIAMOND_DOWN_BOX -/*@}*/ // group: Box Types +/*@}*/ // group: Box Types /** The labeltype() method sets the type of the label. @@ -896,9 +894,9 @@ extern Fl_Labeltype FL_EXPORT fl_define_FL_IMAGE_LABEL(); -# Although bits can be or'd together there are some unused/illegal combinations, for instance: - setting both FL_ALIGN_TOP and FL_ALIGN_BOTTOM in combinations other - than those given in the \p Fl_Align constants below (magic values) + than those given in the \p Fl_Align constants below (magic values) - setting both FL_ALIGN_LEFT and FL_ALIGN_RIGHT in combinations other - than those given in the \p Fl_Align constants below (magic values) + than those given in the \p Fl_Align constants below (magic values) - using one of the "magic values" (2) together with FL_ALIGN_INSIDE \note Using illegal bit combinations or undefined bits may yield unexpected @@ -910,37 +908,37 @@ extern Fl_Labeltype FL_EXPORT fl_define_FL_IMAGE_LABEL(); typedef unsigned Fl_Align; /** Align the label horizontally in the middle. */ -const Fl_Align FL_ALIGN_CENTER = 0x0000; +const Fl_Align FL_ALIGN_CENTER = 0x0000; /** Align the label at the top of the widget. Inside labels appear below the top, outside labels are drawn on top of the widget. */ -const Fl_Align FL_ALIGN_TOP = 0x0001; +const Fl_Align FL_ALIGN_TOP = 0x0001; /** Align the label at the bottom of the widget. */ -const Fl_Align FL_ALIGN_BOTTOM = 0x0002; +const Fl_Align FL_ALIGN_BOTTOM = 0x0002; /** Align the label at the left of the widget. Inside labels appear left-justified starting at the left side of the widget, outside labels are right-justified and drawn to the left of the widget. */ -const Fl_Align FL_ALIGN_LEFT = 0x0004; +const Fl_Align FL_ALIGN_LEFT = 0x0004; /** Align the label to the right of the widget. */ -const Fl_Align FL_ALIGN_RIGHT = 0x0008; +const Fl_Align FL_ALIGN_RIGHT = 0x0008; /** Draw the label inside of the widget. */ -const Fl_Align FL_ALIGN_INSIDE = 0x0010; +const Fl_Align FL_ALIGN_INSIDE = 0x0010; /** If the label contains an image, draw the text on top of the image. */ -const Fl_Align FL_ALIGN_TEXT_OVER_IMAGE = 0x0020; +const Fl_Align FL_ALIGN_TEXT_OVER_IMAGE = 0x0020; /** If the label contains an image, draw the text below the image. */ -const Fl_Align FL_ALIGN_IMAGE_OVER_TEXT = 0x0000; +const Fl_Align FL_ALIGN_IMAGE_OVER_TEXT = 0x0000; /** All parts of the label that are larger than the widget will not be drawn. */ -const Fl_Align FL_ALIGN_CLIP = 0x0040; +const Fl_Align FL_ALIGN_CLIP = 0x0040; /** Wrap text that does not fit the width of the widget. */ -const Fl_Align FL_ALIGN_WRAP = 0x0080; +const Fl_Align FL_ALIGN_WRAP = 0x0080; /** If the label contains an image, draw the text to the right of the image. */ const Fl_Align FL_ALIGN_IMAGE_NEXT_TO_TEXT = 0x0100; @@ -951,25 +949,25 @@ const Fl_Align FL_ALIGN_TEXT_NEXT_TO_IMAGE = 0x0120; /** If the label contains an image, draw the image or deimage in the background. */ const Fl_Align FL_ALIGN_IMAGE_BACKDROP = 0x0200; -const Fl_Align FL_ALIGN_TOP_LEFT = FL_ALIGN_TOP | FL_ALIGN_LEFT; -const Fl_Align FL_ALIGN_TOP_RIGHT = FL_ALIGN_TOP | FL_ALIGN_RIGHT; -const Fl_Align FL_ALIGN_BOTTOM_LEFT = FL_ALIGN_BOTTOM | FL_ALIGN_LEFT; -const Fl_Align FL_ALIGN_BOTTOM_RIGHT = FL_ALIGN_BOTTOM | FL_ALIGN_RIGHT; +const Fl_Align FL_ALIGN_TOP_LEFT = FL_ALIGN_TOP | FL_ALIGN_LEFT; +const Fl_Align FL_ALIGN_TOP_RIGHT = FL_ALIGN_TOP | FL_ALIGN_RIGHT; +const Fl_Align FL_ALIGN_BOTTOM_LEFT = FL_ALIGN_BOTTOM | FL_ALIGN_LEFT; +const Fl_Align FL_ALIGN_BOTTOM_RIGHT = FL_ALIGN_BOTTOM | FL_ALIGN_RIGHT; /** Outside only, left of widget, top position, magic value: TOP | BOTTOM | LEFT. */ -const Fl_Align FL_ALIGN_LEFT_TOP = 0x0007; +const Fl_Align FL_ALIGN_LEFT_TOP = 0x0007; /** Outside only, right of widget, top position, magic value: TOP | BOTTOM | RIGHT. */ -const Fl_Align FL_ALIGN_RIGHT_TOP = 0x000b; +const Fl_Align FL_ALIGN_RIGHT_TOP = 0x000b; /** Outside only, left of widget, bottom position, magic value: TOP | LEFT | RIGHT. */ -const Fl_Align FL_ALIGN_LEFT_BOTTOM = 0x000d; +const Fl_Align FL_ALIGN_LEFT_BOTTOM = 0x000d; /** Outside only, right of widget, bottom position, magic value: BOTTOM | LEFT | RIGHT. */ -const Fl_Align FL_ALIGN_RIGHT_BOTTOM = 0x000e; +const Fl_Align FL_ALIGN_RIGHT_BOTTOM = 0x000e; /** Nothing, same as FL_ALIGN_CENTER, for back compatibility. */ -const Fl_Align FL_ALIGN_NOWRAP = 0x0000; +const Fl_Align FL_ALIGN_NOWRAP = 0x0000; /** Mask value to test for TOP, BOTTOM, LEFT, and RIGHT flags. */ const Fl_Align FL_ALIGN_POSITION_MASK = 0x000f; @@ -986,27 +984,27 @@ const Fl_Align FL_ALIGN_IMAGE_MASK = 0x0320; /** A font number is an index into the internal font table. */ typedef int Fl_Font; -const Fl_Font FL_HELVETICA = 0; ///< Helvetica (or Arial) normal (0) -const Fl_Font FL_HELVETICA_BOLD = 1; ///< Helvetica (or Arial) bold -const Fl_Font FL_HELVETICA_ITALIC = 2; ///< Helvetica (or Arial) oblique -const Fl_Font FL_HELVETICA_BOLD_ITALIC = 3; ///< Helvetica (or Arial) bold-oblique -const Fl_Font FL_COURIER = 4; ///< Courier normal -const Fl_Font FL_COURIER_BOLD = 5; ///< Courier bold -const Fl_Font FL_COURIER_ITALIC = 6; ///< Courier italic -const Fl_Font FL_COURIER_BOLD_ITALIC = 7; ///< Courier bold-italic -const Fl_Font FL_TIMES = 8; ///< Times roman -const Fl_Font FL_TIMES_BOLD = 9; ///< Times roman bold -const Fl_Font FL_TIMES_ITALIC = 10; ///< Times roman italic -const Fl_Font FL_TIMES_BOLD_ITALIC = 11; ///< Times roman bold-italic -const Fl_Font FL_SYMBOL = 12; ///< Standard symbol font -const Fl_Font FL_SCREEN = 13; ///< Default monospaced screen font -const Fl_Font FL_SCREEN_BOLD = 14; ///< Default monospaced bold screen font -const Fl_Font FL_ZAPF_DINGBATS = 15; ///< Zapf-dingbats font - -const Fl_Font FL_FREE_FONT = 16; ///< first one to allocate -const Fl_Font FL_BOLD = 1; ///< add this to helvetica, courier, or times -const Fl_Font FL_ITALIC = 2; ///< add this to helvetica, courier, or times -const Fl_Font FL_BOLD_ITALIC = 3; ///< add this to helvetica, courier, or times +const Fl_Font FL_HELVETICA = 0; ///< Helvetica (or Arial) normal (0) +const Fl_Font FL_HELVETICA_BOLD = 1; ///< Helvetica (or Arial) bold +const Fl_Font FL_HELVETICA_ITALIC = 2; ///< Helvetica (or Arial) oblique +const Fl_Font FL_HELVETICA_BOLD_ITALIC = 3; ///< Helvetica (or Arial) bold-oblique +const Fl_Font FL_COURIER = 4; ///< Courier normal +const Fl_Font FL_COURIER_BOLD = 5; ///< Courier bold +const Fl_Font FL_COURIER_ITALIC = 6; ///< Courier italic +const Fl_Font FL_COURIER_BOLD_ITALIC = 7; ///< Courier bold-italic +const Fl_Font FL_TIMES = 8; ///< Times roman +const Fl_Font FL_TIMES_BOLD = 9; ///< Times roman bold +const Fl_Font FL_TIMES_ITALIC = 10; ///< Times roman italic +const Fl_Font FL_TIMES_BOLD_ITALIC = 11; ///< Times roman bold-italic +const Fl_Font FL_SYMBOL = 12; ///< Standard symbol font +const Fl_Font FL_SCREEN = 13; ///< Default monospaced screen font +const Fl_Font FL_SCREEN_BOLD = 14; ///< Default monospaced bold screen font +const Fl_Font FL_ZAPF_DINGBATS = 15; ///< Zapf-dingbats font + +const Fl_Font FL_FREE_FONT = 16; ///< first one to allocate +const Fl_Font FL_BOLD = 1; ///< add this to helvetica, courier, or times +const Fl_Font FL_ITALIC = 2; ///< add this to helvetica, courier, or times +const Fl_Font FL_BOLD_ITALIC = 3; ///< add this to helvetica, courier, or times /*@}*/ @@ -1015,9 +1013,9 @@ const Fl_Font FL_BOLD_ITALIC = 3; ///< add this to helvetica, courier */ typedef int Fl_Fontsize; -extern FL_EXPORT Fl_Fontsize FL_NORMAL_SIZE; ///< normal font size +extern FL_EXPORT Fl_Fontsize FL_NORMAL_SIZE; ///< normal font size -/** \name Colors +/** \name Colors The Fl_Color type holds an FLTK color value. Colors are either 8-bit indexes into a <a href="fltk-colormap.png">virtual colormap</a> @@ -1035,7 +1033,7 @@ extern FL_EXPORT Fl_Fontsize FL_NORMAL_SIZE; ///< normal font size +--------- red component (8 bit) </pre> - A color can have either an index or an rgb value. Colors with rgb set + A color can have either an index or an rgb value. Colors with rgb set and an index >0 are reserved for special use. */ @@ -1044,22 +1042,22 @@ extern FL_EXPORT Fl_Fontsize FL_NORMAL_SIZE; ///< normal font size 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 +const Fl_Color FL_FOREGROUND_COLOR = 0; ///< the default foreground color (0) used for labels and text +const Fl_Color FL_BACKGROUND2_COLOR = 7; ///< the default background color for text, list, and valuator widgets +const Fl_Color FL_INACTIVE_COLOR = 8; ///< the inactive foreground color +const Fl_Color FL_SELECTION_COLOR = 15; ///< the default selection/highlight color // boxtypes generally limit themselves to these colors so // the whole ramp is not allocated: -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' +const Fl_Color FL_GRAY0 = 32; // 'A' +const Fl_Color FL_DARK3 = 39; // 'H' +const Fl_Color FL_DARK2 = 45; // 'N' +const Fl_Color FL_DARK1 = 47; // 'P' +const Fl_Color FL_BACKGROUND_COLOR = 49; // 'R' default background color +const Fl_Color FL_LIGHT1 = 50; // 'S' +const Fl_Color FL_LIGHT2 = 52; // 'U' +const Fl_Color FL_LIGHT3 = 54; // 'W' // FLTK provides a 5x8x5 color cube that is used with colormap visuals @@ -1142,7 +1140,7 @@ 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);} -/*@}*/ // group: Colors +/*@}*/ // group: Colors /** \name Cursors */ /*@{*/ @@ -1181,7 +1179,7 @@ enum Fl_Cursor { FL_CURSOR_NONE =255 /**< invisible. */ }; -/*@}*/ // group: Cursors +/*@}*/ // group: Cursors /** FD "when" conditions */ enum { // values for "when" passed to Fl::add_fd() @@ -1191,19 +1189,19 @@ enum { // values for "when" passed to Fl::add_fd() }; /** visual types and Fl_Gl_Window::mode() (values match Glut) */ -enum Fl_Mode { - FL_RGB = 0, - FL_INDEX = 1, - FL_SINGLE = 0, - FL_DOUBLE = 2, - FL_ACCUM = 4, - FL_ALPHA = 8, - FL_DEPTH = 16, - FL_STENCIL = 32, - FL_RGB8 = 64, +enum Fl_Mode { + FL_RGB = 0, + FL_INDEX = 1, + FL_SINGLE = 0, + FL_DOUBLE = 2, + FL_ACCUM = 4, + FL_ALPHA = 8, + FL_DEPTH = 16, + FL_STENCIL = 32, + FL_RGB8 = 64, FL_MULTISAMPLE= 128, FL_STEREO = 256, - FL_FAKE_SINGLE = 512, // Fake single buffered windows using double-buffer + FL_FAKE_SINGLE = 512, // Fake single buffered windows using double-buffer FL_OPENGL3 = 1024 }; @@ -1225,7 +1223,3 @@ enum Fl_Damage { // FLTK 1.0.x compatibility definitions (FLTK_1_0_COMPAT) dropped in 1.4.0 #endif - -// -// End of "$Id$". -// @@ -1,6 +1,4 @@ // -// "$Id$" -// // Main header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2020 by Bill Spitzak and others. @@ -11,9 +9,9 @@ // // https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// https://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /** \file @@ -33,7 +31,7 @@ # include "fl_utf8.h" # include "Enumerations.H" # ifndef Fl_Object -# define Fl_Object Fl_Widget /**< for back compatibility - use Fl_Widget! */ +# define Fl_Object Fl_Widget /**< for back compatibility - use Fl_Widget! */ # endif # ifdef check @@ -72,7 +70,7 @@ extern FL_EXPORT const char* fl_local_shift; ///< string pointer used in shortcu callback function to handle such events in the user's code. \see Fl::add_handler(), Fl::add_timeout(), Fl::repeat_timeout(), - Fl::remove_timeout() and others + Fl::remove_timeout() and others @{ */ /** Signature of some label drawing functions passed as parameters */ @@ -206,7 +204,7 @@ public: // should be private! If true then flush() will do something. */ static void damage(int d) {damage_ = d;} - + public: /** Enumerator for global FLTK options. These options can be set system wide, per user, or for the running @@ -225,7 +223,7 @@ public: /// See also: Fl_Input_::tab_nav() /// OPTION_ARROW_FOCUS = 0, - // When switched on, FLTK will use the file chooser dialog that comes + // When switched on, FLTK will use the file chooser dialog that comes // with your operating system whenever possible. When switched off, FLTK // will present its own file chooser. // \todo implement me @@ -235,7 +233,7 @@ public: // decides to choose the file. // \todo implement me //OPTION_FILECHOOSER_PREVIEW, - /// If visible focus is switched on (default), FLTK will draw a dotted rectangle + /// If visible focus is switched on (default), FLTK will draw a dotted rectangle /// inside the widget that will receive the next keystroke. If switched /// off, no such indicator will be drawn and keyboard navigation /// is disabled. @@ -244,7 +242,7 @@ public: /// from any text widget. If disabled, no dragging is possible, however /// dropping text from other applications still works. OPTION_DND_TEXT, - /// If tooltips are enabled (default), hovering the mouse over a widget with a + /// If tooltips are enabled (default), hovering the mouse over a widget with a /// tooltip text will open a little tooltip window until the mouse leaves /// the widget. If disabled, no tooltip is shown. OPTION_SHOW_TOOLTIPS, @@ -265,26 +263,26 @@ public: OPTION_LAST } Fl_Option; -private: +private: static unsigned char options_[OPTION_LAST]; static unsigned char options_read_; static int program_should_quit_; // non-zero means the program was asked to cleanly terminate -public: +public: /* Return a global setting for all FLTK applications, possibly overridden by a setting specifically for this application. */ static bool option(Fl_Option opt); - + /* Override an option while the application is running. */ static void option(Fl_Option opt, bool val); - + /** The currently executing idle callback function: DO NOT USE THIS DIRECTLY! - + This is now used as part of a higher level system allowing multiple idle callback functions to be called. \see add_idle(), remove_idle() @@ -302,7 +300,7 @@ public: static int e_original_keysym; // late addition static int scrollbar_size_; - static int menu_linespacing_; // STR #2927 + static int menu_linespacing_; // STR #2927 #endif @@ -409,9 +407,9 @@ public: return (scheme_ && name && !strcmp(name,scheme_)); } /** - Called by scheme according to scheme name. - Loads or reloads the current scheme selection. - See void scheme(const char *name) + Called by scheme according to scheme name. + Loads or reloads the current scheme selection. + See void scheme(const char *name) */ static int reload_scheme(); // platform dependent static int scrollbar_size(); @@ -444,16 +442,16 @@ public: Adds a one-shot timeout callback. The function will be called by Fl::wait() at <i>t</i> seconds after this function is called. The optional void* argument is passed to the callback. - + You can have multiple timeout callbacks. To remove a timeout callback use Fl::remove_timeout(). - + If you need more accurate, repeated timeouts, use Fl::repeat_timeout() to reschedule the subsequent timeouts. - + The following code will print "TICK" each second on stdout with a fair degree of accuracy: - + \code #include <stdio.h> #include <FL/Fl.H> @@ -520,7 +518,7 @@ int main() { @{ */ /** FLTK calls Fl::warning() to output a warning message. - + The default version on Windows returns \e without printing a warning message, because Windows programs normally don't have stderr (a console window) enabled. @@ -539,7 +537,7 @@ int main() { static void (*warning)(const char*, ...); /** FLTK calls Fl::error() to output a normal error message. - + The default version on Windows displays the error message in a MessageBox window. The default version on all other platforms prints the error message to stderr. @@ -554,11 +552,11 @@ int main() { static void (*error)(const char*, ...); /** FLTK calls Fl::fatal() to output a fatal error message. - + The default version on Windows displays the error message in a MessageBox window. The default version on all other platforms prints the error message to stderr. - + You can override the behavior by setting the function pointer to your own routine. @@ -589,14 +587,14 @@ int main() { */ static Fl_Window* modal() {return modal_;} /** Returns the window that currently receives all events. - + \return The window that currently receives all events, or NULL if event grabbing is currently OFF. */ static Fl_Window* grab() {return grab_;} - /** Selects the window to grab. + /** Selects the window to grab. This is used when pop-up menu systems are active. - + Send all events to the passed window no matter where the pointer or focus is (including in other programs). The window <I>does not have to be shown()</I> , this lets the handle() method of a @@ -604,26 +602,26 @@ int main() { map and unmap a complex set of windows (under both X and Windows <I>some</I> window must be mapped because the system interface needs a window id). - + If grab() is on it will also affect show() of windows by doing system-specific operations (on X it turns on override-redirect). These are designed to make menus popup reliably and faster on the system. - + To turn off grabbing do Fl::grab(0). - + <I>Be careful that your program does not enter an infinite loop while grab() is on. On X this will lock up your screen!</I> - To avoid this potential lockup, all newer operating systems seem to - limit mouse pointer grabbing to the time during which a mouse button + To avoid this potential lockup, all newer operating systems seem to + limit mouse pointer grabbing to the time during which a mouse button is held down. Some OS's may not support grabbing at all. */ static void grab(Fl_Window*); // platform dependent /** @} */ /** \defgroup fl_events Events handling functions - Fl class events handling API declared in <FL/Fl.H> - @{ + Fl class events handling API declared in <FL/Fl.H> + @{ */ // event information: /** @@ -631,44 +629,44 @@ int main() { to determine if a callback is being done in response to a keypress, mouse click, etc. */ - static int event() {return e_number;} + static int event() {return e_number;} /** Returns the mouse position of the event relative to the Fl_Window it was passed to. */ - static int event_x() {return e_x;} + static int event_x() {return e_x;} /** Returns the mouse position of the event relative to the Fl_Window it was passed to. */ - static int event_y() {return e_y;} + static int event_y() {return e_y;} /** Returns the mouse position on the screen of the event. To find the absolute position of an Fl_Window on the screen, use the - difference between event_x_root(),event_y_root() and + difference between event_x_root(),event_y_root() and event_x(),event_y(). */ - static int event_x_root() {return e_x_root;} + static int event_x_root() {return e_x_root;} /** Returns the mouse position on the screen of the event. To find the absolute position of an Fl_Window on the screen, use the - difference between event_x_root(),event_y_root() and + difference between event_x_root(),event_y_root() and event_x(),event_y(). */ - static int event_y_root() {return e_y_root;} + static int event_y_root() {return e_y_root;} /** Returns the current horizontal mouse scrolling associated with the FL_MOUSEWHEEL event. Right is positive. */ - static int event_dx() {return e_dx;} + static int event_dx() {return e_dx;} /** Returns the current vertical mouse scrolling associated with the FL_MOUSEWHEEL event. Down is positive. */ - static int event_dy() {return e_dy;} + static int event_dy() {return e_dy;} /** Return where the mouse is on the screen by doing a round-trip query to - the server. You should use Fl::event_x_root() and + the server. You should use Fl::event_x_root() and Fl::event_y_root() if possible, but this is necessary if you are not sure if a mouse event has been processed recently (such as to position your first window). If the display is not open, this will @@ -677,15 +675,15 @@ int main() { static void get_mouse(int &,int &); /** Returns non zero if we had a double click event. - \retval Non-zero if the most recent FL_PUSH or FL_KEYBOARD was a "double click". - \retval N-1 for N clicks. + \retval Non-zero if the most recent FL_PUSH or FL_KEYBOARD was a "double click". + \retval N-1 for N clicks. A double click is counted if the same button is pressed again while event_is_click() is true. - + */ - static int event_clicks() {return e_clicks;} + static int event_clicks() {return e_clicks;} /** - Manually sets the number returned by Fl::event_clicks(). + Manually sets the number returned by Fl::event_clicks(). This can be used to set it to zero so that later code does not think an item was double-clicked. \param[in] i corresponds to no double-click if 0, i+1 mouse clicks otherwise @@ -694,17 +692,17 @@ int main() { static void event_clicks(int i) {e_clicks = i;} /** Returns non-zero if the mouse has not moved far enough - and not enough time has passed since the last FL_PUSH or + and not enough time has passed since the last FL_PUSH or FL_KEYBOARD event for it to be considered a "drag" rather than a "click". You can test this on FL_DRAG, FL_RELEASE, - and FL_MOVE events. + and FL_MOVE events. */ - static int event_is_click() {return e_is_click;} + static int event_is_click() {return e_is_click;} /** - Clears the value returned by Fl::event_is_click(). + Clears the value returned by Fl::event_is_click(). Useful to prevent the <I>next</I> click from being counted as a double-click or to make a popup menu - pick an item with a single click. Don't pass non-zero to this. + pick an item with a single click. Don't pass non-zero to this. */ static void event_is_click(int i) {e_is_click = i;} /** @@ -716,7 +714,7 @@ int main() { \retval FL_RIGHT_MOUSE. \see Fl::event_buttons() */ - static int event_button() {return e_keysym-FL_Button;} + static int event_button() {return e_keysym-FL_Button;} /** Returns the keyboard and mouse button states of the last event. @@ -735,14 +733,14 @@ int main() { - FL_BUTTON1 - FL_BUTTON2 - FL_BUTTON3 - + X servers do not agree on shift states, and FL_NUM_LOCK, FL_META, and FL_SCROLL_LOCK may not work. The values were selected to match the XFree86 server on Linux. In addition there is a bug in the way X works so that the shift state is not correctly reported until the first event <I>after</I> the shift key is pressed or released. */ - static int event_state() {return e_state;} + static int event_state() {return e_state;} /** Returns non-zero if any of the passed event state bits are turned on. @@ -754,74 +752,74 @@ int main() { 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 + equivalent for the keystroke. For instance: if someone presses '5' on the numeric keypad with numlock on, Fl::event_key() may return the 'key code' for this key, and NOT the character '5'. To always get the '5', use Fl::event_text() instead. - + \returns an integer 'key code', or 0 if the last event was not a key press or release. \see int event_key(int), event_text(), compose(int&). */ - static int event_key() {return e_keysym;} + 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. + + 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. */ static int event_original_key(){return e_original_keysym;} - /** + /** Returns true if the given \p key was held down (or pressed) <I>during</I> the last event. This is constant until the next event is read from the server. - + Fl::get_key(int) returns true if the given key is held down <I>now</I>. Under X this requires a round-trip to the server and is <I>much</I> slower than Fl::event_key(int). - + Keys are identified by the <I>unshifted</I> values. FLTK defines a set of symbols that should work on most modern machines for every key on the keyboard: - + \li All keys on the main keyboard producing a printable ASCII - character use the value of that ASCII character (as though shift, - ctrl, and caps lock were not on). The space bar is 32. + character use the value of that ASCII character (as though shift, + ctrl, and caps lock were not on). The space bar is 32. \li All keys on the numeric keypad producing a printable ASCII - character use the value of that ASCII character plus FL_KP. - The highest possible value is FL_KP_Last so you can - range-check to see if something is on the keypad. - \li All numbered function keys use the number on the function key plus - FL_F. The highest possible number is FL_F_Last, so you - can range-check a value. + character use the value of that ASCII character plus FL_KP. + The highest possible value is FL_KP_Last so you can + range-check to see if something is on the keypad. + \li All numbered function keys use the number on the function key plus + FL_F. The highest possible number is FL_F_Last, so you + can range-check a value. \li Buttons on the mouse are considered keys, and use the button - number (where the left button is 1) plus FL_Button. + number (where the left button is 1) plus FL_Button. \li All other keys on the keypad have a symbol: FL_Escape, - FL_BackSpace, FL_Tab, FL_Enter, FL_Print, FL_Scroll_Lock, FL_Pause, - FL_Insert, FL_Home, FL_Page_Up, FL_Delete, FL_End, FL_Page_Down, - FL_Left, FL_Up, FL_Right, FL_Down, FL_Iso_Key, FL_Shift_L, FL_Shift_R, - FL_Control_L, FL_Control_R, FL_Caps_Lock, FL_Alt_L, FL_Alt_R, - FL_Meta_L, FL_Meta_R, FL_Menu, FL_Num_Lock, FL_KP_Enter. Be - careful not to confuse these with the very similar, but all-caps, - symbols used by Fl::event_state(). + FL_BackSpace, FL_Tab, FL_Enter, FL_Print, FL_Scroll_Lock, FL_Pause, + FL_Insert, FL_Home, FL_Page_Up, FL_Delete, FL_End, FL_Page_Down, + FL_Left, FL_Up, FL_Right, FL_Down, FL_Iso_Key, FL_Shift_L, FL_Shift_R, + FL_Control_L, FL_Control_R, FL_Caps_Lock, FL_Alt_L, FL_Alt_R, + FL_Meta_L, FL_Meta_R, FL_Menu, FL_Num_Lock, FL_KP_Enter. Be + careful not to confuse these with the very similar, but all-caps, + symbols used by Fl::event_state(). On X Fl::get_key(FL_Button+n) does not work. - + On Windows Fl::get_key(FL_KP_Enter) and Fl::event_key(FL_KP_Enter) do not work. */ static int event_key(int key); - /** - Returns true if the given \p key is held down <I>now</I>. + /** + Returns true if the given \p key is held down <I>now</I>. Under X this requires a round-trip to the server and is <I>much</I> 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, and 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 + to get the text equivalent of keystrokes suitable for inserting into strings and text widgets. The returned string is guaranteed to be NULL terminated. @@ -838,7 +836,7 @@ int main() { you paste a nul character. */ static int event_length() {return e_length;} - + /** During an FL_PASTE event of non-textual data, returns a pointer to the pasted data. The returned data is an Fl_RGB_Image * when the result of Fl::event_clipboard_type() is Fl::clipboard_image. */ @@ -861,16 +859,16 @@ int main() { // event destinations: static int handle(int, Fl_Window*); static int handle_(int, Fl_Window*); - /** Gets the widget that is below the mouse. + /** Gets the widget that is below the mouse. \see belowmouse(Fl_Widget*) */ static Fl_Widget* belowmouse() {return belowmouse_;} static void belowmouse(Fl_Widget*); /** Gets the widget that is being pushed. \see void pushed(Fl_Widget*) */ - static Fl_Widget* pushed() {return pushed_;} + static Fl_Widget* pushed() {return pushed_;} static void pushed(Fl_Widget*); /** Gets the current Fl::focus() widget. \sa Fl::focus(Fl_Widget*) */ - static Fl_Widget* focus() {return focus_;} + static Fl_Widget* focus() {return focus_;} static void focus(Fl_Widget*); static void add_handler(Fl_Event_Handler h); static void remove_handler(Fl_Event_Handler h); @@ -881,20 +879,20 @@ int main() { /** @} */ /** \defgroup fl_clipboard Selection & Clipboard functions - FLTK global copy/cut/paste functions declared in <FL/Fl.H> + FLTK global copy/cut/paste functions declared in <FL/Fl.H> @{ */ // cut/paste: /** - Copies the data pointed to by \p stuff to the selection buffer + Copies the data pointed to by \p stuff to the selection buffer (\p destination is 0), the clipboard (\p destination is 1), or both (\p destination is 2). Copying to both is only relevant on X11, on other platforms it maps to the clipboard (1). \p len is the number of relevant bytes in \p stuff. \p type is always Fl::clipboard_plain_text. The selection buffer is used for - middle-mouse pastes and for drag-and-drop selections. The + middle-mouse pastes and for drag-and-drop selections. The clipboard is used for traditional copy/cut/paste operations. - + \note This function is, at present, intended only to copy UTF-8 encoded textual data. To copy graphical data, use the Fl_Copy_Surface class. The \p type argument may allow in the future to copy other kinds of data. @@ -904,17 +902,17 @@ int main() { /** Pastes the data from the selection buffer (\p source is 0) or the clipboard (\p source is 1) into \p receiver. - + The selection buffer (\p source is 0) is used for middle-mouse pastes and for drag-and-drop selections. The clipboard (\p source is 1) is used for copy/cut/paste operations. - + If \p source is 1, the optional \p type argument indicates what type of data is requested from the clipboard. At present, Fl::clipboard_plain_text (requesting text data) and Fl::clipboard_image (requesting image data) are possible. Set things up so the handle function of the \p receiver widget will be called with an FL_PASTE event some time in the future if the clipboard does contain data of the requested type. - + The handle function of \p receiver can process the FL_PASTE event as follows: \li If the \p receiver widget is known to only receive text data, the text string from the specified \p source is in Fl::event_text() with UTF-8 encoding, and the @@ -929,13 +927,13 @@ int main() { If \p receiver accepts the clipboard image, receiver.handle() should return 1 and the application should take ownership of this image (that is, delete it after use). Conversely, if receiver.handle() returns 0, the application must not use the image. - + The receiver should be prepared to be called \e directly by this, or for it to happen \e later, or possibly <i>not at all</i>. This allows the window system to take as long as necessary to retrieve the paste buffer (or even to screw up completely) without complex and error-prone synchronization code in FLTK. - + \par Platform details for image data: \li Unix/Linux platform: Clipboard images in PNG or BMP formats are recognized. Requires linking with the fltk_images library. \li Windows platform: Both bitmap and vectorial (Enhanced metafile) data from clipboard @@ -944,7 +942,7 @@ int main() { can be pasted as image data. */ static void paste(Fl_Widget &receiver, int source, const char *type = Fl::clipboard_plain_text); - + /** FLTK will call the registered callback whenever there is a change to the selection buffer or the clipboard. The source argument indicates which @@ -954,13 +952,13 @@ int main() { \code void clip_callback(int source, void *data) { if ( source == 0 ) printf("CLIP CALLBACK: selection buffer changed\n"); - if ( source == 1 ) printf("CLIP CALLBACK: clipboard changed\n"); + if ( source == 1 ) printf("CLIP CALLBACK: clipboard changed\n"); } [..] int main() { [..] - Fl::add_clipboard_notify(clip_callback); - [..] + Fl::add_clipboard_notify(clip_callback); + [..] } \endcode \note Some systems require polling to monitor the clipboard and may @@ -988,14 +986,14 @@ int main() { filled with relevant data before calling this method. FLTK will then initiate the system wide drag and drop handling. Dropped data will be marked as <i>text</i>. - + Create a selection first using: Fl::copy(const char *stuff, int len, 0) */ static int dnd(); // platform dependent // These are for back-compatibility only: - /** back-compatibility only: Gets the widget owning the current selection + /** back-compatibility only: Gets the widget owning the current selection \see Fl_Widget* selection_owner(Fl_Widget*) */ static Fl_Widget* selection_owner() {return selection_owner_;} static void selection_owner(Fl_Widget*); @@ -1006,7 +1004,7 @@ int main() { /** \defgroup fl_screen Screen functions Fl global screen functions declared in <FL/Fl.H>. - + FLTK supports high-DPI screens using a screen scaling factor. The scaling factor is initialized by the library to a value based on information obtained from the OS. If this initial value @@ -1046,25 +1044,25 @@ int main() { /** \defgroup fl_attributes Color & Font functions - fl global color, font functions. - These functions are declared in <FL/Fl.H> or <FL/fl_draw.H>. + fl global color, font functions. + These functions are declared in <FL/Fl.H> or <FL/fl_draw.H>. @{ */ - + // color map: - static void set_color(Fl_Color, uchar, uchar, uchar); + static void set_color(Fl_Color, uchar, uchar, uchar); /** Sets an entry in the fl_color index table. You can set it to any 8-bit RGB color. The color is not allocated until fl_color(i) is used. */ - static void set_color(Fl_Color i, unsigned c); // platform dependent + static void set_color(Fl_Color i, unsigned c); // platform dependent static unsigned get_color(Fl_Color i); - static void get_color(Fl_Color i, uchar &red, uchar &green, uchar &blue); + static void get_color(Fl_Color i, uchar &red, uchar &green, uchar &blue); /** Frees the specified color from the colormap, if applicable. If overlay is non-zero then the color is freed from the overlay colormap. */ - static void free_color(Fl_Color i, int overlay = 0); // platform dependent + static void free_color(Fl_Color i, int overlay = 0); // platform dependent // fonts: static const char* get_font(Fl_Font); @@ -1073,9 +1071,9 @@ int main() { is useful if you are presenting a choice to the user. There is no guarantee that each face has a different name. The return value points to a static buffer that is overwritten each call. - + The integer pointed to by \p attributes (if the pointer is not - zero) is set to zero, FL_BOLD or FL_ITALIC or + zero) is set to zero, FL_BOLD or FL_ITALIC or FL_BOLD | FL_ITALIC. To locate a "family" of fonts, search forward and back for a set with non-zero attributes, these faces along with the face with a zero attribute before them constitute a family. @@ -1100,7 +1098,7 @@ int main() { face table. It will attempt to put "families" of faces together, so that the normal one is first, followed by bold, italic, and bold italic. - + The optional argument is a string to describe the set of fonts to add. Passing NULL will select only fonts that have the ISO8859-1 character set (and are thus usable by normal text). Passing @@ -1110,7 +1108,7 @@ int main() { values may be useful but are system dependent. With Windows NULL selects fonts with ISO8859-1 encoding and non-NULL selects all fonts. - + The return value is how many faces are in the table after this is done. */ static Fl_Font set_fonts(const char* = 0); // platform dependent @@ -1118,7 +1116,7 @@ int main() { /** @} */ /** \defgroup fl_drawings Drawing functions FLTK global graphics and GUI drawing functions. - These functions are declared in <FL/fl_draw.H>, + These functions are declared in <FL/fl_draw.H>, and in <FL/platform.H> for offscreen buffer-related ones. @{ */ // <Hack to re-order the 'Drawing functions' group> @@ -1143,7 +1141,7 @@ int main() { static void set_box_color(Fl_Color); // back compatibility: - /** \addtogroup fl_windows + /** \addtogroup fl_windows @{ */ /** For back compatibility, sets the void Fl::fatal handler callback */ static void set_abort(Fl_Abort_Handler f) {fatal = f;} @@ -1155,7 +1153,7 @@ int main() { static void set_atclose(Fl_Atclose_Handler f) {atclose = f;} /** @} */ - /** \addtogroup fl_events + /** \addtogroup fl_events @{ */ /** Returns non-zero if the Shift key is pressed. */ static int event_shift() {return e_state&FL_SHIFT;} @@ -1167,9 +1165,9 @@ int main() { static int event_alt() {return e_state&FL_ALT;} /** Returns the mouse buttons state bits; if non-zero, then at least one - button is pressed now. This function returns the button state at the - time of the event. During an FL_RELEASE event, the state - of the released button will be 0. To find out, which button + button is pressed now. This function returns the button state at the + time of the event. During an FL_RELEASE event, the state + of the released button will be 0. To find out, which button caused an FL_RELEASE event, you can use Fl::event_button() instead. \return a bit mask value like { [FL_BUTTON1] | [FL_BUTTON2] | [FL_BUTTON3] } */ @@ -1234,7 +1232,7 @@ int main() { */ static int dnd_text_ops() { return option(OPTION_DND_TEXT); } /** \defgroup fl_multithread Multithreading support functions - fl multithreading support functions declared in <FL/Fl.H> + fl multithreading support functions declared in <FL/Fl.H> @{ */ // Multithreading support: @@ -1246,7 +1244,7 @@ int main() { /** The thread_message() method returns the last message that was sent from a child by the awake() method. - + See also: \ref advanced_multithreading */ static void* thread_message(); // platform dependent @@ -1268,17 +1266,17 @@ int main() { There are three groups of related methods: -# scheduled widget deletion - - Fl::delete_widget() schedules widgets for deletion - - Fl::do_widget_deletion() deletes all scheduled widgets + - Fl::delete_widget() schedules widgets for deletion + - Fl::do_widget_deletion() deletes all scheduled widgets -# widget watch list ("smart pointers") - - Fl::watch_widget_pointer() adds a widget pointer to the watch list - - Fl::release_widget_pointer() removes a widget pointer from the watch list - - Fl::clear_widget_pointer() clears a widget pointer \e in the watch list + - Fl::watch_widget_pointer() adds a widget pointer to the watch list + - Fl::release_widget_pointer() removes a widget pointer from the watch list + - Fl::clear_widget_pointer() clears a widget pointer \e in the watch list -# the class Fl_Widget_Tracker: - - the constructor calls Fl::watch_widget_pointer() - - the destructor calls Fl::release_widget_pointer() - - the access methods can be used to test, if a widget has been deleted - \see Fl_Widget_Tracker. + - the constructor calls Fl::watch_widget_pointer() + - the destructor calls Fl::release_widget_pointer() + - the access methods can be used to test, if a widget has been deleted + \see Fl_Widget_Tracker. @{ */ // Widget deletion: @@ -1288,7 +1286,7 @@ int main() { static void release_widget_pointer(Fl_Widget *&w); static void clear_widget_pointer(Fl_Widget const *w); /** @} */ - + /** sets whether GL windows should be drawn at high resolution on Apple computers with retina displays \version 1.3.4 @@ -1300,7 +1298,7 @@ int main() { \version 1.3.4 */ static int use_high_res_GL() { return use_high_res_GL_; } - + /** sets whether OpenGL uses textures to draw all text. By default, FLTK draws OpenGL text using textures, if the necessary hardware support is available. Call \p Fl::draw_GL_text_with_textures(0) @@ -1313,7 +1311,7 @@ int main() { \version 1.4.0 */ static void draw_GL_text_with_textures(int val) { draw_GL_text_with_textures_ = val; } - + /** returns whether whether OpenGL uses textures to draw all text. Default is yes. \see draw_GL_text_with_textures(int val) @@ -1324,7 +1322,7 @@ int main() { #ifdef FLTK_HAVE_CAIRO /** \defgroup group_cairo Cairo Support Functions and Classes - @{ + @{ */ public: // Cairo support API @@ -1336,19 +1334,19 @@ public: When you wish to associate a cairo context in this mode, you need to call explicitly in your draw() overridden method, Fl::cairo_make_current(Fl_Window*). This will create a cairo context - but only for this Window. - Still in custom cairo application it is possible to handle + but only for this Window. + Still in custom cairo application it is possible to handle completely this process automatically by setting \p alink to true. In this last case, you don't need anymore to call Fl::cairo_make_current(). You can use Fl::cairo_cc() to get the current cairo context anytime. \note Only available when configure has the --enable-cairo option */ static void cairo_autolink_context(bool alink) {cairo_state_.autolink(alink);} - /** + /** Gets the current autolink mode for cairo support. - \retval false if no cairo context autolink is made for each window. - \retval true if any fltk window is attached a cairo context when it - is current. \see void cairo_autolink_context(bool alink) + \retval false if no cairo context autolink is made for each window. + \retval true if any fltk window is attached a cairo context when it + is current. \see void cairo_autolink_context(bool alink) \note Only available when configure has the --enable-cairo option */ static bool cairo_autolink_context() {return cairo_state_.autolink();} @@ -1358,14 +1356,14 @@ public: Set \p own to true if you want fltk to handle this cc deletion. \note Only available when configure has the --enable-cairo option */ - static void cairo_cc(cairo_t * c, bool own=false){ cairo_state_.cc(c, own); } + static void cairo_cc(cairo_t * c, bool own=false){ cairo_state_.cc(c, own); } private: static cairo_t * cairo_make_current(void* gc); static cairo_t * cairo_make_current(void* gc, int W, int H); static Fl_Cairo_State cairo_state_; public: - /** @} */ + /** @} */ #endif // FLTK_HAVE_CAIRO @@ -1386,7 +1384,7 @@ public: variable, such that its destructor is called when the object's scope is left. This ensures that no stale widget pointers are left in the widget watch list (see example below). - + You can also create Fl_Widget_Tracker objects with \c new, but then it is your responsibility to delete the object (and thus remove the widget pointer from the watch list) when it is no longer needed. @@ -1454,12 +1452,8 @@ public: }; /** \defgroup fl_unicode Unicode and UTF-8 functions - fl global Unicode and UTF-8 handling functions declared in <FL/fl_utf8.h> + fl global Unicode and UTF-8 handling functions declared in <FL/fl_utf8.h> @{ */ /** @} */ #endif // !Fl_H - -// -// End of "$Id$". -// diff --git a/FL/Fl_Adjuster.H b/FL/Fl_Adjuster.H index fb20f7d52..c2e308128 100644 --- a/FL/Fl_Adjuster.H +++ b/FL/Fl_Adjuster.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Adjuster widget header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2010 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -31,7 +29,7 @@ /** The Fl_Adjuster widget was stolen from Prisms, and has proven to be very useful for values that need a large dynamic range. - \image html adjuster1.png + \image html adjuster1.png \image latex adjuster1.png "Fl_Adjuster" width=4cm <P>When you press a button and drag to the right the value increases. When you drag to the left it decreases. The largest button adjusts by @@ -67,7 +65,3 @@ public: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_BMP_Image.H b/FL/Fl_BMP_Image.H index 0d60d7114..c779d6525 100644 --- a/FL/Fl_BMP_Image.H +++ b/FL/Fl_BMP_Image.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // BMP image header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2020 by Bill Spitzak and others. @@ -11,9 +9,9 @@ // // https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// https://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -41,7 +39,3 @@ class FL_EXPORT Fl_BMP_Image : public Fl_RGB_Image { }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Bitmap.H b/FL/Fl_Bitmap.H index 47818e7f9..e0fc2244d 100644 --- a/FL/Fl_Bitmap.H +++ b/FL/Fl_Bitmap.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Bitmap header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2017 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -38,7 +36,7 @@ public: const uchar *array; /** Non-zero if array points to bitmap data allocated internally */ int alloc_array; - + private: /** for internal use */ fl_uintptr_t id_; @@ -62,7 +60,3 @@ public: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Box.H b/FL/Fl_Box.H index e1007a7f7..c168566aa 100644 --- a/FL/Fl_Box.H +++ b/FL/Fl_Box.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Box header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2010 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -45,7 +43,7 @@ public: <P>The destructor removes the box. */ Fl_Box(int X, int Y, int W, int H, const char *l=0); - + /** See Fl_Box::Fl_Box(int x, int y, int w, int h, const char * = 0) */ Fl_Box(Fl_Boxtype b, int X, int Y, int W, int H, const char *l); @@ -53,7 +51,3 @@ public: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Browser.H b/FL/Fl_Browser.H index 323076362..707b3acc1 100644 --- a/FL/Fl_Browser.H +++ b/FL/Fl_Browser.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Browser header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2016 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -36,7 +34,7 @@ struct FL_BLINE; lines, and manages all the storage for the text. This is not a text editor or spreadsheet! But it is useful for showing a vertical list of named objects to the user. - + \image html fl_hold_browser.png "Fl_Hold_Browser" \image latex fl_hold_browser.png "Fl_Hold_Browser" width=4cm @@ -57,9 +55,9 @@ struct FL_BLINE; describes. The base class does nothing when the user clicks on it. The - subclasses - Fl_Select_Browser, - Fl_Hold_Browser, and + subclasses + Fl_Select_Browser, + Fl_Hold_Browser, and Fl_Multi_Browser react to user clicks to select lines in the browser and do callbacks. @@ -76,7 +74,7 @@ struct FL_BLINE; \code // How to loop through all the items in the browser for ( int t=1; t<=browser->size(); t++ ) { // index 1 based..! - printf("item #%d, label='%s'\n", t, browser->text(t)); + printf("item #%d, label='%s'\n", t, browser->text(t)); } \endcode @@ -87,15 +85,15 @@ struct FL_BLINE; */ class FL_EXPORT Fl_Browser : public Fl_Browser_ { - FL_BLINE *first; // the array of lines + FL_BLINE *first; // the array of lines FL_BLINE *last; FL_BLINE *cache; - int cacheline; // line number of cache - int lines; // Number of lines + int cacheline; // line number of cache + int lines; // Number of lines int full_height_; const int* column_widths_; - char format_char_; // alternative to @-sign - char column_char_; // alternative to tab + char format_char_; // alternative to @-sign + char column_char_; // alternative to tab protected: @@ -218,7 +216,7 @@ public: Gets the current format code prefix character, which by default is '\@'. A string of formatting codes at the start of each column are stripped off and used to modify how the rest of the line is printed: - + \li <tt>'\@.'</tt> Print rest of line, don't look for more '\@' signs \li <tt>'\@\@'</tt> Doubling the format character prints the format character once, followed by the rest of line @@ -241,7 +239,7 @@ public: \li <tt>'\@-'</tt> draw an engraved line through the middle. Notice that the '\@.' command can be used to reliably - terminate the parsing. To print a random string in a random color, use + terminate the parsing. To print a random string in a random color, use <tt>sprintf("@C%d@.%s", color, string)</tt> and it will work even if the string starts with a digit or has the format character in it. */ @@ -330,7 +328,3 @@ public: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Browser_.H b/FL/Fl_Browser_.H index 308f47ce6..af86bc2c7 100644 --- a/FL/Fl_Browser_.H +++ b/FL/Fl_Browser_.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Common browser header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2016 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -28,15 +26,15 @@ #include "Fl_Group.H" #endif #include "Fl_Scrollbar.H" -#include <FL/Fl.H> // Fl::scrollbar_size() +#include <FL/Fl.H> // Fl::scrollbar_size() -#define FL_NORMAL_BROWSER 0 /**< type() of Fl_Browser */ -#define FL_SELECT_BROWSER 1 /**< type() of FL_Select_Browser */ -#define FL_HOLD_BROWSER 2 /**< type() of Fl_Hold_Browser */ -#define FL_MULTI_BROWSER 3 /**< type() of Fl_Multi_Browser */ +#define FL_NORMAL_BROWSER 0 /**< type() of Fl_Browser */ +#define FL_SELECT_BROWSER 1 /**< type() of FL_Select_Browser */ +#define FL_HOLD_BROWSER 2 /**< type() of Fl_Hold_Browser */ +#define FL_MULTI_BROWSER 3 /**< type() of Fl_Multi_Browser */ -#define FL_SORT_ASCENDING 0 /**< sort browser items in ascending alphabetic order. */ -#define FL_SORT_DESCENDING 1 /**< sort in descending order */ +#define FL_SORT_ASCENDING 0 /**< sort browser items in ascending alphabetic order. */ +#define FL_SORT_DESCENDING 1 /**< sort in descending order */ /** This is the base class for browsers. To be useful it must be @@ -44,7 +42,7 @@ browser and the file chooser's browser are subclassed off of this. This has been designed so that the subclass has complete control - over the storage of the data, although because next() and + over the storage of the data, although because next() and prev() functions are used to index, it works best as a linked list or as a large block of characters in which the line breaks must be searched for. @@ -76,21 +74,21 @@ Keyboard navigation of browser items extend a selection or de-selection. */ class FL_EXPORT Fl_Browser_ : public Fl_Group { - int position_; // where user wants it scrolled to - int real_position_; // the current vertical scrolling position - int hposition_; // where user wants it panned to - int real_hposition_; // the current horizontal scrolling position - int offset_; // how far down top_ item the real_position is - int max_width; // widest object seen so far - uchar has_scrollbar_; // which scrollbars are enabled + int position_; // where user wants it scrolled to + int real_position_; // the current vertical scrolling position + int hposition_; // where user wants it panned to + int real_hposition_; // the current horizontal scrolling position + int offset_; // how far down top_ item the real_position is + int max_width; // widest object seen so far + uchar has_scrollbar_; // which scrollbars are enabled Fl_Font textfont_; Fl_Fontsize textsize_; Fl_Color textcolor_; - void* top_; // which item scrolling position is in - void* selection_; // which is selected (except for FL_MULTI_BROWSER) + void* top_; // which item scrolling position is in + void* selection_; // which is selected (except for FL_MULTI_BROWSER) void *redraw1,*redraw2; // minimal update pointers - void* max_width_item; // which item has max_width_ - int scrollbar_size_; // size of scrollbar trough + void* max_width_item; // which item has max_width_ + int scrollbar_size_; // size of scrollbar trough void update_top(); @@ -98,7 +96,7 @@ protected: // All of the following must be supplied by the subclass: /** - This method must be provided by the subclass + This method must be provided by the subclass to return the first item in the list. \see item_first(), item_next(), item_last(), item_prev() */ @@ -121,8 +119,8 @@ protected: \see item_first(), item_next(), item_last(), item_prev() */ virtual void *item_last() const { return 0L; } - /** - This method must be provided by the subclass to return + /** + This method must be provided by the subclass to return the height of \p item in pixels. Allow for two additional pixels for the list selection box. \param[in] item The item whose height is returned. @@ -145,28 +143,28 @@ protected: */ virtual void item_draw(void *item,int X,int Y,int W,int H) const = 0; /** - This optional method returns a string (label) that may be used for sorting. + This optional method returns a string (label) that may be used for sorting. \param[in] item The item whose label text is returned. \returns The item's text label. (Can be NULL if blank) */ virtual const char *item_text(void *item) const { (void)item; return 0L; } /** - This optional method should be provided by the subclass + This optional method should be provided by the subclass to efficiently swap browser items \p a and \p b, such as for sorting. \param[in] a,b The two items to be swapped. */ virtual void item_swap(void *a,void *b) { (void)a; (void)b; } /** - This method must be provided by the subclass - to return the item for the specified \p index. + This method must be provided by the subclass + to return the item for the specified \p index. \param[in] index The \p index of the item to be returned \returns The item at the specified \p index. */ virtual void *item_at(int index) const { (void)index; return 0L; } // you don't have to provide these but it may help speed it up: - virtual int full_width() const ; // current width of all items - virtual int full_height() const ; // current height of all items - virtual int incr_height() const ; // average height of an item + virtual int full_width() const ; // current width of all items + virtual int full_height() const ; // current height of all items + virtual int incr_height() const ; // average height of an item // These only need to be done by subclass if you want a multi-browser: virtual void item_select(void *item,int val=1); virtual int item_selected(void *item) const ; @@ -178,9 +176,9 @@ protected: void *top() const { return top_; } /** Returns the item currently selected, or NULL if there is no selection. - + For multiple selection browsers this call returns the currently focused item, - even if it is not selected. To find all selected items, call + even if it is not selected. To find all selected items, call Fl_Multi_Browser::selected() for every item in question. */ void *selection() const { return selection_; } @@ -197,9 +195,9 @@ protected: */ void redraw_lines() { damage(FL_DAMAGE_SCROLL); } // redraw all of them void bbox(int &X,int &Y,int &W,int &H) const; - int leftedge() const; // x position after scrollbar & border + int leftedge() const; // x position after scrollbar & border void *find_item(int ypos); // item under mouse - + void draw(); Fl_Browser_(int X,int Y,int W,int H,const char *L=0); @@ -223,7 +221,7 @@ public: /** Gets the vertical scroll position of the list as a pixel position \p pos. The position returned is how many pixels of the list are scrolled off the top edge - of the screen. Example: A position of '3' indicates the top 3 pixels of + of the screen. Example: A position of '3' indicates the top 3 pixels of the list are scrolled off the top edge of the screen. \see position(), hposition() */ @@ -250,13 +248,13 @@ public: - bit 3-31: reserved for future use */ enum { // values for has_scrollbar() - HORIZONTAL = 1, ///< Only show horizontal scrollbar. - VERTICAL = 2, ///< Only show vertical scrollbar. - BOTH = 3, ///< Show both scrollbars. (default) - ALWAYS_ON = 4, ///< Specified scrollbar(s) should 'always' be shown (to be used with HORIZONTAL/VERTICAL) - HORIZONTAL_ALWAYS = 5, ///< Horizontal scrollbar always on. - VERTICAL_ALWAYS = 6, ///< Vertical scrollbar always on. - BOTH_ALWAYS = 7 ///< Both scrollbars always on. + HORIZONTAL = 1, ///< Only show horizontal scrollbar. + VERTICAL = 2, ///< Only show vertical scrollbar. + BOTH = 3, ///< Show both scrollbars. (default) + ALWAYS_ON = 4, ///< Specified scrollbar(s) should 'always' be shown (to be used with HORIZONTAL/VERTICAL) + HORIZONTAL_ALWAYS = 5, ///< Horizontal scrollbar always on. + VERTICAL_ALWAYS = 6, ///< Vertical scrollbar always on. + BOTH_ALWAYS = 7 ///< Both scrollbars always on. }; /** Returns the current scrollbar mode, see Fl_Browser_::has_scrollbar(uchar) @@ -265,9 +263,9 @@ public: /** Sets whether the widget should have scrollbars or not (default Fl_Browser_::BOTH). By default you can scroll in both directions, and the scrollbars - disappear if the data will fit in the widget. + disappear if the data will fit in the widget. has_scrollbar() changes this based on the value of \p mode: - + - 0 - No scrollbars. - Fl_Browser_::HORIZONTAL - Only a horizontal scrollbar. @@ -317,9 +315,9 @@ public: /** Gets the current size of the scrollbars' troughs, in pixels. - If this value is zero (default), this widget will use the + If this value is zero (default), this widget will use the Fl::scrollbar_size() value as the scrollbar's width. - + \returns Scrollbar size in pixels, or 0 if the global Fl::scrollbar_size() is being used. \see Fl::scrollbar_size(int) */ @@ -330,24 +328,24 @@ public: Sets the pixel size of the scrollbars' troughs to \p newSize, in pixels. Normally you should not need this method, and should use - Fl::scrollbar_size(int) instead to manage the size of ALL - your widgets' scrollbars. This ensures your application + Fl::scrollbar_size(int) instead to manage the size of ALL + your widgets' scrollbars. This ensures your application has a consistent UI, is the default behavior, and is normally what you want. Only use THIS method if you really need to override the global scrollbar size. The need for this should be rare. - + Setting \p newSize to the special value of 0 causes the widget to track the global Fl::scrollbar_size(), which is the default. - + \param[in] newSize Sets the scrollbar size in pixels.\n If 0 (default), scrollbar size tracks the global Fl::scrollbar_size() \see Fl::scrollbar_size() */ void scrollbar_size(int newSize) { scrollbar_size_ = newSize; - } + } /** Returns the global value Fl::scrollbar_size(). \deprecated Use scrollbar_size() instead. @@ -379,7 +377,3 @@ public: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Button.H b/FL/Fl_Button.H index 49f5dfa4b..e9ad92df8 100644 --- a/FL/Fl_Button.H +++ b/FL/Fl_Button.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Button header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2014 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -27,13 +25,13 @@ #endif // values for type() -#define FL_NORMAL_BUTTON 0 /**< value() will be set to 1 during the press of the button and +#define FL_NORMAL_BUTTON 0 /**< value() will be set to 1 during the press of the button and reverts back to 0 when the button is released */ -#define FL_TOGGLE_BUTTON 1 ///< value() toggles between 0 and 1 at every click of the button -#define FL_RADIO_BUTTON (FL_RESERVED_TYPE+2) /**< is set to 1 at button press, and all other - buttons in the same group with <tt>type() == FL_RADIO_BUTTON</tt> - are set to zero.*/ -#define FL_HIDDEN_BUTTON 3 ///< for Forms compatibility +#define FL_TOGGLE_BUTTON 1 ///< value() toggles between 0 and 1 at every click of the button +#define FL_RADIO_BUTTON (FL_RESERVED_TYPE+2) /**< is set to 1 at button press, and all other + buttons in the same group with <tt>type() == FL_RADIO_BUTTON</tt> + are set to zero.*/ +#define FL_HIDDEN_BUTTON 3 ///< for Forms compatibility extern FL_EXPORT Fl_Shortcut fl_old_shortcut(const char*); @@ -59,7 +57,7 @@ class Fl_Widget_Tracker; \li \c FL_TOGGLE_BUTTON: value() is inverted after button press. \li \c FL_RADIO_BUTTON: value() is set to 1 after button press, and all other buttons in the current group with <tt>type() == FL_RADIO_BUTTON</tt> - are set to zero. + are set to zero. \todo Refactor the doxygen comments for Fl_Button when() documentation. @@ -70,7 +68,7 @@ class Fl_Widget_Tracker; clicks the button, or when a shortcut is typed. \li \c FL_WHEN_CHANGED: The callback is done each time the value() changes (when the user pushes and releases the button, and as the mouse is - dragged around in and out of the button). + dragged around in and out of the button). */ class FL_EXPORT Fl_Button : public Fl_Widget { @@ -170,7 +168,3 @@ public: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Cairo.H b/FL/Fl_Cairo.H index 1994f0e5e..3a32647a4 100644 --- a/FL/Fl_Cairo.H +++ b/FL/Fl_Cairo.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Main header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2016 by Bill Spitzak and others. @@ -9,15 +7,15 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file - Handling transparently platform dependent cairo include files + Handling transparently platform dependent cairo include files */ #ifndef FL_CAIRO_H @@ -31,12 +29,12 @@ # include <cairo.h> -/** +/** \addtogroup group_cairo @{ */ -/** +/** Contains all the necessary info on the current cairo context. A private internal & unique corresponding object is created to permit cairo context state handling while keeping it opaque. @@ -48,33 +46,33 @@ public: Fl_Cairo_State() : cc_(0), own_cc_(false), autolink_(false), window_(0), gc_(0) {} // access attributes - cairo_t* cc() const {return cc_;} ///< Gets the current cairo context - bool autolink() const {return autolink_;} ///< Gets the autolink option. See Fl::cairo_autolink_context(bool) + cairo_t* cc() const {return cc_;} ///< Gets the current cairo context + bool autolink() const {return autolink_;} ///< Gets the autolink option. See Fl::cairo_autolink_context(bool) /** Sets the current cairo context. - \p own == \e true (the default) indicates that the cairo context \p c - will be deleted by FLTK internally when another cc is set later. + \p own == \e true (the default) indicates that the cairo context \p c + will be deleted by FLTK internally when another cc is set later. - \p own == \e false indicates cc deletion is handled externally - by the user program. + \p own == \e false indicates cc deletion is handled externally + by the user program. */ void cc(cairo_t* c, bool own=true) { - if (cc_ && own_cc_) cairo_destroy(cc_); - cc_=c; - if (!cc_) window_=0; - own_cc_=own; + if (cc_ && own_cc_) cairo_destroy(cc_); + cc_=c; + if (!cc_) window_=0; + own_cc_=own; } void autolink(bool b); ///< Sets the autolink option, only available with --enable-cairoext - void window(void* w) {window_=w;} ///< Sets the window \p w to keep track on - void* window() const {return window_;} ///< Gets the last window attached to a cc - void gc(void* c) {gc_=c;} ///< Sets the gc \p c to keep track on - void* gc() const {return gc_;} ///< Gets the last gc attached to a cc + void window(void* w) {window_=w;} ///< Sets the window \p w to keep track on + void* window() const {return window_;} ///< Gets the last window attached to a cc + void gc(void* c) {gc_=c;} ///< Sets the gc \p c to keep track on + void* gc() const {return gc_;} ///< Gets the last gc attached to a cc private: - cairo_t * cc_; // contains the unique autoupdated cairo context - bool own_cc_; // indicates whether we must delete the cc, useful for internal cleanup - bool autolink_; // false by default, prevents the automatic cairo mapping on fltk windows - // for custom cairo implementations. + cairo_t * cc_; // contains the unique autoupdated cairo context + bool own_cc_; // indicates whether we must delete the cc, useful for internal cleanup + bool autolink_; // false by default, prevents the automatic cairo mapping on fltk windows + // for custom cairo implementations. void* window_, *gc_; // for keeping track internally of last win+gc treated }; @@ -82,7 +80,3 @@ private: # endif // FLTK_HAVE_CAIRO #endif // FL_CAIRO_H - -// -// End of "$Id$" . -// diff --git a/FL/Fl_Cairo_Window.H b/FL/Fl_Cairo_Window.H index dcec92f48..8d98cd5bd 100644 --- a/FL/Fl_Cairo_Window.H +++ b/FL/Fl_Cairo_Window.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Main header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2018 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -29,7 +27,7 @@ # include <FL/Fl.H> # include <FL/Fl_Double_Window.H> -/** +/** \addtogroup group_cairo @{ */ @@ -44,7 +42,7 @@ \note You can alternatively define your custom cairo FLTK window, and thus at least override the draw() method to provide custom cairo support. In this case you will probably use Fl::cairo_make_current(Fl_Window*) - to attach a context to your window. You should do it only when your window is + to attach a context to your window. You should do it only when your window is the current window. \see Fl_Window::current() */ class FL_EXPORT Fl_Cairo_Window : public Fl_Double_Window { @@ -62,7 +60,7 @@ protected: if (draw_cb_) { // call the Cairo draw callback // manual method ? if yes explicitly get a cairo_context here if (!Fl::cairo_autolink_context()) - Fl::cairo_make_current(this); + Fl::cairo_make_current(this); draw_cb_(this, Fl::cairo_cc()); // flush cairo drawings: necessary at least for Windows cairo_surface_t *s = cairo_get_target(Fl::cairo_cc()); @@ -73,7 +71,7 @@ protected: public: /** This defines the cairo draw callback prototype that you must further */ typedef void (*cairo_draw_cb) (Fl_Cairo_Window* self, cairo_t* def); - /** + /** You must provide a draw callback which will implement your cairo rendering. This method will permit you to set your cairo callback to \p cb. */ @@ -87,7 +85,3 @@ private: # endif // FLTK_HAVE_CAIRO #endif // FL_CAIRO_WINDOW_H - -// -// End of "$Id$" . -// diff --git a/FL/Fl_Chart.H b/FL/Fl_Chart.H index 8664d9742..a19b68cd6 100644 --- a/FL/Fl_Chart.H +++ b/FL/Fl_Chart.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Forms chart header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2010 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -27,24 +25,24 @@ #endif // values for type() -#define FL_BAR_CHART 0 /**< type() for Bar Chart variant */ -#define FL_HORBAR_CHART 1 /**< type() for Horizontal Bar Chart variant */ -#define FL_LINE_CHART 2 /**< type() for Line Chart variant */ -#define FL_FILL_CHART 3 /**< type() for Fill Line Chart variant */ -#define FL_SPIKE_CHART 4 /**< type() for Spike Chart variant */ -#define FL_PIE_CHART 5 /**< type() for Pie Chart variant */ -#define FL_SPECIALPIE_CHART 6 /**< type() for Special Pie Chart variant */ +#define FL_BAR_CHART 0 /**< type() for Bar Chart variant */ +#define FL_HORBAR_CHART 1 /**< type() for Horizontal Bar Chart variant */ +#define FL_LINE_CHART 2 /**< type() for Line Chart variant */ +#define FL_FILL_CHART 3 /**< type() for Fill Line Chart variant */ +#define FL_SPIKE_CHART 4 /**< type() for Spike Chart variant */ +#define FL_PIE_CHART 5 /**< type() for Pie Chart variant */ +#define FL_SPECIALPIE_CHART 6 /**< type() for Special Pie Chart variant */ -#define FL_FILLED_CHART FL_FILL_CHART /**< for compatibility */ +#define FL_FILLED_CHART FL_FILL_CHART /**< for compatibility */ -#define FL_CHART_MAX 128 /**< max entries per chart */ -#define FL_CHART_LABEL_MAX 18 /**< max label length for entry */ +#define FL_CHART_MAX 128 /**< max entries per chart */ +#define FL_CHART_LABEL_MAX 18 /**< max label length for entry */ /** For internal use only */ struct FL_CHART_ENTRY { - float val; /**< For internal use only. */ - unsigned col; /**< For internal use only. */ - char str[FL_CHART_LABEL_MAX+1]; /**< For internal use only. */ + float val; /**< For internal use only. */ + unsigned col; /**< For internal use only. */ + char str[FL_CHART_LABEL_MAX+1]; /**< For internal use only. */ }; /** @@ -52,7 +50,7 @@ struct FL_CHART_ENTRY { \brief Fl_Chart displays simple charts. It is provided for Forms compatibility. - \image html charts.png + \image html charts.png \image latex charts.png "Fl_Chart" width=10cm \todo Refactor Fl_Chart::type() information. @@ -145,7 +143,3 @@ public: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Check_Browser.H b/FL/Fl_Check_Browser.H index 2184c721b..1031a64a3 100644 --- a/FL/Fl_Check_Browser.H +++ b/FL/Fl_Check_Browser.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Fl_Check_Browser header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2010 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -55,11 +53,11 @@ public: #ifndef FL_DOXYGEN /** For internal use only. */ struct cb_item { - cb_item *next; /**< For internal use only. */ - cb_item *prev; /**< For internal use only. */ - char checked; /**< For internal use only. */ - char selected; /**< For internal use only. */ - char *text; /**< For internal use only. */ + cb_item *next; /**< For internal use only. */ + cb_item *prev; /**< For internal use only. */ + char checked; /**< For internal use only. */ + char selected; /**< For internal use only. */ + char *text; /**< For internal use only. */ }; #endif // !FL_DOXYGEN @@ -81,7 +79,7 @@ public: ~Fl_Check_Browser() { clear(); } int add(char *s); // add an (unchecked) item int add(char *s, int b); // add an item and set checked - // both return the new nitems() + // both return the new nitems() int remove(int item); // delete an item. Returns nitems() // inline const char * methods to avoid breaking binary compatibility... @@ -114,7 +112,3 @@ public: #endif // Fl_Check_Browser_H -// -// End of "$Id$". -// - diff --git a/FL/Fl_Check_Button.H b/FL/Fl_Check_Button.H index 9c67c73bb..29a0a4aa6 100644 --- a/FL/Fl_Check_Button.H +++ b/FL/Fl_Check_Button.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Check button header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2014 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // #ifndef Fl_Check_Button_H @@ -33,7 +31,3 @@ public: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Choice.H b/FL/Fl_Choice.H index 676ec658e..31da14524 100644 --- a/FL/Fl_Choice.H +++ b/FL/Fl_Choice.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Choice header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2010 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -45,7 +43,7 @@ and then: - The item's callback is done if one has been set; the - Fl_Choice is passed as the Fl_Widget* argument, + Fl_Choice is passed as the Fl_Widget* argument, along with any userdata configured for the callback. - If the item does not have a callback, the Fl_Choice widget's @@ -100,7 +98,7 @@ return Fl::run(); } \endcode - + */ class FL_EXPORT Fl_Choice : public Fl_Menu_ { protected: @@ -122,7 +120,3 @@ public: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Clock.H b/FL/Fl_Clock.H index 74c1ede63..aa29ec04a 100644 --- a/FL/Fl_Clock.H +++ b/FL/Fl_Clock.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Clock header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2017 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -30,12 +28,12 @@ // Please change doxygen documentation below (class Fl_Clock_Output) // accordingly as well when changing the following type values: -#define FL_SQUARE_CLOCK 0 /**< type() of Square Clock variant */ -#define FL_ROUND_CLOCK 1 /**< type() of Round Clock variant */ -#define FL_ANALOG_CLOCK FL_SQUARE_CLOCK /**< An analog clock is square */ +#define FL_SQUARE_CLOCK 0 /**< type() of Square Clock variant */ +#define FL_ROUND_CLOCK 1 /**< type() of Round Clock variant */ +#define FL_ANALOG_CLOCK FL_SQUARE_CLOCK /**< An analog clock is square */ #define FL_DIGITAL_CLOCK FL_SQUARE_CLOCK /**< Not yet implemented */ -// fabien: Please keep the horizontal formatting of both images in class desc, +// fabien: Please keep the horizontal formatting of both images in class desc, // don't lose vertical space for nothing! /** @@ -45,11 +43,11 @@ The time shown on the clock is not updated. To display the current time, use Fl_Clock instead. - \htmlonly <BR> <table align=CENTER border=1 cellpadding=5 > + \htmlonly <BR> <table align=CENTER border=1 cellpadding=5 > <caption align=bottom>type() FL_SQUARE_CLOCK and FL_ROUND_CLOCK </caption> <TR><TD> \endhtmlonly - \image html clock.png + \image html clock.png \htmlonly </TD> <TD> \endhtmlonly - \image html round_clock.png + \image html round_clock.png \htmlonly </TD> </TR> </table> \endhtmlonly \image latex clock.png "FL_SQUARE_CLOCK type" width=4cm \image latex round_clock.png "FL_ROUND_CLOCK type" width=4cm @@ -57,10 +55,10 @@ Values for clock type() (\#include \<FL/Clock.H\>): \code - #define FL_SQUARE_CLOCK 0 // Square Clock variant - #define FL_ROUND_CLOCK 1 // Round Clock variant - #define FL_ANALOG_CLOCK FL_SQUARE_CLOCK // An analog clock is square - #define FL_DIGITAL_CLOCK FL_SQUARE_CLOCK // Not yet implemented + #define FL_SQUARE_CLOCK 0 // Square Clock variant + #define FL_ROUND_CLOCK 1 // Round Clock variant + #define FL_ANALOG_CLOCK FL_SQUARE_CLOCK // An analog clock is square + #define FL_DIGITAL_CLOCK FL_SQUARE_CLOCK // Not yet implemented \endcode */ @@ -76,8 +74,8 @@ public: Fl_Clock_Output(int X, int Y, int W, int H, const char *L = 0); - void value(ulong v); // set to this Unix time - + void value(ulong v); // set to this Unix time + void value(int H, int m, int s); /** @@ -108,9 +106,9 @@ public: /** Returns the shadow drawing mode of the hands. - \returns shadow drawing mode of the hands - \retval 0 no shadows - \retval 1 draw shadows of hands (default) + \returns shadow drawing mode of the hands + \retval 0 no shadows + \retval 1 draw shadows of hands (default) */ int shadow() const {return shadow_;} @@ -124,7 +122,7 @@ public: The default is to draw the shadows (1). - \param[in] mode 1 = shadows (default), 0 = no shadows + \param[in] mode 1 = shadows (default), 0 = no shadows */ void shadow(int mode) { shadow_ = mode ? 1 : 0; } }; @@ -135,18 +133,18 @@ public: \class Fl_Clock \brief This widget provides a round analog clock display. - Fl_Clock is provided for Forms compatibility. + Fl_Clock is provided for Forms compatibility. It installs a 1-second timeout callback using Fl::add_timeout(). You can choose the rounded or square type of the clock with type(). Please see Fl_Clock_Output widget for applicable values. - \htmlonly <BR> <table align=CENTER border=1 cellpadding=5 > + \htmlonly <BR> <table align=CENTER border=1 cellpadding=5 > <caption align=bottom>type() FL_SQUARE_CLOCK and FL_ROUND_CLOCK </caption> <TR><TD> \endhtmlonly - \image html clock.png + \image html clock.png \htmlonly </TD> <TD> \endhtmlonly - \image html round_clock.png + \image html round_clock.png \htmlonly </TD> </TR> </table> \endhtmlonly - \image latex clock.png "FL_SQUARE_CLOCK type" width=4cm + \image latex clock.png "FL_SQUARE_CLOCK type" width=4cm \image latex round_clock.png "FL_ROUND_CLOCK type" width=4cm \see class Fl_Clock_Output @@ -156,14 +154,10 @@ public: int handle(int); Fl_Clock(int X, int Y, int W, int H, const char *L = 0); - + Fl_Clock(uchar t, int X, int Y, int W, int H, const char *L); - + ~Fl_Clock(); }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Color_Chooser.H b/FL/Fl_Color_Chooser.H index db4fae37a..8ba252035 100644 --- a/FL/Fl_Color_Chooser.H +++ b/FL/Fl_Color_Chooser.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Color chooser header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2019 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /** \file @@ -67,7 +65,7 @@ public: #endif // !FL_DOXYGEN -/** \addtogroup group_comdlg +/** \addtogroup group_comdlg @{ */ /** @@ -122,21 +120,21 @@ class FL_EXPORT Fl_Color_Chooser : public Fl_Group { static void rgb_cb(Fl_Widget*, void*); static void mode_cb(Fl_Widget*, void*); public: - + int handle(int e); - /** - Returns which Fl_Color_Chooser variant is currently active - \return color modes are rgb(0), byte(1), hex(2), or hsv(3) + /** + Returns which Fl_Color_Chooser variant is currently active + \return color modes are rgb(0), byte(1), hex(2), or hsv(3) */ int mode() {return choice.value();} - - /** - Set which Fl_Color_Chooser variant is currently active - \param[in] newMode color modes are rgb(0), byte(1), hex(2), or hsv(3) + + /** + Set which Fl_Color_Chooser variant is currently active + \param[in] newMode color modes are rgb(0), byte(1), hex(2), or hsv(3) */ void mode(int newMode); - + /** Returns the current hue. 0 <= hue < 6. Zero is red, one is yellow, two is green, etc. @@ -190,7 +188,3 @@ FL_EXPORT int fl_color_chooser(const char* name, double& r, double& g, double& b FL_EXPORT int fl_color_chooser(const char* name, uchar& r, uchar& g, uchar& b, int m=-1); #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Copy_Surface.H b/FL/Fl_Copy_Surface.H index 65c169492..03faa14cc 100644 --- a/FL/Fl_Copy_Surface.H +++ b/FL/Fl_Copy_Surface.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Copy-to-clipboard code for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2014 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // #ifndef Fl_Copy_Surface_H @@ -22,12 +20,12 @@ #include <FL/Fl_Widget_Surface.H> /** Supports copying of graphical data to the clipboard. - + <br> After creation of an Fl_Copy_Surface object, make it the current drawing surface calling Fl_Surface_Device::push_current(), and all subsequent graphics requests will be recorded in the clipboard. It's possible to draw widgets (using Fl_Copy_Surface::draw() ) or to use any of the \ref fl_drawings or the \ref fl_attributes. Finally, delete the Fl_Copy_Surface object to load the clipboard with the graphical data. - <br> Fl_Gl_Window 's can be copied to the clipboard as well. + <br> Fl_Gl_Window 's can be copied to the clipboard as well. <br> Usage example: \code Fl_Widget *g = ...; // a widget you want to copy to the clipboard @@ -44,7 +42,7 @@ 2) as a color bitmap. Applications to which the clipboard content is pasted can use the format that suits them best. \li Mac OS: The graphical data are copied to the clipboard (a.k.a. pasteboard) in two 'flavors': - 1) in vectorial form as PDF data; 2) in bitmap form as a TIFF image. + 1) in vectorial form as PDF data; 2) in bitmap form as a TIFF image. Applications to which the clipboard content is pasted can use the flavor that suits them best. \li X11: the graphical data are copied to the clipboard as an image in BMP format. */ @@ -78,7 +76,7 @@ public: /** A base class describing the interface between FLTK and draw-to-clipboard operations. - + This class is only for internal use by the FLTK library. A supported platform should implement the virtual methods of this class @@ -108,7 +106,3 @@ protected: */ #endif // Fl_Copy_Surface_H - -// -// End of "$Id$". -// diff --git a/FL/Fl_Counter.H b/FL/Fl_Counter.H index 62ef38864..eaa71f5b4 100644 --- a/FL/Fl_Counter.H +++ b/FL/Fl_Counter.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Counter header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2010 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -29,8 +27,8 @@ #endif // values for type(): -#define FL_NORMAL_COUNTER 0 /**< type() for counter with fast buttons */ -#define FL_SIMPLE_COUNTER 1 /**< type() for counter without fast buttons */ +#define FL_NORMAL_COUNTER 0 /**< type() for counter with fast buttons */ +#define FL_SIMPLE_COUNTER 1 /**< type() for counter without fast buttons */ /** Controls a single floating point value with button (or keyboard) arrows. @@ -109,7 +107,3 @@ public: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Device.H b/FL/Fl_Device.H index f88602aa4..c03219b70 100644 --- a/FL/Fl_Device.H +++ b/FL/Fl_Device.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Definition of classes Fl_Surface_Device, Fl_Display_Device // for the Fast Light Tool Kit (FLTK). // @@ -10,14 +8,14 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // -/** \file Fl_Device.H +/** \file Fl_Device.H \brief declaration of classes Fl_Surface_Device, Fl_Display_Device, Fl_Device_Plugin. */ @@ -36,7 +34,7 @@ class Fl_Widget; A drawing surface that's susceptible to receive graphical output. Any FLTK application has at any time a current drawing surface to which all drawing requests are directed. The current surface is given by Fl_Surface_Device::surface(). - When main() begins running, the current drawing surface has been set to the computer's display, + When main() begins running, the current drawing surface has been set to the computer's display, an instance of the Fl_Display_Device class. A drawing surface other than the computer's display, is typically used as follows: @@ -53,7 +51,7 @@ class Fl_Widget; </ol> For back-compatibility, it is also possible to use the Fl_Surface_Device::set_current() member function to change the current drawing surface, once to the new surface, once to the previous one. - + Class Fl_Surface_Device can also be derived to define new kinds of graphical output usable with FLTK drawing functions. An example would be to draw to a PDF file. This would require to create a new class, @@ -105,7 +103,7 @@ public: /** This plugin socket allows the integration of new device drivers for special - window or screen types. + window or screen types. This class is not intended for use outside the FLTK library. It is currently used to provide an automated printing service and screen capture for OpenGL windows, if linked with fltk_gl. @@ -130,7 +128,3 @@ public: }; #endif // Fl_Device_H - -// -// End of "$Id$". -// diff --git a/FL/Fl_Dial.H b/FL/Fl_Dial.H index bf0de19ca..d88416164 100644 --- a/FL/Fl_Dial.H +++ b/FL/Fl_Dial.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Dial header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2010 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -27,14 +25,14 @@ #endif // values for type(): -#define FL_NORMAL_DIAL 0 /**< type() for dial variant with dot */ -#define FL_LINE_DIAL 1 /**< type() for dial variant with line */ -#define FL_FILL_DIAL 2 /**< type() for dial variant with filled arc */ +#define FL_NORMAL_DIAL 0 /**< type() for dial variant with dot */ +#define FL_LINE_DIAL 1 /**< type() for dial variant with line */ +#define FL_FILL_DIAL 2 /**< type() for dial variant with filled arc */ /** The Fl_Dial widget provides a circular dial to control a single floating point value. - <P ALIGN=CENTER>\image html dial.png + <P ALIGN=CENTER>\image html dial.png \image latex dial.png "Fl_Dial" width=4cm Use type() to set the type of the dial to: <UL> @@ -63,7 +61,7 @@ public: and label string. The default type is FL_NORMAL_DIAL. */ Fl_Dial(int x,int y,int w,int h, const char *l = 0); - /** + /** Sets Or gets the angles used for the minimum and maximum values. The default values are 45 and 315 (0 degrees is straight down and the angles progress clockwise). Normally angle1 is less than angle2, but if you @@ -82,7 +80,3 @@ public: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Double_Window.H b/FL/Fl_Double_Window.H index fe3396a52..7ba197f8b 100644 --- a/FL/Fl_Double_Window.H +++ b/FL/Fl_Double_Window.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Double-buffered window header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2010 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -50,13 +48,13 @@ public: void hide(); void flush(); ~Fl_Double_Window(); - + /** Creates a new Fl_Double_Window widget using the given position, size, and label (title) string. */ Fl_Double_Window(int W, int H, const char *l = 0); - + /** See Fl_Double_Window::Fl_Double_Window(int w, int h, const char *label = 0) */ @@ -65,7 +63,3 @@ public: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Export.H b/FL/Fl_Export.H index 1b51c2584..6dee15a4c 100644 --- a/FL/Fl_Export.H +++ b/FL/Fl_Export.H @@ -1,6 +1,4 @@ /* - * "$Id$" - * * Windows DLL export . * * Copyright 1998-2018 by Bill Spitzak and others. @@ -9,11 +7,11 @@ * the file "COPYING" which should have been included with this file. If this * file is missing or damaged, see the license at: * - * http://www.fltk.org/COPYING.php + * https://www.fltk.org/COPYING.php * - * Please report all bugs and problems on the following page: + * Please see the following page on how to report bugs and issues: * - * http://www.fltk.org/str.php + * https://www.fltk.org/bugs.php */ #ifndef Fl_Export_H @@ -25,9 +23,9 @@ # if defined(FL_DLL) # ifdef FL_LIBRARY -# define FL_EXPORT __declspec(dllexport) +# define FL_EXPORT __declspec(dllexport) # else -# define FL_EXPORT __declspec(dllimport) +# define FL_EXPORT __declspec(dllimport) # endif /* FL_LIBRARY */ # elif __GNUC__ >= 4 # define FL_EXPORT __attribute__ ((visibility ("default"))) @@ -36,7 +34,3 @@ # endif /* FL_DLL */ #endif /* !Fl_Export_H */ - -/* - * End of "$Id$". - */ diff --git a/FL/Fl_File_Browser.H b/FL/Fl_File_Browser.H index 7e41e5e25..67b0a9d81 100644 --- a/FL/Fl_File_Browser.H +++ b/FL/Fl_File_Browser.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // FileBrowser definitions. // // Copyright 1999-2010 by Michael Sweet. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -37,17 +35,17 @@ /** The Fl_File_Browser widget displays a list of filenames, optionally with file-specific icons. */ class FL_EXPORT Fl_File_Browser : public Fl_Browser { - - int filetype_; - const char *directory_; - uchar iconsize_; - const char *pattern_; - - int full_height() const; - int item_height(void *) const; - int item_width(void *) const; - void item_draw(void *, int, int, int, int) const; - int incr_height() const { return (item_height(0)); } + + int filetype_; + const char *directory_; + uchar iconsize_; + const char *pattern_; + + int full_height() const; + int item_height(void *) const; + int item_width(void *) const; + void item_draw(void *, int, int, int, int) const; + int incr_height() const { return (item_height(0)); } public: enum { FILES, DIRECTORIES }; @@ -59,34 +57,34 @@ public: Fl_File_Browser(int, int, int, int, const char * = 0); /** Sets or gets the size of the icons. The default size is 20 pixels. */ - uchar iconsize() const { return (iconsize_); }; + uchar iconsize() const { return (iconsize_); }; /** Sets or gets the size of the icons. The default size is 20 pixels. */ - void iconsize(uchar s) { iconsize_ = s; redraw(); }; + void iconsize(uchar s) { iconsize_ = s; redraw(); }; /** Sets or gets the filename filter. The pattern matching uses the fl_filename_match() function in FLTK. */ - void filter(const char *pattern); + void filter(const char *pattern); /** Sets or gets the filename filter. The pattern matching uses the fl_filename_match() function in FLTK. */ - const char *filter() const { return (pattern_); }; + const char *filter() const { return (pattern_); }; /** Loads the specified directory into the browser. If icons have been loaded then the correct icon is associated with each file in the list. - + <P>The sort argument specifies a sort function to be used with fl_filename_list(). */ - int load(const char *directory, Fl_File_Sort_F *sort = fl_numericsort); + int load(const char *directory, Fl_File_Sort_F *sort = fl_numericsort); Fl_Fontsize textsize() const { return Fl_Browser::textsize(); }; - void textsize(Fl_Fontsize s) { Fl_Browser::textsize(s); iconsize_ = (uchar)(3 * s / 2); }; + void textsize(Fl_Fontsize s) { Fl_Browser::textsize(s); iconsize_ = (uchar)(3 * s / 2); }; /** Sets or gets the file browser type, FILES or @@ -94,18 +92,14 @@ public: files and directories are shown. Otherwise only directories are shown. */ - int filetype() const { return (filetype_); }; + int filetype() const { return (filetype_); }; /** Sets or gets the file browser type, FILES or DIRECTORIES. When set to FILES, both files and directories are shown. Otherwise only directories are shown. */ - void filetype(int t) { filetype_ = t; }; + void filetype(int t) { filetype_ = t; }; }; #endif // !_Fl_File_Browser_H_ - -// -// End of "$Id$". -// diff --git a/FL/Fl_File_Chooser.H b/FL/Fl_File_Chooser.H index 4ce459ebf..702c4ff9f 100644 --- a/FL/Fl_File_Chooser.H +++ b/FL/Fl_File_Chooser.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Fl_File_Chooser dialog for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2015 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // // ======================================================================= // DO NOT EDIT FL/Fl_File_Chooser.H and src/Fl_File_Chooser.cxx !!! @@ -47,24 +45,24 @@ class FL_EXPORT Fl_File_Chooser { public: - enum { SINGLE = 0, MULTI = 1, CREATE = 2, DIRECTORY = 4 }; + enum { SINGLE = 0, MULTI = 1, CREATE = 2, DIRECTORY = 4 }; private: - static Fl_Preferences *prefs_; - void (*callback_)(Fl_File_Chooser*, void *); - void *data_; - char directory_[FL_PATH_MAX]; - char pattern_[FL_PATH_MAX]; - char preview_text_[2048]; - int type_; - void favoritesButtonCB(); - void favoritesCB(Fl_Widget *w); - void fileListCB(); - void fileNameCB(); - void newdir(); - static void previewCB(Fl_File_Chooser *fc); - void showChoiceCB(); - void update_favorites(); - void update_preview(); + static Fl_Preferences *prefs_; + void (*callback_)(Fl_File_Chooser*, void *); + void *data_; + char directory_[FL_PATH_MAX]; + char pattern_[FL_PATH_MAX]; + char preview_text_[2048]; + int type_; + void favoritesButtonCB(); + void favoritesCB(Fl_Widget *w); + void fileListCB(); + void fileNameCB(); + void newdir(); + static void previewCB(Fl_File_Chooser *fc); + void showChoiceCB(); + void update_favorites(); + void update_preview(); public: Fl_File_Chooser(const char *d, const char *p, int t, const char *title); private: @@ -131,10 +129,10 @@ public: void callback(void (*cb)(Fl_File_Chooser *, void *), void *d = 0); void color(Fl_Color c); Fl_Color color(); - int count(); - void directory(const char *d); + int count(); + void directory(const char *d); char * directory(); - void filter(const char *p); + void filter(const char *p); const char * filter(); int filter_value(); void filter_value(int f); @@ -145,15 +143,15 @@ public: const char * label(); void ok_label(const char *l); const char * ok_label(); - void preview(int e); - int preview() const { return previewButton->value(); }; + void preview(int e); + int preview() const { return previewButton->value(); }; private: - void showHidden(int e); - void remove_hidden_files(); + void showHidden(int e); + void remove_hidden_files(); public: - void rescan(); - void rescan_keep_filename(); - void show(); + void rescan(); + void rescan_keep_filename(); + void show(); int shown(); void textcolor(Fl_Color c); Fl_Color textcolor(); @@ -165,72 +163,72 @@ public: int type(); void * user_data() const; void user_data(void *d); - const char *value(int f = 1); - void value(const char *filename); + const char *value(int f = 1); + void value(const char *filename); int visible(); /** [standard text may be customized at run-time] */ - static const char *add_favorites_label; + static const char *add_favorites_label; /** [standard text may be customized at run-time] */ - static const char *all_files_label; + static const char *all_files_label; /** [standard text may be customized at run-time] */ - static const char *custom_filter_label; + static const char *custom_filter_label; /** [standard text may be customized at run-time] */ - static const char *existing_file_label; + static const char *existing_file_label; /** [standard text may be customized at run-time] */ - static const char *favorites_label; + static const char *favorites_label; /** [standard text may be customized at run-time] */ - static const char *filename_label; + static const char *filename_label; /** [standard text may be customized at run-time] */ - static const char *filesystems_label; + static const char *filesystems_label; /** [standard text may be customized at run-time] */ - static const char *manage_favorites_label; + static const char *manage_favorites_label; /** [standard text may be customized at run-time] */ - static const char *new_directory_label; + static const char *new_directory_label; /** [standard text may be customized at run-time] */ - static const char *new_directory_tooltip; + static const char *new_directory_tooltip; /** [standard text may be customized at run-time] */ - static const char *preview_label; + static const char *preview_label; /** [standard text may be customized at run-time] */ - static const char *save_label; + static const char *save_label; /** [standard text may be customized at run-time] */ - static const char *show_label; + static const char *show_label; /** [standard text may be customized at run-time] */ - static const char *hidden_label; + static const char *hidden_label; /** the sort function that is used when loading the contents of a directory. */ - static Fl_File_Sort_F *sort; + static Fl_File_Sort_F *sort; private: - Fl_Widget* ext_group; + Fl_Widget* ext_group; public: Fl_Widget* add_extra(Fl_Widget* gr); }; @@ -239,7 +237,3 @@ FL_EXPORT char *fl_file_chooser(const char *message,const char *pat,const char * FL_EXPORT void fl_file_chooser_callback(void (*cb)(const char*)); FL_EXPORT void fl_file_chooser_ok_label(const char*l); #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_File_Icon.H b/FL/Fl_File_Icon.H index 6ca93d28e..c63358689 100644 --- a/FL/Fl_File_Icon.H +++ b/FL/Fl_File_Icon.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Fl_File_Icon definitions. // // Copyright 1999-2010 by Michael Sweet. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -33,61 +31,61 @@ // Special color value for the icon color. // -# define FL_ICON_COLOR (Fl_Color)0xffffffff /**< icon color [background?]*/ +# define FL_ICON_COLOR (Fl_Color)0xffffffff /**< icon color [background?]*/ // // Fl_File_Icon class... // -/** - The Fl_File_Icon class manages icon images that can be used +/** + The Fl_File_Icon class manages icon images that can be used as labels in other widgets and as icons in the FileBrowser widget. */ -class FL_EXPORT Fl_File_Icon { //// Icon data +class FL_EXPORT Fl_File_Icon { //// Icon data - static Fl_File_Icon *first_; // Pointer to first icon/filetype - Fl_File_Icon *next_; // Pointer to next icon/filetype - const char *pattern_; // Pattern string - int type_; // Match only if directory or file? - int num_data_; // Number of data elements - int alloc_data_; // Number of allocated elements - short *data_; // Icon data + static Fl_File_Icon *first_; // Pointer to first icon/filetype + Fl_File_Icon *next_; // Pointer to next icon/filetype + const char *pattern_; // Pattern string + int type_; // Match only if directory or file? + int num_data_; // Number of data elements + int alloc_data_; // Number of allocated elements + short *data_; // Icon data public: - enum // File types + enum // File types { - ANY, // Any kind of file - PLAIN, // Only plain files - FIFO, // Only named pipes - DEVICE, // Only character and block devices - LINK, // Only symbolic links - DIRECTORY // Only directories + ANY, // Any kind of file + PLAIN, // Only plain files + FIFO, // Only named pipes + DEVICE, // Only character and block devices + LINK, // Only symbolic links + DIRECTORY // Only directories }; - enum // Data opcodes + enum // Data opcodes { - END, // End of primitive/icon - COLOR, // Followed by color value (2 shorts) - LINE, // Start of line - CLOSEDLINE, // Start of closed line - POLYGON, // Start of polygon - OUTLINEPOLYGON, // Followed by outline color (2 shorts) - VERTEX // Followed by scaled X,Y + END, // End of primitive/icon + COLOR, // Followed by color value (2 shorts) + LINE, // Start of line + CLOSEDLINE, // Start of closed line + POLYGON, // Start of polygon + OUTLINEPOLYGON, // Followed by outline color (2 shorts) + VERTEX // Followed by scaled X,Y }; Fl_File_Icon(const char *p, int t, int nd = 0, short *d = 0); ~Fl_File_Icon(); - short *add(short d); + short *add(short d); /** Adds a color value to the icon array, returning a pointer to it. \param[in] c color value */ - short *add_color(Fl_Color c) - { short *d = add((short)COLOR); add((short)(c >> 16)); add((short)c); return (d); } + short *add_color(Fl_Color c) + { short *d = add((short)COLOR); add((short)(c >> 16)); add((short)c); return (d); } /** Adds a vertex value to the icon array, returning a pointer to it. @@ -95,8 +93,8 @@ class FL_EXPORT Fl_File_Icon { //// Icon data The origin (0.0) is in the lower-lefthand corner of the icon. \param[in] x, y vertex coordinates */ - short *add_vertex(int x, int y) - { short *d = add((short)VERTEX); add((short)x); add((short)y); return (d); } + short *add_vertex(int x, int y) + { short *d = add((short)VERTEX); add((short)x); add((short)y); return (d); } /** Adds a vertex value to the icon array, returning a pointer to it. @@ -104,35 +102,35 @@ class FL_EXPORT Fl_File_Icon { //// Icon data The origin (0.0) is in the lower-lefthand corner of the icon. \param[in] x, y vertex coordinates */ - short *add_vertex(float x, float y) - { short *d = add((short)VERTEX); add((short)(x * 10000.0)); - add((short)(y * 10000.0)); return (d); } + short *add_vertex(float x, float y) + { short *d = add((short)VERTEX); add((short)(x * 10000.0)); + add((short)(y * 10000.0)); return (d); } /** Clears all icon data from the icon.*/ - void clear() { num_data_ = 0; } + void clear() { num_data_ = 0; } - void draw(int x, int y, int w, int h, Fl_Color ic, int active = 1); + void draw(int x, int y, int w, int h, Fl_Color ic, int active = 1); - void label(Fl_Widget *w); + void label(Fl_Widget *w); - static void labeltype(const Fl_Label *o, int x, int y, int w, int h, Fl_Align a); - void load(const char *f); - int load_fti(const char *fti); - int load_image(const char *i); + static void labeltype(const Fl_Label *o, int x, int y, int w, int h, Fl_Align a); + void load(const char *f); + int load_fti(const char *fti); + int load_image(const char *i); /** Returns next file icon object. See Fl_File_Icon::first() */ - Fl_File_Icon *next() { return (next_); } + Fl_File_Icon *next() { return (next_); } /** Returns the filename matching pattern for the icon.*/ - const char *pattern() { return (pattern_); } + const char *pattern() { return (pattern_); } /** Returns the number of words of data used by the icon.*/ - int size() { return (num_data_); } + int size() { return (num_data_); } /** Returns the filetype associated with the icon, which can be one of the following: - + \li Fl_File_Icon::ANY, any kind of file. \li Fl_File_Icon::PLAIN, plain files. \li Fl_File_Icon::FIFO, named pipes. @@ -140,20 +138,16 @@ class FL_EXPORT Fl_File_Icon { //// Icon data \li Fl_File_Icon::LINK, symbolic links. \li Fl_File_Icon::DIRECTORY, directories. */ - int type() { return (type_); } + int type() { return (type_); } /** Returns the data array for the icon.*/ - short *value() { return (data_); } + short *value() { return (data_); } static Fl_File_Icon *find(const char *filename, int filetype = ANY); /** Returns a pointer to the first icon in the list.*/ static Fl_File_Icon *first() { return (first_); } - static void load_system_icons(void); + static void load_system_icons(void); }; #endif // !_Fl_Fl_File_Icon_H_ - -// -// End of "$Id$". -// diff --git a/FL/Fl_File_Input.H b/FL/Fl_File_Input.H index 23de89b68..2c8ce4c2a 100644 --- a/FL/Fl_File_Input.H +++ b/FL/Fl_File_Input.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // File_Input header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2010 by Bill Spitzak and others. @@ -10,11 +8,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -36,7 +34,7 @@ FL_WHEN_RELEASE callback won't be called if the directory clicked is the same as the current one. - <P align=CENTER> \image html Fl_File_Input.png </P> + <P align=CENTER> \image html Fl_File_Input.png </P> \image latex Fl_File_Input.png "Fl_File_Input" width=6cm \note As all Fl_Input derived objects, Fl_File_Input may call its callback @@ -45,15 +43,15 @@ to avoid reentrant calls if you plan to show another window or dialog box in the callback. */ class FL_EXPORT Fl_File_Input : public Fl_Input { - - char ok_entry_; - uchar down_box_; - short buttons_[200]; - short pressed_; - void draw_buttons(); - int handle_button(int event); - void update_buttons(); + char ok_entry_; + uchar down_box_; + short buttons_[200]; + short pressed_; + + void draw_buttons(); + int handle_button(int event); + void update_buttons(); public: @@ -66,9 +64,9 @@ protected: public: /** Gets the box type used for the navigation bar. */ - Fl_Boxtype down_box() const { return (Fl_Boxtype)down_box_; } + Fl_Boxtype down_box() const { return (Fl_Boxtype)down_box_; } /** Sets the box type to use for the navigation bar. */ - void down_box(Fl_Boxtype b) { down_box_ = b; } + void down_box(Fl_Boxtype b) { down_box_ = b; } /** Gets the current error color. @@ -79,7 +77,7 @@ public: \deprecated Will be removed in FLTK 1.5.0 or higher. \todo Remove Fl_File_Input::errorcolor() in FLTK 1.5.0 or higher. */ - Fl_Color errorcolor() const { return FL_RED; } + Fl_Color errorcolor() const { return FL_RED; } /** Sets the current error color to \p c. @@ -89,21 +87,16 @@ public: \deprecated Will be removed in FLTK 1.5.0 or higher. \todo Remove Fl_File_Input::errorcolor(Fl_Color) in FLTK 1.5.0 or higher. */ - void errorcolor(Fl_Color c) {} + void errorcolor(Fl_Color c) {} - int value(const char *str); - int value(const char *str, int len); + int value(const char *str); + int value(const char *str, int len); /** Returns the current value, which is a pointer to an internal buffer and is valid only until the next event is handled. */ - const char *value() { return Fl_Input_::value(); } + const char *value() { return Fl_Input_::value(); } }; #endif // !Fl_File_Input_H - - -// -// End of "$Id$". -// diff --git a/FL/Fl_Fill_Dial.H b/FL/Fl_Fill_Dial.H index dbf2df05c..fc66cea62 100644 --- a/FL/Fl_Fill_Dial.H +++ b/FL/Fl_Fill_Dial.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Filled dial header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2010 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -32,7 +30,3 @@ public: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Fill_Slider.H b/FL/Fl_Fill_Slider.H index 299c38e61..9290ed0c2 100644 --- a/FL/Fl_Fill_Slider.H +++ b/FL/Fl_Fill_Slider.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Filled slider header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2010 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -31,7 +29,3 @@ public: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Float_Input.H b/FL/Fl_Float_Input.H index f60d4a284..7524e8dc2 100644 --- a/FL/Fl_Float_Input.H +++ b/FL/Fl_Float_Input.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Floating point input header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2011 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -41,7 +39,3 @@ public: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_FormsBitmap.H b/FL/Fl_FormsBitmap.H index a0095fe6e..e5d6fb1db 100644 --- a/FL/Fl_FormsBitmap.H +++ b/FL/Fl_FormsBitmap.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Forms bitmap header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2010 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -24,7 +22,7 @@ #include "Fl_Bitmap.H" -/** +/** Forms compatibility Bitmap Image Widget */ class FL_EXPORT Fl_FormsBitmap : public Fl_Widget { @@ -41,7 +39,3 @@ public: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_FormsPixmap.H b/FL/Fl_FormsPixmap.H index 6700addae..43cccd966 100644 --- a/FL/Fl_FormsPixmap.H +++ b/FL/Fl_FormsPixmap.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Forms pixmap header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2010 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -48,7 +46,3 @@ public: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Free.H b/FL/Fl_Free.H index 2c6e4328a..1424a5956 100644 --- a/FL/Fl_Free.H +++ b/FL/Fl_Free.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Forms free header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2010 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -26,33 +24,33 @@ #include "Fl_Widget.H" #endif -#define FL_NORMAL_FREE 1 /**< normal event handling */ -#define FL_SLEEPING_FREE 2 /**< deactivate event handling */ -#define FL_INPUT_FREE 3 /**< accepts FL_FOCUS events */ -#define FL_CONTINUOUS_FREE 4 /**< repeated timeout handling */ -#define FL_ALL_FREE 5 /**< FL_INPUT_FREE and FL_CONTINOUS_FREE */ +#define FL_NORMAL_FREE 1 /**< normal event handling */ +#define FL_SLEEPING_FREE 2 /**< deactivate event handling */ +#define FL_INPUT_FREE 3 /**< accepts FL_FOCUS events */ +#define FL_CONTINUOUS_FREE 4 /**< repeated timeout handling */ +#define FL_ALL_FREE 5 /**< FL_INPUT_FREE and FL_CONTINOUS_FREE */ /** appropriate signature for handle function */ typedef int (*FL_HANDLEPTR)(Fl_Widget *, int , float, float, char); /** Emulation of the Forms "free" widget. - + This emulation allows the free demo to run, and appears to be useful for porting programs written in Forms which use the free widget or make subclasses of the Forms widgets. There are five types of free, which determine when the handle function is called: - + \li \c FL_NORMAL_FREE normal event handling. \li \c FL_SLEEPING_FREE deactivates event handling (widget is inactive). \li \c FL_INPUT_FREE accepts FL_FOCUS events. \li \c FL_CONTINUOUS_FREE sets a timeout callback 100 times a second and provides an FL_STEP event. This has obvious - detrimental effects on machine performance. + detrimental effects on machine performance. \li \c FL_ALL_FREE same as FL_INPUT_FREE and FL_CONTINUOUS_FREE. - + */ class FL_EXPORT Fl_Free : public Fl_Widget { FL_HANDLEPTR hfunc; @@ -66,15 +64,11 @@ public: }; // old event names for compatibility: -#define FL_MOUSE FL_DRAG /**< for backward compatibility */ -#define FL_DRAW 100 /**< for backward compatibility [UNUSED]*/ -#define FL_STEP 101 /**< for backward compatibility */ -#define FL_FREEMEM 102 /**< for backward compatibility [UNUSED]*/ -#define FL_FREEZE 103 /**< for backward compatibility [UNUSED]*/ -#define FL_THAW 104 /**< for backward compatibility [UNUSED]*/ +#define FL_MOUSE FL_DRAG /**< for backward compatibility */ +#define FL_DRAW 100 /**< for backward compatibility [UNUSED]*/ +#define FL_STEP 101 /**< for backward compatibility */ +#define FL_FREEMEM 102 /**< for backward compatibility [UNUSED]*/ +#define FL_FREEZE 103 /**< for backward compatibility [UNUSED]*/ +#define FL_THAW 104 /**< for backward compatibility [UNUSED]*/ #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_GIF_Image.H b/FL/Fl_GIF_Image.H index ff781acd8..673e9c0a7 100644 --- a/FL/Fl_GIF_Image.H +++ b/FL/Fl_GIF_Image.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // GIF image header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2020 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -42,7 +40,3 @@ protected: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Gl_Window.H b/FL/Fl_Gl_Window.H index 1369b58e8..218cf676e 100644 --- a/FL/Fl_Gl_Window.H +++ b/FL/Fl_Gl_Window.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // OpenGL header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2016 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -28,7 +26,7 @@ class Fl_Gl_Choice; // structure to hold result of glXChooseVisual class Fl_Gl_Window_Driver; /** The Fl_Gl_Window widget sets things up so OpenGL works. - + It also keeps an OpenGL "context" for that window, so that changes to the lighting and projection may be reused between redraws. Fl_Gl_Window also flushes the OpenGL streams and swaps buffers after draw() returns. @@ -42,7 +40,7 @@ class Fl_Gl_Window_Driver; Please note that the FLTK drawing and clipping functions will not work inside an Fl_Gl_Window. All drawing should be done using OpenGL calls exclusively. - + \see \ref opengl_highdpi \note FLTK 1.4 introduces a driver system for graphic calls. It is now possible @@ -81,9 +79,9 @@ public: int handle(int); /** Returns a pointer to the window's Fl_Gl_Window_Driver object */ Fl_Gl_Window_Driver *gl_driver() {return pGlWindowDriver;} - + /** - Is turned off when FLTK creates a new context for this window or + Is turned off when FLTK creates a new context for this window or when the window resizes, and is turned on \e after draw() is called. You can use this inside your draw() method to avoid unnecessarily initializing the OpenGL context. Just do this: @@ -100,28 +98,28 @@ public: ... draw your geometry here ... } \endcode - + You can turn valid() on by calling valid(1). You should only do this after fixing the transformation inside a draw() - or after make_current(). This is done automatically after + or after make_current(). This is done automatically after draw() returns. */ char valid() const {return valid_f_ & 1;} /** - See char Fl_Gl_Window::valid() const + See char Fl_Gl_Window::valid() const */ void valid(char v) {if (v) valid_f_ |= 1; else valid_f_ &= 0xfe;} void invalidate(); /** - Will only be set if the + Will only be set if the OpenGL context is created or recreated. It differs from Fl_Gl_Window::valid() which is also set whenever the context changes size. */ char context_valid() const {return valid_f_ & 2;} /** - See char Fl_Gl_Window::context_valid() const + See char Fl_Gl_Window::context_valid() const */ void context_valid(char v) {if (v) valid_f_ |= 2; else valid_f_ &= 0xfd;} @@ -139,7 +137,7 @@ public: /** Set or change the OpenGL capabilites of the window. The value can be any of the following OR'd together: - + - \c FL_RGB - RGB color (not indexed) - \c FL_RGB8 - RGB color with at least 8 bits of each color - \c FL_INDEX - Indexed mode @@ -151,14 +149,14 @@ public: - \c FL_STENCIL - stencil buffer - \c FL_MULTISAMPLE - multisample antialiasing - \c FL_OPENGL3 - use OpenGL version 3.0 or more. - + FL_RGB and FL_SINGLE have a value of zero, so they are "on" unless you give FL_INDEX or FL_DOUBLE. - + If the desired combination cannot be done, FLTK will try turning off FL_MULTISAMPLE. If this also fails the show() will call Fl::error() and not show the window. - + You can change the mode while the window is displayed. This is most useful for turning double-buffering on and off. Under X this will cause the old X window to be destroyed and a new one to be created. If @@ -166,14 +164,14 @@ public: window to blink, raise to the top, and be de-iconized, and the xid() will change, possibly breaking other code. It is best to make the GL window a child of another window if you wish to do this! - + mode() must not be called within draw() since it changes the current context. - + The FL_OPENGL3 flag is required to access OpenGL version 3 or more under the X11 and MacOS platforms; it's optional under Windows. See more details in \ref opengl3. - + \version the <tt>FL_OPENGL3</tt> flag appeared in version 1.3.4 */ int mode(int a) {return mode(a,0);} @@ -204,7 +202,7 @@ public: // Note: Doxygen docs in Fl_Widget.H to avoid redundancy. virtual Fl_Gl_Window* as_gl_window() {return this;} - + float pixels_per_unit(); /** Gives the window width in OpenGL pixels. When an Fl_Gl_Window is mapped to a HighDPI display, the value given by Fl_Gl_Window::w() @@ -226,10 +224,10 @@ public: \version 1.3.4 */ int pixel_h() { return int(pixels_per_unit() * h() + 0.5f); } - + ~Fl_Gl_Window(); /** - Creates a new Fl_Gl_Window widget using the given size, and label string. + Creates a new Fl_Gl_Window widget using the given size, and label string. The default boxtype is FL_NO_BOX. The default mode is FL_RGB|FL_DOUBLE|FL_DEPTH. */ Fl_Gl_Window(int W, int H, const char *l=0) : Fl_Window(W,H,l) {init();} @@ -244,7 +242,3 @@ public: }; #endif // Fl_Gl_Window_H - -// -// End of "$Id$". -// diff --git a/FL/Fl_Graphics_Driver.H b/FL/Fl_Graphics_Driver.H index b49e71185..88c70b3fd 100644 --- a/FL/Fl_Graphics_Driver.H +++ b/FL/Fl_Graphics_Driver.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Definition of classes Fl_Graphics_Driver, Fl_Surface_Device, Fl_Display_Device // for the Fast Light Tool Kit (FLTK). // @@ -10,11 +8,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /** @@ -64,9 +62,9 @@ struct Fl_Fontdesc; drawing operations (e.g., fl_rectf()) that operate on the current drawing surface (see Fl_Surface_Device). Drawing operations are functionally presented in \ref drawing and as function lists in the \ref fl_drawings and \ref fl_attributes modules. - + <tt>Fl_Surface_Device::surface()->driver()</tt> - gives at any time the graphics driver used by all drawing operations. + gives at any time the graphics driver used by all drawing operations. For compatibility with older FLTK versions, the \ref fl_graphics_driver global variable gives the same result. Its value changes when drawing operations are directed to another drawing surface by Fl_Surface_Device::push_current() / @@ -130,7 +128,7 @@ and draw_fixed(Fl_RGB_Image *,....) because scale-and-draw may require function Alphablend() from MSIMG32.DLL. In the absence of that, the draw_rgb() implementation calls Fl_Graphics_Driver::draw_rgb() which runs Fl_GDI_Graphics_Driver::draw_fixed(Fl_RGB_Image*,...). - + Graphics drivers also implement cache(Fl_Pixmap*), cache(Fl_Bitmap*) and cache(Fl_RGB_Image*) to compute the cached form of all image types, and uncache(Fl_RGB_Image *,...), uncache_pixmap(fl_uintptr_t) and delete_bitmask(Fl_Bitmask) to destroy cached image forms. @@ -235,7 +233,7 @@ protected: static Fl_Offscreen get_offscreen_and_delete_image_surface(Fl_Image_Surface*); /** For internal library use only */ static void draw_empty(Fl_Image* img, int X, int Y) {img->draw_empty(X, Y);} - + Fl_Graphics_Driver(); void cache_size(Fl_Image *img, int &width, int &height); static unsigned need_pixmap_bg_color; @@ -402,10 +400,10 @@ struct Fl_Fontdesc { - scale the cached offscreen of image objects - scale the pixel arrays used when performing direct image draws - call the member functions of a platform-specific, - Fl_Scalable_Graphics_Driver-derived class that do the drawings with adequately + Fl_Scalable_Graphics_Driver-derived class that do the drawings with adequately scaled coordinates. The member functions are named with the _unscaled suffix. - scale and unscale the clipping region. - + This class is presently used by the X11 and Windows platforms to support HiDPI displays. In the future, it may also be used by other platforms. */ @@ -492,7 +490,3 @@ protected: \} \endcond */ - -// -// End of "$Id$". -// diff --git a/FL/Fl_Group.H b/FL/Fl_Group.H index e782b5219..26baf9726 100644 --- a/FL/Fl_Group.H +++ b/FL/Fl_Group.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Group header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2017 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -52,7 +50,7 @@ class FL_EXPORT Fl_Group : public Fl_Widget { int navigation(int); static Fl_Group *current_; - + // unimplemented copy ctor and assignment operator Fl_Group(const Fl_Group&); Fl_Group& operator=(const Fl_Group&); @@ -84,7 +82,7 @@ public: Fl_Widget* child(int n) const {return array()[n];} int find(const Fl_Widget*) const; /** - See int Fl_Group::find(const Fl_Widget *w) const + See int Fl_Group::find(const Fl_Widget *w) const */ int find(const Fl_Widget& o) const {return find(&o);} Fl_Widget* const* array() const; @@ -98,7 +96,7 @@ public: virtual ~Fl_Group(); void add(Fl_Widget&); /** - See void Fl_Group::add(Fl_Widget &w) + See void Fl_Group::add(Fl_Widget &w) */ void add(Fl_Widget* o) {add(*o);} void insert(Fl_Widget&, int i); @@ -117,7 +115,7 @@ public: void clear(); /** - See void Fl_Group::resizable(Fl_Widget *box) + See void Fl_Group::resizable(Fl_Widget *box) */ void resizable(Fl_Widget& o) {resizable_ = &o;} /** @@ -132,11 +130,11 @@ public: \image html resizebox1.png <br> - + \image html resizebox2.png - + \image latex resizebox1.png "before resize" width=4cm - + \image latex resizebox2.png "after resize" width=4.85cm The resizable may be set to the group itself, in which case all the @@ -152,7 +150,7 @@ public: */ void resizable(Fl_Widget* o) {resizable_ = o;} /** - See void Fl_Group::resizable(Fl_Widget *box) + See void Fl_Group::resizable(Fl_Widget *box) */ Fl_Widget* resizable() const {return resizable_;} /** @@ -164,7 +162,7 @@ public: /** Controls whether the group widget clips the drawing of child widgets to its bounding box. - + Set \p c to 1 if you want to clip the child widgets to the bounding box. @@ -204,7 +202,7 @@ public: /** This is a dummy class that allows you to end a Fl_Group in a constructor list of a class: - \code + \code class MyClass { Fl_Group group; Fl_Button button_in_group; @@ -218,7 +216,7 @@ public: end(), button_outside_group(10,120,60,30) { [..ctor code..] - } + } \endcode */ class FL_EXPORT Fl_End { @@ -228,7 +226,3 @@ public: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Help_Dialog.H b/FL/Fl_Help_Dialog.H index 67c3e9f87..ef5f31028 100644 --- a/FL/Fl_Help_Dialog.H +++ b/FL/Fl_Help_Dialog.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Fl_Help_Dialog dialog for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2015 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // // ======================================================================== // DO NOT EDIT FL/Fl_Help_Dialog.H and src/Fl_Help_Dialog.cxx !!! @@ -36,11 +34,11 @@ #include <FL/Fl_Help_View.H> class FL_EXPORT Fl_Help_Dialog { - int index_; - int max_; + int index_; + int max_; int line_[100]; // FIXME: we must remove those static numbers char file_[100][FL_PATH_MAX]; // FIXME: we must remove those static numbers - int find_pos_; + int find_pos_; public: Fl_Help_Dialog(); private: @@ -84,7 +82,3 @@ public: int y(); }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Help_View.H b/FL/Fl_Help_View.H index 19932cb2e..4df878bf3 100644 --- a/FL/Fl_Help_View.H +++ b/FL/Fl_Help_View.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Help Viewer widget definitions. // // Copyright 1997-2010 by Easy Software Products. @@ -10,11 +8,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -45,15 +43,15 @@ typedef const char *(Fl_Help_Func)(Fl_Widget *, const char *); // struct Fl_Help_Block { - const char *start, // Start of text - *end; // End of text - uchar border; // Draw border? - Fl_Color bgcolor; // Background color - int x, // Indentation/starting X coordinate - y, // Starting Y coordinate - w, // Width - h; // Height - int line[32]; // Left starting position for each line + const char *start, // Start of text + *end; // End of text + uchar border; // Draw border? + Fl_Color bgcolor; // Background color + int x, // Indentation/starting X coordinate + y, // Starting Y coordinate + w, // Width + h; // Height + int line[32]; // Left starting position for each line }; // @@ -61,12 +59,12 @@ struct Fl_Help_Block { // /** Definition of a link for the html viewer. */ struct Fl_Help_Link { - char filename[192], ///< Reference filename - name[32]; ///< Link target (blank if none) - int x, ///< X offset of link text - y, ///< Y offset of link text - w, ///< Width of link text - h; ///< Height of link text + char filename[192], ///< Reference filename + name[32]; ///< Link target (blank if none) + int x, ///< X offset of link text + y, ///< Y offset of link text + w, ///< Width of link text + h; ///< Height of link text }; /* @@ -93,22 +91,22 @@ struct FL_EXPORT Fl_Help_Font_Stack { nfonts_ = 0; } - void init(Fl_Font f, Fl_Fontsize s, Fl_Color c) { + void init(Fl_Font f, Fl_Fontsize s, Fl_Color c) { nfonts_ = 0; elts_[nfonts_].set(f, s, c); - fl_font(f, s); + fl_font(f, s); fl_color(c); } /** Gets the top (current) element on the stack. */ void top(Fl_Font &f, Fl_Fontsize &s, Fl_Color &c) { elts_[nfonts_].get(f, s, c); } /** Pushes the font style triplet on the stack, also calls fl_font() & fl_color() adequately */ - void push(Fl_Font f, Fl_Fontsize s, Fl_Color c) { + void push(Fl_Font f, Fl_Fontsize s, Fl_Color c) { if (nfonts_ < MAX_FL_HELP_FS_ELTS-1) nfonts_ ++; elts_[nfonts_].set(f, s, c); - fl_font(f, s); fl_color(c); + fl_font(f, s); fl_color(c); } /** Pops from the stack the font style triplet and calls fl_font() & fl_color() adequately */ - void pop(Fl_Font &f, Fl_Fontsize &s, Fl_Color &c) { + void pop(Fl_Font &f, Fl_Fontsize &s, Fl_Color &c) { if (nfonts_ > 0) nfonts_ --; top(f, s, c); fl_font(f, s); fl_color(c); @@ -117,15 +115,15 @@ struct FL_EXPORT Fl_Help_Font_Stack { size_t count() const {return nfonts_;} // Gets the current number of fonts in the stack protected: - size_t nfonts_; ///< current number of fonts in stack + size_t nfonts_; ///< current number of fonts in stack Fl_Help_Font_Style elts_[MAX_FL_HELP_FS_ELTS]; ///< font elements }; /** Fl_Help_Target structure */ struct Fl_Help_Target { - char name[32]; ///< Target name - int y; ///< Y offset of target + char name[32]; ///< Target name + int y; ///< Y offset of target }; /** @@ -193,42 +191,42 @@ struct Fl_Help_Target { - yen Yuml yuml */ -class FL_EXPORT Fl_Help_View : public Fl_Group { // Help viewer widget - - enum { RIGHT = -1, CENTER, LEFT }; ///< Alignments - - char title_[1024]; ///< Title string - Fl_Color defcolor_, ///< Default text color - bgcolor_, ///< Background color - textcolor_, ///< Text color - linkcolor_; ///< Link color - Fl_Font textfont_; ///< Default font for text - Fl_Fontsize textsize_; ///< Default font size - const char *value_; ///< HTML text value - Fl_Help_Font_Stack fstack_; ///< font stack management - int nblocks_, ///< Number of blocks/paragraphs - ablocks_; ///< Allocated blocks - Fl_Help_Block *blocks_; ///< Blocks - - Fl_Help_Func *link_; ///< Link transform function - - int nlinks_, ///< Number of links - alinks_; ///< Allocated links - Fl_Help_Link *links_; ///< Links - - int ntargets_, ///< Number of targets - atargets_; ///< Allocated targets - Fl_Help_Target *targets_; ///< Targets - - char directory_[FL_PATH_MAX];///< Directory for current file - char filename_[FL_PATH_MAX]; ///< Current filename - int topline_, ///< Top line in document - leftline_, ///< Lefthand position - size_, ///< Total document length - hsize_, ///< Maximum document width - scrollbar_size_; ///< Size for both scrollbars - Fl_Scrollbar scrollbar_, ///< Vertical scrollbar for document - hscrollbar_; ///< Horizontal scrollbar +class FL_EXPORT Fl_Help_View : public Fl_Group { // Help viewer widget + + enum { RIGHT = -1, CENTER, LEFT }; ///< Alignments + + char title_[1024]; ///< Title string + Fl_Color defcolor_, ///< Default text color + bgcolor_, ///< Background color + textcolor_, ///< Text color + linkcolor_; ///< Link color + Fl_Font textfont_; ///< Default font for text + Fl_Fontsize textsize_; ///< Default font size + const char *value_; ///< HTML text value + Fl_Help_Font_Stack fstack_; ///< font stack management + int nblocks_, ///< Number of blocks/paragraphs + ablocks_; ///< Allocated blocks + Fl_Help_Block *blocks_; ///< Blocks + + Fl_Help_Func *link_; ///< Link transform function + + int nlinks_, ///< Number of links + alinks_; ///< Allocated links + Fl_Help_Link *links_; ///< Links + + int ntargets_, ///< Number of targets + atargets_; ///< Allocated targets + Fl_Help_Target *targets_; ///< Targets + + char directory_[FL_PATH_MAX];///< Directory for current file + char filename_[FL_PATH_MAX]; ///< Current filename + int topline_, ///< Top line in document + leftline_, ///< Lefthand position + size_, ///< Total document length + hsize_, ///< Maximum document width + scrollbar_size_; ///< Size for both scrollbars + Fl_Scrollbar scrollbar_, ///< Vertical scrollbar for document + hscrollbar_; ///< Horizontal scrollbar static int selection_first; static int selection_last; @@ -251,24 +249,24 @@ class FL_EXPORT Fl_Help_View : public Fl_Group { // Help viewer widget void pushfont(Fl_Font f, Fl_Fontsize s, Fl_Color c) {fstack_.push(f, s, c);} void popfont(Fl_Font &f, Fl_Fontsize &s, Fl_Color &c) {fstack_.pop(f, s, c);} - Fl_Help_Block *add_block(const char *s, int xx, int yy, int ww, int hh, uchar border = 0); - void add_link(const char *n, int xx, int yy, int ww, int hh); - void add_target(const char *n, int yy); - static int compare_targets(const Fl_Help_Target *t0, const Fl_Help_Target *t1); - int do_align(Fl_Help_Block *block, int line, int xx, int a, int &l); + Fl_Help_Block *add_block(const char *s, int xx, int yy, int ww, int hh, uchar border = 0); + void add_link(const char *n, int xx, int yy, int ww, int hh); + void add_target(const char *n, int yy); + static int compare_targets(const Fl_Help_Target *t0, const Fl_Help_Target *t1); + int do_align(Fl_Help_Block *block, int line, int xx, int a, int &l); protected: - void draw(); + void draw(); private: - void format(); - void format_table(int *table_width, int *columns, const char *table); - void free_data(); - int get_align(const char *p, int a); - const char *get_attr(const char *p, const char *n, char *buf, int bufsize); - Fl_Color get_color(const char *n, Fl_Color c); + void format(); + void format_table(int *table_width, int *columns, const char *table); + void free_data(); + int get_align(const char *p, int a); + const char *get_attr(const char *p, const char *n, char *buf, int bufsize); + Fl_Color get_color(const char *n, Fl_Color c); Fl_Shared_Image *get_image(const char *name, int W, int H); - int get_length(const char *l); + int get_length(const char *l); public: - int handle(int); + int handle(int); private: void hv_draw(const char *t, int x, int y, int entity_extra_length = 0); @@ -284,72 +282,72 @@ public: Fl_Help_View(int xx, int yy, int ww, int hh, const char *l = 0); ~Fl_Help_View(); /** Returns the current directory for the text in the buffer. */ - const char *directory() const { if (directory_[0]) return (directory_); - else return ((const char *)0); } + const char *directory() const { if (directory_[0]) return (directory_); + else return ((const char *)0); } /** Returns the current filename for the text in the buffer. */ - const char *filename() const { if (filename_[0]) return (filename_); - else return ((const char *)0); } - int find(const char *s, int p = 0); + const char *filename() const { if (filename_[0]) return (filename_); + else return ((const char *)0); } + int find(const char *s, int p = 0); /** This method assigns a callback function to use when a link is followed or a file is loaded (via Fl_Help_View::load()) that requires a different file or path. - + The callback function receives a pointer to the Fl_Help_View widget and the URI or full pathname for the file in question. It must return a pathname that can be opened as a local file or NULL: - + \code const char *fn(Fl_Widget *w, const char *uri); \endcode - + The link function can be used to retrieve remote or virtual documents, returning a temporary file that contains the actual data. If the link function returns NULL, the value of the Fl_Help_View widget will remain unchanged. - + If the link callback cannot handle the URI scheme, it should return the uri value unchanged or set the value() of the widget before returning NULL. */ - void link(Fl_Help_Func *fn) { link_ = fn; } - int load(const char *f); - void resize(int,int,int,int); + void link(Fl_Help_Func *fn) { link_ = fn; } + int load(const char *f); + void resize(int,int,int,int); /** Gets the size of the help view. */ - int size() const { return (size_); } - void size(int W, int H) { Fl_Widget::size(W, H); } + int size() const { return (size_); } + void size(int W, int H) { Fl_Widget::size(W, H); } /** Sets the default text color. */ - void textcolor(Fl_Color c) { if (textcolor_ == defcolor_) textcolor_ = c; defcolor_ = c; } + void textcolor(Fl_Color c) { if (textcolor_ == defcolor_) textcolor_ = c; defcolor_ = c; } /** Returns the current default text color. */ - Fl_Color textcolor() const { return (defcolor_); } + Fl_Color textcolor() const { return (defcolor_); } /** Sets the default text font. */ - void textfont(Fl_Font f) { textfont_ = f; format(); } + void textfont(Fl_Font f) { textfont_ = f; format(); } /** Returns the current default text font. */ Fl_Font textfont() const { return (textfont_); } /** Sets the default text size. */ - void textsize(Fl_Fontsize s) { textsize_ = s; format(); } + void textsize(Fl_Fontsize s) { textsize_ = s; format(); } /** Gets the default text size. */ Fl_Fontsize textsize() const { return (textsize_); } /** Returns the current document title, or NULL if there is no title. */ - const char *title() { return (title_); } - void topline(const char *n); - void topline(int); + const char *title() { return (title_); } + void topline(const char *n); + void topline(int); /** Returns the current top line in pixels. */ - int topline() const { return (topline_); } - void leftline(int); + int topline() const { return (topline_); } + void leftline(int); /** Gets the left position in pixels. */ - int leftline() const { return (leftline_); } - void value(const char *val); + int leftline() const { return (leftline_); } + void value(const char *val); /** Returns the current buffer contents. */ - const char *value() const { return (value_); } + const char *value() const { return (value_); } void clear_selection(); void select_all(); /** Gets the current size of the scrollbars' troughs, in pixels. - If this value is zero (default), this widget will use the + If this value is zero (default), this widget will use the Fl::scrollbar_size() value as the scrollbar's width. - + \returns Scrollbar size in pixels, or 0 if the global Fl::scrollbar_size() is being used. \see Fl::scrollbar_size(int) */ @@ -360,28 +358,24 @@ public: Sets the pixel size of the scrollbars' troughs to \p newSize, in pixels. Normally you should not need this method, and should use - Fl::scrollbar_size(int) instead to manage the size of ALL - your widgets' scrollbars. This ensures your application + Fl::scrollbar_size(int) instead to manage the size of ALL + your widgets' scrollbars. This ensures your application has a consistent UI, is the default behavior, and is normally what you want. Only use THIS method if you really need to override the global scrollbar size. The need for this should be rare. - + Setting \p newSize to the special value of 0 causes the widget to track the global Fl::scrollbar_size(), which is the default. - + \param[in] newSize Sets the scrollbar size in pixels.\n If 0 (default), scrollbar size tracks the global Fl::scrollbar_size() \see Fl::scrollbar_size() */ void scrollbar_size(int newSize) { scrollbar_size_ = newSize; - } + } }; #endif // !Fl_Help_View_H - -// -// End of "$Id$". -// diff --git a/FL/Fl_Hold_Browser.H b/FL/Fl_Hold_Browser.H index 79113b496..cc0192c39 100644 --- a/FL/Fl_Hold_Browser.H +++ b/FL/Fl_Hold_Browser.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Hold browser header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2010 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -25,7 +23,7 @@ #include "Fl_Browser.H" /** - The Fl_Hold_Browser is a subclass of Fl_Browser which lets the user + The Fl_Hold_Browser is a subclass of Fl_Browser which lets the user select a single item, or no items by clicking on the empty space. \image html fl_hold_browser.png "Fl_Hold_Browser" @@ -49,7 +47,3 @@ public: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Hor_Fill_Slider.H b/FL/Fl_Hor_Fill_Slider.H index 934bc059c..c8890dbf4 100644 --- a/FL/Fl_Hor_Fill_Slider.H +++ b/FL/Fl_Hor_Fill_Slider.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Horizontal fill slider header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2010 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -30,7 +28,3 @@ public: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Hor_Nice_Slider.H b/FL/Fl_Hor_Nice_Slider.H index c862f8bf1..e9393d449 100644 --- a/FL/Fl_Hor_Nice_Slider.H +++ b/FL/Fl_Hor_Nice_Slider.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Horizontal "nice" slider header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2010 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -30,7 +28,3 @@ public: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Hor_Slider.H b/FL/Fl_Hor_Slider.H index 415cdb763..cfd2426f5 100644 --- a/FL/Fl_Hor_Slider.H +++ b/FL/Fl_Hor_Slider.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Horizontal slider header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2011 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -39,7 +37,3 @@ public: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Hor_Value_Slider.H b/FL/Fl_Hor_Value_Slider.H index 183a1cfcb..88c6efe95 100644 --- a/FL/Fl_Hor_Value_Slider.H +++ b/FL/Fl_Hor_Value_Slider.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Horizontal value slider header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2010 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -30,7 +28,3 @@ public: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Image.H b/FL/Fl_Image.H index decc5bdeb..dc09ed7a4 100644 --- a/FL/Fl_Image.H +++ b/FL/Fl_Image.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Image header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2017 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /** \file @@ -44,19 +42,19 @@ enum Fl_RGB_Scaling { /** \brief Base class for image caching, scaling and drawing. - + Fl_Image is the base class used for caching, scaling and drawing all kinds of images - in FLTK. This class keeps track of common image data such as the pixels, - colormap, width, height, and depth. Virtual methods are used to provide + in FLTK. This class keeps track of common image data such as the pixels, + colormap, width, height, and depth. Virtual methods are used to provide type-specific image handling. - + Each image possesses two (width, height) pairs. 1) The width and height of the image raw data are returned by data_w() and data_h(). These values are set when the image is created and remain unchanged. 2) The width and height of the area filled by the image when it gets drawn are returned by w() and h(). The values are equal to data_w() and data_h() when the image is created, and can be changed by the scale() member function. - + Since the Fl_Image class does not support image drawing by itself, calling the draw() method results in a box with an X in it being drawn instead. @@ -67,7 +65,7 @@ public: static const int ERR_NO_IMAGE = -1; static const int ERR_FILE_ACCESS = -2; static const int ERR_FORMAT = -3; - + private: int w_, h_, d_, ld_, count_; int data_w_, data_h_; @@ -108,7 +106,7 @@ protected: to account for the extra data per line. */ void ld(int LD) {ld_ = LD;} - /** + /** Sets the current array pointer and count of pointers in the array. */ void data(const char * const *p, int c) {data_ = p; count_ = c;} @@ -120,7 +118,7 @@ protected: public: - /** + /** Returns the current image drawing width in FLTK units. The values of w() and data_w() are identical unless scale() has been called after which they may differ. @@ -233,10 +231,10 @@ public: /** Draws the image to the current drawing surface with a bounding box. Arguments <tt>X,Y,W,H</tt> specify - a bounding box for the image, with the origin + a bounding box for the image, with the origin (upper-left corner) of the image offset by the \c cx and \c cy arguments. - + In other words: <tt>fl_push_clip(X,Y,W,H)</tt> is applied, the image is drawn with its upper-left corner at <tt>X-cx,Y-cy</tt> and its own width and height, <tt>fl_pop_clip</tt><tt>()</tt> is applied. @@ -256,7 +254,7 @@ public: static void RGB_scaling(Fl_RGB_Scaling); // get RGB image scaling method static Fl_RGB_Scaling RGB_scaling(); - + // set the image drawing size virtual void scale(int width, int height, int proportional = 1, int can_expand = 0); /** Sets what algorithm is used when resizing a source image to draw it. @@ -320,17 +318,17 @@ public: virtual void label(Fl_Menu_Item*m); virtual void uncache(); /** Sets the maximum allowed image size in bytes when creating an Fl_RGB_Image object. - + The image size in bytes of an Fl_RGB_Image object is the value of the product w() * h() * d(). - If this product exceeds size, the created object of a derived class of Fl_RGB_Image + If this product exceeds size, the created object of a derived class of Fl_RGB_Image won't be loaded with the image data. - This does not apply to direct RGB image creation with + This does not apply to direct RGB image creation with Fl_RGB_Image::Fl_RGB_Image(const uchar *bits, int W, int H, int D, int LD). - The default max_size() value is essentially infinite. + The default max_size() value is essentially infinite. */ static void max_size(size_t size) { max_size_ = size;} /** Returns the maximum allowed image size in bytes when creating an Fl_RGB_Image object. - + \sa void Fl_RGB_Image::max_size(size_t) */ static size_t max_size() {return max_size_;} @@ -343,7 +341,3 @@ public: }; #endif // !Fl_Image_H - -// -// End of "$Id$". -// diff --git a/FL/Fl_Image_Surface.H b/FL/Fl_Image_Surface.H index 9c78f3d43..68596e930 100644 --- a/FL/Fl_Image_Surface.H +++ b/FL/Fl_Image_Surface.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Draw-to-image code for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2016 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // #ifndef Fl_Image_Surface_H @@ -25,17 +23,17 @@ #include <FL/platform_types.h> // for Fl_Offscreen -/** +/** \brief Directs all graphics requests to an Fl_Image. - + After creation of an Fl_Image_Surface object, make it the current drawing surface calling Fl_Surface_Device::push_current(), and all - subsequent graphics requests will be recorded in the image. It's possible to - draw widgets (using Fl_Image_Surface::draw()) or to use any of the + subsequent graphics requests will be recorded in the image. It's possible to + draw widgets (using Fl_Image_Surface::draw()) or to use any of the \ref fl_drawings or the \ref fl_attributes. Finally, call image() on the object to obtain a newly allocated Fl_RGB_Image object. Fl_Gl_Window objects can be drawn in the image as well. - + Usage example: \code // this is the widget that you want to draw into an image @@ -43,12 +41,12 @@ // create an Fl_Image_Surface object Fl_Image_Surface *image_surface = new Fl_Image_Surface(g->w(), g->h()); - + // direct all further graphics requests to the image Fl_Surface_Device::push_current(image_surface); // draw a white background - fl_color(FL_WHITE); + fl_color(FL_WHITE); fl_rectf(0, 0, g->w(), g->h()); // draw the g widget in the image @@ -59,7 +57,7 @@ // direct graphics requests back to their previous destination Fl_Surface_Device::pop_current(); - + // delete the image_surface object, but not the image itself delete image_surface; \endcode @@ -125,7 +123,3 @@ protected: */ #endif // Fl_Image_Surface_H - -// -// End of "$Id$". -// diff --git a/FL/Fl_Input.H b/FL/Fl_Input.H index 9257ff29b..f165ddc6e 100644 --- a/FL/Fl_Input.H +++ b/FL/Fl_Input.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Input header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2010 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -40,16 +38,16 @@ <TABLE WIDTH="90%" BORDER="1" SUMMARY="Fl_Input keyboard and mouse bindings."> <CAPTION ALIGN="TOP">Keyboard and mouse bindings.</CAPTION> <TR><TD NOWRAP="NOWRAP" WIDTH="1%"> - <B>Mouse button 1</B> + <B>Mouse button 1</B> </TD><TD> - Moves the cursor to this point. - Drag selects characters. - Double click selects words. + Moves the cursor to this point. + Drag selects characters. + Double click selects words. Triple click selects all line. Shift+click extends the selection. When you select text it is automatically copied to the selection buffer. </TD></TR><TR><TD NOWRAP="NOWRAP"> - <B>Mouse button 2</B> + <B>Mouse button 2</B> </TD><TD> Insert the selection buffer at the point clicked. You can also select a region and replace it with the selection buffer @@ -124,7 +122,7 @@ <TD NOWRAP="NOWRAP"><B> Command-V </B></TD> <TD> <B>Paste the clipboard.</B> <BR> - (Macs keyboards don't have "Insert" keys, + (Macs keyboards don't have "Insert" keys, but if they did, Shift-Insert would work) </TD></TR><TR> @@ -140,16 +138,16 @@ <TD NOWRAP="NOWRAP"><B> Command-Z </B></TD> <TD> <B>Undo.</B> <BR> - This is a single-level undo mechanism, but all adjacent + This is a single-level undo mechanism, but all adjacent deletions and insertions are concatenated into a single "undo". - Often this will undo a lot more than you expected. + Often this will undo a lot more than you expected. </TD></TR><TR> <TD NOWRAP="NOWRAP"><B> Shift-^Z </B></TD> <TD NOWRAP="NOWRAP"><B> Shift-Command-Z </B></TD> <TD> <B>Redo.</B> <BR> - Currently same behavior as ^Z. + Currently same behavior as ^Z. Reserved for future multilevel undo/redo. </TD></TR><TR> @@ -264,8 +262,4 @@ public: Fl_Input(int,int,int,int,const char * = 0); }; -#endif - -// -// End of "$Id$". -// +#endif diff --git a/FL/Fl_Input_.H b/FL/Fl_Input_.H index a07a70282..315f24a68 100644 --- a/FL/Fl_Input_.H +++ b/FL/Fl_Input_.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Input base class header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2015 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -26,18 +24,18 @@ #include "Fl_Widget.H" #endif -#define FL_NORMAL_INPUT 0 -#define FL_FLOAT_INPUT 1 -#define FL_INT_INPUT 2 -#define FL_HIDDEN_INPUT 3 -#define FL_MULTILINE_INPUT 4 -#define FL_SECRET_INPUT 5 -#define FL_INPUT_TYPE 7 -#define FL_INPUT_READONLY 8 -#define FL_NORMAL_OUTPUT (FL_NORMAL_INPUT | FL_INPUT_READONLY) -#define FL_MULTILINE_OUTPUT (FL_MULTILINE_INPUT | FL_INPUT_READONLY) -#define FL_INPUT_WRAP 16 -#define FL_MULTILINE_INPUT_WRAP (FL_MULTILINE_INPUT | FL_INPUT_WRAP) +#define FL_NORMAL_INPUT 0 +#define FL_FLOAT_INPUT 1 +#define FL_INT_INPUT 2 +#define FL_HIDDEN_INPUT 3 +#define FL_MULTILINE_INPUT 4 +#define FL_SECRET_INPUT 5 +#define FL_INPUT_TYPE 7 +#define FL_INPUT_READONLY 8 +#define FL_NORMAL_OUTPUT (FL_NORMAL_INPUT | FL_INPUT_READONLY) +#define FL_MULTILINE_OUTPUT (FL_MULTILINE_INPUT | FL_INPUT_READONLY) +#define FL_INPUT_WRAP 16 +#define FL_MULTILINE_INPUT_WRAP (FL_MULTILINE_INPUT | FL_INPUT_WRAP) #define FL_MULTILINE_OUTPUT_WRAP (FL_MULTILINE_INPUT | FL_INPUT_READONLY | FL_INPUT_WRAP) /** @@ -54,16 +52,16 @@ setting type() to one of the following values: \code - #define FL_NORMAL_INPUT 0 - #define FL_FLOAT_INPUT 1 - #define FL_INT_INPUT 2 - #define FL_MULTILINE_INPUT 4 - #define FL_SECRET_INPUT 5 - #define FL_INPUT_TYPE 7 - #define FL_INPUT_READONLY 8 - #define FL_NORMAL_OUTPUT (FL_NORMAL_INPUT | FL_INPUT_READONLY) - #define FL_MULTILINE_OUTPUT (FL_MULTILINE_INPUT | FL_INPUT_READONLY) - #define FL_INPUT_WRAP 16 + #define FL_NORMAL_INPUT 0 + #define FL_FLOAT_INPUT 1 + #define FL_INT_INPUT 2 + #define FL_MULTILINE_INPUT 4 + #define FL_SECRET_INPUT 5 + #define FL_INPUT_TYPE 7 + #define FL_INPUT_READONLY 8 + #define FL_NORMAL_OUTPUT (FL_NORMAL_INPUT | FL_INPUT_READONLY) + #define FL_MULTILINE_OUTPUT (FL_MULTILINE_INPUT | FL_INPUT_READONLY) + #define FL_INPUT_WRAP 16 #define FL_MULTILINE_INPUT_WRAP (FL_MULTILINE_INPUT | FL_INPUT_WRAP) #define FL_MULTILINE_OUTPUT_WRAP (FL_MULTILINE_INPUT | FL_INPUT_READONLY | FL_INPUT_WRAP) \endcode @@ -113,8 +111,8 @@ class FL_EXPORT Fl_Input_ : public Fl_Widget { If \p position_ equals \p mark_, no text is selected */ int mark_; - /** \internal Behavior of Tab key in multiline input widget. - If enabled (default) Tab causes focus nav, otherwise Tab is inserted + /** \internal Behavior of Tab key in multiline input widget. + If enabled (default) Tab causes focus nav, otherwise Tab is inserted as a character. */ int tab_nav_; @@ -180,7 +178,7 @@ protected: /* Find the start of a line. */ int line_start(int i) const; - + /* Find the end of a line. */ int line_end(int i) const; @@ -238,8 +236,8 @@ public: This function returns the current value, which is a pointer to the internal buffer and is valid only until the next event is handled. - - \return pointer to an internal buffer - do not free() this + + \return pointer to an internal buffer - do not free() this \see Fl_Input_::value(const char*) */ const char* value() const {return value_;} @@ -248,9 +246,9 @@ public: Fl_Char index(int i) const; /** - Returns the number of bytes in value(). - - This may be greater than <tt>strlen(value())</tt> if there are + Returns the number of bytes in value(). + + This may be greater than <tt>strlen(value())</tt> if there are \c nul characters in the text. \return number of bytes in the text @@ -283,7 +281,7 @@ public: */ int position() const {return position_;} - /** Gets the current selection mark. + /** Gets the current selection mark. \return index into the text */ int mark() const {return mark_;} @@ -298,9 +296,9 @@ public: */ int position(int p) {return position(p, p);} - /** Sets the current selection mark. + /** Sets the current selection mark. mark(n) is the same as <tt>position(position(),n)</tt>. - \param m new index of the mark + \param m new index of the mark \return 0 if the mark did not change \see position(), position(int, int) */ int mark(int m) {return position(position(), m);} @@ -377,11 +375,11 @@ public: \see Fl_Button::shortcut() */ int shortcut() const {return shortcut_;} - /** + /** Sets the shortcut key associated with this widget. Pressing the shortcut key gives text editing focus to this widget. - \param [in] s new shortcut keystroke - \see Fl_Button::shortcut() + \param [in] s new shortcut keystroke + \see Fl_Button::shortcut() */ void shortcut(int s) {shortcut_ = s;} @@ -414,52 +412,52 @@ public: \see textcolor() */ void textcolor(Fl_Color n) {textcolor_ = n;} - /** Gets the color of the cursor. + /** Gets the color of the cursor. \return the current cursor color */ Fl_Color cursor_color() const {return cursor_color_;} - /** Sets the color of the cursor. + /** 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;} - /** Gets the input field type. + /** Gets the input field type. \return the current input type */ int input_type() const {return type() & FL_INPUT_TYPE; } - /** Sets the input field type. + /** Sets the input field type. A redraw() is required to reformat the input field. \param [in] t new input type */ void input_type(int t) { type((uchar)(t | readonly())); } - /** Gets the read-only state of the input field. + /** Gets the read-only state of the input field. \return non-zero if this widget is read-only */ int readonly() const { return type() & FL_INPUT_READONLY; } - /** Sets the read-only state of the input field. + /** Sets the read-only state of the input field. \param [in] b if \p b is 0, the text in this widget can be edited by the user */ void readonly(int b) { if (b) type((uchar)(type() | FL_INPUT_READONLY)); else type((uchar)(type() & ~FL_INPUT_READONLY)); } /** - Gets the word wrapping state of the input field. + Gets the word wrapping state of the input field. Word wrap is only functional with multi-line input fields. */ int wrap() const { return type() & FL_INPUT_WRAP; } /** - Sets the word wrapping state of the input field. + Sets the word wrapping state of the input field. Word wrap is only functional with multi-line input fields. */ void wrap(int b) { if (b) type((uchar)(type() | FL_INPUT_WRAP)); else type((uchar)(type() & ~FL_INPUT_WRAP)); } /** - Sets whether the Tab key does focus navigation, + Sets whether the Tab key does focus navigation, or inserts tab characters into Fl_Multiline_Input. - By default this flag is enabled to provide the 'normal' behavior - most users expect; Tab navigates focus to the next widget. + By default this flag is enabled to provide the 'normal' behavior + most users expect; Tab navigates focus to the next widget. To inserting an actual Tab character, users can use Ctrl-I or copy/paste. @@ -468,8 +466,8 @@ public: only the mouse can be used to navigate to the next field. History: This flag was provided for backwards support of FLTK's old 1.1.x - behavior where Tab inserts a tab character instead of navigating - focus to the next widget. This behavior was unique to Fl_Multiline_Input. + behavior where Tab inserts a tab character instead of navigating + focus to the next widget. This behavior was unique to Fl_Multiline_Input. With the advent of Fl_Text_Editor, this old behavior has been deprecated. \param [in] val If \p val is 1, Tab advances focus (default).<BR> @@ -496,8 +494,4 @@ public: } }; -#endif - -// -// End of "$Id$". -// +#endif diff --git a/FL/Fl_Input_Choice.H b/FL/Fl_Input_Choice.H index 80cee90b4..9f29ce968 100644 --- a/FL/Fl_Input_Choice.H +++ b/FL/Fl_Input_Choice.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // An input/chooser widget. // ______________ ____ // | || __ | @@ -14,11 +12,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -184,7 +182,3 @@ public: }; #endif // !Fl_Input_Choice_H - -// -// End of "$Id$". -// diff --git a/FL/Fl_Int_Input.H b/FL/Fl_Int_Input.H index cb6e8141e..508a2f8ee 100644 --- a/FL/Fl_Int_Input.H +++ b/FL/Fl_Int_Input.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Integer input header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2010 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -40,7 +38,3 @@ public: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_JPEG_Image.H b/FL/Fl_JPEG_Image.H index 50553823c..f4eeb42cf 100644 --- a/FL/Fl_JPEG_Image.H +++ b/FL/Fl_JPEG_Image.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // JPEG image header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2010 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -43,7 +41,3 @@ protected: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Light_Button.H b/FL/Fl_Light_Button.H index 8735f3dcb..2a3ca1007 100644 --- a/FL/Fl_Light_Button.H +++ b/FL/Fl_Light_Button.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Lighted button header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2010 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -25,14 +23,14 @@ #include "Fl_Button.H" /** - This subclass displays the "on" state by turning on a light, - rather than drawing pushed in. The shape of the "light" + This subclass displays the "on" state by turning on a light, + rather than drawing pushed in. The shape of the "light" is initially set to FL_DOWN_BOX. The color of the light when on is controlled with selection_color(), which defaults to FL_YELLOW. Buttons generate callbacks when they are clicked by the user. You control exactly when and how by changing the values for type() and when(). - <P ALIGN=CENTER>\image html Fl_Light_Button.png</P> + <P ALIGN=CENTER>\image html Fl_Light_Button.png</P> \image latex Fl_Light_Button.png "Fl_Light_Button" width=4cm */ class FL_EXPORT Fl_Light_Button : public Fl_Button { @@ -44,7 +42,3 @@ public: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Line_Dial.H b/FL/Fl_Line_Dial.H index 150a05df5..873e82b48 100644 --- a/FL/Fl_Line_Dial.H +++ b/FL/Fl_Line_Dial.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Line dial header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2010 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -30,7 +28,3 @@ public: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Menu.H b/FL/Fl_Menu.H index a0f2545dd..eb6caf740 100644 --- a/FL/Fl_Menu.H +++ b/FL/Fl_Menu.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Old menu header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2010 by Bill Spitzak and others. @@ -9,16 +7,12 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // // this include file is for back compatibility only #include "Fl_Menu_Item.H" - -// -// End of "$Id$". -// diff --git a/FL/Fl_Menu_.H b/FL/Fl_Menu_.H index 4ebfc5852..1bd10d4d7 100644 --- a/FL/Fl_Menu_.H +++ b/FL/Fl_Menu_.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Menu base class header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2019 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -59,7 +57,7 @@ class FL_EXPORT Fl_Menu_ : public Fl_Widget { protected: - uchar alloc; // flag indicates if menu_ is a dynamic copy (=1) or not (=0) + uchar alloc; // flag indicates if menu_ is a dynamic copy (=1) or not (=0) uchar down_box_; Fl_Font textfont_; Fl_Fontsize textsize_; @@ -204,7 +202,3 @@ public: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Menu_Bar.H b/FL/Fl_Menu_Bar.H index 11a895430..a97ccf45a 100644 --- a/FL/Fl_Menu_Bar.H +++ b/FL/Fl_Menu_Bar.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Menu bar header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2017 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -96,7 +94,3 @@ public: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Menu_Button.H b/FL/Fl_Menu_Button.H index 7f18eab66..b592dbb19 100644 --- a/FL/Fl_Menu_Button.H +++ b/FL/Fl_Menu_Button.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Menu button header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2010 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -26,15 +24,15 @@ /** This is a button that when pushed pops up a menu (or hierarchy of - menus) defined by an array of + menus) defined by an array of Fl_Menu_Item objects. <P ALIGN=CENTER>\image html menu_button.png</P> \image latex menu_button.png " menu_button" width=5cm <P>Normally any mouse button will pop up a menu and it is lined up below the button as shown in the picture. However an Fl_Menu_Button may also control a pop-up menu. This is done by setting the type(). - If type() is zero a normal menu button is produced. - If it is nonzero then this is a pop-up menu. The bits in type() indicate + If type() is zero a normal menu button is produced. + If it is nonzero then this is a pop-up menu. The bits in type() indicate what mouse buttons pop up the menu (see Fl_Menu_Button::popup_buttons). </P> <P>The menu will also pop up in response to shortcuts indicated by putting a '&' character in the label(). </P> @@ -47,7 +45,7 @@ and then: - The item's callback is done if one has been set; the - Fl_Menu_Button is passed as the Fl_Widget* argument, + Fl_Menu_Button is passed as the Fl_Widget* argument, along with any userdata configured for the callback. - If the item does not have a callback, the Fl_Menu_Button's callback @@ -61,10 +59,10 @@ protected: public: /** \brief indicate what mouse buttons pop up the menu. - - Values for type() used to indicate what mouse buttons pop up the menu. + + Values for type() used to indicate what mouse buttons pop up the menu. Fl_Menu_Button::POPUP3 is usually what you want. - */ + */ enum popup_buttons {POPUP1 = 1, /**< pops up with the mouse 1st button. */ POPUP2, /**< pops up with the mouse 2nd button. */ POPUP12, /**< pops up with the mouse 1st or 2nd buttons. */ @@ -79,7 +77,3 @@ public: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Menu_Item.H b/FL/Fl_Menu_Item.H index dbe1a80fb..65be443cd 100644 --- a/FL/Fl_Menu_Item.H +++ b/FL/Fl_Menu_Item.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Menu item header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2010 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // #ifndef Fl_Menu_Item_H @@ -27,15 +25,15 @@ /// @file 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, ///< Deactivate menu item (gray out) + FL_MENU_TOGGLE= 2, ///< Item is a checkbox toggle (shows checkbox for on/off state) + FL_MENU_VALUE = 4, ///< The on/off state for checkbox/radio buttons (if set, state is 'on') + FL_MENU_RADIO = 8, ///< Item is a radio button (one checkbox of many can be on) + FL_MENU_INVISIBLE = 0x10, ///< Item will not show up (shortcut will work) + FL_SUBMENU_POINTER = 0x20, ///< Indicates user_data() is a pointer to another menu array + FL_SUBMENU = 0x40, ///< This item is a submenu to other items + FL_MENU_DIVIDER = 0x80, ///< Creates divider line below this item. Also ends a group of radio buttons. + FL_MENU_HORIZONTAL = 0x100 ///< ??? -- reserved }; extern FL_EXPORT Fl_Shortcut fl_old_shortcut(const char*); @@ -44,7 +42,7 @@ class Fl_Menu_; /** The Fl_Menu_Item structure defines a single menu item that - is used by the Fl_Menu_ class. + is used by the Fl_Menu_ class. \code struct Fl_Menu_Item { const char* text; // label() @@ -57,7 +55,7 @@ class Fl_Menu_; uchar labelsize_; uchar labelcolor_; }; - + 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) @@ -96,7 +94,7 @@ class Fl_Menu_; \image html menu.png \image latex menu.png "menu" width=10cm - A submenu title is identified by the bit FL_SUBMENU in the + A submenu title is identified by the bit FL_SUBMENU in the flags field, and ends with a label() that is NULL. You can nest menus to any depth. A pointer to the first item in the submenu can be treated as an Fl_Menu array itself. It is also @@ -107,15 +105,15 @@ class Fl_Menu_; releases of FLTK. */ struct FL_EXPORT Fl_Menu_Item { - const char *text; ///< menu item text, returned by label() - int shortcut_; ///< menu item shortcut + const char *text; ///< menu item text, returned by label() + int shortcut_; ///< menu item shortcut Fl_Callback *callback_; ///< menu item callback - void *user_data_; ///< menu item user_data for the menu's callback - int flags; ///< menu item flags like FL_MENU_TOGGLE, FL_MENU_RADIO - uchar labeltype_; ///< how the menu item text looks like - Fl_Font labelfont_; ///< which font for this menu item text + void *user_data_; ///< menu item user_data for the menu's callback + int flags; ///< menu item flags like FL_MENU_TOGGLE, FL_MENU_RADIO + 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 + Fl_Color labelcolor_; ///< menu item text color // advance N items, skipping submenus: const Fl_Menu_Item *next(int=1) const; @@ -271,17 +269,17 @@ struct FL_EXPORT Fl_Menu_Item { /** Sets exactly what key combination will trigger the menu item. The - value is a logical 'or' of a key and a set of shift flags, for instance + value is a logical 'or' of a key and a set of shift flags, for instance FL_ALT+'a' or FL_ALT+FL_F+10 or just 'a'. A value of zero disables the shortcut. - The key can be any value returned by Fl::event_key(), but will usually - be an ASCII letter. Use a lower-case letter unless you require the shift + The key can be any value returned by Fl::event_key(), but will usually + be an ASCII letter. Use a lower-case letter unless you require the shift key to be held down. The shift flags can be any set of values accepted by Fl::event_state(). - If the bit is on that shift key must be pushed. Meta, Alt, Ctrl, - and Shift must be off if they are not in the shift flags (zero for the + If the bit is on that shift key must be pushed. Meta, Alt, Ctrl, + and Shift must be off if they are not in the shift flags (zero for the other bits indicates a "don't care" setting). */ void shortcut(int s) {shortcut_ = s;} @@ -420,7 +418,7 @@ struct FL_EXPORT Fl_Menu_Item { /** See int add(const char*, int shortcut, Fl_Callback*, void*, int) */ int add(const char*a, const char* b, Fl_Callback* c, - void* d = 0, int e = 0) { + void* d = 0, int e = 0) { return add(a,fl_old_shortcut(b),c,d,e);} int size() const ; @@ -428,21 +426,17 @@ struct FL_EXPORT Fl_Menu_Item { typedef Fl_Menu_Item Fl_Menu; // back compatibility -enum { // back-compatibility enum: - FL_PUP_NONE = 0, - FL_PUP_GREY = FL_MENU_INACTIVE, - FL_PUP_GRAY = FL_MENU_INACTIVE, - FL_MENU_BOX = FL_MENU_TOGGLE, - FL_PUP_BOX = FL_MENU_TOGGLE, - FL_MENU_CHECK = FL_MENU_VALUE, - FL_PUP_CHECK = FL_MENU_VALUE, - FL_PUP_RADIO = FL_MENU_RADIO, +enum { // back-compatibility enum: + FL_PUP_NONE = 0, + FL_PUP_GREY = FL_MENU_INACTIVE, + FL_PUP_GRAY = FL_MENU_INACTIVE, + FL_MENU_BOX = FL_MENU_TOGGLE, + FL_PUP_BOX = FL_MENU_TOGGLE, + FL_MENU_CHECK = FL_MENU_VALUE, + FL_PUP_CHECK = FL_MENU_VALUE, + FL_PUP_RADIO = FL_MENU_RADIO, FL_PUP_INVISIBLE = FL_MENU_INVISIBLE, FL_PUP_SUBMENU = FL_SUBMENU_POINTER }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Menu_Window.H b/FL/Fl_Menu_Window.H index 90e6426b9..deae888af 100644 --- a/FL/Fl_Menu_Window.H +++ b/FL/Fl_Menu_Window.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Menu window header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2010 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -51,7 +49,3 @@ public: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Multi_Browser.H b/FL/Fl_Multi_Browser.H index 39bd446b3..69a6395dc 100644 --- a/FL/Fl_Multi_Browser.H +++ b/FL/Fl_Multi_Browser.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Multi browser header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2010 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -26,16 +24,16 @@ /** The Fl_Multi_Browser class is a subclass of Fl_Browser - which lets the user select any set of the lines. + which lets the user select any set of the lines. \image html fl_multi_browser.png "Fl_Multi_Browser" \image latex fl_multi_browser.png "Fl_Multi_Browser" width=4cm The user interface is Macintosh style: clicking an item turns off all the others and selects that one, dragging selects all the items the mouse moves over, - and ctrl + click (Cmd+click on the Mac OS platform) toggles the items. + and ctrl + click (Cmd+click on the Mac OS platform) toggles the items. Shift + click extends the selection until the clicked item. - This is different from how forms did it. + This is different from how forms did it. Normally the callback is done when the user releases the mouse, but you can change this with when(). <P>See Fl_Browser for methods to add and remove lines from the browser. @@ -52,7 +50,3 @@ public: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Multi_Label.H b/FL/Fl_Multi_Label.H index 1500964b3..ff46e32df 100644 --- a/FL/Fl_Multi_Label.H +++ b/FL/Fl_Multi_Label.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Multi-label header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2015 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // #ifndef Fl_Multi_Label_H @@ -45,8 +43,8 @@ struct Fl_Menu_Item; Example Use: Fl_Menu_Bar \code - Fl_Pixmap *image = new Fl_Pixmap(..); // image for menu item; any Fl_Image based widget - Fl_Menu_Bar *menu = new Fl_Menu_Bar(..); // can be any Fl_Menu_ oriented widget (Fl_Choice, Fl_Menu_Button..) + Fl_Pixmap *image = new Fl_Pixmap(..); // image for menu item; any Fl_Image based widget + Fl_Menu_Bar *menu = new Fl_Menu_Bar(..); // can be any Fl_Menu_ oriented widget (Fl_Choice, Fl_Menu_Button..) // Create a menu item int i = menu->add("File/New", ..); @@ -96,7 +94,3 @@ struct FL_EXPORT Fl_Multi_Label { }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Multiline_Input.H b/FL/Fl_Multiline_Input.H index 4ac3441e9..552721005 100644 --- a/FL/Fl_Multiline_Input.H +++ b/FL/Fl_Multiline_Input.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Multiline input header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2011 by Bill Spitzak and others. @@ -9,15 +7,15 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file - Fl_Multiline_Input widget . */ + Fl_Multiline_Input widget . */ #ifndef Fl_Multiline_Input_H #define Fl_Multiline_Input_H @@ -54,7 +52,3 @@ public: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Multiline_Output.H b/FL/Fl_Multiline_Output.H index d5ffdc5d6..a8bd088bc 100644 --- a/FL/Fl_Multiline_Output.H +++ b/FL/Fl_Multiline_Output.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Multi line output header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2011 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -32,7 +30,7 @@ Note that this widget does not support scrollbars, or per-character color control. - If you are presenting large amounts of read-only text + 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. @@ -50,7 +48,3 @@ public: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Native_File_Chooser.H b/FL/Fl_Native_File_Chooser.H index 4f0cbc3e0..423560ccc 100644 --- a/FL/Fl_Native_File_Chooser.H +++ b/FL/Fl_Native_File_Chooser.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // FLTK native OS file chooser widget // // Copyright 1998-2016 by Bill Spitzak and others. @@ -10,11 +8,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /** \file @@ -38,15 +36,15 @@ Each platform must implement the constructor of the Fl_Native_File_Chooser class. This particular implementation: - + Fl_Native_File_Chooser::Fl_Native_File_Chooser(int val) { platform_fnfc = new Fl_Native_File_Chooser_FLTK_Driver(val); } - - can be used by any platform. + + can be used by any platform. No more code is required. The cross-platform Fl_Native_File_Chooser_FLTK.cxx file must be compiled in libfltk, and the default FLTK file chooser will be used. - + This other implementation: Fl_Native_File_Chooser::Fl_Native_File_Chooser(int val) { platform_fnfc = 0; @@ -63,19 +61,19 @@ class Fl_Native_File_Chooser_Driver; /** - This class lets an FLTK application easily and consistently access - the operating system's native file chooser. Some operating systems - have very complex and specific file choosers that many users want - access to specifically, instead of FLTK's default file chooser(s). - + This class lets an FLTK application easily and consistently access + the operating system's native file chooser. Some operating systems + have very complex and specific file choosers that many users want + access to specifically, instead of FLTK's default file chooser(s). + In cases where there is no native file browser, FLTK's own file browser is used instead. - + To use this widget, use the following include in your code: \code #include <FL/Fl_Native_File_Chooser.H> \endcode - + The following example shows how to pick a single file: \code // Create and post the local native file chooser @@ -94,15 +92,15 @@ class Fl_Native_File_Chooser_Driver; default: printf("PICKED: %s\n", fnfc.filename()); break; // FILE CHOSEN } \endcode - + The Fl_Native_File_Chooser widget transmits UTF-8 encoded filenames to its user. It is recommended to open files that may have non-ASCII names with the fl_fopen() or fl_open() utility functions that handle these names in a cross-platform way (whereas the standard fopen()/open() functions fail on the Windows platform to open files with a non-ASCII name). - + <B>Platform Specific Caveats</B> - + - Under X windows, and if Fl::OPTION_FNFC_USES_GTK has not been switched off, the widget attempts to use standard GTK file chooser dialogs if they are available at run-time on the platform, and falls back to use FLTK's Fl_File_Chooser if they are not. @@ -111,34 +109,34 @@ class Fl_Native_File_Chooser_Driver; at the start of main(), to enable the nicer looking file browser widgets. Use the static public attributes of class Fl_File_Chooser to localize the browser. - - Some operating systems support certain OS specific options; see + - Some operating systems support certain OS specific options; see Fl_Native_File_Chooser::options() for a list. - + \image html Fl_Native_File_Chooser.png "The Fl_Native_File_Chooser on different platforms." \image latex Fl_Native_File_Chooser.png "The Fl_Native_File_Chooser on different platforms" width=14cm - + */ class FL_EXPORT Fl_Native_File_Chooser { private: Fl_Native_File_Chooser_Driver *platform_fnfc; public: enum Type { - BROWSE_FILE = 0, ///< browse files (lets user choose one file) - BROWSE_DIRECTORY, ///< browse directories (lets user choose one directory) - BROWSE_MULTI_FILE, ///< browse files (lets user choose multiple files) - BROWSE_MULTI_DIRECTORY, ///< browse directories (lets user choose multiple directories) - BROWSE_SAVE_FILE, ///< browse to save a file - BROWSE_SAVE_DIRECTORY ///< browse to save a directory + BROWSE_FILE = 0, ///< browse files (lets user choose one file) + BROWSE_DIRECTORY, ///< browse directories (lets user choose one directory) + BROWSE_MULTI_FILE, ///< browse files (lets user choose multiple files) + BROWSE_MULTI_DIRECTORY, ///< browse directories (lets user choose multiple directories) + BROWSE_SAVE_FILE, ///< browse to save a file + BROWSE_SAVE_DIRECTORY ///< browse to save a directory }; enum Option { - NO_OPTIONS = 0x0000, ///< no options enabled - SAVEAS_CONFIRM = 0x0001, ///< Show native 'Save As' overwrite confirm dialog - NEW_FOLDER = 0x0002, ///< Show 'New Folder' icon (if supported) - PREVIEW = 0x0004, ///< enable preview mode (if supported) - USE_FILTER_EXT = 0x0008 ///< Chooser filter pilots the output file extension (if supported) + NO_OPTIONS = 0x0000, ///< no options enabled + SAVEAS_CONFIRM = 0x0001, ///< Show native 'Save As' overwrite confirm dialog + NEW_FOLDER = 0x0002, ///< Show 'New Folder' icon (if supported) + PREVIEW = 0x0004, ///< enable preview mode (if supported) + USE_FILTER_EXT = 0x0008 ///< Chooser filter pilots the output file extension (if supported) }; static const char *file_exists_message; - + /** The constructor. Internally allocates the native widgets. Optional \p val presets the type of browser this will be, @@ -213,7 +211,7 @@ public: /** A cross-platform implementation of Fl_Native_File_Chooser_Driver. This implementation uses a Fl_File_Chooser object as file chooser. - + Any platform can support the Fl_Native_File_Chooser class by implementing its constructor as follows: \code @@ -229,16 +227,16 @@ private: int exist_dialog(); void parse_filter(); protected: - int _btype; // kind-of browser to show() - int _options; // general options + int _btype; // kind-of browser to show() + int _options; // general options int _nfilters; - char *_filter; // user supplied filter - char *_parsedfilt; // parsed filter - int _filtvalue; // selected filter + char *_filter; // user supplied filter + char *_parsedfilt; // parsed filter + int _filtvalue; // selected filter char *_preset_file; - char *_prevvalue; // Returned filename + char *_prevvalue; // Returned filename char *_directory; - char *_errmsg; // error message + char *_errmsg; // error message Fl_File_Chooser *_file_chooser; public: Fl_Native_File_Chooser_FLTK_Driver(int val); @@ -272,7 +270,3 @@ public: #endif /*FL_NATIVE_FILE_CHOOSER_H*/ - -// -// End of "$Id$". -// diff --git a/FL/Fl_Nice_Slider.H b/FL/Fl_Nice_Slider.H index febeb940a..1887eacc4 100644 --- a/FL/Fl_Nice_Slider.H +++ b/FL/Fl_Nice_Slider.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // "Nice" slider header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2010 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -30,7 +28,3 @@ public: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Object.H b/FL/Fl_Object.H index 9cbbcca3b..8098dd2d9 100644 --- a/FL/Fl_Object.H +++ b/FL/Fl_Object.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Old Fl_Object header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2010 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // // This file is provided for back compatibility only. Please use Fl_Widget @@ -21,7 +19,3 @@ #define Fl_Object Fl_Widget #endif #include "Fl_Widget.H" - -// -// End of "$Id$". -// diff --git a/FL/Fl_Output.H b/FL/Fl_Output.H index 5d1827164..06dfeb650 100644 --- a/FL/Fl_Output.H +++ b/FL/Fl_Output.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Output header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2011 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -25,7 +23,7 @@ #include "Fl_Input.H" /** This widget displays a piece of text. - + When you set the value() , Fl_Output does a strcpy() to its own storage, which is useful for program-generated values. The user may select portions of the text using the mouse and paste the contents into other @@ -56,8 +54,4 @@ public: Fl_Output(int X,int Y,int W,int H, const char *l = 0); }; -#endif - -// -// End of "$Id$". -// +#endif diff --git a/FL/Fl_Overlay_Window.H b/FL/Fl_Overlay_Window.H index 4d600a47f..d19bc3dc1 100644 --- a/FL/Fl_Overlay_Window.H +++ b/FL/Fl_Overlay_Window.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Overlay window header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2010 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -66,7 +64,7 @@ protected: Fl_Overlay_Window(int W, int H, const char *l=0); /** Creates a new Fl_Overlay_Window widget using the given - position, size, and label (title) string. If the + position, size, and label (title) string. If the positions (x,y) are not given, then the window manager will choose them. */ @@ -77,7 +75,3 @@ public: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_PNG_Image.H b/FL/Fl_PNG_Image.H index 84c246926..b0bd92ffa 100644 --- a/FL/Fl_PNG_Image.H +++ b/FL/Fl_PNG_Image.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // PNG image header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2010 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -40,7 +38,3 @@ private: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_PNM_Image.H b/FL/Fl_PNM_Image.H index e5b05885f..ff0b63744 100644 --- a/FL/Fl_PNM_Image.H +++ b/FL/Fl_PNM_Image.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // PNM image header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2010 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -37,7 +35,3 @@ class FL_EXPORT Fl_PNM_Image : public Fl_RGB_Image { }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Pack.H b/FL/Fl_Pack.H index 26c5a33a7..cb2d7bb95 100644 --- a/FL/Fl_Pack.H +++ b/FL/Fl_Pack.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Pack header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2020 by Bill Spitzak and others. @@ -11,9 +9,9 @@ // // https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// https://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -93,7 +91,3 @@ public: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Paged_Device.H b/FL/Fl_Paged_Device.H index 154fb5d7a..3229de8a4 100644 --- a/FL/Fl_Paged_Device.H +++ b/FL/Fl_Paged_Device.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Printing support for the Fast Light Tool Kit (FLTK). // // Copyright 2010-2016 by Bill Spitzak and others. @@ -9,14 +7,14 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // -/** \file Fl_Paged_Device.H +/** \file Fl_Paged_Device.H \brief declaration of class Fl_Paged_Device. */ @@ -32,7 +30,7 @@ /** \brief Represents page-structured drawing surfaces. - This class has no public constructor: don't instantiate it; use Fl_Printer + This class has no public constructor: don't instantiate it; use Fl_Printer or Fl_PostScript_File_Device instead. */ class FL_EXPORT Fl_Paged_Device : public Fl_Widget_Surface { @@ -42,7 +40,7 @@ protected: public: /** \brief Possible page formats. - + All paper formats with pre-defined width and height. */ enum Page_Format { @@ -92,15 +90,15 @@ public: */ typedef struct { /** \brief width in points */ - int width; + int width; /** \brief height in points */ - int height; + int height; /** \brief format name */ - const char *name; + const char *name; } page_format; /** \brief width, height and name of all elements of the enum \ref Page_Format. */ - static const page_format page_formats[NO_PAGE_FORMATS]; + static const page_format page_formats[NO_PAGE_FORMATS]; /** \brief The destructor */ virtual ~Fl_Paged_Device() {}; virtual int begin_job(int pagecount = 0, int *frompage = NULL, int *topage = NULL, char **perr_message = NULL); @@ -128,7 +126,3 @@ public: #endif // Fl_Paged_Device_H -// -// End of "$Id$" -// - diff --git a/FL/Fl_Pixmap.H b/FL/Fl_Pixmap.H index 384a25b22..c446a92be 100644 --- a/FL/Fl_Pixmap.H +++ b/FL/Fl_Pixmap.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Pixmap header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2017 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -47,7 +45,7 @@ protected: public: int alloc_data; // Non-zero if data was allocated - + private: // for internal use fl_uintptr_t id_; @@ -77,7 +75,3 @@ public: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Plugin.H b/FL/Fl_Plugin.H index 6cbd840ad..aca8d4b8b 100644 --- a/FL/Fl_Plugin.H +++ b/FL/Fl_Plugin.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // A Plugin system for FLTK, implemented in Fl_Preferences.cxx. // // Copyright 2002-2010 by Matthias Melcher. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -27,7 +25,7 @@ /** \brief Fl_Plugin allows link-time and run-time integration of binary modules. - + Fl_Plugin and Fl_Plugin_Manager provide a small and simple solution for linking C++ classes at run-time, or optionally linking modules at compile time without the need to change the main application. @@ -35,7 +33,7 @@ Fl_Plugin_Manager uses static initialisation to create the plugin interface early during startup. Plugins are stored in a temporary database, organized in classes. - + Plugins should derive a new class from Fl_Plugin as a base: \code class My_Plugin : public Fl_Plugin { @@ -45,9 +43,9 @@ }; My_Plugin blur_plugin(); \endcode - + Plugins can be put into modules and either linked before distribution, or loaded - from dynamically linkable files. An Fl_Plugin_Manager is used to list and + from dynamically linkable files. An Fl_Plugin_Manager is used to list and access all currently loaded plugins. \code Fl_Plugin_Manager mgr("effects"); @@ -74,14 +72,14 @@ class FL_EXPORT Fl_Plugin_Manager : public Fl_Preferences { public: Fl_Plugin_Manager(const char *klass); ~Fl_Plugin_Manager(); - + /** \brief Return the number of plugins in the klass. */ int plugins() { return groups(); } Fl_Plugin *plugin(int index); Fl_Plugin *plugin(const char *name); Fl_Preferences::ID addPlugin(const char *name, Fl_Plugin *plugin); - + static void removePlugin(Fl_Preferences::ID id); static int load(const char *filename); static int loadAll(const char *filepath, const char *pattern=0); @@ -89,7 +87,3 @@ public: #endif // !Fl_Preferences_H - -// -// End of "$Id$". -// diff --git a/FL/Fl_Positioner.H b/FL/Fl_Positioner.H index a47e64cd9..02d872e03 100644 --- a/FL/Fl_Positioner.H +++ b/FL/Fl_Positioner.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Positioner header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2010 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -31,7 +29,7 @@ It would be useful if this could be put atop another widget so that the crosshairs are on top, but this is not implemented. The color of the crosshairs is selection_color(). - <P ALIGN=CENTER>\image html positioner.png </P> + <P ALIGN=CENTER>\image html positioner.png </P> \image latex positioner.png " Fl_Positioner" width=4cm */ class FL_EXPORT Fl_Positioner : public Fl_Widget { @@ -88,7 +86,3 @@ public: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_PostScript.H b/FL/Fl_PostScript.H index ad6a6cd4a..f5f55f4fd 100644 --- a/FL/Fl_PostScript.H +++ b/FL/Fl_PostScript.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Support for graphics output to PostScript file for the Fast Light Tool Kit (FLTK). // // Copyright 2010-2020 by Bill Spitzak and others. @@ -11,12 +9,12 @@ // // https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// https://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // -/** \file Fl_PostScript.H +/** \file Fl_PostScript.H \brief declaration of classes Fl_PostScript_Graphics_Driver, Fl_PostScript_File_Device. */ @@ -57,21 +55,21 @@ public: Fl_PostScript_Graphics_Driver(); #ifndef FL_DOXYGEN enum SHAPE{NONE=0, LINE, LOOP, POLYGON, POINTS}; - + class Clip { public: int x, y, w, h; Clip *prev; }; Clip * clip_; - + int lang_level_; int gap_; int pages_; - + double width_; double height_; - + int shape_; int linewidth_;// need for clipping, lang level 1-2 int linestyle_;// @@ -82,7 +80,7 @@ public: void reconcat(); //invert void recover(); //recovers the state after grestore (such as line styles...) void reset(); - + uchar * mask; int mx; // width of mask; int my; // mask lines @@ -91,16 +89,16 @@ public: int page_policy_; int nPages; int orientation_; - + float scale_x; float scale_y; float angle; int left_margin; int top_margin; - + FILE *output; double pw_, ph_; - + uchar bg_r, bg_g, bg_b; int start_postscript (int pagecount, enum Fl_Paged_Device::Page_Format format, enum Fl_Paged_Device::Page_Layout layout); /* int alpha_mask(const uchar * data, int w, int h, int D, int LD=0); @@ -108,10 +106,10 @@ public: void transformed_draw(const char* s, int n, double x, double y); //precise text placing void transformed_draw(const char* s, double x, double y); int alpha_mask(const uchar * data, int w, int h, int D, int LD=0); - + enum Fl_Paged_Device::Page_Format page_format_; char *ps_filename_; - + void page_policy(int p); int page_policy(){return page_policy_;}; void close_command(Fl_PostScript_Close_Command* cmd){close_cmd_=cmd;}; @@ -121,43 +119,43 @@ public: //Fl_PostScript_Graphics_Driver(FILE *o, int lang_level, int x, int y, int w, int h); //eps constructor void interpolate(int i){interpolate_=i;}; int interpolate(){return interpolate_;} - + void page(double pw, double ph, int media = 0); void page(int format); #endif // FL_DOXYGEN - + // implementation of drawing methods void color(Fl_Color c); void color(uchar r, uchar g, uchar b); - + void push_clip(int x, int y, int w, int h); int clip_box(int x, int y, int w, int h, int &X, int &Y, int &W, int &H); int not_clipped(int x, int y, int w, int h); void push_no_clip(); void pop_clip(); - + void line_style(int style, int width=0, char* dashes=0); - + void rect(int x, int y, int w, int h); void rectf(int x, int y, int w, int h); - + void xyline(int x, int y, int x1); void xyline(int x, int y, int x1, int y2); void xyline(int x, int y, int x1, int y2, int x3); - + void yxline(int x, int y, int y1); void yxline(int x, int y, int y1, int x2); void yxline(int x, int y, int y1, int x2, int y3); - + void line(int x1, int y1, int x2, int y2); - void line(int x1, int y1, int x2, int y2, int x3, int y3); - + void line(int x1, int y1, int x2, int y2, int x3, int y3); + void loop(int x0, int y0, int x1, int y1, int x2, int y2); void loop(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3); void polygon(int x0, int y0, int x1, int y1, int x2, int y2); void polygon(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3); void point(int x, int y); - + void begin_points(); void begin_line(); void begin_loop(); @@ -176,12 +174,12 @@ public: void gap(){gap_=1;}; void end_complex_polygon(){end_polygon();}; void transformed_vertex(double x, double y); - + void draw_image(const uchar* d, int x,int y,int w,int h, int delta=3, int ldelta=0); void draw_image_mono(const uchar* d, int x,int y,int w,int h, int delta=1, int ld=0); void draw_image(Fl_Draw_Image_Cb call, void* data, int x,int y, int w, int h, int delta=3); void draw_image_mono(Fl_Draw_Image_Cb call, void* data, int x,int y, int w, int h, int delta=1); - + void draw(const char* s, int nBytes, int x, int y) {transformed_draw(s,nBytes,x,y); }; void draw(const char* s, int nBytes, float x, float y) {transformed_draw(s,nBytes,x,y); }; void draw(int angle, const char *str, int n, int x, int y); @@ -206,7 +204,7 @@ public: // --- Fl_Bitmask create_bitmask(int w, int h, const uchar *array) { return 0L; } virtual int has_feature(driver_feature feature_mask) { return feature_mask & PRINTER; } - + int start_eps(int width, int height); void ps_origin(int x, int y); void ps_translate(int, int); @@ -222,7 +220,7 @@ public: To send graphical output to a PostScript file. This class is used exactly as the Fl_Printer class except for the begin_job() call, two variants of which are usable and allow to specify what page format and layout are desired. - + PostScript text uses vectorial fonts when using the FLTK standard fonts and the latin alphabet or a few other characters listed in the following table. The latin alphabet means all unicode characters between U+0020 and U+017F, or, in other words, @@ -274,7 +272,7 @@ public: @return 0 if OK, 1 if user cancelled the file dialog, 2 if fopen failed on user-selected output file. */ int begin_job(int pagecount = 0, enum Fl_Paged_Device::Page_Format format = Fl_Paged_Device::A4, - enum Fl_Paged_Device::Page_Layout layout = Fl_Paged_Device::PORTRAIT); + enum Fl_Paged_Device::Page_Layout layout = Fl_Paged_Device::PORTRAIT); /** Synonym of begin_job(). For API compatibility with FLTK 1.3.x */ int start_job(int pagecount = 0, enum Fl_Paged_Device::Page_Format format = Fl_Paged_Device::A4, @@ -292,7 +290,7 @@ public: @return always 0. */ int begin_job(FILE *ps_output, int pagecount = 0, enum Fl_Paged_Device::Page_Format format = Fl_Paged_Device::A4, - enum Fl_Paged_Device::Page_Layout layout = Fl_Paged_Device::PORTRAIT); + enum Fl_Paged_Device::Page_Layout layout = Fl_Paged_Device::PORTRAIT); /** Synonym of begin_job(). For API compatibility with FLTK 1.3.x */ int start_job(FILE *ps_output, int pagecount = 0, enum Fl_Paged_Device::Page_Format format = Fl_Paged_Device::A4, @@ -309,8 +307,8 @@ public: void rotate(float angle); void translate(int x, int y); void untranslate(void); - int end_page (void); - void end_job(void); + int end_page (void); + void end_job(void); /** \brief Label of the PostScript file chooser window */ static const char *file_chooser_title; }; @@ -368,7 +366,3 @@ public: }; #endif // Fl_PostScript_H - -// -// End of "$Id$" -// diff --git a/FL/Fl_Preferences.H b/FL/Fl_Preferences.H index 9690e456f..9378ec408 100644 --- a/FL/Fl_Preferences.H +++ b/FL/Fl_Preferences.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Preferences implementation for the Fast Light Tool Kit (FLTK). // // Copyright 2002-2010 by Matthias Melcher. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -23,7 +21,7 @@ # define Fl_Preferences_H # include <stdio.h> -# include "Fl_Export.H" +# include "Fl_Export.H" /** \brief Fl_Preferences provides methods to store user @@ -51,7 +49,7 @@ reasons. One application can have multiple preferences files. Extensive binary data however should be stored in separate files: see \a Fl_Preferences::getUserdataPath() . - + \note Starting with FLTK 1.3, preference databases are expected to be in UTF-8 encoding. Previous databases were stored in the current character set or code page which renders them incompatible @@ -64,11 +62,11 @@ */ class FL_EXPORT Fl_Preferences { -public: +public: /** Define the scope of the preferences. */ - enum Root { + enum Root { SYSTEM = 0, ///< Preferences are used system-wide USER, ///< Preferences apply only to the current user ROOT_MASK = 0xFF, ///< masks for the values above @@ -76,16 +74,16 @@ public: CORE_SYSTEM = CORE|SYSTEM, CORE_USER = CORE|USER }; - + /** Every Fl_Preferences-Group has a uniqe ID. - + ID's can be retrieved from an Fl_Preferences-Group and can then be used - to create more Fl_Preference references to the same data set, as long as the + to create more Fl_Preference references to the same data set, as long as the database remains open. */ typedef void *ID; - + static const char *newUUID(); /** Set this, if no call to Fl_Preferences shall access the file sytem @@ -132,11 +130,11 @@ public: Fl_Preferences(const Fl_Preferences&); Fl_Preferences( ID id ); virtual ~Fl_Preferences(); - + /** Return an ID that can later be reused to open more references to this dataset. */ ID id() { return (ID)node; } - + /** Remove the group with this ID from a database. */ static char remove(ID id_) { return ((Node*)id_)->remove(); } @@ -144,11 +142,11 @@ public: /** Return the name of this entry. */ const char *name() { return node->name(); } - + /** Return the full path to this entry. */ const char *path() { return node->path(); } - + int groups(); const char *group( int num_group ); char groupExists( const char *key ); @@ -160,7 +158,7 @@ public: char entryExists( const char *key ); char deleteEntry( const char *entry ); char deleteAllEntries(); - + char clear(); char set( const char *entry, int value ); @@ -169,8 +167,8 @@ public: char set( const char *entry, double value ); char set( const char *entry, double value, int precision ); char set( const char *entry, const char *value ); - char set( const char *entry, const void *value, int size ); - + char set( const char *entry, const void *value, int size ); + char get( const char *entry, int &value, int defaultValue ); char get( const char *entry, float &value, float defaultValue ); char get( const char *entry, double &value, double defaultValue ); @@ -187,13 +185,13 @@ public: // char export( const char *filename, Type fileFormat ); // char import( const char *filename ); - + /** 'Name' provides a simple method to create numerical or more complex procedural names for entries and groups on the fly. - + Example: prefs.set(Fl_Preferences::Name("File%d",i),file[i]);. - + See test/preferences.cxx as a sample for writing arrays into preferences. 'Name' is actually implemented as a class inside Fl_Preferences. It casts @@ -204,7 +202,7 @@ public: char *data_; - public: + public: Name( unsigned int n ); Name( const char *format, ... ); @@ -221,7 +219,7 @@ public: char *name, *value; }; -private: +private: Fl_Preferences() : node(0), rootNode(0) { } Fl_Preferences &operator=(const Fl_Preferences&); @@ -232,13 +230,13 @@ private: public: // older Sun compilers need this (public definition of the following classes) class RootNode; - - class FL_EXPORT Node { // a node contains a list to all its entries - // and all means to manage the tree structure + + class FL_EXPORT Node { // a node contains a list to all its entries + // and all means to manage the tree structure Node *child_, *next_; - union { // these two are mutually exclusive - Node *parent_; // top_ bit clear - RootNode *root_; // top_ bit set + union { // these two are mutually exclusive + Node *parent_; // top_ bit clear + RootNode *root_; // top_ bit set }; char *path_; Entry *entry_; @@ -288,7 +286,7 @@ public: // older Sun compilers need this (public definition of the following cl }; friend class Node; - class FL_EXPORT RootNode { // the root node manages file paths and basic reading and writing + class FL_EXPORT RootNode { // the root node manages file paths and basic reading and writing Fl_Preferences *prefs_; char *filename_; char *vendor_, *application_; @@ -310,7 +308,3 @@ protected: }; #endif // !Fl_Preferences_H - -// -// End of "$Id$". -// diff --git a/FL/Fl_Printer.H b/FL/Fl_Printer.H index 43b05c1be..320ec12f6 100644 --- a/FL/Fl_Printer.H +++ b/FL/Fl_Printer.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Printing support for the Fast Light Tool Kit (FLTK). // // Copyright 2010-2016 by Bill Spitzak and others. @@ -9,14 +7,14 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // -/** \file Fl_Printer.H +/** \file Fl_Printer.H \brief declaration of class Fl_Printer. */ @@ -29,11 +27,11 @@ \brief OS-independent print support. Fl_Printer allows to use all drawing, color, text, image, and clip FLTK functions, and to have them operate on printed page(s). There are two main, non exclusive, ways to use it. - <ul><li>Print any widget (standard, custom, Fl_Window, Fl_Gl_Window) as it appears - on screen, with optional translation, scaling and rotation. This is done by calling print_widget(), + <ul><li>Print any widget (standard, custom, Fl_Window, Fl_Gl_Window) as it appears + on screen, with optional translation, scaling and rotation. This is done by calling print_widget(), print_window() or print_window_part(). <li>Use a series of FLTK graphics commands (e.g., font, text, lines, colors, clip, image) to - compose a page appropriately shaped for printing. + compose a page appropriately shaped for printing. </ul> In both cases, begin by begin_job(), begin_page(), printable_rect() and origin() calls and finish by end_page() and end_job() calls. @@ -111,12 +109,12 @@ public: /** \name These attributes are useful for the Linux/Unix platform only. \{ - */ - static const char *dialog_title; - static const char *dialog_printer; - static const char *dialog_range; - static const char *dialog_copies; - static const char *dialog_all; + */ + static const char *dialog_title; + static const char *dialog_printer; + static const char *dialog_range; + static const char *dialog_copies; + static const char *dialog_all; static const char *dialog_pages; static const char *dialog_from; static const char *dialog_to; @@ -131,13 +129,9 @@ public: static const char *property_use; static const char *property_save; static const char *property_cancel; - /** \} */ + /** \} */ /** The destructor */ ~Fl_Printer(void); }; #endif // Fl_Printer_H - -// -// End of "$Id$" -// diff --git a/FL/Fl_Progress.H b/FL/Fl_Progress.H index 769028f22..e0b5d8911 100644 --- a/FL/Fl_Progress.H +++ b/FL/Fl_Progress.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Progress bar widget definitions. // // Copyright 2000-2010 by Michael Sweet. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -36,10 +34,10 @@ Displays a progress bar for the user. */ class FL_EXPORT Fl_Progress : public Fl_Widget { - - float value_, - minimum_, - maximum_; + + float value_, + minimum_, + maximum_; protected: @@ -50,23 +48,19 @@ class FL_EXPORT Fl_Progress : public Fl_Widget { Fl_Progress(int x, int y, int w, int h, const char *l = 0); /** Sets the maximum value in the progress widget. */ - void maximum(float v) { maximum_ = v; redraw(); } + void maximum(float v) { maximum_ = v; redraw(); } /** Gets the maximum value in the progress widget. */ - float maximum() const { return (maximum_); } + float maximum() const { return (maximum_); } /** Sets the minimum value in the progress widget. */ - void minimum(float v) { minimum_ = v; redraw(); } + void minimum(float v) { minimum_ = v; redraw(); } /** Gets the minimum value in the progress widget. */ - float minimum() const { return (minimum_); } + float minimum() const { return (minimum_); } /** Sets the current value in the progress widget. */ - void value(float v) { value_ = v; redraw(); } + void value(float v) { value_ = v; redraw(); } /** Gets the current value in the progress widget. */ - float value() const { return (value_); } + float value() const { return (value_); } }; #endif // !_Fl_Progress_H_ - -// -// End of "$Id$". -// diff --git a/FL/Fl_RGB_Image.H b/FL/Fl_RGB_Image.H index 056d4145b..1584c2fcb 100644 --- a/FL/Fl_RGB_Image.H +++ b/FL/Fl_RGB_Image.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // RGB Image header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2010 by Bill Spitzak and others. @@ -9,18 +7,14 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // #ifndef Fl_RGB_Image_H # define Fl_RGB_Image_H # include "Fl_Image.H" #endif // !Fl_RGB_Image_H - -// -// End of "$Id$". -// diff --git a/FL/Fl_Radio_Button.H b/FL/Fl_Radio_Button.H index 5dafe42a8..9cfc31621 100644 --- a/FL/Fl_Radio_Button.H +++ b/FL/Fl_Radio_Button.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Radio button header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2014 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -30,7 +28,3 @@ public: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Radio_Light_Button.H b/FL/Fl_Radio_Light_Button.H index 5945be11f..0877377db 100644 --- a/FL/Fl_Radio_Light_Button.H +++ b/FL/Fl_Radio_Light_Button.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Radio light button header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2014 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -30,7 +28,3 @@ public: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Radio_Round_Button.H b/FL/Fl_Radio_Round_Button.H index 91f53481a..ab0dc55d2 100644 --- a/FL/Fl_Radio_Round_Button.H +++ b/FL/Fl_Radio_Round_Button.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Radio round button header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2014 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -30,7 +28,3 @@ public: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Rect.H b/FL/Fl_Rect.H index 00e570a82..32ce01ffb 100644 --- a/FL/Fl_Rect.H +++ b/FL/Fl_Rect.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Fl_Rect header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2018 by Bill Spitzak and others. @@ -9,17 +7,17 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // #ifndef Fl_Rect_H #define Fl_Rect_H -#include <FL/Fl_Widget.H> // for c'tor based on Fl_Widget +#include <FL/Fl_Widget.H> // for c'tor based on Fl_Widget /** Rectangle with standard FLTK coordinates (X, Y, W, H). @@ -60,10 +58,10 @@ public: Fl_Rect (const Fl_Widget* const widget) : x_(widget->x()), y_(widget->y()), w_(widget->w()), h_(widget->h()) {} - int x() const { return x_; } ///< gets the x coordinate (left edge) - int y() const { return y_; } ///< gets the y coordinate (top edge) - int w() const { return w_; } ///< gets the width - int h() const { return h_; } ///< gets the height + int x() const { return x_; } ///< gets the x coordinate (left edge) + int y() const { return y_; } ///< gets the y coordinate (top edge) + int w() const { return w_; } ///< gets the width + int h() const { return h_; } ///< gets the height /** gets the right edge (x + w). \note r() and b() are coordinates \b outside the area of the rectangle. @@ -74,15 +72,11 @@ public: */ int b() const { return y_ + h_; } - void x(int X) { x_ = X; } ///< sets the x coordinate (left edge) - void y(int Y) { y_ = Y; } ///< sets the y coordinate (top edge) - void w(int W) { w_ = W; } ///< sets the width - void h(int H) { h_ = H; } ///< sets the height + void x(int X) { x_ = X; } ///< sets the x coordinate (left edge) + void y(int Y) { y_ = Y; } ///< sets the y coordinate (top edge) + void w(int W) { w_ = W; } ///< sets the width + void h(int H) { h_ = H; } ///< sets the height }; // class Fl_Rect #endif // Fl_Rect_H - -// -// End of "$Id$". -// diff --git a/FL/Fl_Repeat_Button.H b/FL/Fl_Repeat_Button.H index f22df8899..08ac61a33 100644 --- a/FL/Fl_Repeat_Button.H +++ b/FL/Fl_Repeat_Button.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Repeat button header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2010 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -48,7 +46,3 @@ public: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Return_Button.H b/FL/Fl_Return_Button.H index 54b4ab5ef..845b15f7d 100644 --- a/FL/Fl_Return_Button.H +++ b/FL/Fl_Return_Button.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Return button header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2010 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -27,7 +25,7 @@ The Fl_Return_Button is a subclass of Fl_Button that generates a callback when it is pressed or when the user presses the Enter key. A carriage-return symbol is drawn next to the button label. - <P ALIGN=CENTER>\image html Fl_Return_Button.png + <P ALIGN=CENTER>\image html Fl_Return_Button.png \image latex Fl_Return_Button.png "Fl_Return_Button" width=4cm */ class FL_EXPORT Fl_Return_Button : public Fl_Button { @@ -44,7 +42,3 @@ public: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Roller.H b/FL/Fl_Roller.H index c416c136a..4eeabd300 100644 --- a/FL/Fl_Roller.H +++ b/FL/Fl_Roller.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Roller header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2010 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -33,8 +31,8 @@ The roller can be controlled by clicking and dragging the mouse, by the corresponding arrow keys when the roller has the keyboard focus, or by the mousewheels when the mouse pointer is positioned over the roller widget. - - <P ALIGN=CENTER>\image html Fl_Roller.png + + <P ALIGN=CENTER>\image html Fl_Roller.png \image latex Fl_Roller.png "Fl_Roller" width=4cm */ class FL_EXPORT Fl_Roller : public Fl_Valuator { @@ -46,7 +44,3 @@ public: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Round_Button.H b/FL/Fl_Round_Button.H index f5cb03325..8c84e44cf 100644 --- a/FL/Fl_Round_Button.H +++ b/FL/Fl_Round_Button.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Round button header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2014 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // #ifndef Fl_Round_Button_H @@ -39,7 +37,3 @@ public: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Round_Clock.H b/FL/Fl_Round_Clock.H index 3ae748256..5d9bf90ea 100644 --- a/FL/Fl_Round_Clock.H +++ b/FL/Fl_Round_Clock.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Round clock header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2010 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -32,7 +30,3 @@ public: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_SVG_File_Surface.H b/FL/Fl_SVG_File_Surface.H index 9f5c7ace6..74437326f 100644 --- a/FL/Fl_SVG_File_Surface.H +++ b/FL/Fl_SVG_File_Surface.H @@ -9,9 +9,9 @@ // // https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// https://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // #ifndef Fl_SVG_File_Surface_H diff --git a/FL/Fl_SVG_Image.H b/FL/Fl_SVG_Image.H index 4940ffb8c..9a2504c02 100644 --- a/FL/Fl_SVG_Image.H +++ b/FL/Fl_SVG_Image.H @@ -9,9 +9,9 @@ // // https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// https://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // #ifndef FL_SVG_IMAGE_H @@ -22,28 +22,28 @@ struct NSVGimage; /** The Fl_SVG_Image class supports loading, caching and drawing of scalable vector graphics (SVG) images. - The FLTK library performs parsing and rasterization of SVG data using a modified version + The FLTK library performs parsing and rasterization of SVG data using a modified version of the \c nanosvg software (https://github.com/memononen/nanosvg). The software modification allows the option to change the image ratio while performing rasterization. - Use Fl_Image::fail() to check if the Fl_SVG_Image failed to load. fail() returns ERR_FILE_ACCESS - if the file could not be opened or read, and ERR_FORMAT if the SVG format could not be decoded. + Use Fl_Image::fail() to check if the Fl_SVG_Image failed to load. fail() returns ERR_FILE_ACCESS + if the file could not be opened or read, and ERR_FORMAT if the SVG format could not be decoded. If the image has loaded correctly, w(), h(), and d() should return values greater than zero. - Rasterization is not done until the image is first drawn or resize() or normalize() is called. Therefore, + Rasterization is not done until the image is first drawn or resize() or normalize() is called. Therefore, \ref array is NULL until then. The delayed rasterization ensures an Fl_SVG_Image is always rasterized to the exact screen resolution at which it is drawn. The Fl_SVG_Image class draws images computed by \c nanosvg with the following known limitations - + - text between \c <text\> and </text\> marks, - \c image elements, and - <use\> statements are not rendered. - The FLTK library can optionally be built without SVG support; in that case, + The FLTK library can optionally be built without SVG support; in that case, class Fl_SVG_Image is unavailable. Example of displaying a hard-coded svg file: @@ -117,7 +117,7 @@ struct NSVGimage; Fl_Box::resize(x, y, w, h); } }; - + int main(int argc, char **argv) { Fl_Window *win = new Fl_Window(130, 130); resizable_box *box = new resizable_box(win->w(), win->h()); @@ -166,7 +166,3 @@ public: }; #endif // FL_SVG_IMAGE_H - -// -// End of "$Id$". -// diff --git a/FL/Fl_Scroll.H b/FL/Fl_Scroll.H index 9da8a2d32..bc51fe11c 100644 --- a/FL/Fl_Scroll.H +++ b/FL/Fl_Scroll.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Scroll header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2015 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -94,7 +92,7 @@ class FL_EXPORT Fl_Scroll : public Fl_Group { void fix_scrollbar_order(); static void draw_clip(void*,int,int,int,int); -protected: // (STR#1895) +protected: // (STR#1895) /** Structure to manage scrollbar and widget interior sizes. This is filled out by recalc_scrollbars() for use in calculations @@ -106,27 +104,27 @@ protected: // (STR#1895) typedef struct { int x,y,w,h; } Fl_Region_XYWH; /// A local struct to manage a region defined by left/right/top/bottom typedef struct { - int l; ///< (l)eft "x" position, aka x1 - int r; ///< (r)ight "x" position, aka x2 - int t; ///< (t)op "y" position, aka y1 - int b; ///< (b)ottom "y" position, aka y2 + int l; ///< (l)eft "x" position, aka x1 + int r; ///< (r)ight "x" position, aka x2 + int t; ///< (t)op "y" position, aka y1 + int b; ///< (b)ottom "y" position, aka y2 } Fl_Region_LRTB; /// A local struct to manage a scrollbar's xywh region and tab values typedef struct { int x,y,w,h; - int pos; ///< scrollbar tab's "position of first line displayed" - int size; ///< scrollbar tab's "size of window in lines" - int first; ///< scrollbar tab's "number of first line" - int total; ///< scrollbar tab's "total number of lines" + int pos; ///< scrollbar tab's "position of first line displayed" + int size; ///< scrollbar tab's "size of window in lines" + int first; ///< scrollbar tab's "number of first line" + int total; ///< scrollbar tab's "total number of lines" } Fl_Scrollbar_Data; - int scrollsize; ///< the effective scrollbar thickness (local or global) - Fl_Region_XYWH innerbox; ///< widget's inner box, excluding scrollbars - Fl_Region_XYWH innerchild; ///< widget's inner box, including scrollbars - Fl_Region_LRTB child; ///< child bounding box: left/right/top/bottom - int hneeded; ///< horizontal scrollbar visibility - int vneeded; ///< vertical scrollbar visibility - Fl_Scrollbar_Data hscroll; ///< horizontal scrollbar region + values - Fl_Scrollbar_Data vscroll; ///< vertical scrollbar region + values + int scrollsize; ///< the effective scrollbar thickness (local or global) + Fl_Region_XYWH innerbox; ///< widget's inner box, excluding scrollbars + Fl_Region_XYWH innerchild; ///< widget's inner box, including scrollbars + Fl_Region_LRTB child; ///< child bounding box: left/right/top/bottom + int hneeded; ///< horizontal scrollbar visibility + int vneeded; ///< vertical scrollbar visibility + Fl_Scrollbar_Data hscroll; ///< horizontal scrollbar region + values + Fl_Scrollbar_Data vscroll; ///< vertical scrollbar region + values } ScrollInfo; void recalc_scrollbars(ScrollInfo &si); @@ -199,7 +197,3 @@ public: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Scrollbar.H b/FL/Fl_Scrollbar.H index 5563dcce1..f4542cfdc 100644 --- a/FL/Fl_Scrollbar.H +++ b/FL/Fl_Scrollbar.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Scroll bar header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2010 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -37,7 +35,7 @@ have to use casts to get at the floating-point versions of value() from Fl_Slider. - \image html scrollbar.png + \image html scrollbar.png \image latex scrollbar.png "Fl_Scrollbar" width=4cm */ class FL_EXPORT Fl_Scrollbar : public Fl_Slider { @@ -105,7 +103,3 @@ public: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Secret_Input.H b/FL/Fl_Secret_Input.H index de9621c73..0c7eb1666 100644 --- a/FL/Fl_Secret_Input.H +++ b/FL/Fl_Secret_Input.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Secret input header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2011 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -45,7 +43,3 @@ public: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Select_Browser.H b/FL/Fl_Select_Browser.H index 123e24cf8..b4651a0bd 100644 --- a/FL/Fl_Select_Browser.H +++ b/FL/Fl_Select_Browser.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Select browser header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2010 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -44,7 +42,3 @@ public: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Shared_Image.H b/FL/Fl_Shared_Image.H index f68ec7af0..bc0575340 100644 --- a/FL/Fl_Shared_Image.H +++ b/FL/Fl_Shared_Image.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Shared image header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2017 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /** \file @@ -56,20 +54,20 @@ class FL_EXPORT Fl_Shared_Image : public Fl_Image { protected: - static Fl_Shared_Image **images_; // Shared images - static int num_images_; // Number of shared images - static int alloc_images_; // Allocated shared images - static Fl_Shared_Handler *handlers_; // Additional format handlers - static int num_handlers_; // Number of format handlers - static int alloc_handlers_; // Allocated format handlers + static Fl_Shared_Image **images_; // Shared images + static int num_images_; // Number of shared images + static int alloc_images_; // Allocated shared images + static Fl_Shared_Handler *handlers_; // Additional format handlers + static int num_handlers_; // Number of format handlers + static int alloc_handlers_; // Allocated format handlers - const char *name_; // Name of image file - int original_; // Original image? - int refcount_; // Number of times this image has been used - Fl_Image *image_; // The image that is shared - int alloc_image_; // Was the image allocated? + const char *name_; // Name of image file + int original_; // Original image? + int refcount_; // Number of times this image has been used + Fl_Image *image_; // The image that is shared + int alloc_image_; // Was the image allocated? - static int compare(Fl_Shared_Image **i0, Fl_Shared_Image **i1); + static int compare(Fl_Shared_Image **i0, Fl_Shared_Image **i1); // Use get() and release() to load/delete images in memory... Fl_Shared_Image(); @@ -80,12 +78,12 @@ protected: public: /** Returns the filename of the shared image */ - const char *name() { return name_; } + const char *name() { return name_; } /** Returns the number of references of this shared image. When reference is below 1, the image is deleted. */ - int refcount() { return refcount_; } + int refcount() { return refcount_; } /** Returns whether this is an original image. Images loaded from a file or from memory are marked \p original as @@ -96,8 +94,8 @@ public: */ int original() { return original_; } - void release(); - void reload(); + void release(); + void reload(); virtual Fl_Shared_Image *as_shared_image() { return this; @@ -115,9 +113,9 @@ public: static Fl_Shared_Image *get(const char *name, int W = 0, int H = 0); static Fl_Shared_Image *get(Fl_RGB_Image *rgb, int own_it = 1); static Fl_Shared_Image **images(); - static int num_images(); - static void add_handler(Fl_Shared_Handler f); - static void remove_handler(Fl_Shared_Handler f); + static int num_images(); + static void add_handler(Fl_Shared_Handler f); + static void remove_handler(Fl_Shared_Handler f); }; // @@ -129,7 +127,3 @@ public: FL_EXPORT extern void fl_register_images(); #endif // !Fl_Shared_Image_H - -// -// End of "$Id$" -// diff --git a/FL/Fl_Simple_Counter.H b/FL/Fl_Simple_Counter.H index 8edc907af..1ec214740 100644 --- a/FL/Fl_Simple_Counter.H +++ b/FL/Fl_Simple_Counter.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Simple counter header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2010 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -23,9 +21,9 @@ #define Fl_Simple_Counter_H #include "Fl_Counter.H" -/** - This widget creates a counter with only 2 arrow buttons - <P align=center>\image html counter.png</P> +/** + This widget creates a counter with only 2 arrow buttons + <P align=center>\image html counter.png</P> \image latex counter.png "Fl_Simple_Counter" width=4cm */ class FL_EXPORT Fl_Simple_Counter : public Fl_Counter { @@ -34,7 +32,3 @@ public: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Simple_Terminal.H b/FL/Fl_Simple_Terminal.H index 5f4d5e6dc..158bf7d48 100644 --- a/FL/Fl_Simple_Terminal.H +++ b/FL/Fl_Simple_Terminal.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // A simple terminal widget for Fast Light Tool Kit (FLTK). // // Copyright 1998-2011 by Bill Spitzak and others. @@ -10,11 +8,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -192,7 +190,3 @@ protected: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Single_Window.H b/FL/Fl_Single_Window.H index a5f2cdc0a..01878db5c 100644 --- a/FL/Fl_Single_Window.H +++ b/FL/Fl_Single_Window.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Single-buffered window header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2015 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -35,7 +33,7 @@ class FL_EXPORT Fl_Single_Window : public Fl_Window { public: void show(); void show(int a, char **b) {Fl_Window::show(a,b);} - + /** Creates a new Fl_Single_Window widget using the given size, and label (title) string. @@ -47,12 +45,8 @@ public: position, size, and label (title) string. */ Fl_Single_Window(int X, int Y, int W, int H, const char *l=0); - + int make_current(); }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Slider.H b/FL/Fl_Slider.H index aceb62d5a..4761c6f11 100644 --- a/FL/Fl_Slider.H +++ b/FL/Fl_Slider.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Slider header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2010 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -27,12 +25,12 @@ #endif // values for type(), lowest bit indicate horizontal: -#define FL_VERT_SLIDER 0 -#define FL_HOR_SLIDER 1 -#define FL_VERT_FILL_SLIDER 2 -#define FL_HOR_FILL_SLIDER 3 -#define FL_VERT_NICE_SLIDER 4 -#define FL_HOR_NICE_SLIDER 5 +#define FL_VERT_SLIDER 0 +#define FL_HOR_SLIDER 1 +#define FL_VERT_FILL_SLIDER 2 +#define FL_HOR_FILL_SLIDER 3 +#define FL_VERT_NICE_SLIDER 4 +#define FL_HOR_NICE_SLIDER 5 /** The Fl_Slider widget contains a sliding knob inside a box. It is @@ -41,9 +39,9 @@ maximum(). The minimum() may be greater than the maximum() to reverse the slider direction. - Use void Fl_Widget::type(int) to set how the slider is drawn, + Use void Fl_Widget::type(int) to set how the slider is drawn, which can be one of the following: - + \li FL_VERTICAL - Draws a vertical slider (this is the default). \li FL_HORIZONTAL - Draws a horizontal slider. \li FL_VERT_FILL_SLIDER - Draws a filled vertical slider, @@ -55,7 +53,7 @@ \li FL_HOR_NICE_SLIDER - Draws a horizontal slider with a nice looking control knob. - \image html slider.png + \image html slider.png \image latex slider.png "Fl_Slider" width=4cm */ class FL_EXPORT Fl_Slider : public Fl_Valuator { @@ -105,7 +103,3 @@ public: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Spinner.H b/FL/Fl_Spinner.H index 48fdaebfd..541078a8f 100644 --- a/FL/Fl_Spinner.H +++ b/FL/Fl_Spinner.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Spinner widget for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2017 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -38,17 +36,17 @@ */ class FL_EXPORT Fl_Spinner : public Fl_Group { - double value_; // Current value - double minimum_; // Minimum value - double maximum_; // Maximum value - double step_; // Amount to add/subtract for up/down - const char *format_; // Format string for input field - int wrap_; // wrap around at bounds (1/0) + double value_; // Current value + double minimum_; // Minimum value + double maximum_; // Maximum value + double step_; // Amount to add/subtract for up/down + const char *format_; // Format string for input field + int wrap_; // wrap around at bounds (1/0) private: static void sb_cb(Fl_Widget *w, Fl_Spinner *sb); // internal callback - void update(); // update input field + void update(); // update input field protected: @@ -60,13 +58,13 @@ protected: public: Fl_Spinner_Input(int X, int Y, int W, int H) : Fl_Input(X, Y, W, H) {} - int handle(int event); // implemented in src/Fl_Spinner.cxx + int handle(int event); // implemented in src/Fl_Spinner.cxx }; - Fl_Spinner_Input input_; // Input field for the value + Fl_Spinner_Input input_; // Input field for the value Fl_Repeat_Button - up_button_, // Up button - down_button_; // Down button + up_button_, // Up button + down_button_; // Down button public: @@ -120,9 +118,9 @@ public: FLTK 1.3.x and older versions. \note Wrap mode does not apply to the input field if the input value - is edited directly as a number. The input value is always - clipped to the allowed range as if wrap mode was off when the - input field is left (i.e. loses focus). + is edited directly as a number. The input value is always + clipped to the allowed range as if wrap mode was off when the + input field is left (i.e. loses focus). \see minimum(), maximum() @@ -207,8 +205,3 @@ public: }; #endif // !Fl_Spinner_H - - -// -// End of "$Id$". -// diff --git a/FL/Fl_Sys_Menu_Bar.H b/FL/Fl_Sys_Menu_Bar.H index c586625ac..beb4425a9 100644 --- a/FL/Fl_Sys_Menu_Bar.H +++ b/FL/Fl_Sys_Menu_Bar.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // MacOS system menu bar header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2017 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /** \file @@ -30,9 +28,9 @@ class Fl_Sys_Menu_Bar_Driver; /** A class to create and modify menus that appear on macOS in the menu bar at the top of the screen. - + On other than macOS platforms, Fl_Sys_Menu_Bar is a synonym of class Fl_Menu_Bar. - + On the macOS platform, replace Fl_Menu_Bar with Fl_Sys_Menu_Bar, and a system menu at the top of the screen will be available. This menu will match an array of Fl_Menu_Item's exactly as in all other FLTK menus (except for the submenu with the @@ -41,7 +39,7 @@ class Fl_Sys_Menu_Bar_Driver; from this class can be created, because macOS uses a single system menu bar. Therefore, porting to macOS an app that creates, on other platforms, several Fl_Menu_Bar objects, one for each of several windows, is more complex that just replacing Fl_Menu_Bar by Fl_Sys_Menu_Bar. - + On the macOS platform, the system menu bar of any FLTK app begins with the Application menu which the FLTK library automatically constructs. Functions Fl_Mac_App_Menu::custom_application_menu_items() and Fl_Sys_Menu_Bar::about() can be used to further customize @@ -51,13 +49,13 @@ class Fl_Sys_Menu_Bar_Driver; Other member functions of this class allow the app to generate the rest of the system menu bar. It is recommended to localize the system menu bar using the standard Mac OS X localization procedure (see \ref osissues_localize). - + Changes to the menu state are immediately visible in the menubar when they are made using member functions of the Fl_Sys_Menu_Bar class. Other changes (e.g., by a call to Fl_Menu_Item::set()) should be followed by a call to update() to be visible in the menubar across all platforms. macOS global variable \ref fl_sys_menu_bar points to the unique, current system menu bar. - + A few FLTK menu features are not supported by the Mac System menu: \li no symbolic labels \li no embossed labels @@ -66,11 +64,11 @@ class Fl_Sys_Menu_Bar_Driver; As described above, the submenu with the application's own name (usually the second submenu from the left, immediately following the "Apple" submenu) is a special case, and can be managed with - Fl_Mac_App_Menu::custom_application_menu_items(). + Fl_Mac_App_Menu::custom_application_menu_items(). For example, to make your own "Appname -> Preferences" dialog, you might use: \code - #include <FL/platform.H> // for Fl_Mac_App_Menu class + #include <FL/platform.H> // for Fl_Mac_App_Menu class #include <FL/Fl_Sys_Menu_Bar.H> // for Fl_Menu_Item : void prefs_cb(Fl_Widget *w, void *data) { @@ -84,7 +82,7 @@ class Fl_Sys_Menu_Bar_Driver; { "Preferences", 0, prefs_cb, 0, 0 }, { 0 }, { 0 } }; - Fl_Mac_App_Menu::custom_application_menu_items(appitems); // adds it + Fl_Mac_App_Menu::custom_application_menu_items(appitems); // adds it } \endcode @@ -114,7 +112,7 @@ public: void menu(const Fl_Menu_Item *m); virtual void update(); int add(const char* label, int shortcut, Fl_Callback*, void *user_data=0, int flags=0); - /** Adds a new menu item. + /** Adds a new menu item. \see Fl_Menu_::add(const char* label, int shortcut, Fl_Callback*, void *user_data=0, int flags=0) */ int add(const char* label, const char* shortcut, Fl_Callback* cb, void *user_data=0, int flags=0) { @@ -122,7 +120,7 @@ public: } int add(const char* str); int insert(int index, const char* label, int shortcut, Fl_Callback *cb, void *user_data=0, int flags=0); - /** Insert a new menu item. + /** Insert a new menu item. \see Fl_Menu_::insert(int index, const char* label, const char* shortcut, Fl_Callback *cb, void *user_data=0, int flags=0) */ int insert(int index, const char* label, const char* shortcut, Fl_Callback *cb, void *user_data=0, int flags=0) { @@ -132,14 +130,14 @@ public: void replace(int index, const char *name); void clear(); int clear_submenu(int index); - void mode (int i, int fl); + void mode (int i, int fl); /** Gets the flags of item i. */ int mode(int i) const { return Fl_Menu_::mode(i); } void shortcut (int i, int s); void setonly (Fl_Menu_Item *item); static void about(Fl_Callback *cb, void *data); - + static window_menu_style_enum window_menu_style(); static void window_menu_style(window_menu_style_enum style); static void create_window_menu(); @@ -150,7 +148,3 @@ public: extern Fl_Sys_Menu_Bar *fl_sys_menu_bar; #endif // Fl_Sys_Menu_Bar_H - -// -// End of "$Id$". -// diff --git a/FL/Fl_Table.H b/FL/Fl_Table.H index ad91d62a6..ecc68efa7 100644 --- a/FL/Fl_Table.H +++ b/FL/Fl_Table.H @@ -1,7 +1,5 @@ // -// "$Id$" -// -// Fl_Table -- A table widget +// Fl_Table -- A table widget for the Fast Light Tool Kit (FLTK). // // Copyright 2002 by Greg Ercolano. // Copyright (c) 2004 O'ksi'D @@ -12,9 +10,9 @@ // // https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// https://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // #ifndef _FL_TABLE_H @@ -25,20 +23,20 @@ /** A table of widgets or other content. - + This is the base class for table widgets. - + To be useful it must be subclassed and several virtual functions defined. - Normally applications use widgets derived from this widget, and do not use this - widget directly; this widget is usually too low level to be used directly by + Normally applications use widgets derived from this widget, and do not use this + widget directly; this widget is usually too low level to be used directly by applications. - + This widget does \em not handle the data in the table. The draw_cell() - method must be overridden by a subclass to manage drawing the contents of + method must be overridden by a subclass to manage drawing the contents of the cells. - + This widget can be used in several ways: - + - As a custom widget; see examples/table-simple.cxx and test/table.cxx. Very optimal for even extremely large tables. - As a table made up of a single FLTK widget instanced all over the table, @@ -46,63 +44,63 @@ examples/table-spreadsheet-with-keyboard-nav.cxx. Optimal for large tables. - As a regular container of FLTK widgets, one widget per cell. See examples/table-as-container.cxx. \em Not recommended for large tables. - + \image html table-simple.png \image latex table-simple.png "table-simple example" width=6cm \image html table-as-container.png \image latex table-as-container.png "table-as-container example" width=6cm - + When acting as part of a custom widget, events on the cells and/or headings - generate callbacks when they are clicked by the user. You control when events + generate callbacks when they are clicked by the user. You control when events are generated based on the setting for Fl_Table::when(). - - When acting as a container for FLTK widgets, the FLTK widgets maintain - themselves. Although the draw_cell() method must be overridden, its contents + + When acting as a container for FLTK widgets, the FLTK widgets maintain + themselves. Although the draw_cell() method must be overridden, its contents can be very simple. See the draw_cell() code in examples/table-simple.cxx. - + The following variables are available to classes deriving from Fl_Table: - - \anchor table_dimensions_diagram + + \anchor table_dimensions_diagram \image html table-dimensions.png \image latex table-dimensions.png "Fl_Table Dimensions" width=6cm - + <table border=0> <tr><td>x()/y()/w()/h()</td> - <td>Fl_Table widget's outer dimension. The outer edge of the border of the + <td>Fl_Table widget's outer dimension. The outer edge of the border of the Fl_Table. (Red in the diagram above)</td></tr> - + <tr><td>wix/wiy/wiw/wih</td> - <td>Fl_Table widget's inner dimension. The inner edge of the border of the - Fl_Table. eg. if the Fl_Table's box() is FL_NO_BOX, these values are the same + <td>Fl_Table widget's inner dimension. The inner edge of the border of the + Fl_Table. eg. if the Fl_Table's box() is FL_NO_BOX, these values are the same as x()/y()/w()/h(). (Yellow in the diagram above)</td></tr> - + <tr><td>tox/toy/tow/toh</td> <td>The table's outer dimension. The outer edge of the border around the cells, but inside the row/col headings and scrollbars. (Green in the diagram above) </td></tr> - + <tr><td>tix/tiy/tiw/tih</td> <td>The table's inner dimension. The inner edge of the border around the cells, - but inside the row/col headings and scrollbars. AKA the table's clip region. + but inside the row/col headings and scrollbars. AKA the table's clip region. eg. if the table_box() is FL_NO_BOX, these values are the same as tox/toy/tow/toh. (Blue in the diagram above) </td></tr></table> - + CORE DEVELOPERS - + - Greg Ercolano : 12/16/2002 - initial implementation 12/16/02. Fl_Table, Fl_Table_Row, docs. - Jean-Marc Lienher : 02/22/2004 - added keyboard nav + mouse selection, and ported Fl_Table into fltk-utf8-1.1.4 - + OTHER CONTRIBUTORS - + - Inspired by the Feb 2000 version of FLVW's Flvw_Table widget. Mucho thanks to those folks. - Mister Satan : 04/07/2003 - MinGW porting mods, and singleinput.cxx; a cool Fl_Input oriented spreadsheet example - Marek Paliwoda : 01/08/2003 - Porting mods for Borland - Ori Berger : 03/16/2006 - Optimizations for >500k rows/cols - + LICENSE - + Greg kindly gave his permission to integrate Fl_Table and Fl_Table_Row into FLTK, allowing FLTK license to apply while his widgets are part of the library. [updated by Greg, 04/26/17] @@ -116,30 +114,30 @@ public: or in a callback() to determine where a recent event occurred. */ enum TableContext { - CONTEXT_NONE = 0, ///< no known context - CONTEXT_STARTPAGE = 0x01, ///< before the table is redrawn - CONTEXT_ENDPAGE = 0x02, ///< after the table is redrawn - CONTEXT_ROW_HEADER = 0x04, ///< drawing or event occurred in the row header - CONTEXT_COL_HEADER = 0x08, ///< drawing or event occurred in the col header - CONTEXT_CELL = 0x10, ///< drawing or event occurred in a cell - CONTEXT_TABLE = 0x20, ///< drawing or event occurred in a dead zone of table - CONTEXT_RC_RESIZE = 0x40 ///< column or row is being resized + CONTEXT_NONE = 0, ///< no known context + CONTEXT_STARTPAGE = 0x01, ///< before the table is redrawn + CONTEXT_ENDPAGE = 0x02, ///< after the table is redrawn + CONTEXT_ROW_HEADER = 0x04, ///< drawing or event occurred in the row header + CONTEXT_COL_HEADER = 0x08, ///< drawing or event occurred in the col header + CONTEXT_CELL = 0x10, ///< drawing or event occurred in a cell + CONTEXT_TABLE = 0x20, ///< drawing or event occurred in a dead zone of table + CONTEXT_RC_RESIZE = 0x40 ///< column or row is being resized }; - + private: - int _rows, _cols; // total rows/cols - int _row_header_w; // width of row header - int _col_header_h; // height of column header - int _row_position; // last row_position set (not necessarily == toprow!) - int _col_position; // last col_position set (not necessarily == leftcol!) - - char _row_header; // row header enabled? - char _col_header; // col header enabled? - char _row_resize; // row resizing enabled? - char _col_resize; // col resizing enabled? - int _row_resize_min; // row minimum resizing height (default=1) - int _col_resize_min; // col minimum resizing width (default=1) - + int _rows, _cols; // total rows/cols + int _row_header_w; // width of row header + int _col_header_h; // height of column header + int _row_position; // last row_position set (not necessarily == toprow!) + int _col_position; // last col_position set (not necessarily == leftcol!) + + char _row_header; // row header enabled? + char _col_header; // col header enabled? + char _row_resize; // row resizing enabled? + char _col_resize; // col resizing enabled? + int _row_resize_min; // row minimum resizing height (default=1) + int _col_resize_min; // col minimum resizing width (default=1) + // OPTIMIZATION: partial row/column redraw variables int _redraw_toprow; int _redraw_botrow; @@ -147,15 +145,15 @@ private: int _redraw_rightcol; Fl_Color _row_header_color; Fl_Color _col_header_color; - + int _auto_drag; int _selecting; int _scrollbar_size; enum { - TABCELLNAV = 1<<0, ///> tab cell navigation flag + TABCELLNAV = 1<<0, ///> tab cell navigation flag }; unsigned int flags_; - + // An STL-ish vector without templates class FL_EXPORT IntVector { int *arr; @@ -166,10 +164,10 @@ private: } void copy(int *newarr, unsigned int newsize); public: - IntVector() { init(); } // CTOR - ~IntVector(); // DTOR - IntVector(IntVector&o) { init(); copy(o.arr, o._size); } // COPY CTOR - IntVector& operator=(IntVector&o) { // ASSIGN + IntVector() { init(); } // CTOR + ~IntVector(); // DTOR + IntVector(IntVector&o) { init(); copy(o.arr, o._size); } // COPY CTOR + IntVector& operator=(IntVector&o) { // ASSIGN init(); copy(o.arr, o._size); return(*this); @@ -182,34 +180,34 @@ private: void push_back(int val) { unsigned int x = _size; size(_size+1); arr[x] = val; } int back() { return(arr[_size-1]); } }; - - IntVector _colwidths; // column widths in pixels - IntVector _rowheights; // row heights in pixels - - Fl_Cursor _last_cursor; // last mouse cursor before changed to 'resize' cursor - + + IntVector _colwidths; // column widths in pixels + IntVector _rowheights; // row heights in pixels + + Fl_Cursor _last_cursor; // last mouse cursor before changed to 'resize' cursor + // EVENT CALLBACK DATA - TableContext _callback_context; // event context - int _callback_row, _callback_col; // event row/col - + TableContext _callback_context; // event context + int _callback_row, _callback_col; // event row/col + // handle() state variables. // Put here instead of local statics in handle(), so more // than one Fl_Table can exist without crosstalk between them. // - int _resizing_col; // column being dragged - int _resizing_row; // row being dragged - int _dragging_x; // starting x position for horiz drag - int _dragging_y; // starting y position for vert drag - int _last_row; // last row we FL_PUSH'ed - + int _resizing_col; // column being dragged + int _resizing_row; // row being dragged + int _dragging_x; // starting x position for horiz drag + int _dragging_y; // starting y position for vert drag + int _last_row; // last row we FL_PUSH'ed + // Redraw single cell void _redraw_cell(TableContext context, int R, int C); - + void _start_auto_drag(); void _stop_auto_drag(); void _auto_drag_cb(); static void _auto_drag_cb2(void *d); - + protected: enum ResizeFlag { RESIZE_NONE = 0, @@ -219,70 +217,70 @@ protected: RESIZE_ROW_BELOW = 4 }; - int table_w; ///< table's virtual width (in pixels) - int table_h; ///< table's virtual height (in pixels) - int toprow; ///< top row# of currently visible table on screen - int botrow; ///< bottom row# of currently visible table on screen - int leftcol; ///< left column# of currently visible table on screen - int rightcol; ///< right column# of currently visible table on screen - + int table_w; ///< table's virtual width (in pixels) + int table_h; ///< table's virtual height (in pixels) + int toprow; ///< top row# of currently visible table on screen + int botrow; ///< bottom row# of currently visible table on screen + int leftcol; ///< left column# of currently visible table on screen + int rightcol; ///< right column# of currently visible table on screen + // selection - int current_row; ///< selection cursor's current row (-1 if none) - int current_col; ///< selection cursor's current column (-1 if none) - int select_row; ///< extended selection row (-1 if none) - int select_col; ///< extended selection column (-1 if none) - + int current_row; ///< selection cursor's current row (-1 if none) + int current_col; ///< selection cursor's current column (-1 if none) + int select_row; ///< extended selection row (-1 if none) + int select_col; ///< extended selection column (-1 if none) + // OPTIMIZATION: Precomputed scroll positions for the toprow/leftcol - int toprow_scrollpos; ///< precomputed scroll position for top row - int leftcol_scrollpos; ///< precomputed scroll position for left column - + int toprow_scrollpos; ///< precomputed scroll position for top row + int leftcol_scrollpos; ///< precomputed scroll position for left column + // Data table's inner dimension - int tix; ///< Data table's inner x dimension, inside bounding box. See \ref table_dimensions_diagram "Table Dimension Diagram" - int tiy; ///< Data table's inner y dimension, inside bounding box. See \ref table_dimensions_diagram "Table Dimension Diagram" - int tiw; ///< Data table's inner w dimension, inside bounding box. See \ref table_dimensions_diagram "Table Dimension Diagram" - int tih; ///< Data table's inner h dimension, inside bounding box. See \ref table_dimensions_diagram "Table Dimension Diagram" + int tix; ///< Data table's inner x dimension, inside bounding box. See \ref table_dimensions_diagram "Table Dimension Diagram" + int tiy; ///< Data table's inner y dimension, inside bounding box. See \ref table_dimensions_diagram "Table Dimension Diagram" + int tiw; ///< Data table's inner w dimension, inside bounding box. See \ref table_dimensions_diagram "Table Dimension Diagram" + int tih; ///< Data table's inner h dimension, inside bounding box. See \ref table_dimensions_diagram "Table Dimension Diagram" // Data table's outer dimension - int tox; ///< Data table's outer x dimension, outside bounding box. See \ref table_dimensions_diagram "Table Dimension Diagram" - int toy; ///< Data table's outer y dimension, outside bounding box. See \ref table_dimensions_diagram "Table Dimension Diagram" - int tow; ///< Data table's outer w dimension, outside bounding box. See \ref table_dimensions_diagram "Table Dimension Diagram" - int toh; ///< Data table's outer h dimension, outside bounding box. See \ref table_dimensions_diagram "Table Dimension Diagram" + int tox; ///< Data table's outer x dimension, outside bounding box. See \ref table_dimensions_diagram "Table Dimension Diagram" + int toy; ///< Data table's outer y dimension, outside bounding box. See \ref table_dimensions_diagram "Table Dimension Diagram" + int tow; ///< Data table's outer w dimension, outside bounding box. See \ref table_dimensions_diagram "Table Dimension Diagram" + int toh; ///< Data table's outer h dimension, outside bounding box. See \ref table_dimensions_diagram "Table Dimension Diagram" // Table widget's inner dimension - int wix; ///< Table widget's inner x dimension, inside bounding box. See \ref table_dimensions_diagram "Table Dimension Diagram" - int wiy; ///< Table widget's inner y dimension, inside bounding box. See \ref table_dimensions_diagram "Table Dimension Diagram" - int wiw; ///< Table widget's inner w dimension, inside bounding box. See \ref table_dimensions_diagram "Table Dimension Diagram" - int wih; ///< Table widget's inner h dimension, inside bounding box. See \ref table_dimensions_diagram "Table Dimension Diagram" - - Fl_Scroll *table; ///< child Fl_Scroll widget container for child fltk widgets (if any) - Fl_Scrollbar *vscrollbar; ///< child vertical scrollbar widget - Fl_Scrollbar *hscrollbar; ///< child horizontal scrollbar widget - + int wix; ///< Table widget's inner x dimension, inside bounding box. See \ref table_dimensions_diagram "Table Dimension Diagram" + int wiy; ///< Table widget's inner y dimension, inside bounding box. See \ref table_dimensions_diagram "Table Dimension Diagram" + int wiw; ///< Table widget's inner w dimension, inside bounding box. See \ref table_dimensions_diagram "Table Dimension Diagram" + int wih; ///< Table widget's inner h dimension, inside bounding box. See \ref table_dimensions_diagram "Table Dimension Diagram" + + Fl_Scroll *table; ///< child Fl_Scroll widget container for child fltk widgets (if any) + Fl_Scrollbar *vscrollbar; ///< child vertical scrollbar widget + Fl_Scrollbar *hscrollbar; ///< child horizontal scrollbar widget + // Fltk - int handle(int e); // fltk handle() override - + int handle(int e); // fltk handle() override + // Class maintenance void recalc_dimensions(); - void table_resized(); // table resized; recalc - void table_scrolled(); // table scrolled; recalc - void get_bounds(TableContext context, // return x/y/w/h bounds for context + void table_resized(); // table resized; recalc + void table_scrolled(); // table scrolled; recalc + void get_bounds(TableContext context, // return x/y/w/h bounds for context int &X, int &Y, int &W, int &H); - void change_cursor(Fl_Cursor newcursor); // change mouse cursor to some other shape + void change_cursor(Fl_Cursor newcursor); // change mouse cursor to some other shape TableContext cursor2rowcol(int &R, int &C, ResizeFlag &resizeflag); - int find_cell(TableContext context, // find cell's x/y/w/h given r/c + int find_cell(TableContext context, // find cell's x/y/w/h given r/c int R, int C, int &X, int &Y, int &W, int &H); int row_col_clamp(TableContext context, int &R, int &C); // clamp r/c to known universe - + /** Subclass should override this method to handle drawing the cells. - + This method will be called whenever the table is redrawn, once per cell. - + Only cells that are completely (or partially) visible will be told to draw. - + \p context will be one of the following: - + <table border=1> <tr> <td>\p Fl_Table::CONTEXT_STARTPAGE</td> @@ -319,25 +317,25 @@ protected: <td>Whenever table or row/column is resized or scrolled, either interactively or via col_width() or row_height().<br> R/C/X/Y/W/H will all be zero. - <p> + <p> Useful for fltk containers that need to resize or move the child fltk widgets.</td> </tr> </table> - + \p row and \p col will be set to the row and column number of the cell being drawn. In the case of row headers, \p col will be \a 0. In the case of column headers, \p row will be \a 0. - + <tt>x/y/w/h</tt> will be the position and dimensions of where the cell should be drawn. - + In the case of custom widgets, a minimal draw_cell() override might look like the following. With custom widgets it is up to the caller to handle drawing everything within the dimensions of the cell, including handling the selection color. Note all clipping must be handled as well; this allows drawing outside the dimensions of the cell if so desired for 'custom effects'. - + \code // This is called whenever Fl_Table wants you to draw a cell void MyTable::draw_cell(TableContext context, int R=0, int C=0, int X=0, int Y=0, int W=0, int H=0) { @@ -347,7 +345,7 @@ protected: case CONTEXT_STARTPAGE: // Fl_Table telling us it's starting to draw page fl_font(FL_HELVETICA, 16); return; - + case CONTEXT_ROW_HEADER: // Fl_Table telling us to draw row/col headers case CONTEXT_COL_HEADER: fl_push_clip(X, Y, W, H); @@ -358,25 +356,25 @@ protected: } fl_pop_clip(); return; - + case CONTEXT_CELL: // Fl_Table telling us to draw cells fl_push_clip(X, Y, W, H); { // BG COLOR fl_color( row_selected(R) ? selection_color() : FL_WHITE); fl_rectf(X, Y, W, H); - + // TEXT fl_color(FL_BLACK); fl_draw(s, X, Y, W, H, FL_ALIGN_CENTER); - + // BORDER fl_color(FL_LIGHT2); fl_rect(X, Y, W, H); } fl_pop_clip(); return; - + default: return; } @@ -384,24 +382,24 @@ protected: } \endcode */ - virtual void draw_cell(TableContext context, int R=0, int C=0, + virtual void draw_cell(TableContext context, int R=0, int C=0, int X=0, int Y=0, int W=0, int H=0) - { } // overridden by deriving class - - long row_scroll_position(int row); // find scroll position of row (in pixels) - long col_scroll_position(int col); // find scroll position of col (in pixels) - + { } // overridden by deriving class + + long row_scroll_position(int row); // find scroll position of row (in pixels) + long col_scroll_position(int col); // find scroll position of col (in pixels) + /** Does the table contain any child fltk widgets? */ - int is_fltk_container() { // does table contain fltk widgets? - return( Fl_Group::children() > 3 ); // (ie. more than box and 2 scrollbars?) + int is_fltk_container() { // does table contain fltk widgets? + return( Fl_Group::children() > 3 ); // (ie. more than box and 2 scrollbars?) } - - static void scroll_cb(Fl_Widget*,void*); // h/v scrollbar callback - + + static void scroll_cb(Fl_Widget*,void*); // h/v scrollbar callback + void damage_zone(int r1, int c1, int r2, int c2, int r3 = 0, int c3 = 0); - + /** Define region of cells to be redrawn by specified range of rows/cols, and then sets damage(DAMAGE_CHILD). Extends any previously defined range to redraw. @@ -430,7 +428,7 @@ protected: public: Fl_Table(int X, int Y, int W, int H, const char *l=0); ~Fl_Table(); - + /** Clears the table to zero rows (rows(0)), zero columns (cols(0)), and clears any widgets (table->clear()) that were added with begin()/end() or add()/insert()/etc. @@ -441,9 +439,9 @@ public: cols(0); table->clear(); } - + // \todo: add topline(), middleline(), bottomline() - + /** Sets the kind of box drawn around the data table, the default being FL_NO_BOX. Changing this value will cause the table @@ -453,40 +451,40 @@ public: table->box(val); table_resized(); } - + /** Returns the current box type used for the data table. */ inline Fl_Boxtype table_box( void ) { return(table->box()); } - - virtual void rows(int val); // set/get number of rows - + + virtual void rows(int val); // set/get number of rows + /** Returns the number of rows in the table. */ inline int rows() { return(_rows); } - - virtual void cols(int val); // set/get number of columns - - /** + + virtual void cols(int val); // set/get number of columns + + /** Get the number of columns in the table. */ inline int cols() { return(_cols); } - + /** - Returns the range of row and column numbers for all visible + Returns the range of row and column numbers for all visible and partially visible cells in the table. - + These values can be used e.g. by your draw_cell() routine during CONTEXT_STARTPAGE to figure out what cells are about to be redrawn for the purposes of locking the data from a database before it's drawn. - + \code leftcol rightcol : : @@ -498,10 +496,10 @@ public: | | botrow .. '-------------------` \endcode - + e.g. in a table where the visible rows are 5-20, and the visible columns are 100-120, then those variables would be: - + - toprow = 5 - botrow = 20 - leftcol = 100 @@ -512,33 +510,33 @@ public: r2 = botrow; c1 = leftcol; c2 = rightcol; - } - + } + /** Returns 1 if someone is interactively resizing a row or column. You can currently call this only from within your callback(). */ int is_interactive_resize() { return(_resizing_row != -1 || _resizing_col != -1); - } - + } + /** Returns if row resizing by the user is allowed. */ inline int row_resize() { return(_row_resize); } - + /** Allows/disallows row resizing by the user. 1=allow interactive resizing, 0=disallow interactive resizing. Since interactive resizing is done via the row headers, row_header() must also be enabled to allow resizing. - */ - void row_resize(int flag) { // enable row resizing + */ + void row_resize(int flag) { // enable row resizing _row_resize = flag; } - + /** Returns if column resizing by the user is allowed. */ @@ -552,17 +550,17 @@ public: Since interactive resizing is done via the column headers, \p col_header() must also be enabled to allow resizing. */ - void col_resize(int flag) { // enable col resizing + void col_resize(int flag) { // enable col resizing _col_resize = flag; } - + /** Returns the current column minimum resize value. */ - inline int col_resize_min() { // column minimum resizing width + inline int col_resize_min() { // column minimum resizing width return(_col_resize_min); } - + /** Sets the current column minimum resize value. This is used to prevent the user from interactively resizing @@ -570,15 +568,15 @@ public: */ void col_resize_min(int val) { _col_resize_min = ( val < 1 ) ? 1 : val; - } - + } + /** Returns the current row minimum resize value. */ - inline int row_resize_min() { // column minimum resizing width + inline int row_resize_min() { // column minimum resizing width return(_row_resize_min); } - + /** Sets the current row minimum resize value. This is used to prevent the user from interactively resizing @@ -587,14 +585,14 @@ public: void row_resize_min(int val) { _row_resize_min = ( val < 1 ) ? 1 : val; } - + /** Returns if row headers are enabled or not. */ - inline int row_header() { // set/get row header enable flag + inline int row_header() { // set/get row header enable flag return(_row_header); } - + /** Enables/disables showing the row headers. 1=enabled, 0=disabled. If changed, the table is redrawn. @@ -604,14 +602,14 @@ public: table_resized(); redraw(); } - + /** Returns if column headers are enabled or not. */ - inline int col_header() { // set/get col header enable flag + inline int col_header() { // set/get col header enable flag return(_col_header); } - + /** Enable or disable column headers. If changed, the table is redrawn. @@ -621,97 +619,97 @@ public: table_resized(); redraw(); } - + /** Sets the height in pixels for column headers and redraws the table. */ - inline void col_header_height(int height) { // set/get col header height + inline void col_header_height(int height) { // set/get col header height _col_header_h = height; table_resized(); redraw(); } - + /** Gets the column header height. */ inline int col_header_height() { return(_col_header_h); } - + /** Sets the row header width to n and causes the screen to redraw. */ - inline void row_header_width(int width) { // set/get row header width + inline void row_header_width(int width) { // set/get row header width _row_header_w = width; table_resized(); redraw(); } - + /** Returns the current row header width (in pixels). */ inline int row_header_width() { return(_row_header_w); } - + /** Sets the row header color and causes the screen to redraw. */ - inline void row_header_color(Fl_Color val) { // set/get row header color + inline void row_header_color(Fl_Color val) { // set/get row header color _row_header_color = val; redraw(); } - + /** Returns the current row header color. */ inline Fl_Color row_header_color() { return(_row_header_color); - } - + } + /** Sets the color for column headers and redraws the table. */ - inline void col_header_color(Fl_Color val) { // set/get col header color + inline void col_header_color(Fl_Color val) { // set/get col header color _col_header_color = val; redraw(); } - + /** Gets the color for column headers. */ inline Fl_Color col_header_color() { return(_col_header_color); } - - void row_height(int row, int height); // set/get row height - + + void row_height(int row, int height); // set/get row height + /** Returns the current height of the specified row as a value in pixels. */ inline int row_height(int row) { return((row<0 || row>=(int)_rowheights.size()) ? 0 : _rowheights[row]); } - - void col_width(int col, int width); // set/get a column's width - + + void col_width(int col, int width); // set/get a column's width + /** Returns the current width of the specified column in pixels. */ inline int col_width(int col) { return((col<0 || col>=(int)_colwidths.size()) ? 0 : _colwidths[col]); } - + /** Convenience method to set the height of all rows to the same value, in pixels. The screen is redrawn. */ - void row_height_all(int height) { // set all row/col heights + void row_height_all(int height) { // set all row/col heights for ( int r=0; r<rows(); r++ ) { row_height(r, height); } } - + /** Convenience method to set the width of all columns to the same value, in pixels. The screen is redrawn. @@ -721,33 +719,33 @@ public: col_width(c, width); } } - - void row_position(int row); // set/get table's current scroll position + + void row_position(int row); // set/get table's current scroll position void col_position(int col); - + /** Returns the current row scroll position as a row number. */ int row_position() { return(_row_position); } - + /** Returns the current column scroll position as a column number. */ int col_position() { return(_col_position); } - + /** Sets which row should be at the top of the table, scrolling as necessary, and the table is redrawn. If the table cannot be scrolled that far, it is scrolled as far as possible. */ - inline void top_row(int row) { // set/get top row (deprecated) + inline void top_row(int row) { // set/get top row (deprecated) row_position(row); } - + /** Returns the current top row shown in the table. This row may be partially obscured. @@ -755,13 +753,13 @@ public: inline int top_row() { return(row_position()); } - int is_selected(int r, int c); // selected cell + int is_selected(int r, int c); // selected cell void get_selection(int &row_top, int &col_left, int &row_bot, int &col_right); void set_selection(int row_top, int col_left, int row_bot, int col_right); int move_cursor(int R, int C, int shiftselect); int move_cursor(int R, int C); - void resize(int X, int Y, int W, int H); // fltk resize() override - + void resize(int X, int Y, int W, int H); // fltk resize() override + // This crashes sortapp() during init. // void box(Fl_Boxtype val) { // Fl_Group::box(val); @@ -772,7 +770,7 @@ public: // Fl_Boxtype box(void) const { // return(Fl_Group::box()); // } - + // Child group management /** @@ -794,7 +792,7 @@ public: table->show(); } else { table->hide(); - } + } } /** @@ -844,7 +842,7 @@ public: table->show(); } else { table->hide(); - } + } Fl_Group::current(Fl_Group::parent()); } @@ -855,11 +853,11 @@ public: Fl_Widget*const* array() { return(table->array()); } - + /** Returns the child widget by an index. - When using the Fl_Table as a container for FLTK widgets, this method returns + When using the Fl_Table as a container for FLTK widgets, this method returns the widget pointer from the internal array of widgets in the container. Typically used in loops, eg: @@ -873,11 +871,11 @@ public: Fl_Widget *child(int n) const { return(table->child(n)); } - + /** Returns the number of children in the table. - When using the Fl_Table as a container for FLTK widgets, this method returns + When using the Fl_Table as a container for FLTK widgets, this method returns how many child widgets the table has. \see child(int) @@ -894,10 +892,10 @@ public: // (doxygen will substitute Fl_Group's docs here) int find(const Fl_Widget &wgt) const { return(table->find(wgt)); - } + } // CALLBACKS - + /** Returns the current row the event occurred on. @@ -906,7 +904,7 @@ public: int callback_row() { return(_callback_row); } - + /** Returns the current column the event occurred on. @@ -915,7 +913,7 @@ public: int callback_col() { return(_callback_col); } - + /** Returns the current 'table context'. @@ -924,7 +922,7 @@ public: TableContext callback_context() { return(_callback_context); } - + /** Calls the widget callback. @@ -938,24 +936,24 @@ public: _callback_col = col; Fl_Widget::do_callback(); } - + #ifdef FL_DOXYGEN /** The Fl_Widget::when() function is used to set a group of flags, determining when the widget callback is called: - + <table border=1> <tr> <td>\p FL_WHEN_CHANGED</td> <td> - callback() will be called when rows or columns are resized (interactively or - via col_width() or row_height()), passing CONTEXT_RC_RESIZE via + callback() will be called when rows or columns are resized (interactively or + via col_width() or row_height()), passing CONTEXT_RC_RESIZE via callback_context(). </td> </tr><tr> <td>\p FL_WHEN_RELEASE</td> <td> - callback() will be called during FL_RELEASE events, such as when someone + callback() will be called during FL_RELEASE events, such as when someone releases a mouse button somewhere on the table. </td> </tr> @@ -970,24 +968,24 @@ public: */ void when(Fl_When flags); #endif - + #ifdef FL_DOXYGEN /** Callbacks will be called depending on the setting of Fl_Widget::when(). - - Callback functions should use the following functions to determine the + + Callback functions should use the following functions to determine the context/row/column: - Fl_Table::callback_row() returns current row - Fl_Table::callback_col() returns current column - Fl_Table::callback_context() returns current table context - callback_row() and callback_col() will be set to the row and column number the - event occurred on. If someone clicked on a row header, \p col will be \a 0. + callback_row() and callback_col() will be set to the row and column number the + event occurred on. If someone clicked on a row header, \p col will be \a 0. If someone clicked on a column header, \p row will be \a 0. - + callback_context() will return one of the following: - + <table border=1> <tr><td><tt>Fl_Table::CONTEXT_ROW_HEADER</tt></td> <td>Someone clicked on a row header. Excludes resizing.</td> @@ -998,7 +996,7 @@ public: <td><tt>Fl_Table::CONTEXT_CELL</tt></td> <td> Someone clicked on a cell. - + To receive callbacks for FL_RELEASE events, you must set when(FL_WHEN_RELEASE). </td> @@ -1007,19 +1005,19 @@ public: <td> Someone is resizing rows/columns either interactively, or via the col_width() or row_height() API. - + Use is_interactive_resize() to determine interactive resizing. - + If resizing a column, R=0 and C=column being resized. - + If resizing a row, C=0 and R=row being resized. - + NOTE: To receive resize events, you must set when(FL_WHEN_CHANGED). </td> </tr> </table> - + \code class MyTable : public Fl_Table { [..] @@ -1032,13 +1030,13 @@ public: fprintf(stderr, "callback: Row=%d Col=%d Context=%d Event=%d\n", R, C, (int)context, (int)Fl::event()); } - + // Actual static callback static void event_callback(Fl_Widget*, void* data) { MyTable *o = (MyTable*)data; o->event_callback2(); } - + public: // Constructor MyTable() { @@ -1055,9 +1053,9 @@ public: /** Gets the current size of the scrollbars' troughs, in pixels. - If this value is zero (default), this widget will use the + If this value is zero (default), this widget will use the Fl::scrollbar_size() value as the scrollbar's width. - + \returns Scrollbar size in pixels, or 0 if the global Fl::scrollbar_size() is being used. \see Fl::scrollbar_size(int) */ @@ -1078,7 +1076,7 @@ public: Setting \p newSize to the special value of 0 causes the widget to track the global Fl::scrollbar_size(), which is the default. - + \param[in] newSize Sets the scrollbar size in pixels.\n If 0 (default), scrollbar size tracks the global Fl::scrollbar_size() \see Fl::scrollbar_size() @@ -1119,7 +1117,3 @@ public: }; #endif /*_FL_TABLE_H*/ - -// -// End of "$Id$". -// diff --git a/FL/Fl_Table_Row.H b/FL/Fl_Table_Row.H index 0a8fcca8f..655efab81 100644 --- a/FL/Fl_Table_Row.H +++ b/FL/Fl_Table_Row.H @@ -1,12 +1,10 @@ // -// "$Id$" -// #ifndef _FL_TABLE_ROW_H #define _FL_TABLE_ROW_H // -// Fl_Table_Row -- A row oriented table widget +// Fl_Table_Row -- A row oriented table widget for the Fast Light Tool Kit (FLTK). // // A class specializing in a table of rows. // Handles row-specific selection behavior. @@ -17,37 +15,39 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php +// +// Please see the following page on how to report bugs and issues: // -// Please report all bugs and problems to "erco at seriss dot com". +// https://www.fltk.org/bugs.php // #include <FL/Fl_Table.H> /** A table with row selection capabilities. - + This class implements a simple table with the ability to select rows. This widget is similar to an Fl_Browser with columns. Most methods of importance will be found in the Fl_Table widget, such as Fl_Table::rows() and Fl_Table::cols(). - + To be useful it must be subclassed and at minimum the draw_cell() method must be overridden to provide the content of the cells. This widget does \em not manage the cell's data content; it is up to the parent class's draw_cell() method override to provide this. - - Events on the cells and/or headings generate callbacks when they are + + Events on the cells and/or headings generate callbacks when they are clicked by the user. You control when events are generated based on the values you supply for Fl_Table::when(). */ class FL_EXPORT Fl_Table_Row : public Fl_Table { public: enum TableRowSelectMode { - SELECT_NONE, // no selection allowed - SELECT_SINGLE, // single row selection - SELECT_MULTI // multiple row selection (default) - }; + SELECT_NONE, // no selection allowed + SELECT_SINGLE, // single row selection + SELECT_MULTI // multiple row selection (default) + }; private: // An STL-ish vector without templates class FL_EXPORT CharVector { @@ -59,15 +59,15 @@ private: } void copy(char *newarr, int newsize); public: - CharVector() { // CTOR + CharVector() { // CTOR init(); } - ~CharVector(); // DTOR - CharVector(CharVector&o) { // COPY CTOR + ~CharVector(); // DTOR + CharVector(CharVector&o) { // COPY CTOR init(); copy(o.arr, o._size); } - CharVector& operator=(CharVector&o) { // ASSIGN + CharVector& operator=(CharVector&o) { // ASSIGN init(); copy(o.arr, o._size); return(*this); @@ -97,33 +97,33 @@ private: } }; - CharVector _rowselect; // selection flag for each row - + CharVector _rowselect; // selection flag for each row + // handle() state variables. // Put here instead of local statics in handle(), so more // than one instance can exist without crosstalk between. // - int _dragging_select; // dragging out a selection? + int _dragging_select; // dragging out a selection? int _last_row; - int _last_y; // last event's Y position - int _last_push_x; // last PUSH event's X position - int _last_push_y; // last PUSH event's Y position - + int _last_y; // last event's Y position + int _last_push_x; // last PUSH event's X position + int _last_push_y; // last PUSH event's Y position + TableRowSelectMode _selectmode; - + protected: int handle(int event); - int find_cell(TableContext context, // find cell's x/y/w/h given r/c + int find_cell(TableContext context, // find cell's x/y/w/h given r/c int R, int C, int &X, int &Y, int &W, int &H) { return(Fl_Table::find_cell(context, R, C, X, Y, W, H)); } - + public: /** The constructor for the Fl_Table_Row. This creates an empty table with no rows or columns, with headers and row/column resize behavior disabled. - */ + */ Fl_Table_Row(int X, int Y, int W, int H, const char *l=0) : Fl_Table(X,Y,W,H,l) { _dragging_select = 0; _last_row = -1; @@ -132,60 +132,56 @@ public: _last_push_y = -1; _selectmode = SELECT_MULTI; } - + /** The destructor for the Fl_Table_Row. Destroys the table and its associated widgets. */ ~Fl_Table_Row() { } - - void rows(int val); // set number of rows - int rows() { // get number of rows + + void rows(int val); // set number of rows + int rows() { // get number of rows return(Fl_Table::rows()); } - + /** Sets the table selection mode. - + - \p Fl_Table_Row::SELECT_NONE - No selection allowed - \p Fl_Table_Row::SELECT_SINGLE - Only single rows can be selected - \p Fl_Table_Row::SELECT_MULTI - Multiple rows can be selected */ - void type(TableRowSelectMode val); // set selection mode - - TableRowSelectMode type() const { // get selection mode + void type(TableRowSelectMode val); // set selection mode + + TableRowSelectMode type() const { // get selection mode return(_selectmode); } - + /** Checks to see if 'row' is selected. Returns 1 if selected, 0 if not. You can change the selection of a row by clicking on it, or by using select_row(row, flag) */ - int row_selected(int row); // is row selected? (0=no, 1=yes, -1=range err) - + int row_selected(int row); // is row selected? (0=no, 1=yes, -1=range err) + /** Changes the selection state for 'row', depending on the value of 'flag'. 0=deselected, 1=select, 2=toggle existing state. */ - int select_row(int row, int flag=1); // select state for row: flag:0=off, 1=on, 2=toggle + int select_row(int row, int flag=1); // select state for row: flag:0=off, 1=on, 2=toggle // returns: 0=no change, 1=changed, -1=range err - + /** - This convenience function changes the selection state + This convenience function changes the selection state for \em all rows based on 'flag'. 0=deselect, 1=select, 2=toggle existing state. */ - void select_all_rows(int flag=1); // all rows to a known state - + void select_all_rows(int flag=1); // all rows to a known state + void clear() { - rows(0); // implies clearing selection + rows(0); // implies clearing selection cols(0); - Fl_Table::clear(); // clear the table + Fl_Table::clear(); // clear the table } }; #endif /*_FL_TABLE_ROW_H*/ - -// -// End of "$Id$". -// diff --git a/FL/Fl_Tabs.H b/FL/Fl_Tabs.H index dd0820418..eadeb8999 100644 --- a/FL/Fl_Tabs.H +++ b/FL/Fl_Tabs.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Tab header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2017 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -28,22 +26,22 @@ The Fl_Tabs widget is the "file card tabs" interface that allows you to put lots and lots of buttons and switches in a panel, as popularized by many toolkits. - + \image html tabs.png \image latex tabs.png "Fl_Tabs" width=8cm - + Clicking the tab makes a child visible() by calling show() on it, and all other children are made invisible by calling hide() on them. Usually the children are Fl_Group widgets containing several widgets themselves. - + Each child makes a card, and its label() is printed on the card tab, including the label font and style. The selection color of that child is used to color the tab, while the color of the child determines the background color of the pane. '&' in labels are used to prefix a shortcut that is drawn underlined and that activates the corresponding tab; repeated '&&' avoids that. - + The size of the tabs is controlled by the bounding box of the children (there should be some space between the children and the edge of the Fl_Tabs), and the tabs may be placed @@ -51,7 +49,7 @@ gap is larger. It is easiest to lay this out in fluid, using the fluid browser to select each child group and resize them until the tabs look the way you want them to. - + The background area behind and to the right of the tabs is "transparent", exposing the background detail of the parent. The value of Fl_Tabs::box() does not affect this area. So if Fl_Tabs is @@ -70,15 +68,15 @@ Fl_Tabs *tabs = new Fl_Tabs(10,10,300,200); { Fl_Group *grp1 = new Fl_Group(20,30,280,170,"Tab1"); - { - ..widgets that go in tab#1.. + { + ..widgets that go in tab#1.. } - grp1->end(); + grp1->end(); Fl_Group *grp2 = new Fl_Group(20,30,280,170,"Tab2"); - { - ..widgets that go in tab#2.. - } - grp2->end(); + { + ..widgets that go in tab#2.. + } + grp2->end(); } tabs->end(); \endcode @@ -115,7 +113,7 @@ \b Uniform \b Tab \b and \b Panel \b Appearance In order to have uniform tab and panel appearance, not only must the color() - and selection_color() for each child group be set, but also the + and selection_color() for each child group be set, but also the selection_color() of the Fl_Tab itself any time a new "tab" is selected. This can be achieved within the Fl_Tab callback, e.g. @@ -174,7 +172,7 @@ grp2 = new Fl_Group(..); .. tabs->end(); - tabs->resizable(grp1); // keeps tab height constant + tabs->resizable(grp1); // keeps tab height constant \endcode \par Callback's Use Of when() @@ -190,15 +188,15 @@ -# The above flags can be logically OR-ed (|) or added (+) to combine behaviors. -# The default value for when() is \ref FL_WHEN_RELEASE (inherited from Fl_Widget). - -# If \ref FL_WHEN_RELEASE is the \em only flag specified, + -# If \ref FL_WHEN_RELEASE is the \em only flag specified, the behavior will be as if (\ref FL_WHEN_RELEASE|\ref FL_WHEN_CHANGED) was specified. -# The value of changed() will be valid during the callback. - -# If both \ref FL_WHEN_CHANGED and \ref FL_WHEN_NOT_CHANGED are specified, + -# If both \ref FL_WHEN_CHANGED and \ref FL_WHEN_NOT_CHANGED are specified, the callback is invoked whether the tab has been changed or not. - The changed() method can be used to determine the cause. + The changed() method can be used to determine the cause. -# \ref FL_WHEN_NOT_CHANGED can happen if someone clicks on an already selected tab, or if a keyboard navigation attempt results in no change to the tabs, - such as using the arrow keys while at the left or right end of the tabs. + such as using the arrow keys while at the left or right end of the tabs. */ class FL_EXPORT Fl_Tabs : public Fl_Group { @@ -206,13 +204,13 @@ class FL_EXPORT Fl_Tabs : public Fl_Group { protected: - int *tab_pos; // array of x-offsets of tabs per child + 1 - int *tab_width; // array of widths of tabs per child + 1 - int tab_count; // array size - Fl_Align tab_align_; // tab label alignment + int *tab_pos; // array of x-offsets of tabs per child + 1 + int *tab_width; // array of widths of tabs per child + 1 + int tab_count; // array size + Fl_Align tab_align_; // tab label alignment virtual void redraw_tabs(); - virtual int tab_positions(); // allocate and calculate tab positions + virtual int tab_positions(); // allocate and calculate tab positions virtual void clear_tab_positions(); virtual void draw_tab(int x1, int x2, int W, int H, Fl_Widget* o, int sel=0); virtual int tab_height(); @@ -267,7 +265,3 @@ public: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Text_Buffer.H b/FL/Fl_Text_Buffer.H index c8e749c1e..473e61c77 100644 --- a/FL/Fl_Text_Buffer.H +++ b/FL/Fl_Text_Buffer.H @@ -1,19 +1,19 @@ // -// "$Id$" -// // Header file for Fl_Text_Buffer class. // // Copyright 2001-2017 by Bill Spitzak and others. // Original code Copyright Mark Edel. Permission to distribute under // the LGPL for the FLTK library granted by Mark Edel. // -// Please report all bugs and problems on the following page: +// This library is free software. Distribution and use rights are outlined in +// the file "COPYING" which should have been included with this file. If this +// file is missing or damaged, see the license at: // -// http://www.fltk.org/str.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -22,7 +22,7 @@ #ifndef FL_TEXT_BUFFER_H #define FL_TEXT_BUFFER_H -#include <stdarg.h> /* va_start/end */ +#include <stdarg.h> /* va_start/end */ #undef ASSERT_UTF8 @@ -134,7 +134,7 @@ public: /** \brief Returns true if any text is selected. \return \p true if any text has been selected, or \p false - if no text is selected. + if no text is selected. */ bool selected() const { return mSelected; } @@ -839,7 +839,3 @@ protected: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Text_Display.H b/FL/Fl_Text_Display.H index 6d077fbb7..59dc24bee 100644 --- a/FL/Fl_Text_Display.H +++ b/FL/Fl_Text_Display.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Header file for Fl_Text_Display class. // // Copyright 2001-2020 by Bill Spitzak and others. @@ -13,9 +11,9 @@ // // https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// https://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -24,7 +22,7 @@ #ifndef FL_TEXT_DISPLAY_H #define FL_TEXT_DISPLAY_H -#include <FL/Fl.H> // Fl::scrollbar_size() +#include <FL/Fl.H> // Fl::scrollbar_size() #include "fl_draw.H" #include "Fl_Group.H" #include "Fl_Widget.H" @@ -33,7 +31,7 @@ /** \brief Rich text display widget. - + This is the FLTK text display widget. It allows the user to view multiple lines of text and supports highlighting, word wrap, mixes of font faces and colors, line numbers and scrolling. The buffer @@ -57,7 +55,7 @@ Fl_Text_Display *disp = new Fl_Text_Display(10, 10, 640, 480); disp->buffer(buff); // attach text buffer to display widget buff->text("line one\nline two"); // add some text to buffer - .. + .. } \endcode @@ -80,9 +78,9 @@ class FL_EXPORT Fl_Text_Display: public Fl_Group { public: - - /** - text display cursor shapes enumeration + + /** + text display cursor shapes enumeration */ enum { NORMAL_CURSOR, /**< I-beam */ @@ -92,18 +90,18 @@ public: HEAVY_CURSOR, /**< thick I-beam */ SIMPLE_CURSOR /**< as cursor as Fl_Input cursor */ }; - + /** - the character position is the left edge of a character, whereas + the character position is the left edge of a character, whereas the cursor is thought to be between the centers of two consecutive characters. */ enum { - CURSOR_POS, + CURSOR_POS, CHARACTER_POS }; - - /** + + /** drag types - they match Fl::event_clicks() so that single clicking to start a collection selects by character, double clicking selects by word and triple clicking selects by line. @@ -111,11 +109,11 @@ public: enum { DRAG_NONE = -2, DRAG_START_DND = -1, - DRAG_CHAR = 0, - DRAG_WORD = 1, + DRAG_CHAR = 0, + DRAG_WORD = 1, DRAG_LINE = 2 }; - + /** wrap types - used in wrap_mode() */ @@ -124,13 +122,13 @@ public: WRAP_AT_COLUMN, /**< wrap text at the given text column */ WRAP_AT_PIXEL, /**< wrap text at a pixel position */ WRAP_AT_BOUNDS /**< wrap text so that it fits into the widget width */ - }; - + }; + friend void fl_text_drag_me(int pos, Fl_Text_Display* d); - + typedef void (*Unfinished_Style_Cb)(int, void *); - - /** + + /** This structure associates the color, font, and font size of a string to draw with an attribute mask matching attr. @@ -144,19 +142,19 @@ public: \see Fl_Text_Display::highlight_data() */ struct Style_Table_Entry { - Fl_Color color; ///< text color - Fl_Font font; ///< text font - Fl_Fontsize size; ///< text font size - unsigned attr; ///< currently unused (this may be changed in the future) + Fl_Color color; ///< text color + Fl_Font font; ///< text font + Fl_Fontsize size; ///< text font size + unsigned attr; ///< currently unused (this may be changed in the future) }; - + Fl_Text_Display(int X, int Y, int W, int H, const char *l = 0); ~Fl_Text_Display(); - + virtual int handle(int e); - + void buffer(Fl_Text_Buffer* buf); - + /** Sets the current text buffer associated with the text widget. Multiple text widgets can be associated with the same text buffer. @@ -164,7 +162,7 @@ public: \see Fl_Text_Display::buffer(Fl_Text_Buffer* buf) */ void buffer(Fl_Text_Buffer& buf) { buffer(&buf); } - + /** Gets the current text buffer associated with the text widget. Multiple text widgets can be associated with the same text buffer. @@ -173,7 +171,7 @@ public: \see Fl_Text_Display::buffer(Fl_Text_Buffer& buf) */ Fl_Text_Buffer* buffer() const { return mBuffer; } - + void redisplay_range(int start, int end); void scroll(int topLineNum, int horizOffset); void insert(const char* text); @@ -196,10 +194,10 @@ public: int in_selection(int x, int y) const; void show_insert_position(); - + int move_right(); int move_left(); - int move_up(); + int move_up(); int move_down(); int count_lines(int start, int end, bool start_pos_is_line_start) const; int line_start(int pos) const; @@ -208,29 +206,29 @@ public: int rewind_lines(int startPos, int nLines); void next_word(void); void previous_word(void); - + void show_cursor(int b = 1); - + /** Hides the text cursor. */ void hide_cursor() { show_cursor(0); } - + void cursor_style(int style); int cursor_style() const { return mCursorStyle; } - + /** - Gets the text cursor color. + Gets the text cursor color. \return cursor color */ Fl_Color cursor_color() const {return mCursor_color;} - - /** + + /** Sets the text cursor color. \param n new cursor color */ void cursor_color(Fl_Color n) {mCursor_color = n;} - + /** Returns the global value Fl::scrollbar_size() unless a specific scrollbar_width_ has been set. \deprecated Use scrollbar_size() instead. @@ -249,13 +247,13 @@ public: Fl::scrollbar_size(width); scrollbar_width_ = 0; } - + /** Gets the current size of the scrollbars' troughs, in pixels. - If this value is zero (default), this widget will use the + If this value is zero (default), this widget will use the Fl::scrollbar_size() value as the scrollbar's width. - + \returns Scrollbar size in pixels, or 0 if the global Fl::scrollbar_size() is being used. \see Fl::scrollbar_size(int) */ @@ -267,114 +265,114 @@ public: Sets the pixel size of the scrollbars' troughs to \p newSize, in pixels. Normally you should not need this method, and should use - Fl::scrollbar_size(int) instead to manage the size of ALL - your widgets' scrollbars. This ensures your application + Fl::scrollbar_size(int) instead to manage the size of ALL + your widgets' scrollbars. This ensures your application has a consistent UI, is the default behavior, and is normally what you want. Only use THIS method if you really need to override the global scrollbar size. The need for this should be rare. - + Setting \p newSize to the special value of 0 causes the widget to track the global Fl::scrollbar_size(), which is the default. - + \param[in] newSize Sets the scrollbar size in pixels.\n If 0 (default), scrollbar size tracks the global Fl::scrollbar_size() \see Fl::scrollbar_size() */ void scrollbar_size(int newSize) { scrollbar_width_ = newSize; - } + } /** Gets the scrollbar alignment type. \return scrollbar alignment */ Fl_Align scrollbar_align() const { return scrollbar_align_; } - + /** Sets the scrollbar alignment type. \param a new scrollbar alignment */ void scrollbar_align(Fl_Align a) { scrollbar_align_ = a; } - + /** Moves the insert position to the beginning of the current word. \param pos start calculation at this index \return beginning of the words */ int word_start(int pos) const { return buffer()->word_start(pos); } - - /** + + /** Moves the insert position to the end of the current word. \param pos start calculation at this index \return index of first character after the end of the word */ int word_end(int pos) const { return buffer()->word_end(pos); } - - + + void highlight_data(Fl_Text_Buffer *styleBuffer, const Style_Table_Entry *styleTable, int nStyles, char unfinishedStyle, Unfinished_Style_Cb unfinishedHighlightCB, void *cbArg); - + int position_style(int lineStartPos, int lineLen, int lineIndex) const; - - /** - \todo FIXME : get set methods pointing on shortcut_ - have no effects as shortcut_ is unused in this class and derived! + + /** + \todo FIXME : get set methods pointing on shortcut_ + have no effects as shortcut_ is unused in this class and derived! \return the current shortcut key */ int shortcut() const {return shortcut_;} - + /** - \todo FIXME : get set methods pointing on shortcut_ - have no effects as shortcut_ is unused in this class and derived! + \todo FIXME : get set methods pointing on shortcut_ + have no effects as shortcut_ is unused in this class and derived! \param s the new shortcut key */ void shortcut(int s) {shortcut_ = s;} - + /** Gets the default font used when drawing text in the widget. \return current text font face unless overridden by a style */ Fl_Font textfont() const {return textfont_;} - + /** Sets the default font used when drawing text in the widget. \param s default text font face */ void textfont(Fl_Font s) {textfont_ = s; mColumnScale = 0; } - + /** Gets the default size of text in the widget. \return current text height unless overridden by a style */ Fl_Fontsize textsize() const {return textsize_;} - + /** Sets the default size of text in the widget. \param s new text size */ void textsize(Fl_Fontsize s) {textsize_ = s; mColumnScale = 0; } - + /** Gets the default color of text in the widget. \return text color unless overridden by a style */ Fl_Color textcolor() const {return textcolor_;} - + /** Sets the default color of text in the widget. \param n new text color */ void textcolor(Fl_Color n) {textcolor_ = n;} - + int wrapped_column(int row, int column) const; int wrapped_row(int row) const; void wrap_mode(int wrap, int wrap_margin); - + virtual void recalc_display(); virtual void resize(int X, int Y, int W, int H); @@ -384,15 +382,15 @@ public: \return an approximate column number based on the main font */ double x_to_col(double x) const; - + /** Convert a column number into an x pixel position. \param col an approximate column number based on the main font \return number of pixels from the left margin to the left of an - average sized character + average sized character */ double col_to_x(double col) const; - + void linenumber_width(int width); int linenumber_width() const; void linenumber_font(Fl_Font val); @@ -413,57 +411,57 @@ protected: // draw(). // Anything with "vline" indicates thats it deals with currently // visible lines. - + virtual void draw(); void draw_text(int X, int Y, int W, int H); void draw_range(int start, int end); void draw_cursor(int, int); - + void draw_string(int style, int x, int y, int toX, const char *string, int nChars) const; - + void draw_vline(int visLineNum, int leftClip, int rightClip, int leftCharIndex, int rightCharIndex); - + int find_x(const char *s, int len, int style, int x) const; - - enum { - DRAW_LINE, + + enum { + DRAW_LINE, FIND_INDEX, FIND_INDEX_FROM_ZERO, GET_WIDTH, - FIND_CURSOR_INDEX // STR #2788 + FIND_CURSOR_INDEX // STR #2788 }; - - int handle_vline(int mode, + + int handle_vline(int mode, int lineStart, int lineLen, int leftChar, int rightChar, int topClip, int bottomClip, int leftClip, int rightClip) const; - + void draw_line_numbers(bool clearAll); - + void clear_rect(int style, int x, int y, int width, int height) const; void display_insert(); - + void offset_line_starts(int newTopLineNum); - + void calc_line_starts(int startLine, int endLine); - + void update_line_starts(int pos, int charsInserted, int charsDeleted, int linesInserted, int linesDeleted, int *scrolled); - + void calc_last_char(); - + int position_to_line( int pos, int* lineNum ) const; double string_width(const char* string, int length, int style) const; - + static void scroll_timer_cb(void*); - + static void buffer_predelete_cb(int pos, int nDeleted, void* cbArg); static void buffer_modified_cb(int pos, int nInserted, int nDeleted, int nRestyled, const char* deletedText, void* cbArg); - + static void h_scrollbar_cb(Fl_Scrollbar* w, Fl_Text_Display* d); static void v_scrollbar_cb( Fl_Scrollbar* w, Fl_Text_Display* d); void update_v_scrollbar(); @@ -473,7 +471,7 @@ protected: int empty_vlines() const; int vline_length(int visLineNum) const; int xy_to_position(int x, int y, int PosType = CHARACTER_POS) const; - + void xy_to_rowcol(int x, int y, int* row, int* column, int PosType = CHARACTER_POS) const; void maintain_absolute_top_line_number(int state); @@ -483,9 +481,9 @@ protected: void reset_absolute_top_line_number(); int position_to_linecol(int pos, int* lineNum, int* column) const; int scroll_(int topLineNum, int horizOffset); - + void extend_range_for_styles(int* start, int* end); - + void find_wrap_range(const char *deletedText, int pos, int nInserted, int nDeleted, int *modRangeStart, int *modRangeEnd, int *linesInserted, int *linesDeleted); @@ -499,7 +497,7 @@ protected: int *nextLineStart) const; double measure_proportional_character(const char *s, int colNum, int pos) const; int wrap_uses_character(int lineEndPos) const; - + int damage_range1_start, damage_range1_end; int damage_range2_start, damage_range2_end; int mCursorPos; @@ -521,7 +519,7 @@ protected: either to a newline or one character beyond the end of the buffer) */ int mContinuousWrap; /* Wrap long lines when displaying */ - int mWrapMarginPix; /* Margin in # of pixels for + int mWrapMarginPix; /* Margin in # of pixels for wrapping in continuousWrap mode */ int* mLineStarts; /* Array of the size mNVisibleLines. This array only keeps track of lines @@ -554,9 +552,9 @@ protected: Unfinished_Style_Cb mUnfinishedHighlightCB; /* Callback to parse "unfinished" */ /* regions */ void* mHighlightCBArg; /* Arg to unfinishedHighlightCB */ - + int mMaxsize; - + int mSuppressResync; /* Suppress resynchronization of line starts during buffer updates */ int mNLinesDeleted; /* Number of lines deleted during @@ -565,26 +563,26 @@ protected: int mModifyingTabDistance; /* Whether tab distance is being modified XXX: UNUSED */ mutable double mColumnScale; /* Width in pixels of an average character. This - value is calculated as needed (lazy eval); it + value is calculated as needed (lazy eval); it needs to be mutable so that it can be calculated within a method marked as "const" */ - + Fl_Color mCursor_color; - + Fl_Scrollbar* mHScrollBar; Fl_Scrollbar* mVScrollBar; - int scrollbar_width_; // size of scrollbar trough (behavior changed in 1.4) + int scrollbar_width_; // size of scrollbar trough (behavior changed in 1.4) Fl_Align scrollbar_align_; int dragPos, dragType, dragging; int display_insert_position_hint; struct { int x, y, w, h; } text_area; - + int shortcut_; - + Fl_Font textfont_; Fl_Fontsize textsize_; Fl_Color textcolor_; - + // Line number margin and width int mLineNumLeft, mLineNumWidth; @@ -598,7 +596,3 @@ protected: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Text_Editor.H b/FL/Fl_Text_Editor.H index b4e245164..48f8a1ac0 100644 --- a/FL/Fl_Text_Editor.H +++ b/FL/Fl_Text_Editor.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Header file for Fl_Text_Editor class. // // Copyright 2001-2010 by Bill Spitzak and others. @@ -11,11 +9,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -44,25 +42,25 @@ class FL_EXPORT Fl_Text_Editor : public Fl_Text_Display { /** Simple linked list item associating a key/state to a function. */ struct Key_Binding { - int key; ///< the key pressed - int state; ///< the state of key modifiers - Key_Func function; ///< associated function - Key_Binding* next; ///< next key binding in the list + int key; ///< the key pressed + int state; ///< the state of key modifiers + Key_Func function; ///< associated function + Key_Binding* next; ///< next key binding in the list }; Fl_Text_Editor(int X, int Y, int W, int H, const char* l = 0); ~Fl_Text_Editor() { remove_all_key_bindings(); } virtual int handle(int e); /** - Sets the current insert mode; if non-zero, new text - is inserted before the current cursor position. Otherwise, new - text replaces text at the current cursor position. + Sets the current insert mode; if non-zero, new text + is inserted before the current cursor position. Otherwise, new + text replaces text at the current cursor position. */ void insert_mode(int b) { insert_mode_ = b; } /** - Gets the current insert mode; if non-zero, new text - is inserted before the current cursor position. Otherwise, new - text replaces text at the current cursor position. + Gets the current insert mode; if non-zero, new text + is inserted before the current cursor position. Otherwise, new + text replaces text at the current cursor position. */ int insert_mode() { return insert_mode_; } void tab_nav(int val); @@ -138,7 +136,3 @@ class FL_EXPORT Fl_Text_Editor : public Fl_Text_Display { #endif -// -// End of "$Id$". -// - diff --git a/FL/Fl_Tile.H b/FL/Fl_Tile.H index c5a8e1703..5b818fe89 100644 --- a/FL/Fl_Tile.H +++ b/FL/Fl_Tile.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Tile header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2016 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // #ifndef Fl_Tile_H @@ -35,7 +33,3 @@ public: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Tiled_Image.H b/FL/Fl_Tiled_Image.H index 0eb17e2e2..66814a8fd 100644 --- a/FL/Fl_Tiled_Image.H +++ b/FL/Fl_Tiled_Image.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Tiled image header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2015 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -34,8 +32,8 @@ class FL_EXPORT Fl_Tiled_Image : public Fl_Image { protected: - Fl_Image *image_; // The image that is tiled - int alloc_image_; // Did we allocate this image? + Fl_Image *image_; // The image that is tiled + int alloc_image_; // Did we allocate this image? public: @@ -53,7 +51,3 @@ class FL_EXPORT Fl_Tiled_Image : public Fl_Image { }; #endif // !Fl_Tiled_Image_H - -// -// End of "$Id$" -// diff --git a/FL/Fl_Timer.H b/FL/Fl_Timer.H index 3000615dd..6c9db28a1 100644 --- a/FL/Fl_Timer.H +++ b/FL/Fl_Timer.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Timer header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2010 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -27,15 +25,15 @@ #endif // values for type(): -#define FL_NORMAL_TIMER 0 -#define FL_VALUE_TIMER 1 -#define FL_HIDDEN_TIMER 2 +#define FL_NORMAL_TIMER 0 +#define FL_VALUE_TIMER 1 +#define FL_HIDDEN_TIMER 2 /** This is provided only to emulate the Forms Timer widget. It works by making a timeout callback every 1/5 second. This is wasteful and inaccurate if you just want something to happen a fixed time in the - future. You should directly call + future. You should directly call Fl::add_timeout() instead. */ class FL_EXPORT Fl_Timer : public Fl_Widget { @@ -72,7 +70,3 @@ public: #endif -// -// End of "$Id$". -// - diff --git a/FL/Fl_Toggle_Button.H b/FL/Fl_Toggle_Button.H index 008565563..b2e0eda3c 100644 --- a/FL/Fl_Toggle_Button.H +++ b/FL/Fl_Toggle_Button.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Toggle button header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2010 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -25,7 +23,7 @@ #include "Fl_Button.H" /** - The toggle button is a push button that needs to be clicked once + The toggle button is a push button that needs to be clicked once to toggle on, and one more time to toggle off. The Fl_Toggle_Button subclass displays the "on" state by drawing a pushed-in button.</P> @@ -44,7 +42,3 @@ public: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Toggle_Light_Button.H b/FL/Fl_Toggle_Light_Button.H index 8dd6e39f0..60dacd8de 100644 --- a/FL/Fl_Toggle_Light_Button.H +++ b/FL/Fl_Toggle_Light_Button.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Toggle light button header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2010 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // // provided for back-compatibility only @@ -22,7 +20,3 @@ #include "Fl_Light_Button.H" #define Fl_Toggle_Light_Button Fl_Light_Button #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Toggle_Round_Button.H b/FL/Fl_Toggle_Round_Button.H index ab87d1679..7fe5e1924 100644 --- a/FL/Fl_Toggle_Round_Button.H +++ b/FL/Fl_Toggle_Round_Button.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Toggle round button header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2010 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // // provided for back-compatibility only @@ -22,7 +20,3 @@ #include "Fl_Round_Button.H" #define Fl_Toggle_Round_Button Fl_Round_Button #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Tooltip.H b/FL/Fl_Tooltip.H index aa8fd880b..b79d93149 100644 --- a/FL/Fl_Tooltip.H +++ b/FL/Fl_Tooltip.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Tooltip header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2011 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -116,14 +114,10 @@ private: static Fl_Font font_; static Fl_Fontsize size_; static Fl_Widget* widget_; //!< Keeps track of the current target widget - static int margin_width_; //!< distance around tooltip text left+right - static int margin_height_; //!< distance around tooltip text top+bottom - static int wrap_width_; //!< maximum width of tooltip text before it word wraps + static int margin_width_; //!< distance around tooltip text left+right + static int margin_height_; //!< distance around tooltip text top+bottom + static int wrap_width_; //!< maximum width of tooltip text before it word wraps static const int draw_symbols_; // 1 = draw @-symbols in tooltips, 0 = no }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Tree.H b/FL/Fl_Tree.H index fc827ba9e..44509e978 100644 --- a/FL/Fl_Tree.H +++ b/FL/Fl_Tree.H @@ -1,6 +1,4 @@ // -// "$Id$" -// #ifndef FL_TREE_H #define FL_TREE_H @@ -26,9 +24,9 @@ // // https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// https://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /// @@ -80,7 +78,7 @@ tree.add("Simpsons/Lisa"); tree.end(); \endcode - + \par FEATURES Items can be added with add(),<BR> removed with remove(),<BR> @@ -124,7 +122,7 @@ widget() to be shown in place of the item's label (if it has one). Only the widget()'s width will be used; the widget()'s x() and y() position will be managed by the tree, and the h() will track the item's height. - This default behavior can be altered (ABI 1.3.1): + This default behavior can be altered (ABI 1.3.1): Setting Fl_Tree::item_draw_mode()'s FL_TREE_ITEM_DRAW_LABEL_AND_WIDGET flag causes the label + widget to be displayed together in that order, and adding the FL_TREE_ITEM_HEIGHT_FROM_WIDGET flag causes widget's height @@ -136,8 +134,8 @@ can either be changed globally with Fl_Tree::usericon(), or on a per-item basis with Fl_Tree_Item::usericon(). \par - Various default preferences can be globally manipulated via Fl_Tree_Prefs, - including colors, margins, icons, connection lines, etc. + Various default preferences can be globally manipulated via Fl_Tree_Prefs, + including colors, margins, icons, connection lines, etc. \par FONTS AND COLORS When adding new items to the tree, the new items get the @@ -165,7 +163,7 @@ \code void MyTreeCallback(Fl_Widget *w, void *data) { Fl_Tree *tree = (Fl_Tree*)w; - Fl_Tree_Item *item = (Fl_Tree_Item*)tree->callback_item(); // get selected item + Fl_Tree_Item *item = (Fl_Tree_Item*)tree->callback_item(); // get selected item switch ( tree->callback_reason() ) { case FL_TREE_REASON_SELECTED: [..] case FL_TREE_REASON_DESELECTED: [..] @@ -190,7 +188,7 @@ \code [..] char pathname[256] = "???"; - tree->item_pathname(pathname, sizeof(pathname), item); // eg. "Parent/Child/Item" + tree->item_pathname(pathname, sizeof(pathname), item); // eg. "Parent/Child/Item" [..] \endcode \par @@ -203,7 +201,7 @@ } \endcode \par - To recursively walk all the children of a particular item, + To recursively walk all the children of a particular item, define a function that uses recursion: \par \code @@ -220,8 +218,8 @@ \par \code tree = new Fl_Tree(..); - tree->item_labelfont(FL_COURIER); // Use Courier font for all new items - tree->item_labelfgcolor(FL_RED); // Use red color for labels of all new items + tree->item_labelfont(FL_COURIER); // Use Courier font for all new items + tree->item_labelfgcolor(FL_RED); // Use red color for labels of all new items [..] // Now create the items in the tree using the above defaults. tree->add("Aaa"); @@ -275,33 +273,33 @@ /// The reason the callback was invoked. /// enum Fl_Tree_Reason { - FL_TREE_REASON_NONE=0, ///< unknown reason - FL_TREE_REASON_SELECTED, ///< an item was selected - FL_TREE_REASON_DESELECTED, ///< an item was de-selected - FL_TREE_REASON_RESELECTED, ///< an item was re-selected (double-clicked). - ///< See ::Fl_Tree_Item_Reselect_Mode to enable this. - FL_TREE_REASON_OPENED, ///< an item was opened - FL_TREE_REASON_CLOSED, ///< an item was closed - FL_TREE_REASON_DRAGGED ///< an item was dragged into a new place + FL_TREE_REASON_NONE=0, ///< unknown reason + FL_TREE_REASON_SELECTED, ///< an item was selected + FL_TREE_REASON_DESELECTED, ///< an item was de-selected + FL_TREE_REASON_RESELECTED, ///< an item was re-selected (double-clicked). + ///< See ::Fl_Tree_Item_Reselect_Mode to enable this. + FL_TREE_REASON_OPENED, ///< an item was opened + FL_TREE_REASON_CLOSED, ///< an item was closed + FL_TREE_REASON_DRAGGED ///< an item was dragged into a new place }; class FL_EXPORT Fl_Tree : public Fl_Group { friend class Fl_Tree_Item; - Fl_Tree_Item *_root; // can be null! - Fl_Tree_Item *_item_focus; // item that has focus box - Fl_Tree_Item *_callback_item; // item invoked during callback (can be NULL) - Fl_Tree_Reason _callback_reason; // reason for the callback - Fl_Tree_Prefs _prefs; // all the tree's settings - int _scrollbar_size; // size of scrollbar trough + Fl_Tree_Item *_root; // can be null! + Fl_Tree_Item *_item_focus; // item that has focus box + Fl_Tree_Item *_callback_item; // item invoked during callback (can be NULL) + Fl_Tree_Reason _callback_reason; // reason for the callback + Fl_Tree_Prefs _prefs; // all the tree's settings + int _scrollbar_size; // size of scrollbar trough Fl_Tree_Item *_lastselect; // last selected item char _lastpushed; // FL_PUSH occurred on: 0=nothing, 1=open/close, 2=usericon, 3=label void fix_scrollbar_order(); protected: - Fl_Scrollbar *_vscroll; ///< Vertical scrollbar - Fl_Scrollbar *_hscroll; ///< Horizontal scrollbar - int _tox,_toy,_tow,_toh; ///< Tree widget outer xywh dimension: outside scrollbars, inside widget border - int _tix,_tiy,_tiw,_tih; ///< Tree widget inner xywh dimension: inside borders + scrollbars + Fl_Scrollbar *_vscroll; ///< Vertical scrollbar + Fl_Scrollbar *_hscroll; ///< Horizontal scrollbar + int _tox,_toy,_tow,_toh; ///< Tree widget outer xywh dimension: outside scrollbars, inside widget border + int _tix,_tiy,_tiw,_tih; ///< Tree widget inner xywh dimension: inside borders + scrollbars /// the calculated width of the entire tree hierarchy. See calc_tree() int _tree_w; @@ -352,14 +350,14 @@ public: Fl_Tree_Item* find_clicked(int yonly=0); Fl_Tree_Item *item_clicked(); Fl_Tree_Item *first(); - Fl_Tree_Item *first_visible(); // deprecated in ABI 10303 + Fl_Tree_Item *first_visible(); // deprecated in ABI 10303 Fl_Tree_Item *first_visible_item(); Fl_Tree_Item *next(Fl_Tree_Item *item=0); Fl_Tree_Item *prev(Fl_Tree_Item *item=0); Fl_Tree_Item *last(); - Fl_Tree_Item *last_visible(); // deprecated in ABI 10303 + Fl_Tree_Item *last_visible(); // deprecated in ABI 10303 Fl_Tree_Item *last_visible_item(); - Fl_Tree_Item *next_visible_item(Fl_Tree_Item *start, int dir); // made public in 1.3.3 ABI + Fl_Tree_Item *next_visible_item(Fl_Tree_Item *start, int dir); // made public in 1.3.3 ABI Fl_Tree_Item *first_selected_item(); Fl_Tree_Item *last_selected_item(); Fl_Tree_Item *next_item(Fl_Tree_Item *item, int dir=FL_Down, bool visible=false); @@ -392,13 +390,13 @@ public: int select_all(Fl_Tree_Item *item=0, int docallback=1); int extend_selection_dir(Fl_Tree_Item *from, Fl_Tree_Item *to, - int dir, - int val, - bool visible); + int dir, + int val, + bool visible); int extend_selection(Fl_Tree_Item *from, - Fl_Tree_Item *to, - int val=1, - bool visible=false); + Fl_Tree_Item *to, + int val=1, + bool visible=false); void set_item_focus(Fl_Tree_Item *item); Fl_Tree_Item *get_item_focus() const; int is_selected(Fl_Tree_Item *item) const; @@ -492,7 +490,3 @@ public: }; #endif /*FL_TREE_H*/ - -// -// End of "$Id$". -// diff --git a/FL/Fl_Tree_Item.H b/FL/Fl_Tree_Item.H index 99d52a4b9..d0e68d4e7 100644 --- a/FL/Fl_Tree_Item.H +++ b/FL/Fl_Tree_Item.H @@ -1,6 +1,4 @@ // -// "$Id$" -// #ifndef FL_TREE_ITEM_H #define FL_TREE_ITEM_H @@ -24,11 +22,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /// @@ -65,31 +63,31 @@ /// class Fl_Tree; class FL_EXPORT Fl_Tree_Item { - Fl_Tree *_tree; // parent tree - const char *_label; // label (memory managed) - Fl_Font _labelfont; // label's font face - Fl_Fontsize _labelsize; // label's font size - Fl_Color _labelfgcolor; // label's fg color - Fl_Color _labelbgcolor; // label's bg color (0xffffffff is 'transparent') + Fl_Tree *_tree; // parent tree + const char *_label; // label (memory managed) + Fl_Font _labelfont; // label's font face + Fl_Fontsize _labelsize; // label's font size + Fl_Color _labelfgcolor; // label's fg color + Fl_Color _labelbgcolor; // label's bg color (0xffffffff is 'transparent') /// \enum Fl_Tree_Item_Flags enum Fl_Tree_Item_Flags { - OPEN = 1<<0, ///> item is open - VISIBLE = 1<<1, ///> item is visible - ACTIVE = 1<<2, ///> item is active - SELECTED = 1<<3 ///> item is selected + OPEN = 1<<0, ///> item is open + VISIBLE = 1<<1, ///> item is visible + ACTIVE = 1<<2, ///> item is active + SELECTED = 1<<3 ///> item is selected }; - unsigned short _flags; // misc flags - int _xywh[4]; // xywh of this widget (if visible) - int _collapse_xywh[4]; // xywh of collapse icon (if visible) - int _label_xywh[4]; // xywh of label - Fl_Widget *_widget; // item's label widget (optional) - Fl_Image *_usericon; // item's user-specific icon (optional) - Fl_Image *_userdeicon; // deactivated usericon - Fl_Tree_Item_Array _children; // array of child items - Fl_Tree_Item *_parent; // parent item (=0 if root) - void *_userdata; // user data that can be associated with an item - Fl_Tree_Item *_prev_sibling; // previous sibling (same level) - Fl_Tree_Item *_next_sibling; // next sibling (same level) + unsigned short _flags; // misc flags + int _xywh[4]; // xywh of this widget (if visible) + int _collapse_xywh[4]; // xywh of collapse icon (if visible) + int _label_xywh[4]; // xywh of label + Fl_Widget *_widget; // item's label widget (optional) + Fl_Image *_usericon; // item's user-specific icon (optional) + Fl_Image *_userdeicon; // deactivated usericon + Fl_Tree_Item_Array _children; // array of child items + Fl_Tree_Item *_parent; // parent item (=0 if root) + void *_userdata; // user data that can be associated with an item + Fl_Tree_Item *_prev_sibling; // previous sibling (same level) + Fl_Tree_Item *_next_sibling; // next sibling (same level) // Protected methods protected: void _Init(const Fl_Tree_Prefs &prefs, Fl_Tree *tree); @@ -103,10 +101,10 @@ protected: Fl_Color drawbgcolor() const; public: - Fl_Tree_Item(const Fl_Tree_Prefs &prefs); // CTOR -- backwards compatible - Fl_Tree_Item(Fl_Tree *tree); // CTOR -- ABI 1.3.3+ - virtual ~Fl_Tree_Item(); // DTOR -- ABI 1.3.3+ - Fl_Tree_Item(const Fl_Tree_Item *o); // COPY CTOR + Fl_Tree_Item(const Fl_Tree_Prefs &prefs); // CTOR -- backwards compatible + Fl_Tree_Item(Fl_Tree *tree); // CTOR -- ABI 1.3.3+ + virtual ~Fl_Tree_Item(); // DTOR -- ABI 1.3.3+ + Fl_Tree_Item(const Fl_Tree_Item *o); // COPY CTOR /// The item's x position relative to the window int x() const { return(_xywh[0]); } /// The item's y position relative to the window @@ -130,8 +128,8 @@ public: /// \version 1.3.3 int label_h() const { return(_label_xywh[3]); } virtual int draw_item_content(int render); - void draw(int X, int &Y, int W, Fl_Tree_Item *itemfocus, - int &tree_item_xmax, int lastchild=1, int render=1); + void draw(int X, int &Y, int W, Fl_Tree_Item *itemfocus, + int &tree_item_xmax, int lastchild=1, int render=1); void show_self(const char *indent = "") const; void label(const char *val); const char *label() const; @@ -141,11 +139,11 @@ public: /// Retrieve the user-data value that has been assigned to the item. inline void* user_data() const { return _userdata; } - + /// Set item's label font face. void labelfont(Fl_Font val) { - _labelfont = val; - recalc_tree(); // may change tree geometry + _labelfont = val; + recalc_tree(); // may change tree geometry } /// Get item's label font face. Fl_Font labelfont() const { @@ -153,8 +151,8 @@ public: } /// Set item's label font size. void labelsize(Fl_Fontsize val) { - _labelsize = val; - recalc_tree(); // may change tree geometry + _labelsize = val; + recalc_tree(); // may change tree geometry } /// Get item's label font size. Fl_Fontsize labelsize() const { @@ -162,11 +160,11 @@ public: } /// Set item's label foreground text color. void labelfgcolor(Fl_Color val) { - _labelfgcolor = val; + _labelfgcolor = val; } /// Return item's label foreground text color. Fl_Color labelfgcolor() const { - return(_labelfgcolor); + return(_labelfgcolor); } /// Set item's label text color. Alias for labelfgcolor(Fl_Color)). void labelcolor(Fl_Color val) { @@ -174,42 +172,42 @@ public: } /// Return item's label text color. Alias for labelfgcolor() const). Fl_Color labelcolor() const { - return labelfgcolor(); + return labelfgcolor(); } /// Set item's label background color. /// A special case is made for color 0xffffffff which uses the parent tree's bg color. void labelbgcolor(Fl_Color val) { - _labelbgcolor = val; + _labelbgcolor = val; } /// Return item's label background text color. /// If the color is 0xffffffff, the default behavior is the parent tree's /// bg color will be used. (An overloaded draw_item_content() can override /// this behavior.) Fl_Color labelbgcolor() const { - return(_labelbgcolor); + return(_labelbgcolor); } /// Assign an FLTK widget to this item. void widget(Fl_Widget *val) { - _widget = val; - recalc_tree(); // may change tree geometry + _widget = val; + recalc_tree(); // may change tree geometry } /// Return FLTK widget assigned to this item. Fl_Widget *widget() const { - return(_widget); + return(_widget); } /// Return the number of children this item has. int children() const { - return(_children.total()); + return(_children.total()); } /// Return the child item for the given 'index'. Fl_Tree_Item *child(int index) { - return(_children[index]); + return(_children[index]); } /// Return the const child item for the given 'index'. const Fl_Tree_Item *child(int t) const; /// See if this item has children. int has_children() const { - return(children()); + return(children()); } int find_child(const char *name); int find_child(Fl_Tree_Item *item); @@ -228,15 +226,15 @@ public: // Adding items ////////////////// Fl_Tree_Item *add(const Fl_Tree_Prefs &prefs, - const char *new_label, - Fl_Tree_Item *newitem); + const char *new_label, + Fl_Tree_Item *newitem); Fl_Tree_Item *add(const Fl_Tree_Prefs &prefs, - const char *new_label); + const char *new_label); Fl_Tree_Item *add(const Fl_Tree_Prefs &prefs, - char **arr, - Fl_Tree_Item *newitem); + char **arr, + Fl_Tree_Item *newitem); Fl_Tree_Item *add(const Fl_Tree_Prefs &prefs, - char **arr); + char **arr); Fl_Tree_Item *replace(Fl_Tree_Item *new_item); Fl_Tree_Item *replace_child(Fl_Tree_Item *olditem, Fl_Tree_Item *newitem); Fl_Tree_Item *insert(const Fl_Tree_Prefs &prefs, const char *new_label, int pos=0); @@ -254,11 +252,11 @@ public: Fl_Tree_Item *next_sibling(); Fl_Tree_Item *prev_sibling(); void update_prev_next(int index); - Fl_Tree_Item *next_displayed(Fl_Tree_Prefs &prefs); // deprecated - Fl_Tree_Item *prev_displayed(Fl_Tree_Prefs &prefs); // deprecated + Fl_Tree_Item *next_displayed(Fl_Tree_Prefs &prefs); // deprecated + Fl_Tree_Item *prev_displayed(Fl_Tree_Prefs &prefs); // deprecated Fl_Tree_Item *next_visible(Fl_Tree_Prefs &prefs); Fl_Tree_Item *prev_visible(Fl_Tree_Prefs &prefs); - + /// Return the parent for this item. Returns NULL if we are the root. Fl_Tree_Item *parent() { return(_parent); @@ -299,7 +297,7 @@ public: } /// Toggle the item's open/closed state. void open_toggle() { - is_open()?close():open(); // handles calling recalc_tree() + is_open()?close():open(); // handles calling recalc_tree() } /// Change the item's selection state to the optionally specified 'val'. /// If 'val' is not specified, the item will be selected. @@ -310,9 +308,9 @@ public: /// Toggle the item's selection state. void select_toggle() { if ( is_selected() ) { - deselect(); // deselect if selected + deselect(); // deselect if selected } else { - select(); // select if deselected + select(); // select if deselected } } /// Select item and all its children. @@ -355,7 +353,7 @@ public: } /// Change the item's activation state to the optionally specified 'val'. /// - /// When deactivated, the item will be 'grayed out'; the callback() + /// When deactivated, the item will be 'grayed out'; the callback() /// won't be invoked if the user clicks on the label. If a widget() /// is associated with the item, its activation state will be changed as well. /// @@ -365,9 +363,9 @@ public: set_flag(ACTIVE,val); if ( _widget && val != (int)_widget->active() ) { if ( val ) { - _widget->activate(); + _widget->activate(); } else { - _widget->deactivate(); + _widget->deactivate(); } _widget->redraw(); } @@ -407,7 +405,7 @@ public: /// void usericon(Fl_Image *val) { _usericon = val; - recalc_tree(); // may change tree geometry + recalc_tree(); // may change tree geometry } /// Get the item's user icon as an Fl_Image. Returns '0' if disabled. Fl_Image *usericon() const { @@ -467,7 +465,7 @@ protected: /// Set a flag to an on or off value. val is 0 or 1. inline void set_flag(unsigned short flag,int val) { if ( flag==OPEN || flag==VISIBLE ) { - recalc_tree(); // may change tree geometry + recalc_tree(); // may change tree geometry } if ( val ) _flags |= flag; else _flags &= ~flag; } @@ -479,7 +477,3 @@ protected: }; #endif /*FL_TREE_ITEM_H*/ - -// -// End of "$Id$". -// diff --git a/FL/Fl_Tree_Item_Array.H b/FL/Fl_Tree_Item_Array.H index 05b3562c3..dc4da5ff3 100644 --- a/FL/Fl_Tree_Item_Array.H +++ b/FL/Fl_Tree_Item_Array.H @@ -1,6 +1,4 @@ // -// "$Id$" -// #ifndef _FL_TREE_ITEM_ARRAY_H #define _FL_TREE_ITEM_ARRAY_H @@ -8,8 +6,8 @@ #include <FL/Fl.H> #include "Fl_Export.H" -class FL_EXPORT Fl_Tree_Item; // forward decl must *precede* first doxygen comment block - // or doxygen will not document our class.. +class FL_EXPORT Fl_Tree_Item; // forward decl must *precede* first doxygen comment block + // or doxygen will not document our class.. ////////////////////////// // FL/Fl_Tree_Item_Array.H @@ -22,11 +20,11 @@ class FL_EXPORT Fl_Tree_Item; // forward decl must *precede* first doxygen comme // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /// @@ -45,19 +43,19 @@ class FL_EXPORT Fl_Tree_Item; // forward decl must *precede* first doxygen comme /// class FL_EXPORT Fl_Tree_Item_Array { - Fl_Tree_Item **_items; // items array - int _total; // #items in array - int _size; // #items *allocated* for array - int _chunksize; // #items to enlarge mem allocation + Fl_Tree_Item **_items; // items array + int _total; // #items in array + int _size; // #items *allocated* for array + int _chunksize; // #items to enlarge mem allocation enum { - MANAGE_ITEM = 1, ///> manage the Fl_Tree_Item's internals (internal use only) + MANAGE_ITEM = 1, ///> manage the Fl_Tree_Item's internals (internal use only) }; - char _flags; // flags to control behavior + char _flags; // flags to control behavior void enlarge(int count); public: - Fl_Tree_Item_Array(int new_chunksize = 10); // CTOR - ~Fl_Tree_Item_Array(); // DTOR - Fl_Tree_Item_Array(const Fl_Tree_Item_Array *o); // COPY CTOR + Fl_Tree_Item_Array(int new_chunksize = 10); // CTOR + ~Fl_Tree_Item_Array(); // DTOR + Fl_Tree_Item_Array(const Fl_Tree_Item_Array *o); // COPY CTOR /// Return the item and index \p i. Fl_Tree_Item *operator[](int i) { return(_items[i]); @@ -82,7 +80,7 @@ public: void remove(int index); int remove(Fl_Tree_Item *item); /// Option to control if Fl_Tree_Item_Array's destructor will also destroy the Fl_Tree_Item's. - /// If set: items and item array is destroyed. + /// If set: items and item array is destroyed. /// If clear: only the item array is destroyed, not items themselves. void manage_item_destroy(int val) { if ( val ) _flags |= MANAGE_ITEM; else _flags &= ~MANAGE_ITEM; @@ -93,7 +91,3 @@ public: }; #endif /*_FL_TREE_ITEM_ARRAY_H*/ - -// -// End of "$Id$". -// diff --git a/FL/Fl_Tree_Prefs.H b/FL/Fl_Tree_Prefs.H index a7a8bee30..e6e010734 100644 --- a/FL/Fl_Tree_Prefs.H +++ b/FL/Fl_Tree_Prefs.H @@ -1,11 +1,9 @@ // -// "$Id$" -// #ifndef FL_TREE_PREFS_H #define FL_TREE_PREFS_H -#include <FL/Fl.H> // needed for ABI version features (via Enumerations.H) +#include <FL/Fl.H> // needed for ABI version features (via Enumerations.H) ////////////////////// // FL/Fl_Tree_Prefs.H @@ -18,11 +16,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /// @@ -47,18 +45,18 @@ /// Sort order options for items added to the tree /// enum Fl_Tree_Sort { - FL_TREE_SORT_NONE=0, ///< No sorting; items are added in the order defined (default). - FL_TREE_SORT_ASCENDING=1, ///< Add items in ascending sort order. - FL_TREE_SORT_DESCENDING=2 ///< Add items in descending sort order. + FL_TREE_SORT_NONE=0, ///< No sorting; items are added in the order defined (default). + FL_TREE_SORT_ASCENDING=1, ///< Add items in ascending sort order. + FL_TREE_SORT_DESCENDING=2 ///< Add items in descending sort order. }; /// \enum Fl_Tree_Connector /// Defines the style of connection lines between items. /// enum Fl_Tree_Connector { - FL_TREE_CONNECTOR_NONE=0, ///< Use no lines connecting items - FL_TREE_CONNECTOR_DOTTED=1, ///< Use dotted lines connecting items (default) - FL_TREE_CONNECTOR_SOLID=2 ///< Use solid lines connecting items + FL_TREE_CONNECTOR_NONE=0, ///< Use no lines connecting items + FL_TREE_CONNECTOR_DOTTED=1, ///< Use dotted lines connecting items (default) + FL_TREE_CONNECTOR_SOLID=2 ///< Use solid lines connecting items }; /// \enum Fl_Tree_Select @@ -78,8 +76,8 @@ enum Fl_Tree_Select { /// via item_reselect_mode(). /// enum Fl_Tree_Item_Reselect_Mode { - FL_TREE_SELECTABLE_ONCE=0, ///< Item can only be selected once (default) - FL_TREE_SELECTABLE_ALWAYS, ///< Enables FL_TREE_REASON_RESELECTED events for callbacks + FL_TREE_SELECTABLE_ONCE=0, ///< Item can only be selected once (default) + FL_TREE_SELECTABLE_ALWAYS, ///< Enables FL_TREE_REASON_RESELECTED events for callbacks }; /// \enum Fl_Tree_Item_Draw_Mode @@ -87,10 +85,10 @@ enum Fl_Tree_Item_Reselect_Mode { /// via item_draw_mode(). /// enum Fl_Tree_Item_Draw_Mode { - FL_TREE_ITEM_DRAW_DEFAULT=0, ///< If widget() defined, draw in place of label, + FL_TREE_ITEM_DRAW_DEFAULT=0, ///< If widget() defined, draw in place of label, ///< and widget() tracks item height (default) - FL_TREE_ITEM_DRAW_LABEL_AND_WIDGET=1, ///< If widget() defined, include label to the left of the widget - FL_TREE_ITEM_HEIGHT_FROM_WIDGET=2 ///< If widget() defined, widget()'s height controls item's height + FL_TREE_ITEM_DRAW_LABEL_AND_WIDGET=1, ///< If widget() defined, include label to the left of the widget + FL_TREE_ITEM_HEIGHT_FROM_WIDGET=2 ///< If widget() defined, widget()'s height controls item's height }; class Fl_Tree_Item; @@ -105,41 +103,41 @@ typedef void (Fl_Tree_Item_Draw_Callback)(Fl_Tree_Item*, void*); /// instead of trying to accessing tree's preferences settings directly. /// class FL_EXPORT Fl_Tree_Prefs { - Fl_Font _labelfont; // label's font face - Fl_Fontsize _labelsize; // label's font size - int _margintop; // -- - int _marginleft; // |- tree's controllable margins - int _marginbottom; // -- - int _openchild_marginbottom; // extra space below an open child tree - int _usericonmarginleft; // space to left of user icon (if any) - int _labelmarginleft; // space to left of label - int _widgetmarginleft; // space to left of widget - int _connectorwidth; // connector width (right of open/close icon) - int _linespacing; // vertical space between lines + Fl_Font _labelfont; // label's font face + Fl_Fontsize _labelsize; // label's font size + int _margintop; // -- + int _marginleft; // |- tree's controllable margins + int _marginbottom; // -- + int _openchild_marginbottom; // extra space below an open child tree + int _usericonmarginleft; // space to left of user icon (if any) + int _labelmarginleft; // space to left of label + int _widgetmarginleft; // space to left of widget + int _connectorwidth; // connector width (right of open/close icon) + int _linespacing; // vertical space between lines // Colors - Fl_Color _labelfgcolor; // label's foreground color - Fl_Color _labelbgcolor; // label's background color - Fl_Color _connectorcolor; // connector dotted line color - Fl_Tree_Connector _connectorstyle; // connector line style - Fl_Image *_openimage; // the 'open' icon [+] - Fl_Image *_closeimage; // the 'close' icon [-] - Fl_Image *_userimage; // user's own icon - Fl_Image *_opendeimage; // deactivated 'open' icon - Fl_Image *_closedeimage; // deactivated 'close' icon - Fl_Image *_userdeimage; // deactivated user icon - char _showcollapse; // 1=show collapse icons, 0=don't - char _showroot; // show the root item as part of the tree - Fl_Tree_Sort _sortorder; // none, ascening, descending, etc. - Fl_Boxtype _selectbox; // selection box type - Fl_Tree_Select _selectmode; // selection mode - Fl_Tree_Item_Reselect_Mode _itemreselectmode; // controls item selection callback() behavior - Fl_Tree_Item_Draw_Mode _itemdrawmode; // controls how items draw label + widget() - Fl_Tree_Item_Draw_Callback *_itemdrawcallback; // callback to handle drawing items (0=none) - void *_itemdrawuserdata; // data for drawing items (0=none) + Fl_Color _labelfgcolor; // label's foreground color + Fl_Color _labelbgcolor; // label's background color + Fl_Color _connectorcolor; // connector dotted line color + Fl_Tree_Connector _connectorstyle; // connector line style + Fl_Image *_openimage; // the 'open' icon [+] + Fl_Image *_closeimage; // the 'close' icon [-] + Fl_Image *_userimage; // user's own icon + Fl_Image *_opendeimage; // deactivated 'open' icon + Fl_Image *_closedeimage; // deactivated 'close' icon + Fl_Image *_userdeimage; // deactivated user icon + char _showcollapse; // 1=show collapse icons, 0=don't + char _showroot; // show the root item as part of the tree + Fl_Tree_Sort _sortorder; // none, ascening, descending, etc. + Fl_Boxtype _selectbox; // selection box type + Fl_Tree_Select _selectmode; // selection mode + Fl_Tree_Item_Reselect_Mode _itemreselectmode; // controls item selection callback() behavior + Fl_Tree_Item_Draw_Mode _itemdrawmode; // controls how items draw label + widget() + Fl_Tree_Item_Draw_Callback *_itemdrawcallback; // callback to handle drawing items (0=none) + void *_itemdrawuserdata; // data for drawing items (0=none) public: Fl_Tree_Prefs(); ~Fl_Tree_Prefs(); - + //////////////////////////// // Labels //////////////////////////// @@ -188,7 +186,7 @@ public: inline Fl_Color labelbgcolor() const { return(item_labelbgcolor()); } /// Obsolete: Set the default label background color. Please use item_labelbgcolor(Fl_Color) instead. inline void labelbgcolor(Fl_Color val) { item_labelbgcolor(val); } - + //////////////////////////// // Margins //////////////////////////// @@ -258,7 +256,7 @@ public: inline void linespacing(int val) { _linespacing = val; } - + //////////////////////////// // Colors and Styles //////////////////////////// @@ -290,7 +288,7 @@ public: inline void connectorwidth(int val) { _connectorwidth = val; } - + //////////////////////////// // Icons //////////////////////////// @@ -342,7 +340,7 @@ public: inline Fl_Image *userdeicon() const { return _userdeimage; } - + //////////////////////////// // Options //////////////////////////// @@ -417,7 +415,7 @@ public: } /// Set the 'item draw mode' used for the tree to \p val. /// This affects how items in the tree are drawn, - /// such as when a widget() is defined. + /// such as when a widget() is defined. /// See Fl_Tree_Item_Draw_Mode for possible values. /// inline void item_draw_mode(Fl_Tree_Item_Draw_Mode val) { @@ -439,7 +437,3 @@ public: }; #endif /*FL_TREE_PREFS_H*/ - -// -// End of "$Id$". -// diff --git a/FL/Fl_Valuator.H b/FL/Fl_Valuator.H index 9fc36f7bf..d8288b7ed 100644 --- a/FL/Fl_Valuator.H +++ b/FL/Fl_Valuator.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Valuator header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2016 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -27,8 +25,8 @@ #endif // shared type() values for classes that work in both directions: -#define FL_VERTICAL 0 ///< The valuator can work vertically -#define FL_HORIZONTAL 1 ///< The valuator can work horizontally +#define FL_VERTICAL 0 ///< The valuator can work vertically +#define FL_HORIZONTAL 1 ///< The valuator can work horizontally /** The Fl_Valuator class controls a single floating-point value @@ -132,7 +130,3 @@ public: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Value_Input.H b/FL/Fl_Value_Input.H index 1aabe8ed7..995b36a00 100644 --- a/FL/Fl_Value_Input.H +++ b/FL/Fl_Value_Input.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Value input header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2010 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -32,31 +30,31 @@ type(FL_FLOAT_INPUT) or type(FL_INT_INPUT) in there - and when they hit return or tab the value updates to what they typed and the callback is done. - + <P>If step() is non-zero and integral, then the range of numbers is limited to integers instead of floating point numbers. As well as displaying the value as an integer, typed input is also limited to integer values, even if the hidden Fl_Input widget is of type(FL_FLOAT_INPUT).</P> - + <P>If step() is non-zero, the user can also drag the mouse across the object and thus slide the value. The left button moves one step() per pixel, the middle by 10 * step(), and the right button by 100 * step(). It is therefore impossible to select text by dragging across it, although clicking can still move the insertion cursor.</P> - + <P>If step() is non-zero and integral, then the range of numbers are limited to integers instead of floating point values. - - <P ALIGN="CENTER">\image html Fl_Value_Input.png + + <P ALIGN="CENTER">\image html Fl_Value_Input.png \image latex Fl_Value_Input.png "Fl_Value_Input" width=4cm \see Fl_Widget::shortcut_label(int) */ class FL_EXPORT Fl_Value_Input : public Fl_Valuator { public: - /* This is the encapsulated Fl_input attribute to which + /* This is the encapsulated Fl_input attribute to which this class delegates the value font, color and shortcut */ Fl_Input input; private: @@ -83,21 +81,21 @@ public: char soft() const {return soft_;} /** Returns the current shortcut key for the Input. - \see Fl_Value_Input::shortcut(int) + \see Fl_Value_Input::shortcut(int) */ int shortcut() const {return input.shortcut();} - /** + /** Sets the shortcut key to \p s. Setting this overrides the use of '&' in the label(). The value is a bitwise OR of a key and a set of shift flags, for example FL_ALT | 'a' , FL_ALT | (FL_F + 10), or just 'a'. A value of 0 disables the shortcut. - - The key can be any value returned by + + The key can be any value returned by Fl::event_key(), but will usually be an ASCII letter. Use a lower-case letter unless you require the shift key to be held down. - - The shift flags can be any set of values accepted by + + The shift flags can be any set of values accepted by Fl::event_state(). If the bit is on that shift key must be pushed. Meta, Alt, Ctrl, and Shift must be off if they are not in the shift flags (zero for the other bits indicates a "don't care" @@ -125,7 +123,3 @@ public: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Value_Output.H b/FL/Fl_Value_Output.H index 2d817f579..6a2e7e900 100644 --- a/FL/Fl_Value_Output.H +++ b/FL/Fl_Value_Output.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Value output header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2010 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -30,12 +28,12 @@ The Fl_Value_Output widget displays a floating point value. If step() is not zero, the user can adjust the value by dragging the mouse left and right. The left button moves one step() - per pixel, the middle by 10 * step(), and the right button by + per pixel, the middle by 10 * step(), and the right button by 100 * step(). - <P>This is much lighter-weight than + <P>This is much lighter-weight than Fl_Value_Input because it contains no text editing code or character buffer. </P> - <P ALIGN=CENTER>\image html Fl_Value_Output.png + <P ALIGN=CENTER>\image html Fl_Value_Output.png \image latex Fl_Value_Output.png "Fl_Value_Output" width=4cm */ class FL_EXPORT Fl_Value_Output : public Fl_Valuator { @@ -80,7 +78,3 @@ public: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Value_Slider.H b/FL/Fl_Value_Slider.H index 462cdb424..b139de71b 100644 --- a/FL/Fl_Value_Slider.H +++ b/FL/Fl_Value_Slider.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Value slider header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2010 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -27,7 +25,7 @@ /** The Fl_Value_Slider widget is a Fl_Slider widget with a box displaying the current value. - <P ALIGN=CENTER>\image html value_slider.png + <P ALIGN=CENTER>\image html value_slider.png \image latex value_slider.png "Fl_Value_Slider" width=4cm */ class FL_EXPORT Fl_Value_Slider : public Fl_Slider { @@ -54,7 +52,3 @@ public: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Widget.H b/FL/Fl_Widget.H index 6ca0787cd..0745b9063 100644 --- a/FL/Fl_Widget.H +++ b/FL/Fl_Widget.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Widget header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2020 by Bill Spitzak and others. @@ -11,9 +9,9 @@ // // https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// https://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /** \file @@ -72,16 +70,16 @@ struct FL_EXPORT Fl_Label { -/** Fl_Widget is the base class for all widgets in FLTK. - +/** Fl_Widget is the base class for all widgets in FLTK. + You can't create one of these because the constructor is not public. - However you can subclass it. + However you can subclass it. - All "property" accessing methods, such as color(), parent(), or argument() - are implemented as trivial inline functions and thus are as fast and small - as accessing fields in a structure. Unless otherwise noted, the property - setting methods such as color(n) or label(s) are also trivial inline - functions, even if they change the widget's appearance. It is up to the + All "property" accessing methods, such as color(), parent(), or argument() + are implemented as trivial inline functions and thus are as fast and small + as accessing fields in a structure. Unless otherwise noted, the property + setting methods such as color(n) or label(s) are also trivial inline + functions, even if they change the widget's appearance. It is up to the user code to call redraw() after these. */ class FL_EXPORT Fl_Widget { @@ -112,10 +110,10 @@ protected: /** Creates a widget at the given position and size. - The Fl_Widget is a protected constructor, but all derived widgets have a - matching public constructor. It takes a value for x(), y(), w(), h(), and + The Fl_Widget is a protected constructor, but all derived widgets have a + matching public constructor. It takes a value for x(), y(), w(), h(), and an optional value for label(). - + \param[in] x, y the position of the widget relative to the enclosing window \param[in] w, h size of the widget in pixels \param[in] label optional text for the widget label @@ -180,10 +178,10 @@ protected: public: /** Destroys the widget. - Destroying single widgets is not very common. You almost always want to - destroy the parent group instead, which will destroy all of the child widgets + Destroying single widgets is not very common. You almost always want to + destroy the parent group instead, which will destroy all of the child widgets and groups in that group. - + \since FLTK 1.3, the widget's destructor removes the widget from its parent group, if it is member of a group. */ @@ -207,17 +205,17 @@ public: */ virtual void draw() = 0; - /** Handles the specified event. - You normally don't call this method directly, but instead let FLTK do + /** Handles the specified event. + You normally don't call this method directly, but instead let FLTK do it when the user interacts with the widget. - - When implemented in a widget, this function must return 0 if the + + When implemented in a widget, this function must return 0 if the widget does not use the event or 1 otherwise. - Most of the time, you want to call the inherited handle() method in - your overridden method so that you don't short-circuit events that you + Most of the time, you want to call the inherited handle() method in + your overridden method so that you don't short-circuit events that you don't handle. In this last case you should return the callee retval. - + \param[in] event the kind of event received \retval 0 if the event was not used or understood \retval 1 if the event was used and can be deleted @@ -235,15 +233,15 @@ public: */ int is_label_copied() const {return ((flags_ & COPIED_LABEL) ? 1 : 0);} - /** Returns a pointer to the parent widget. - Usually this is a Fl_Group or Fl_Window. + /** Returns a pointer to the parent widget. + Usually this is a Fl_Group or Fl_Window. \retval NULL if the widget has no parent \see Fl_Group::add(Fl_Widget*) */ Fl_Group* parent() const {return parent_;} /** Internal use only - "for hacks only". - + It is \em \b STRONGLY recommended not to use this method, because it short-circuits Fl_Group's normal widget adding and removing methods, if the widget is already a child widget of another Fl_Group. @@ -255,7 +253,7 @@ public: /** Gets the widget type. Returns the widget type value, which is used for Forms compatibility and to simulate RTTI. - + \todo Explain "simulate RTTI" (currently only used to decide if a widget is a window, i.e. type()>=FL_WINDOW ?). Is type() really used in a way that ensures "Forms compatibility" ? @@ -289,20 +287,20 @@ public: /** Changes the size or position of the widget. - This is a virtual function so that the widget may implement its + This is a virtual function so that the widget may implement its own handling of resizing. The default version does \e not - call the redraw() method, but instead relies on the parent widget - to do so because the parent may know a faster way to update the - display, such as scrolling from the old position. + call the redraw() method, but instead relies on the parent widget + to do so because the parent may know a faster way to update the + display, such as scrolling from the old position. - Some window managers under X11 call resize() a lot more often - than needed. Please verify that the position or size of a widget + Some window managers under X11 call resize() a lot more often + than needed. Please verify that the position or size of a widget did actually change before doing any extensive calculations. - position(X, Y) is a shortcut for resize(X, Y, w(), h()), + position(X, Y) is a shortcut for resize(X, Y, w(), h()), and size(W, H) is a shortcut for resize(x(), y(), W, H). - - \param[in] x, y new position relative to the parent window + + \param[in] x, y new position relative to the parent window \param[in] w, h new size \see position(int,int), size(int,int) */ @@ -314,8 +312,8 @@ public: /** Repositions the window or widget. position(X, Y) is a shortcut for resize(X, Y, w(), h()). - - \param[in] X, Y new position relative to the parent window + + \param[in] X, Y new position relative to the parent window \see resize(int,int,int,int), size(int,int) */ void position(int X,int Y) {resize(X,Y,w_,h_);} @@ -323,7 +321,7 @@ public: /** Changes the size of the widget. size(W, H) is a shortcut for resize(x(), y(), W, H). - + \param[in] W, H new size \see position(int,int), resize(int,int,int,int) */ @@ -337,8 +335,8 @@ public: Fl_Align align() const {return label_.align_;} /** Sets the label alignment. - This controls how the label is displayed next to or inside the widget. - The default value is FL_ALIGN_CENTER, which centers the label inside + This controls how the label is displayed next to or inside the widget. + The default value is FL_ALIGN_CENTER, which centers the label inside the widget. \param[in] alignment new label alignment \see align(), Fl_Align @@ -350,10 +348,10 @@ public: \see box(Fl_Boxtype), Fl_Boxtype */ Fl_Boxtype box() const {return (Fl_Boxtype)box_;} - - /** Sets the box type for the widget. + + /** Sets the box type for the widget. This identifies a routine that draws the background of the widget. - See Fl_Boxtype for the available types. The default depends on the + See Fl_Boxtype for the available types. The default depends on the widget, but is usually FL_NO_BOX or FL_UP_BOX. \param[in] new_box the new box type \see box(), Fl_Boxtype @@ -366,11 +364,11 @@ public: */ Fl_Color color() const {return color_;} - /** Sets the background color of the widget. - The color is passed to the box routine. The color is either an index into - an internal table of RGB colors or an RGB color value generated using + /** Sets the background color of the widget. + The color is passed to the box routine. The color is either an index into + an internal table of RGB colors or an RGB color value generated using fl_rgb_color(). - + 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 @@ -385,18 +383,18 @@ public: Fl_Color selection_color() const {return color2_;} /** Sets the selection color. - The selection color is defined for Forms compatibility and is usually - used to color the widget when it is selected, although some widgets - use this color for other purposes. You can set both colors at once + 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). \param[in] a the new selection color \see selection_color(), color(Fl_Color, Fl_Color) */ void selection_color(Fl_Color a) {color2_ = a;} - /** Sets the background and selection color of the widget. + /** Sets the background and selection color of the widget. - The two color form sets both the background and selection colors. + The two color form sets both the background and selection colors. \param[in] bg background color \param[in] sel selection color \see color(unsigned), selection_color(unsigned) @@ -413,17 +411,17 @@ public: The label is shown somewhere on or next to the widget. See \ref common_labels for details about what can be put in a label. - The passed pointer is stored unchanged in the widget (the string is \em not copied), so if - you need to set the label to a formatted value, make sure the buffer is - static, global, or allocated. The copy_label() method can be used + The passed pointer is stored unchanged in the widget (the string is \em not copied), so if + you need to set the label to a formatted value, make sure the buffer is + static, global, or allocated. The copy_label() method can be used to make a copy of the label string automatically. \param[in] text pointer to new label text \see copy_label() */ void label(const char* text); - /** Sets the current label. - Unlike label(), this method allocates a copy of the label + /** Sets the current label. + Unlike label(), this method allocates a copy of the label string instead of using the original string pointer. The internal copy will automatically be freed whenever you assign @@ -445,29 +443,29 @@ public: */ Fl_Labeltype labeltype() const {return (Fl_Labeltype)label_.type;} - /** Sets the label type. - The label type identifies the function that draws the label of the widget. - This is generally used for special effects such as embossing or for using - the label() pointer as another form of data such as an icon. The value + /** Sets the label type. + The label type identifies the function that draws the label of the widget. + This is generally used for special effects such as embossing or for using + the label() pointer as another form of data such as an icon. The value FL_NORMAL_LABEL prints the label as plain text. \param[in] a new label type \see Fl_Labeltype */ void labeltype(Fl_Labeltype a) {label_.type = a;} - /** Gets the label color. - The default color is FL_FOREGROUND_COLOR. + /** Gets the label color. + The default color is FL_FOREGROUND_COLOR. \return the current label color */ Fl_Color labelcolor() const {return label_.color;} - /** Sets the label color. - The default color is FL_FOREGROUND_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;} - /** Gets the font to use. + /** Gets the font to use. Fonts are identified by indexes into a table. The default value uses a Helvetica typeface (Arial for Microsoft® Windows®). The function Fl::set_font() can define new typefaces. @@ -476,7 +474,7 @@ public: */ Fl_Font labelfont() const {return label_.font;} - /** Sets the font to use. + /** Sets the font to use. Fonts are identified by indexes into a table. The default value uses a Helvetica typeface (Arial for Microsoft® Windows®). The function Fl::set_font() can define new typefaces. @@ -485,7 +483,7 @@ public: */ void labelfont(Fl_Font f) {label_.font=f;} - /** Gets the font size in pixels. + /** Gets the font size in pixels. The default size is 14 pixels. \return the current font size */ @@ -547,8 +545,8 @@ public: */ const char *tooltip() const {return tooltip_;} - void tooltip(const char *text); // see Fl_Tooltip - void copy_tooltip(const char *text); // see Fl_Tooltip + void tooltip(const char *text); // see Fl_Tooltip + void copy_tooltip(const char *text); // see Fl_Tooltip /** Gets the current callback function for the widget. Each widget has a single callback. @@ -600,16 +598,16 @@ public: /** Gets the current user data (long) argument that is passed to the callback function. \note On platforms with <tt>sizeof(long) \< sizeof(void*)</tt>, particularly - on Windows 64-bit platforms, this method can truncate stored addresses - \p (void*) to the size of a \p long value. Use with care and only - if you are sure that the stored user_data value fits in a \p long - value because it was stored with argument(long) or another method - using only \p long values. You may want to use user_data() instead. + on Windows 64-bit platforms, this method can truncate stored addresses + \p (void*) to the size of a \p long value. Use with care and only + if you are sure that the stored user_data value fits in a \p long + value because it was stored with argument(long) or another method + using only \p long values. You may want to use user_data() instead. \see user_data() \todo [Internal] The user_data value must be implemented using - \p fl_intptr_t or similar to avoid 64-bit platform incompatibilities. + \p fl_intptr_t or similar to avoid 64-bit platform incompatibilities. */ long argument() const {return (long)(fl_intptr_t)user_data_;} @@ -633,29 +631,29 @@ public: This controls when callbacks are done. The following values are useful, the default value is FL_WHEN_RELEASE: - + \li 0: The callback is not done, but changed() is turned on. \li FL_WHEN_CHANGED: The callback is done each time the text is changed by the user. - \li FL_WHEN_RELEASE: The callback will be done when this widget loses - the focus, including when the window is unmapped. This is a useful - value for text fields in a panel where doing the callback on every - change is wasteful. However the callback will also happen if the - mouse is moved out of the window, which means it should not do - anything visible (like pop up an error message). - You might do better setting this to zero, and scanning all the - items for changed() when the OK button on a panel is pressed. - \li FL_WHEN_ENTER_KEY: If the user types the Enter key, the entire - text is selected, and the callback is done if the text has changed. - Normally the Enter key will navigate to the next field (or insert - a newline for a Fl_Multiline_Input) - this changes the behavior. + \li FL_WHEN_RELEASE: The callback will be done when this widget loses + the focus, including when the window is unmapped. This is a useful + value for text fields in a panel where doing the callback on every + change is wasteful. However the callback will also happen if the + mouse is moved out of the window, which means it should not do + anything visible (like pop up an error message). + You might do better setting this to zero, and scanning all the + items for changed() when the OK button on a panel is pressed. + \li FL_WHEN_ENTER_KEY: If the user types the Enter key, the entire + text is selected, and the callback is done if the text has changed. + Normally the Enter key will navigate to the next field (or insert + a newline for a Fl_Multiline_Input) - this changes the behavior. \li FL_WHEN_ENTER_KEY|FL_WHEN_NOT_CHANGED: The Enter key will do the callback even if the text has not changed. Useful for command fields. - Fl_Widget::when() is a set of bitflags used by subclasses of + Fl_Widget::when() is a set of bitflags used by subclasses of Fl_Widget to decide when to do the callback. - If the value is zero then the callback is never done. Other values - are described in the individual widgets. This field is in the base + If the value is zero then the callback is never done. Other values + are described in the individual widgets. This field is in the base class so that you can scan a panel and do_callback() on all the ones that don't do their own callbacks in response to an "OK" button. \param[in] i set of flags @@ -692,20 +690,20 @@ public: \see hide(), visible(), visible_r() */ virtual void show(); - + /** Makes a widget invisible. \see show(), visible(), visible_r() */ virtual void hide(); - /** Makes the widget visible. - You must still redraw the parent widget to see a change in the + /** Makes the widget visible. + You must still redraw the parent widget to see a change in the window. Normally you want to use the show() method instead. */ void set_visible() {flags_ &= ~INVISIBLE;} - /** Hides the widget. - You must still redraw the parent to see a change in the window. + /** Hides the widget. + You must still redraw the parent to see a change in the window. Normally you want to use the hide() method instead. */ void clear_visible() {flags_ |= INVISIBLE;} @@ -716,27 +714,27 @@ public: */ unsigned int active() const {return !(flags_&INACTIVE);} - /** Returns whether the widget and all of its parents are active. + /** Returns whether the widget and all of its parents are active. \retval 0 if this or any of the parent widgets are inactive \see active(), activate(), deactivate() */ int active_r() const; /** Activates the widget. - Changing this value will send FL_ACTIVATE to the widget if + Changing this value will send FL_ACTIVATE to the widget if active_r() is true. \see active(), active_r(), deactivate() */ void activate(); /** Deactivates the widget. - Inactive widgets will be drawn "grayed out", e.g. with less contrast - than the active widget. Inactive widgets will not receive any keyboard - or mouse button events. Other events (including FL_ENTER, FL_MOVE, - FL_LEAVE, FL_SHORTCUT, and others) will still be sent. A widget is - only active if active() is true on it <I>and all of its parents</I>. + Inactive widgets will be drawn "grayed out", e.g. with less contrast + than the active widget. Inactive widgets will not receive any keyboard + or mouse button events. Other events (including FL_ENTER, FL_MOVE, + FL_LEAVE, FL_SHORTCUT, and others) will still be sent. A widget is + only active if active() is true on it <I>and all of its parents</I>. - Changing this value will send FL_DEACTIVATE to the widget if + Changing this value will send FL_DEACTIVATE to the widget if active_r() is true. Currently you cannot deactivate Fl_Window widgets. @@ -746,22 +744,22 @@ public: void deactivate(); /** Returns if a widget is used for output only. - output() means the same as !active() except it does not change how the - widget is drawn. The widget will not receive any events. This is useful - for making scrollbars or buttons that work as displays rather than input + output() means the same as !active() except it does not change how the + widget is drawn. The widget will not receive any events. This is useful + for making scrollbars or buttons that work as displays rather than input devices. \retval 0 if the widget is used for input and output - \see set_output(), clear_output() + \see set_output(), clear_output() */ unsigned int output() const {return (flags_&OUTPUT);} /** Sets a widget to output only. - \see output(), clear_output() + \see output(), clear_output() */ void set_output() {flags_ |= OUTPUT;} /** Sets a widget to accept input. - \see set_output(), output() + \see set_output(), output() */ void clear_output() {flags_ &= ~OUTPUT;} @@ -815,31 +813,31 @@ public: void set_active() {flags_ &= ~INACTIVE;} /** Gives the widget the keyboard focus. - Tries to make this widget be the Fl::focus() widget, by first sending - it an FL_FOCUS event, and if it returns non-zero, setting - Fl::focus() to this widget. You should use this method to - assign the focus to a widget. + Tries to make this widget be the Fl::focus() widget, by first sending + it an FL_FOCUS event, and if it returns non-zero, setting + Fl::focus() to this widget. You should use this method to + assign the focus to a widget. \return true if the widget accepted the focus. */ int take_focus(); - /** Enables keyboard focus navigation with this widget. + /** Enables keyboard focus navigation with this widget. Note, however, that this will not necessarily mean that the widget will accept focus, but for widgets that can accept focus, this method enables it if it has been disabled. - \see visible_focus(), clear_visible_focus(), visible_focus(int) + \see visible_focus(), clear_visible_focus(), visible_focus(int) */ void set_visible_focus() { flags_ |= VISIBLE_FOCUS; } - /** Disables keyboard focus navigation with this widget. + /** Disables keyboard focus navigation with this widget. Normally, all widgets participate in keyboard focus navigation. - \see set_visible_focus(), visible_focus(), visible_focus(int) + \see set_visible_focus(), visible_focus(), visible_focus(int) */ void clear_visible_focus() { flags_ &= ~VISIBLE_FOCUS; } - /** Modifies keyboard focus navigation. + /** Modifies keyboard focus navigation. \param[in] v set or clear visible focus - \see set_visible_focus(), clear_visible_focus(), visible_focus() + \see set_visible_focus(), clear_visible_focus(), visible_focus() */ void visible_focus(int v) { if (v) set_visible_focus(); else clear_visible_focus(); } @@ -927,13 +925,13 @@ public: void redraw(); /** Schedules the drawing of the label. - Marks the widget or the parent as needing a redraw for the label area + Marks the widget or the parent as needing a redraw for the label area of a widget. */ void redraw_label(); - /** Returns non-zero if draw() needs to be called. - The damage value is actually a bit field that the widget + /** Returns non-zero if draw() needs to be called. + The damage value is actually a bit field that the widget subclass can use to figure out what parts to draw. \return a bitmap of flags describing the kind of damage to the widget \see damage(uchar), clear_damage(uchar) @@ -948,7 +946,7 @@ public: \note Therefore it is possible to set damage bits with this method, but this should be avoided. Use damage(uchar) instead. - + \param[in] c new bitmask of damage flags (default: 0) \see damage(uchar), damage() */ @@ -973,7 +971,7 @@ public: /** Sets width ww and height hh accordingly with the label size. Labels with images will return w() and h() of the image. - + This calls fl_measure() internally. For more information about the arguments \p ww and \p hh and word wrapping \see fl_measure(const char*, int&, int&, int) @@ -991,15 +989,15 @@ public: non-NULL, then the widget in question is derived from Fl_Group, and you can use the returned pointer to access its children or other Fl_Group-specific methods. - + Example: \code void my_callback (Fl_Widget *w, void *) { Fl_Group *g = w->as_group(); - if (g) - printf ("This group has %d children\n", g->children()); - else - printf ("This widget is not a group!\n"); + if (g) + printf ("This group has %d children\n", g->children()); + else + printf ("This widget is not a group!\n"); } \endcode @@ -1038,7 +1036,7 @@ public: /** Returns non zero if MAC_USE_ACCENTS_MENU flag is set, 0 otherwise. */ int use_accents_menu() { return flags() & MAC_USE_ACCENTS_MENU; } - + /** For back compatibility only. \deprecated Use selection_color() instead. */ @@ -1080,7 +1078,3 @@ public: #define FL_RESERVED_TYPE 100 #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Widget_Surface.H b/FL/Fl_Widget_Surface.H index 94b8dbb2c..2faa2c8d8 100644 --- a/FL/Fl_Widget_Surface.H +++ b/FL/Fl_Widget_Surface.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Drivers code for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2016 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // #ifndef Fl_Widget_Surface_h @@ -45,7 +43,3 @@ public: }; #endif /* Fl_Widget_Surface_h */ - -// -// End of "$Id$". -// diff --git a/FL/Fl_Window.H b/FL/Fl_Window.H index e7125d633..1db612b72 100644 --- a/FL/Fl_Window.H +++ b/FL/Fl_Window.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Window header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2016 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /** \file @@ -27,7 +25,7 @@ #include <FL/Fl_Bitmap.H> #include <stdlib.h> -#define FL_WINDOW 0xF0 ///< window type id all subclasses have type() >= this +#define FL_WINDOW 0xF0 ///< window type id all subclasses have type() >= this #define FL_DOUBLE_WINDOW 0xF1 ///< double window type id class Fl_X; @@ -83,7 +81,7 @@ private: uchar size_range_set; // cursor stuff Fl_Cursor cursor_default; - + void _Fl_Window(); // constructor innards // unimplemented copy ctor and assignment operator @@ -125,10 +123,10 @@ protected: public: /** - Creates a window from the given size and title. - If Fl_Group::current() is not NULL, the window is created as a + Creates a window from the given size and title. + If Fl_Group::current() is not NULL, the window is created as a subwindow of the parent window. - + The (w,h) form of the constructor creates a top-level window and asks the window manager to position the window. The (x,y,w,h) form of the constructor either creates a subwindow or a @@ -137,14 +135,14 @@ public: window, the window manager will pick a place to show the window or allow the user to pick a location. Use position(x,y) or hotspot() before calling show() to request a - position on the screen. See Fl_Window::resize() + position on the screen. See Fl_Window::resize() for some more details on positioning windows. - + Top-level windows initially have visible() set to 0 and parent() set to NULL. Subwindows initially have visible() set to 1 and parent() set to the parent window pointer. - + Fl_Widget::box() defaults to FL_FLAT_BOX. If you plan to completely fill the window with children widgets you should change this to FL_NO_BOX. If you turn the window border off @@ -161,7 +159,7 @@ public: /** The destructor <I>also deletes all the children</I>. This allows a whole tree to be deleted at once, without having to keep a pointer to - all the children in the user code. A kludge has been done so the + all the children in the user code. A kludge has been done so the Fl_Window and all of its children can be automatic (local) variables, but you must declare the Fl_Window <I>first</I> so that it is destroyed last. @@ -180,10 +178,10 @@ public: You can also call the Fl_Widget methods size(x,y) and position(w,h), which are inline wrappers for this virtual function. - A top-level window can not force, but merely suggest a position and - size to the operating system. The window manager may not be willing or - able to display a window at the desired position or with the given - dimensions. It is up to the application developer to verify window + A top-level window can not force, but merely suggest a position and + size to the operating system. The window manager may not be willing or + able to display a window at the desired position or with the given + dimensions. It is up to the application developer to verify window parameters after the resize request. */ virtual void resize(int X,int Y,int W,int H); @@ -196,11 +194,11 @@ public: Fast inline function to turn the window manager border off. It only works before show() is called. */ - void clear_border() {set_flag(NOBORDER);} + void clear_border() {set_flag(NOBORDER);} /** Returns whether the window possesses a border */ - unsigned int border() const {return !(flags() & NOBORDER);} + unsigned int border() const {return !(flags() & NOBORDER);} /** Activates the flags NOBORDER|FL_OVERRIDE */ - void set_override() {set_flag(NOBORDER|OVERRIDE);} + void set_override() {set_flag(NOBORDER|OVERRIDE);} /** Returns non zero if FL_OVERRIDE flag is set, 0 otherwise. */ unsigned int override() const { return flags()&OVERRIDE; } /** @@ -211,16 +209,16 @@ public: once, in which case only the last one shown gets events. You can see which window (if any) is modal by calling Fl::modal(). */ - void set_modal() {set_flag(MODAL);} + void set_modal() {set_flag(MODAL);} /** Returns true if this window is modal. */ - unsigned int modal() const {return flags() & MODAL;} + unsigned int modal() const {return flags() & MODAL;} /** A "non-modal" window (terminology borrowed from Microsoft Windows) acts like a modal() one in that it remains on top, but it has no effect on event delivery. There are <I>three</I> states for a window: modal, non-modal, and normal. */ - void set_non_modal() {set_flag(NON_MODAL);} + void set_non_modal() {set_flag(NON_MODAL);} /** Returns true if this window is modal or non-modal. */ unsigned int non_modal() const {return flags() & (NON_MODAL|MODAL);} @@ -276,11 +274,11 @@ 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(MENU_WINDOW);} /** Returns true if this window is a menu window. */ unsigned int menu_window() const {return flags() & MENU_WINDOW;} - + /** Marks the window as a tooltip window. @@ -297,8 +295,8 @@ 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(TOOLTIP_WINDOW); + clear_flag(MENU_WINDOW); } /** Returns true if this window is a tooltip window. */ unsigned int tooltip_window() const {return flags() & TOOLTIP_WINDOW;} @@ -323,13 +321,13 @@ public: \deprecated please use force_position(0) instead */ - void free_position() {clear_flag(FORCE_POSITION);} + void free_position() {clear_flag(FORCE_POSITION);} void size_range(int minw, int minh, int maxw=0, int maxh=0, int dw=0, int dh=0, int aspect=0); /** See void Fl_Window::label(const char*) */ - const char* label() const {return Fl_Widget::label();} + const char* label() const {return Fl_Widget::label();} /** See void Fl_Window::iconlabel(const char*) */ - const char* iconlabel() const {return iconlabel_;} + const char* iconlabel() const {return iconlabel_;} /** Sets the window title bar label. */ void label(const char*); /** Sets the icon label. */ @@ -426,7 +424,7 @@ public: /** Makes the window completely fill one or more screens, without any window manager border visible. You must use fullscreen_off() to - undo this. + undo this. \note On some platforms, this can result in the keyboard being grabbed. The window may also be recreated, meaning hide() and @@ -440,18 +438,18 @@ public: */ void fullscreen_off(); /** - Turns off any side effects of fullscreen() and does + Turns off any side effects of fullscreen() and does resize(x,y,w,h). */ void fullscreen_off(int X,int Y,int W,int H); /** - Returns non zero if FULLSCREEN flag is set, 0 otherwise. + Returns non zero if FULLSCREEN flag is set, 0 otherwise. */ unsigned int fullscreen_active() const { return flags() & FULLSCREEN; } /** Sets which screens should be used when this window is in fullscreen mode. The window will be resized to the top of the screen with index - \p top, the bottom of the screen with index \p bottom, etc. + \p top, the bottom of the screen with index \p bottom, etc. If this method is never called, or if any argument is < 0, then the window will be resized to fill the screen it is currently on. @@ -467,7 +465,7 @@ public: Call show() to restore the window. When a window is iconified/restored (either by these calls or by the - user) the handle() method is called with FL_HIDE and + user) the handle() method is called with FL_HIDE and FL_SHOW events and visible() is turned on and off. There is no way to control what is drawn in the icon except with the @@ -510,16 +508,16 @@ public: void default_cursor(Fl_Cursor c, Fl_Color, Fl_Color=FL_WHITE); static void default_callback(Fl_Window*, void* v); - + /** Returns the window width including any frame added by the window manager. - + Same as w() if applied to a subwindow. */ int decorated_w() const; - /** Returns the window height including any window title bar and any frame + /** Returns the window height including any window title bar and any frame added by the window manager. - + Same as h() if applied to a subwindow. */ int decorated_h() const; @@ -536,7 +534,7 @@ public: Return non-null if this is an Fl_Double_Window object. */ virtual class Fl_Double_Window *as_double_window() {return 0L;} - + void shape(const Fl_Image* img); void shape(const Fl_Image& b) ; const Fl_Image *shape(); @@ -545,7 +543,3 @@ public: }; #endif - -// -// End of "$Id$". -// diff --git a/FL/Fl_Wizard.H b/FL/Fl_Wizard.H index e89203f60..785cee450 100644 --- a/FL/Fl_Wizard.H +++ b/FL/Fl_Wizard.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Fl_Wizard widget definitions. // // Copyright 1999-2010 by Easy Software Products. @@ -12,9 +10,9 @@ // // https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// https://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -58,7 +56,3 @@ public: }; #endif // !_Fl_Wizard_H_ - -// -// End of "$Id$". -// diff --git a/FL/Fl_XBM_Image.H b/FL/Fl_XBM_Image.H index 13938e26e..2c4e1b0f0 100644 --- a/FL/Fl_XBM_Image.H +++ b/FL/Fl_XBM_Image.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // XBM image header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2010 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file @@ -35,7 +33,3 @@ class FL_EXPORT Fl_XBM_Image : public Fl_Bitmap { }; #endif // !Fl_XBM_Image_H - -// -// End of "$Id$". -// diff --git a/FL/Fl_XPM_Image.H b/FL/Fl_XPM_Image.H index c910fbffa..a10a24825 100644 --- a/FL/Fl_XPM_Image.H +++ b/FL/Fl_XPM_Image.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // XPM image header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2010 by Bill Spitzak and others. @@ -9,15 +7,15 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /* \file - + Fl_XPM_Image class . */ #ifndef Fl_XPM_Image_H @@ -36,7 +34,3 @@ class FL_EXPORT Fl_XPM_Image : public Fl_Pixmap { }; #endif // !Fl_XPM_Image - -// -// End of "$Id$". -// diff --git a/FL/Makefile.in b/FL/Makefile.in index 52141e8d6..b34b55db6 100644 --- a/FL/Makefile.in +++ b/FL/Makefile.in @@ -1,6 +1,4 @@ # -# "$Id$" -# # Header makefile for the Fast Light Tool Kit (FLTK). # # Copyright 1998-2010 by Bill Spitzak and others. @@ -9,11 +7,11 @@ # the file "COPYING" which should have been included with this file. If this # file is missing or damaged, see the license at: # -# http://www.fltk.org/COPYING.php +# https://www.fltk.org/COPYING.php # -# Please report all bugs and problems on the following page: +# Please see the following page on how to report bugs and issues: # -# http://www.fltk.org/str.php +# https://www.fltk.org/bugs.php # include ../makeinclude @@ -47,8 +45,3 @@ uninstall: echo "Uninstalling include files..." $(RMDIR) $(DESTDIR)$(includedir)/FL @HLINKS@ $(RM) $(DESTDIR)$(includedir)/Fl - - -# -# End of "$Id$". -# diff --git a/FL/android.H b/FL/android.H index eea3d616c..f1ad220e1 100644 --- a/FL/android.H +++ b/FL/android.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Template header file for the Fast Light Tool Kit (FLTK). // // Copyright 2016-2018 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // // Do not directly include this file, instead use <FL/android.H>. @@ -159,8 +157,3 @@ enum Fl_Android_Platform_Event */ FL_ANDROID_EVENT_DESTROY }; - - -// -// End of "$Id$". -// diff --git a/FL/filename.H b/FL/filename.H index 5c1bab4d2..d9caa70bb 100644 --- a/FL/filename.H +++ b/FL/filename.H @@ -1,6 +1,4 @@ /* - * "$Id$" - * * Filename header file for the Fast Light Tool Kit (FLTK). * * Copyright 1998-2018 by Bill Spitzak and others. @@ -9,11 +7,11 @@ * the file "COPYING" which should have been included with this file. If this * file is missing or damaged, see the license at: * - * http://www.fltk.org/COPYING.php + * https://www.fltk.org/COPYING.php * - * Please report all bugs and problems on the following page: + * Please see the following page on how to report bugs and issues: * - * http://www.fltk.org/str.php + * https://www.fltk.org/bugs.php */ /** \file @@ -96,8 +94,8 @@ FL_EXPORT void fl_filename_free_list(struct dirent ***l, int n); * system-defined program (added in FLTK 1.1.8) */ -FL_EXPORT int fl_open_uri(const char *uri, char *msg = (char *)0, - int msglen = 0); +FL_EXPORT int fl_open_uri(const char *uri, char *msg = (char *)0, + int msglen = 0); FL_EXPORT void fl_decode_uri(char *uri); @@ -110,7 +108,3 @@ FL_EXPORT void fl_decode_uri(char *uri); #endif /* FL_FILENAME_H */ /** @} */ - -/* - * End of "$Id$". - */ diff --git a/FL/fl_ask.H b/FL/fl_ask.H index 2a9f1b107..84e9ef227 100644 --- a/FL/fl_ask.H +++ b/FL/fl_ask.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Standard dialog header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2020 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// https://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// https://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /** \file fl_ask.H @@ -26,7 +24,7 @@ # include "Enumerations.H" class Fl_Widget; -/** Different system beeps available. +/** Different system beeps available. \sa fl_beep(int) */ enum Fl_Beep { FL_BEEP_DEFAULT = 0, ///< Default beep. @@ -84,7 +82,3 @@ extern FL_EXPORT const char* fl_ok; extern FL_EXPORT const char* fl_cancel; extern FL_EXPORT const char* fl_close; #endif // !fl_ask_H - -// -// End of "$Id$". -// diff --git a/FL/fl_draw.H b/FL/fl_draw.H index 7f1a63451..4b9796acf 100644 --- a/FL/fl_draw.H +++ b/FL/fl_draw.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Portable drawing function header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2020 by Bill Spitzak and others. @@ -11,9 +9,9 @@ // // https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// https://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /** @@ -46,9 +44,9 @@ FL_EXPORT extern char fl_draw_shortcut; then a least-squares algorithm is used to find the closest color. If no valid graphical context (fl_gc) is available, the foreground is not set for the current window. - \param[in] c color + \param[in] c color */ -inline void fl_color(Fl_Color c) {fl_graphics_driver->color(c); } // select indexed color +inline void fl_color(Fl_Color c) {fl_graphics_driver->color(c); } // select indexed color /** for back compatibility - use fl_color(Fl_Color c) instead */ inline void fl_color(int c) {fl_color((Fl_Color)c);} /** @@ -61,7 +59,7 @@ inline void fl_color(int c) {fl_color((Fl_Color)c);} the foreground is not set for the current window. \param[in] r,g,b color components */ -inline void fl_color(uchar r, uchar g, uchar b) {fl_graphics_driver->color(r,g,b); } // select actual color +inline void fl_color(uchar r, uchar g, uchar b) {fl_graphics_driver->color(r,g,b); } // select actual color /** Returns the last fl_color() that was set. This can be used for state save/restore. @@ -94,7 +92,7 @@ inline void fl_push_clip(int x, int y, int w, int h) {fl_graphics_driver->push_c inline void fl_push_no_clip() {fl_graphics_driver->push_no_clip(); } /** Restores the previous clip region. - + You must call fl_pop_clip() once for every time you call fl_push_clip(). Unpredictable results may occur if the clip stack is not empty when you return to FLTK. @@ -137,9 +135,9 @@ inline int fl_not_clipped(int x, int y, int w, int h) { int X = 0, Y = 0, W = 0, H = 0; int ret = fl_clip_box(x(), y(), w(), h(), X, Y, W, H); if (ret == 0) { // entire group is visible (not clipped) - // full drawing code here + // full drawing code here } else { // parts of this group are clipped - // partial drawing code here (uses X, Y, W, and H to test) + // partial drawing code here (uses X, Y, W, and H to test) } } \endcode @@ -171,7 +169,7 @@ inline void fl_restore_clip() { /** Replaces the top of the clipping stack with a clipping region of any shape. - + Fl_Region is an operating system specific type. \note This function is mostly intended for internal use by the FLTK library when drawing to the display. @@ -200,7 +198,7 @@ inline void fl_point(int x, int y) { fl_graphics_driver->point(x,y); } Sets how to draw lines (the "pen"). If you change this it is your responsibility to set it back to the default using \c fl_line_style(0). - + \param[in] style A bitmask which is a bitwise-OR of a line style, a cap style, and a join style. If you don't specify a dash type you will get a solid line. If you don't specify a cap or join type @@ -215,7 +213,7 @@ inline void fl_point(int x, int y) { fl_graphics_driver->point(x,y); } with a zero-length entry. A \c NULL pointer or a zero-length array results in a solid line. Odd array sizes are not supported and result in undefined behavior. - + \note Because of how line styles are implemented on Win32 systems, you \e must set the line style \e after setting the drawing color. If you set the color after the line style you will lose @@ -225,26 +223,26 @@ inline void fl_point(int x, int y) { fl_graphics_driver->point(x,y); } */ inline void fl_line_style(int style, int width=0, char* dashes=0) {fl_graphics_driver->line_style(style,width,dashes); } enum { - FL_SOLID = 0, ///< line style: <tt>___________</tt> - FL_DASH = 1, ///< line style: <tt>_ _ _ _ _ _</tt> - FL_DOT = 2, ///< line style: <tt>. . . . . .</tt> - FL_DASHDOT = 3, ///< line style: <tt>_ . _ . _ .</tt> - FL_DASHDOTDOT = 4, ///< line style: <tt>_ . . _ . .</tt> - - FL_CAP_FLAT = 0x100, ///< cap style: end is flat - FL_CAP_ROUND = 0x200, ///< cap style: end is round - FL_CAP_SQUARE = 0x300, ///< cap style: end wraps end point - - FL_JOIN_MITER = 0x1000, ///< join style: line join extends to a point - FL_JOIN_ROUND = 0x2000, ///< join style: line join is rounded - FL_JOIN_BEVEL = 0x3000 ///< join style: line join is tidied + FL_SOLID = 0, ///< line style: <tt>___________</tt> + FL_DASH = 1, ///< line style: <tt>_ _ _ _ _ _</tt> + FL_DOT = 2, ///< line style: <tt>. . . . . .</tt> + FL_DASHDOT = 3, ///< line style: <tt>_ . _ . _ .</tt> + FL_DASHDOTDOT = 4, ///< line style: <tt>_ . . _ . .</tt> + + FL_CAP_FLAT = 0x100, ///< cap style: end is flat + FL_CAP_ROUND = 0x200, ///< cap style: end is round + FL_CAP_SQUARE = 0x300, ///< cap style: end wraps end point + + FL_JOIN_MITER = 0x1000, ///< join style: line join extends to a point + FL_JOIN_ROUND = 0x2000, ///< join style: line join is rounded + FL_JOIN_BEVEL = 0x3000 ///< join style: line join is tidied }; // rectangles tweaked to exactly fill the pixel rectangle: -/** +/** Draws a 1-pixel border \e inside the given bounding box. - This function is meant for quick drawing of simple boxes. The behavior is + This function is meant for quick drawing of simple boxes. The behavior is undefined for line widths that are not 1. */ inline void fl_rect(int x, int y, int w, int h) { fl_graphics_driver->rect(x,y,w,h); } @@ -287,7 +285,7 @@ inline void fl_loop(int x, int y, int x1, int y1, int x2, int y2) {fl_graphics_d /** Outlines a 4-sided polygon with lines */ -inline void fl_loop(int x, int y, int x1, int y1, int x2, int y2, int x3, int y3) +inline void fl_loop(int x, int y, int x1, int y1, int x2, int y2, int x3, int y3) {fl_graphics_driver->loop(x,y,x1,y1,x2,y2,x3,y3); } // filled polygons @@ -298,7 +296,7 @@ inline void fl_polygon(int x, int y, int x1, int y1, int x2, int y2) {fl_graphic /** Fills a 4-sided polygon. The polygon must be convex. */ -inline void fl_polygon(int x, int y, int x1, int y1, int x2, int y2, int x3, int y3) +inline void fl_polygon(int x, int y, int x1, int y1, int x2, int y2, int x3, int y3) { fl_graphics_driver->polygon(x,y,x1,y1,x2,y2,x3,y3); } // draw rectilinear lines, horizontal segment first: @@ -334,21 +332,21 @@ inline void fl_yxline(int x, int y, int y1, int x2, int y3) {fl_graphics_driver- // circular lines and pie slices (code in fl_arci.C): /** Draw ellipse sections using integer coordinates. - + These functions match the rather limited circle drawing code provided by X and Windows. The advantage over using fl_arc with floating point coordinates is that they are faster because they often use the hardware, and they draw much nicer small circles, since the small sizes are often hard-coded bitmaps. - + If a complete circle is drawn it will fit inside the passed bounding box. The two angles are measured in degrees counter-clockwise from 3 o'clock and are the starting and ending angle of the arc, \p a2 must be greater or equal to \p a1. - + fl_arc() draws a series of lines to approximate the arc. Notice that the integer version of fl_arc() has a different number of arguments than the double version fl_arc(double x, double y, double r, double start, double end) - + \param[in] x,y,w,h bounding box of complete circle \param[in] a1,a2 start and end angles of arc measured in degrees counter-clockwise from 3 o'clock. \p a2 must be greater @@ -360,11 +358,11 @@ inline void fl_yxline(int x, int y, int y1, int x2, int y3) {fl_graphics_driver- inline void fl_arc(int x, int y, int w, int h, double a1, double a2) {fl_graphics_driver->arc(x,y,w,h,a1,a2); } /** Draw filled ellipse sections using integer coordinates. - + Like fl_arc(), but fl_pie() draws a filled-in pie slice. This slice may extend outside the line drawn by fl_arc(); to avoid this use w - 1 and h - 1. - + \param[in] x,y,w,h bounding box of complete circle \param[in] a1,a2 start and end angles of arc measured in degrees counter-clockwise from 3 o'clock. \p a2 must be greater @@ -379,7 +377,7 @@ FL_EXPORT void fl_chord(int x, int y, int w, int h, double a1, double a2); // ny // scalable drawing code (code in fl_vertex.C and fl_arc.C): /** - Saves the current transformation matrix on the stack. + Saves the current transformation matrix on the stack. The maximum depth of the stack is 32. */ inline void fl_push_matrix() { fl_graphics_driver->push_matrix(); } @@ -413,12 +411,12 @@ inline void fl_translate(double x, double y) { fl_graphics_driver->translate(x, inline void fl_rotate(double d) { fl_graphics_driver->rotate(d); } /** Concatenates another transformation onto the current one. - + \param[in] a,b,c,d,x,y transformation matrix elements such that <tt> X' = aX + cY + x </tt> and <tt> Y' = bX +dY + y </tt> */ -inline void fl_mult_matrix(double a, double b, double c, double d, double x,double y) - { fl_graphics_driver->mult_matrix(a, b, c, d, x, y); } +inline void fl_mult_matrix(double a, double b, double c, double d, double x,double y) + { fl_graphics_driver->mult_matrix(a, b, c, d, x, y); } /** Starts drawing a list of points. Points are added to the list with fl_vertex() */ @@ -482,7 +480,7 @@ inline void fl_curve(double X0, double Y0, double X1, double Y1, double X2, doub inline void fl_arc(double x, double y, double r, double start, double end) {fl_graphics_driver->arc(x,y,r,start,end); } /** fl_circle(x,y,r) is equivalent to fl_arc(x,y,r,0,360), but may be faster. - + It must be the \e only thing in the path: if you want a circle as part of a complex polygon you must use fl_arc() \param[in] x,y,r center and radius of circle @@ -506,13 +504,13 @@ inline void fl_end_loop() {fl_graphics_driver->end_loop(); } inline void fl_end_polygon() {fl_graphics_driver->end_polygon(); } /** Starts drawing a complex filled polygon. - + The polygon may be concave, may have holes in it, or may be several disconnected pieces. Call fl_gap() to separate loops of the path. - + To outline the polygon, use fl_begin_loop() and replace each fl_gap() with fl_end_loop();fl_begin_loop() pairs. - + \note For portability, you should only draw polygons that appear the same whether "even/odd" or "non-zero" winding rules are used to fill them. @@ -521,7 +519,7 @@ inline void fl_end_polygon() {fl_graphics_driver->end_polygon(); } inline void fl_begin_complex_polygon() {fl_graphics_driver->begin_complex_polygon(); } /** Call fl_gap() to separate loops of the path. - + It is unnecessary but harmless to call fl_gap() before the first vertex, after the last vertex, or several times in a row. */ @@ -558,8 +556,8 @@ inline double fl_transform_dy(double x, double y) {return fl_graphics_driver->tr inline void fl_transformed_vertex(double xf, double yf) {fl_graphics_driver->transformed_vertex(xf,yf); } /** Copy a rectangular area of the given offscreen buffer into the current drawing destination. - \param x,y position where to draw the copied rectangle - \param w,h size of the copied rectangle + \param x,y position where to draw the copied rectangle + \param w,h size of the copied rectangle \param pixmap offscreen buffer containing the rectangle to copy \param srcx,srcy origin in offscreen buffer of rectangle to copy */ @@ -620,7 +618,7 @@ inline double fl_width(const char* txt, int n) {return fl_graphics_driver->width \note if a valid fl_gc is NOT found then it uses the first window gc, or the screen gc if no fltk window is available when called. */ inline double fl_width(unsigned int c) {return fl_graphics_driver->width(c);} -/** Determines the minimum pixel dimensions of a nul-terminated string +/** Determines the minimum pixel dimensions of a nul-terminated string using the current fl_font(). Usage: given a string "txt" drawn using fl_draw(txt, x, y) you would determine @@ -717,9 +715,9 @@ inline void fl_draw(const char* str, int n, int x, int y) {fl_graphics_driver->d rotating \p angle degrees counter-clockwise. \note When using X11 (Unix, Linux, Cygwin et al.) this needs Xft to work. - Under plain X11 (w/o Xft) rotated text is not supported by FLTK. - A warning will be issued to stderr at runtime (only once) if you - use this method with an angle other than 0. + Under plain X11 (w/o Xft) rotated text is not supported by FLTK. + A warning will be issued to stderr at runtime (only once) if you + use this method with an angle other than 0. */ inline void fl_draw(int angle, const char* str, int n, int x, int y) {fl_graphics_driver->draw(angle,str,n,x,y); } /** @@ -747,16 +745,16 @@ FL_EXPORT void fl_draw_box(Fl_Boxtype, int x, int y, int w, int h, Fl_Color); Draws an 8-bit per color RGB or luminance image. \param[in] buf points at the "r" data of the top-left pixel. Color data must be in <tt>r,g,b</tt> order. - Luminance data is only one <tt>gray</tt> byte. + Luminance data is only one <tt>gray</tt> byte. \param[in] X,Y position where to put top-left corner of image \param[in] W,H size of the image \param[in] D delta to add to the pointer between pixels. It may be any value greater than or equal to 1, or it can be - negative to flip the image horizontally + negative to flip the image horizontally \param[in] L delta to add to the pointer between lines (if 0 is passed it uses \p W * \p D), and may be larger than - \p W * \p D to crop data, or negative to flip the - image vertically + \p W * \p D to crop data, or negative to flip the + image vertically It is highly recommended that you put the following code before the first <tt>show()</tt> of \e any window in your program to get rid of @@ -893,7 +891,3 @@ FL_EXPORT int fl_add_symbol(const char* name, void (*drawit)(Fl_Color), int scal /** @} */ #endif - -// -// End of "$Id$". -// diff --git a/FL/fl_message.H b/FL/fl_message.H index b83f13c67..5932b76b8 100644 --- a/FL/fl_message.H +++ b/FL/fl_message.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Standard message header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2010 by Bill Spitzak and others. @@ -9,15 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // #include "fl_ask.H" - -// -// End of "$Id$". -// diff --git a/FL/fl_show_colormap.H b/FL/fl_show_colormap.H index 49dfaf0fb..97c93dc21 100644 --- a/FL/fl_show_colormap.H +++ b/FL/fl_show_colormap.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Colormap picker header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2010 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /** \file @@ -43,7 +41,3 @@ FL_EXPORT Fl_Color fl_show_colormap(Fl_Color oldcol); /** @} */ #endif - -// -// End of "$Id$". -// diff --git a/FL/fl_show_input.H b/FL/fl_show_input.H index 622cb22db..217556f0d 100644 --- a/FL/fl_show_input.H +++ b/FL/fl_show_input.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Standard input dialog header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2010 by Bill Spitzak and others. @@ -9,15 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // #include "fl_ask.H" - -// -// End of "$Id$". -// diff --git a/FL/fl_types.h b/FL/fl_types.h index 631c7250b..c571f3dce 100644 --- a/FL/fl_types.h +++ b/FL/fl_types.h @@ -1,6 +1,4 @@ /* - * "$Id$" - * * Simple "C"-style types for the Fast Light Tool Kit (FLTK). * * Copyright 1998-2020 by Bill Spitzak and others. @@ -11,9 +9,9 @@ * * https://www.fltk.org/COPYING.php * - * Please report all bugs and problems on the following page: + * Please see the following page on how to report bugs and issues: * - * https://www.fltk.org/str.php + * https://www.fltk.org/bugs.php */ /** \file @@ -23,8 +21,8 @@ #ifndef FL_TYPES_H #define FL_TYPES_H -/** \name Miscellaneous */ -/*@{*/ /* group: Miscellaneous */ +/** \name Miscellaneous */ +/*@{*/ /* group: Miscellaneous */ /** unsigned char */ typedef unsigned char uchar; @@ -68,10 +66,6 @@ typedef unsigned int Fl_Shortcut; /** 24-bit Unicode character - upper 8 bits are unused */ typedef unsigned int Fl_Char; -/*@}*/ /* group: Miscellaneous */ +/*@}*/ /* group: Miscellaneous */ #endif - -/* - * End of "$Id$". - */ diff --git a/FL/fl_utf8.h b/FL/fl_utf8.h index faa69e7e8..8cf26900a 100644 --- a/FL/fl_utf8.h +++ b/FL/fl_utf8.h @@ -1,6 +1,4 @@ /* - * "$Id$" - * * Author: Jean-Marc Lienher ( http://oksid.ch ) * Copyright 2000-2010 by O'ksi'D. * Copyright 2016-2020 by Bill Spitzak and others. @@ -11,9 +9,9 @@ * * https://www.fltk.org/COPYING.php * - * Please report all bugs and problems on the following page: + * Please see the following page on how to report bugs and issues: * - * https://www.fltk.org/str.php + * https://www.fltk.org/bugs.php */ /* Merged in some functionality from the fltk-2 version. IMM. @@ -218,7 +216,3 @@ FL_EXPORT char fl_make_path( const char *path ); #endif /* _HAVE_FL_UTF8_HDR_ */ - -/* - * End of "$Id$". - */ diff --git a/FL/forms.H b/FL/forms.H index f14be6ab0..7e08b176b 100644 --- a/FL/forms.H +++ b/FL/forms.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Forms emulation header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2011 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // #ifndef __FORMS_H__ @@ -38,116 +36,116 @@ typedef Fl_Window FL_FORM; #define TRUE 1 #endif -#define FL_ON 1 -#define FL_OK 1 -#define FL_VALID 1 -#define FL_PREEMPT 1 -#define FL_AUTO 2 -#define FL_WHEN_NEEDED FL_AUTO -#define FL_OFF 0 -#define FL_NONE 0 -#define FL_CANCEL 0 -#define FL_INVALID 0 -#define FL_IGNORE -1 -//#define FL_CLOSE -2 // this variable is never used in FLTK Forms. It is removed becaus it conflicts with the window FL_CLOSE event - -#define FL_LCOL FL_BLACK -#define FL_COL1 FL_GRAY -#define FL_MCOL FL_LIGHT1 -#define FL_LEFT_BCOL FL_LIGHT3 // 53 is better match -#define FL_TOP_BCOL FL_LIGHT2 // 51 -#define FL_BOTTOM_BCOL FL_DARK2 // 40 -#define FL_RIGHT_BCOL FL_DARK3 // 36 -#define FL_INACTIVE FL_INACTIVE_COLOR -#define FL_INACTIVE_COL FL_INACTIVE_COLOR -#define FL_FREE_COL1 FL_FREE_COLOR -#define FL_FREE_COL2 ((Fl_Color)(FL_FREE_COLOR+1)) -#define FL_FREE_COL3 ((Fl_Color)(FL_FREE_COLOR+2)) -#define FL_FREE_COL4 ((Fl_Color)(FL_FREE_COLOR+3)) -#define FL_FREE_COL5 ((Fl_Color)(FL_FREE_COLOR+4)) -#define FL_FREE_COL6 ((Fl_Color)(FL_FREE_COLOR+5)) -#define FL_FREE_COL7 ((Fl_Color)(FL_FREE_COLOR+6)) -#define FL_FREE_COL8 ((Fl_Color)(FL_FREE_COLOR+7)) -#define FL_FREE_COL9 ((Fl_Color)(FL_FREE_COLOR+8)) -#define FL_FREE_COL10 ((Fl_Color)(FL_FREE_COLOR+9)) -#define FL_FREE_COL11 ((Fl_Color)(FL_FREE_COLOR+10)) -#define FL_FREE_COL12 ((Fl_Color)(FL_FREE_COLOR+11)) -#define FL_FREE_COL13 ((Fl_Color)(FL_FREE_COLOR+12)) -#define FL_FREE_COL14 ((Fl_Color)(FL_FREE_COLOR+13)) -#define FL_FREE_COL15 ((Fl_Color)(FL_FREE_COLOR+14)) -#define FL_FREE_COL16 ((Fl_Color)(FL_FREE_COLOR+15)) -#define FL_TOMATO ((Fl_Color)(131)) -#define FL_INDIANRED ((Fl_Color)(164)) -#define FL_SLATEBLUE ((Fl_Color)(195)) -#define FL_DARKGOLD ((Fl_Color)(84)) -#define FL_PALEGREEN ((Fl_Color)(157)) -#define FL_ORCHID ((Fl_Color)(203)) -#define FL_DARKCYAN ((Fl_Color)(189)) -#define FL_DARKTOMATO ((Fl_Color)(113)) -#define FL_WHEAT ((Fl_Color)(174)) - -#define FL_ALIGN_BESIDE FL_ALIGN_INSIDE - -#define FL_PUP_TOGGLE 2 // FL_MENU_TOGGLE +#define FL_ON 1 +#define FL_OK 1 +#define FL_VALID 1 +#define FL_PREEMPT 1 +#define FL_AUTO 2 +#define FL_WHEN_NEEDED FL_AUTO +#define FL_OFF 0 +#define FL_NONE 0 +#define FL_CANCEL 0 +#define FL_INVALID 0 +#define FL_IGNORE -1 +//#define FL_CLOSE -2 // this variable is never used in FLTK Forms. It is removed becaus it conflicts with the window FL_CLOSE event + +#define FL_LCOL FL_BLACK +#define FL_COL1 FL_GRAY +#define FL_MCOL FL_LIGHT1 +#define FL_LEFT_BCOL FL_LIGHT3 // 53 is better match +#define FL_TOP_BCOL FL_LIGHT2 // 51 +#define FL_BOTTOM_BCOL FL_DARK2 // 40 +#define FL_RIGHT_BCOL FL_DARK3 // 36 +#define FL_INACTIVE FL_INACTIVE_COLOR +#define FL_INACTIVE_COL FL_INACTIVE_COLOR +#define FL_FREE_COL1 FL_FREE_COLOR +#define FL_FREE_COL2 ((Fl_Color)(FL_FREE_COLOR+1)) +#define FL_FREE_COL3 ((Fl_Color)(FL_FREE_COLOR+2)) +#define FL_FREE_COL4 ((Fl_Color)(FL_FREE_COLOR+3)) +#define FL_FREE_COL5 ((Fl_Color)(FL_FREE_COLOR+4)) +#define FL_FREE_COL6 ((Fl_Color)(FL_FREE_COLOR+5)) +#define FL_FREE_COL7 ((Fl_Color)(FL_FREE_COLOR+6)) +#define FL_FREE_COL8 ((Fl_Color)(FL_FREE_COLOR+7)) +#define FL_FREE_COL9 ((Fl_Color)(FL_FREE_COLOR+8)) +#define FL_FREE_COL10 ((Fl_Color)(FL_FREE_COLOR+9)) +#define FL_FREE_COL11 ((Fl_Color)(FL_FREE_COLOR+10)) +#define FL_FREE_COL12 ((Fl_Color)(FL_FREE_COLOR+11)) +#define FL_FREE_COL13 ((Fl_Color)(FL_FREE_COLOR+12)) +#define FL_FREE_COL14 ((Fl_Color)(FL_FREE_COLOR+13)) +#define FL_FREE_COL15 ((Fl_Color)(FL_FREE_COLOR+14)) +#define FL_FREE_COL16 ((Fl_Color)(FL_FREE_COLOR+15)) +#define FL_TOMATO ((Fl_Color)(131)) +#define FL_INDIANRED ((Fl_Color)(164)) +#define FL_SLATEBLUE ((Fl_Color)(195)) +#define FL_DARKGOLD ((Fl_Color)(84)) +#define FL_PALEGREEN ((Fl_Color)(157)) +#define FL_ORCHID ((Fl_Color)(203)) +#define FL_DARKCYAN ((Fl_Color)(189)) +#define FL_DARKTOMATO ((Fl_Color)(113)) +#define FL_WHEAT ((Fl_Color)(174)) + +#define FL_ALIGN_BESIDE FL_ALIGN_INSIDE + +#define FL_PUP_TOGGLE 2 // FL_MENU_TOGGLE #define FL_PUP_INACTIVE 1 // FL_MENU_INACTIVE -#define FL_NO_FRAME FL_NO_BOX -#define FL_ROUNDED3D_UPBOX FL_ROUND_UP_BOX -#define FL_ROUNDED3D_DOWNBOX FL_ROUND_DOWN_BOX -#define FL_OVAL3D_UPBOX FL_ROUND_UP_BOX -#define FL_OVAL3D_DOWNBOX FL_ROUND_DOWN_BOX - -#define FL_MBUTTON1 1 -#define FL_LEFTMOUSE 1 -#define FL_MBUTTON2 2 -#define FL_MIDDLEMOUSE 2 -#define FL_MBUTTON3 3 -#define FL_RIGHTMOUSE 3 -#define FL_MBUTTON4 4 -#define FL_MBUTTON5 5 +#define FL_NO_FRAME FL_NO_BOX +#define FL_ROUNDED3D_UPBOX FL_ROUND_UP_BOX +#define FL_ROUNDED3D_DOWNBOX FL_ROUND_DOWN_BOX +#define FL_OVAL3D_UPBOX FL_ROUND_UP_BOX +#define FL_OVAL3D_DOWNBOX FL_ROUND_DOWN_BOX + +#define FL_MBUTTON1 1 +#define FL_LEFTMOUSE 1 +#define FL_MBUTTON2 2 +#define FL_MIDDLEMOUSE 2 +#define FL_MBUTTON3 3 +#define FL_RIGHTMOUSE 3 +#define FL_MBUTTON4 4 +#define FL_MBUTTON5 5 #define FL_INVALID_STYLE 255 -#define FL_NORMAL_STYLE FL_HELVETICA -#define FL_BOLD_STYLE FL_HELVETICA_BOLD -#define FL_ITALIC_STYLE FL_HELVETICA_ITALIC +#define FL_NORMAL_STYLE FL_HELVETICA +#define FL_BOLD_STYLE FL_HELVETICA_BOLD +#define FL_ITALIC_STYLE FL_HELVETICA_ITALIC #define FL_BOLDITALIC_STYLE FL_HELVETICA_BOLD_ITALIC -#define FL_FIXED_STYLE FL_COURIER +#define FL_FIXED_STYLE FL_COURIER #define FL_FIXEDBOLD_STYLE FL_COURIER_BOLD #define FL_FIXEDITALIC_STYLE FL_COURIER_ITALIC #define FL_FIXEDBOLDITALIC_STYLE FL_COURIER_BOLD_ITALIC -#define FL_TIMES_STYLE FL_TIMES +#define FL_TIMES_STYLE FL_TIMES #define FL_TIMESBOLD_STYLE FL_TIMES_BOLD #define FL_TIMESITALIC_STYLE FL_TIMES_ITALIC #define FL_TIMESBOLDITALIC_STYLE FL_TIMES_BOLD_ITALIC // hacks to change the labeltype() when passed to fl_set_object_lstyle(): -#define FL_SHADOW_STYLE (FL_SHADOW_LABEL<<8) -#define FL_ENGRAVED_STYLE (FL_ENGRAVED_LABEL<<8) -#define FL_EMBOSSED_STYLE (FL_EMBOSSED_LABEL<<0) +#define FL_SHADOW_STYLE (FL_SHADOW_LABEL<<8) +#define FL_ENGRAVED_STYLE (FL_ENGRAVED_LABEL<<8) +#define FL_EMBOSSED_STYLE (FL_EMBOSSED_LABEL<<0) // size values are different from XForms, match older Forms: -#define FL_TINY_SIZE 8 -#define FL_SMALL_SIZE 11 // 10 -//#define FL_NORMAL_SIZE 14 // 12 -#define FL_MEDIUM_SIZE 18 // 14 -#define FL_LARGE_SIZE 24 // 18 -#define FL_HUGE_SIZE 32 // 24 -#define FL_DEFAULT_SIZE FL_SMALL_SIZE -#define FL_TINY_FONT FL_TINY_SIZE -#define FL_SMALL_FONT FL_SMALL_SIZE -#define FL_NORMAL_FONT FL_NORMAL_SIZE -#define FL_MEDIUM_FONT FL_MEDIUM_SIZE -#define FL_LARGE_FONT FL_LARGE_SIZE -#define FL_HUGE_FONT FL_HUGE_SIZE -#define FL_NORMAL_FONT1 FL_SMALL_FONT -#define FL_NORMAL_FONT2 FL_NORMAL_FONT -#define FL_DEFAULT_FONT FL_SMALL_FONT - -#define FL_RETURN_END_CHANGED FL_WHEN_RELEASE -#define FL_RETURN_CHANGED FL_WHEN_CHANGED -#define FL_RETURN_END FL_WHEN_RELEASE_ALWAYS -#define FL_RETURN_ALWAYS (FL_WHEN_CHANGED|FL_WHEN_NOT_CHANGED) - -#define FL_BOUND_WIDTH 3 +#define FL_TINY_SIZE 8 +#define FL_SMALL_SIZE 11 // 10 +//#define FL_NORMAL_SIZE 14 // 12 +#define FL_MEDIUM_SIZE 18 // 14 +#define FL_LARGE_SIZE 24 // 18 +#define FL_HUGE_SIZE 32 // 24 +#define FL_DEFAULT_SIZE FL_SMALL_SIZE +#define FL_TINY_FONT FL_TINY_SIZE +#define FL_SMALL_FONT FL_SMALL_SIZE +#define FL_NORMAL_FONT FL_NORMAL_SIZE +#define FL_MEDIUM_FONT FL_MEDIUM_SIZE +#define FL_LARGE_FONT FL_LARGE_SIZE +#define FL_HUGE_FONT FL_HUGE_SIZE +#define FL_NORMAL_FONT1 FL_SMALL_FONT +#define FL_NORMAL_FONT2 FL_NORMAL_FONT +#define FL_DEFAULT_FONT FL_SMALL_FONT + +#define FL_RETURN_END_CHANGED FL_WHEN_RELEASE +#define FL_RETURN_CHANGED FL_WHEN_CHANGED +#define FL_RETURN_END FL_WHEN_RELEASE_ALWAYS +#define FL_RETURN_ALWAYS (FL_WHEN_CHANGED|FL_WHEN_NOT_CHANGED) + +#define FL_BOUND_WIDTH 3 typedef int FL_Coord; typedef int FL_COLOR; @@ -276,31 +274,31 @@ inline void fl_set_form_geometry(Fl_Window* f,int x,int y,int w,int h) { inline void fl_adjust_form_size(Fl_Window*) {} FL_EXPORT void fl_show_form(Fl_Window* f,int p,int b,const char* n); -enum { // "p" argument values: - FL_PLACE_FREE = 0, // make resizable - FL_PLACE_MOUSE = 1, // mouse centered on form - FL_PLACE_CENTER = 2, // center of the screen +enum { // "p" argument values: + FL_PLACE_FREE = 0, // make resizable + FL_PLACE_MOUSE = 1, // mouse centered on form + FL_PLACE_CENTER = 2, // center of the screen FL_PLACE_POSITION = 4,// fixed position, resizable - FL_PLACE_SIZE = 8, // fixed size, normal fltk behavior + FL_PLACE_SIZE = 8, // fixed size, normal fltk behavior FL_PLACE_GEOMETRY =16,// fixed size and position - FL_PLACE_ASPECT = 32, // keep aspect ratio (ignored) + FL_PLACE_ASPECT = 32, // keep aspect ratio (ignored) FL_PLACE_FULLSCREEN=64,// fill screen FL_PLACE_HOTSPOT = 128,// enables hotspot FL_PLACE_ICONIC = 256,// iconic (ignored) - FL_FREE_SIZE=(1<<14), // force resizable - FL_FIX_SIZE =(1<<15) // force off resizable + FL_FREE_SIZE=(1<<14), // force resizable + FL_FIX_SIZE =(1<<15) // force off resizable }; #define FL_PLACE_FREE_CENTER (FL_PLACE_CENTER|FL_FREE_SIZE) #define FL_PLACE_CENTERFREE (FL_PLACE_CENTER|FL_FREE_SIZE) -enum { // "b" arguement values: +enum { // "b" arguement values: FL_NOBORDER = 0, FL_FULLBORDER, FL_TRANSIENT -//FL_MODAL = (1<<8) // not implemented yet in Forms +//FL_MODAL = (1<<8) // not implemented yet in Forms }; inline void fl_set_form_hotspot(Fl_Window* w,int x,int y) {w->hotspot(x,y);} inline void fl_set_form_hotobject(Fl_Window* w, Fl_Widget* o) {w->hotspot(o);} -extern FL_EXPORT char fl_flip; // in forms.C +extern FL_EXPORT char fl_flip; // in forms.C inline void fl_flip_yorigin() {fl_flip = 1;} #define fl_prepare_form_window fl_show_form @@ -346,8 +344,8 @@ inline void fl_drw_frame(Fl_Boxtype b,int x,int y,int w,int h,Fl_Color bgc,int=3 fl_draw_box(b,x,y,w,h,bgc);} inline void fl_drw_text(Fl_Align align, int x, int y, int w, int h, - Fl_Color fgcolor, int size, Fl_Font style, - const char* s) { + Fl_Color fgcolor, int size, Fl_Font style, + const char* s) { fl_font(style,size); fl_color(fgcolor); fl_draw(s,x,y,w,h,align); @@ -355,8 +353,8 @@ inline void fl_drw_text(Fl_Align align, int x, int y, int w, int h, // this does not work except for CENTER... inline void fl_drw_text_beside(Fl_Align align, int x, int y, int w, int h, - Fl_Color fgcolor, int size, Fl_Font style, - const char* s) { + Fl_Color fgcolor, int size, Fl_Font style, + const char* s) { fl_font(style,size); fl_color(fgcolor); fl_draw(s,x,y,w,h,align); @@ -465,13 +463,13 @@ inline int fl_isdisplayed_browser_line(Fl_Widget* o, int n) { #include "Fl_Button.H" -#define FL_NORMAL_BUTTON 0 -#define FL_TOUCH_BUTTON 4 -#define FL_INOUT_BUTTON 5 -#define FL_RETURN_BUTTON 6 -#define FL_HIDDEN_RET_BUTTON 7 -#define FL_PUSH_BUTTON FL_TOGGLE_BUTTON -#define FL_MENU_BUTTON 9 +#define FL_NORMAL_BUTTON 0 +#define FL_TOUCH_BUTTON 4 +#define FL_INOUT_BUTTON 5 +#define FL_RETURN_BUTTON 6 +#define FL_HIDDEN_RET_BUTTON 7 +#define FL_PUSH_BUTTON FL_TOGGLE_BUTTON +#define FL_MENU_BUTTON 9 FL_EXPORT Fl_Button* fl_add_button(uchar t,int x,int y,int w,int h,const char* l); inline int fl_get_button(Fl_Widget* b) {return ((Fl_Button*)b)->value();} @@ -528,9 +526,9 @@ inline void fl_set_chart_lcolor(Fl_Widget* o, Fl_Color v) { #include "Fl_Choice.H" -#define FL_NORMAL_CHOICE 0 -#define FL_NORMAL_CHOICE2 0 -#define FL_DROPLIST_CHOICE 0 +#define FL_NORMAL_CHOICE 0 +#define FL_NORMAL_CHOICE2 0 +#define FL_DROPLIST_CHOICE 0 forms_constructor(Fl_Choice, fl_add_choice) inline void fl_clear_choice(Fl_Widget* o) { @@ -631,7 +629,7 @@ inline Fl_Widget* fl_add_labelframe(Fl_Boxtype i,int x,int y,int w,int h,const c #include "Fl_Free.H" inline Fl_Free* fl_add_free(int t,double x,double y,double w,double h,const char* l, - FL_HANDLEPTR hdl) { + FL_HANDLEPTR hdl) { return (Fl_Free*)(fl_add_new( new Fl_Free(t,int(x),int(y),int(w),int(h),l,hdl))); } @@ -657,7 +655,7 @@ FL_EXPORT int fl_show_choice( inline void fl_set_goodies_font(Fl_Font a, Fl_Fontsize b) {fl_message_font(a,b);} #define fl_show_messages fl_message inline int fl_show_choices(const char* c,int n,const char* b1,const char* b2, - const char* b3, int) { + const char* b3, int) { return fl_show_choice(0,c,0,n,b1,b2,b3); } @@ -667,10 +665,10 @@ inline int do_matching(char* a, const char* b) {return fl_filename_match(a,b);} // Forms-compatible file chooser (implementation in fselect.C): FL_EXPORT char* fl_show_file_selector(const char* message,const char* dir, - const char* pat,const char* fname); -FL_EXPORT char* fl_get_directory(); -FL_EXPORT char* fl_get_pattern(); -FL_EXPORT char* fl_get_filename(); + const char* pat,const char* fname); +FL_EXPORT char* fl_get_directory(); +FL_EXPORT char* fl_get_pattern(); +FL_EXPORT char* fl_get_filename(); #include "Fl_Input.H" forms_constructor(Fl_Input, fl_add_input) @@ -705,9 +703,9 @@ inline const char* fl_get_input(Fl_Widget* o) {return ((Fl_Input*)o)->value();} #include "Fl_Menu_Button.H" // types are not implemented, they all act like FL_PUSH_MENU: -#define FL_TOUCH_MENU 0 -#define FL_PUSH_MENU 1 -#define FL_PULLDOWN_MENU 2 +#define FL_TOUCH_MENU 0 +#define FL_PUSH_MENU 1 +#define FL_PULLDOWN_MENU 2 forms_constructor(Fl_Menu_Button, fl_add_menu) inline void fl_clear_menu(Fl_Widget* o) { @@ -739,7 +737,7 @@ inline const char* fl_get_menu_text(Fl_Widget* o) { return ((Fl_Menu_Button*)o)->text();} #include "Fl_Positioner.H" -#define FL_NORMAL_POSITIONER 0 +#define FL_NORMAL_POSITIONER 0 forms_constructor(Fl_Positioner, fl_add_positioner) inline void fl_set_positioner_xvalue(Fl_Widget* o, double v) { ((Fl_Positioner*)o)->xvalue(v);} @@ -807,7 +805,7 @@ protected: void draw(); public: Fl_FormsText(Fl_Boxtype b, int X, int Y, int W, int H, const char* l=0) - : Fl_Widget(X,Y,W,H,l) {box(b); align(FL_ALIGN_LEFT);} + : Fl_Widget(X,Y,W,H,l) {box(b); align(FL_ALIGN_LEFT);} }; #define FL_NORMAL_TEXT FL_NO_BOX forms_constructorb(Fl_FormsText, fl_add_text) @@ -829,8 +827,4 @@ void FL_EXPORT fl_gettime(long* sec, long* usec); inline int fl_double_click() {return Fl::event_clicks();} inline void fl_draw() {Fl::flush();} -#endif /* define __FORMS_H__ */ - -// -// End of "$Id$". -// +#endif /* define __FORMS_H__ */ @@ -1,6 +1,4 @@ // -// "$Id$" -// // OpenGL header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2018 by Bill Spitzak and others. @@ -16,11 +14,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /** @@ -97,7 +95,3 @@ FL_EXPORT int gl_texture_pile_height(); FL_EXPORT void gl_draw_image(const uchar *, int x,int y,int w,int h, int d=3, int ld=0); #endif // !FL_gl_H - -// -// End of "$Id$". -// diff --git a/FL/gl2opengl.h b/FL/gl2opengl.h index b89614e0f..5ba1fef20 100644 --- a/FL/gl2opengl.h +++ b/FL/gl2opengl.h @@ -1,8 +1,8 @@ -/* gl.h +/* gl.h - GL to OpenGL translator. - If you include this, you might be able to port old GL programs. - There are also much better emulators available on the net. + GL to OpenGL translator. + If you include this, you might be able to port old GL programs. + There are also much better emulators available on the net. */ diff --git a/FL/gl_draw.H b/FL/gl_draw.H index 52c57fd4a..dbd17fd58 100644 --- a/FL/gl_draw.H +++ b/FL/gl_draw.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // OpenGL header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2010 by Bill Spitzak and others. @@ -9,18 +7,13 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // #include "gl.h" extern FL_EXPORT void gl_remove_displaylist_fonts(); - - -// -// End of "$Id$". -// @@ -1,6 +1,4 @@ // -// "$Id$" -// // GLu header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2010 by Bill Spitzak and others. @@ -16,11 +14,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // #ifndef FL_glu_H @@ -45,7 +43,3 @@ # endif #endif // !FL_glu_H - -// -// End of "$Id$". -// @@ -1,6 +1,4 @@ // -// "$Id$" -// // GLUT emulation header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2015 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // // Emulation of GLUT using fltk. @@ -37,7 +35,7 @@ # include "Fl.H" # include "Fl_Gl_Window.H" -/** +/** GLUT is emulated using this window class and these static variables (plus several more static variables hidden in glut_compatibility.cxx): */ @@ -67,8 +65,8 @@ public: // so the inline functions work ~Fl_Glut_Window(); }; -extern FL_EXPORT Fl_Glut_Window *glut_window; // the current window -extern FL_EXPORT int glut_menu; // the current menu +extern FL_EXPORT Fl_Glut_Window *glut_window; // the current window +extern FL_EXPORT int glut_menu; // the current menu // function pointers that are not per-window: extern FL_EXPORT void (*glut_idle_function)(); @@ -83,18 +81,18 @@ FL_EXPORT void glutInit(int *argcp, char **argv); // creates first window FL_EXPORT void glutInitDisplayMode(unsigned int mode); // the FL_ symbols have the same value as the GLUT ones: -# define GLUT_RGB FL_RGB -# define GLUT_RGBA FL_RGB -# define GLUT_INDEX FL_INDEX -# define GLUT_SINGLE FL_SINGLE -# define GLUT_DOUBLE FL_DOUBLE -# define GLUT_ACCUM FL_ACCUM -# define GLUT_ALPHA FL_ALPHA -# define GLUT_DEPTH FL_DEPTH -# define GLUT_STENCIL FL_STENCIL +# define GLUT_RGB FL_RGB +# define GLUT_RGBA FL_RGB +# define GLUT_INDEX FL_INDEX +# define GLUT_SINGLE FL_SINGLE +# define GLUT_DOUBLE FL_DOUBLE +# define GLUT_ACCUM FL_ACCUM +# define GLUT_ALPHA FL_ALPHA +# define GLUT_DEPTH FL_DEPTH +# define GLUT_STENCIL FL_STENCIL # define GLUT_MULTISAMPLE FL_MULTISAMPLE -# define GLUT_STEREO FL_STEREO -// # define GLUT_LUMINANCE 512 +# define GLUT_STEREO FL_STEREO +// # define GLUT_LUMINANCE 512 FL_EXPORT void glutInitWindowPosition(int x, int y); @@ -141,29 +139,29 @@ inline void glutFullScreen() {glut_window->fullscreen();} inline void glutSetCursor(Fl_Cursor cursor) {glut_window->cursor(cursor);} // notice that the numeric values are different than glut: -# define GLUT_CURSOR_RIGHT_ARROW ((Fl_Cursor)2) -# define GLUT_CURSOR_LEFT_ARROW ((Fl_Cursor)67) -# define GLUT_CURSOR_INFO FL_CURSOR_HAND -# define GLUT_CURSOR_DESTROY ((Fl_Cursor)45) -# define GLUT_CURSOR_HELP FL_CURSOR_HELP -# define GLUT_CURSOR_CYCLE ((Fl_Cursor)26) -# define GLUT_CURSOR_SPRAY ((Fl_Cursor)63) -# define GLUT_CURSOR_WAIT FL_CURSOR_WAIT -# define GLUT_CURSOR_TEXT FL_CURSOR_INSERT -# define GLUT_CURSOR_CROSSHAIR FL_CURSOR_CROSS -# define GLUT_CURSOR_UP_DOWN FL_CURSOR_NS -# define GLUT_CURSOR_LEFT_RIGHT FL_CURSOR_WE -# define GLUT_CURSOR_TOP_SIDE FL_CURSOR_N -# define GLUT_CURSOR_BOTTOM_SIDE FL_CURSOR_S -# define GLUT_CURSOR_LEFT_SIDE FL_CURSOR_W -# define GLUT_CURSOR_RIGHT_SIDE FL_CURSOR_E -# define GLUT_CURSOR_TOP_LEFT_CORNER FL_CURSOR_NW -# define GLUT_CURSOR_TOP_RIGHT_CORNER FL_CURSOR_NE -# define GLUT_CURSOR_BOTTOM_RIGHT_CORNER FL_CURSOR_SE -# define GLUT_CURSOR_BOTTOM_LEFT_CORNER FL_CURSOR_SW -# define GLUT_CURSOR_INHERIT FL_CURSOR_DEFAULT -# define GLUT_CURSOR_NONE FL_CURSOR_NONE -# define GLUT_CURSOR_FULL_CROSSHAIR FL_CURSOR_CROSS +# define GLUT_CURSOR_RIGHT_ARROW ((Fl_Cursor)2) +# define GLUT_CURSOR_LEFT_ARROW ((Fl_Cursor)67) +# define GLUT_CURSOR_INFO FL_CURSOR_HAND +# define GLUT_CURSOR_DESTROY ((Fl_Cursor)45) +# define GLUT_CURSOR_HELP FL_CURSOR_HELP +# define GLUT_CURSOR_CYCLE ((Fl_Cursor)26) +# define GLUT_CURSOR_SPRAY ((Fl_Cursor)63) +# define GLUT_CURSOR_WAIT FL_CURSOR_WAIT +# define GLUT_CURSOR_TEXT FL_CURSOR_INSERT +# define GLUT_CURSOR_CROSSHAIR FL_CURSOR_CROSS +# define GLUT_CURSOR_UP_DOWN FL_CURSOR_NS +# define GLUT_CURSOR_LEFT_RIGHT FL_CURSOR_WE +# define GLUT_CURSOR_TOP_SIDE FL_CURSOR_N +# define GLUT_CURSOR_BOTTOM_SIDE FL_CURSOR_S +# define GLUT_CURSOR_LEFT_SIDE FL_CURSOR_W +# define GLUT_CURSOR_RIGHT_SIDE FL_CURSOR_E +# define GLUT_CURSOR_TOP_LEFT_CORNER FL_CURSOR_NW +# define GLUT_CURSOR_TOP_RIGHT_CORNER FL_CURSOR_NE +# define GLUT_CURSOR_BOTTOM_RIGHT_CORNER FL_CURSOR_SE +# define GLUT_CURSOR_BOTTOM_LEFT_CORNER FL_CURSOR_SW +# define GLUT_CURSOR_INHERIT FL_CURSOR_DEFAULT +# define GLUT_CURSOR_NONE FL_CURSOR_NONE +# define GLUT_CURSOR_FULL_CROSSHAIR FL_CURSOR_CROSS inline void glutWarpPointer(int, int) { /* do nothing */ } @@ -212,11 +210,11 @@ inline void glutKeyboardFunc(void (*f)(uchar key, int x, int y)) { inline void glutMouseFunc(void (*f)(int b, int state, int x, int y)) { glut_window->mouse = f;} -# define GLUT_LEFT_BUTTON 0 -# define GLUT_MIDDLE_BUTTON 1 -# define GLUT_RIGHT_BUTTON 2 -# define GLUT_DOWN 0 -# define GLUT_UP 1 +# define GLUT_LEFT_BUTTON 0 +# define GLUT_MIDDLE_BUTTON 1 +# define GLUT_RIGHT_BUTTON 2 +# define GLUT_DOWN 0 +# define GLUT_UP 1 inline void glutMotionFunc(void (*f)(int x, int y)) {glut_window->motion= f;} @@ -244,28 +242,28 @@ enum {GLUT_MENU_NOT_IN_USE, GLUT_MENU_IN_USE}; inline void glutSpecialFunc(void (*f)(int key, int x, int y)) { glut_window->special = f;} -# define GLUT_KEY_F1 1 -# define GLUT_KEY_F2 2 -# define GLUT_KEY_F3 3 -# define GLUT_KEY_F4 4 -# define GLUT_KEY_F5 5 -# define GLUT_KEY_F6 6 -# define GLUT_KEY_F7 7 -# define GLUT_KEY_F8 8 -# define GLUT_KEY_F9 9 -# define GLUT_KEY_F10 10 -# define GLUT_KEY_F11 11 -# define GLUT_KEY_F12 12 +# define GLUT_KEY_F1 1 +# define GLUT_KEY_F2 2 +# define GLUT_KEY_F3 3 +# define GLUT_KEY_F4 4 +# define GLUT_KEY_F5 5 +# define GLUT_KEY_F6 6 +# define GLUT_KEY_F7 7 +# define GLUT_KEY_F8 8 +# define GLUT_KEY_F9 9 +# define GLUT_KEY_F10 10 +# define GLUT_KEY_F11 11 +# define GLUT_KEY_F12 12 // WARNING: Different values than GLUT uses: -# define GLUT_KEY_LEFT FL_Left -# define GLUT_KEY_UP FL_Up -# define GLUT_KEY_RIGHT FL_Right -# define GLUT_KEY_DOWN FL_Down -# define GLUT_KEY_PAGE_UP FL_Page_Up -# define GLUT_KEY_PAGE_DOWN FL_Page_Down -# define GLUT_KEY_HOME FL_Home -# define GLUT_KEY_END FL_End -# define GLUT_KEY_INSERT FL_Insert +# define GLUT_KEY_LEFT FL_Left +# define GLUT_KEY_UP FL_Up +# define GLUT_KEY_RIGHT FL_Right +# define GLUT_KEY_DOWN FL_Down +# define GLUT_KEY_PAGE_UP FL_Page_Up +# define GLUT_KEY_PAGE_DOWN FL_Page_Down +# define GLUT_KEY_HOME FL_Home +# define GLUT_KEY_END FL_End +# define GLUT_KEY_INSERT FL_Insert //inline void glutSpaceballMotionFunc(void (*)(int x, int y, int z)); @@ -286,14 +284,14 @@ inline void glutOverlayDisplayFunc(void (*f)()) { //inline void glutWindowStatusFunc(void (*)(int state)); //enum {GLUT_HIDDEN, GLUT_FULLY_RETAINED, GLUT_PARTIALLY_RETAINED, -// GLUT_FULLY_COVERED}; +// GLUT_FULLY_COVERED}; //inline void glutSetColor(int, GLfloat red, GLfloat green, GLfloat blue); //inline GLfloat glutGetColor(int ndx, int component); -//#define GLUT_RED 0 -//#define GLUT_GREEN 1 -//#define GLUT_BLUE 2 +//#define GLUT_RED 0 +//#define GLUT_GREEN 1 +//#define GLUT_BLUE 2 //inline void glutCopyColormap(int win); @@ -325,36 +323,36 @@ enum { //GLUT_ELAPSED_TIME, }; -# define GLUT_WINDOW_STENCIL_SIZE GL_STENCIL_BITS -# define GLUT_WINDOW_DEPTH_SIZE GL_DEPTH_BITS -# define GLUT_WINDOW_RED_SIZE GL_RED_BITS -# define GLUT_WINDOW_GREEN_SIZE GL_GREEN_BITS -# define GLUT_WINDOW_BLUE_SIZE GL_BLUE_BITS -# define GLUT_WINDOW_ALPHA_SIZE GL_ALPHA_BITS -# define GLUT_WINDOW_ACCUM_RED_SIZE GL_ACCUM_RED_BITS -# define GLUT_WINDOW_ACCUM_GREEN_SIZE GL_ACCUM_GREEN_BITS -# define GLUT_WINDOW_ACCUM_BLUE_SIZE GL_ACCUM_BLUE_BITS -# define GLUT_WINDOW_ACCUM_ALPHA_SIZE GL_ACCUM_ALPHA_BITS -# define GLUT_WINDOW_DOUBLEBUFFER GL_DOUBLEBUFFER -# define GLUT_WINDOW_RGBA GL_RGBA -# define GLUT_WINDOW_COLORMAP_SIZE GL_INDEX_BITS +# define GLUT_WINDOW_STENCIL_SIZE GL_STENCIL_BITS +# define GLUT_WINDOW_DEPTH_SIZE GL_DEPTH_BITS +# define GLUT_WINDOW_RED_SIZE GL_RED_BITS +# define GLUT_WINDOW_GREEN_SIZE GL_GREEN_BITS +# define GLUT_WINDOW_BLUE_SIZE GL_BLUE_BITS +# define GLUT_WINDOW_ALPHA_SIZE GL_ALPHA_BITS +# define GLUT_WINDOW_ACCUM_RED_SIZE GL_ACCUM_RED_BITS +# define GLUT_WINDOW_ACCUM_GREEN_SIZE GL_ACCUM_GREEN_BITS +# define GLUT_WINDOW_ACCUM_BLUE_SIZE GL_ACCUM_BLUE_BITS +# define GLUT_WINDOW_ACCUM_ALPHA_SIZE GL_ACCUM_ALPHA_BITS +# define GLUT_WINDOW_DOUBLEBUFFER GL_DOUBLEBUFFER +# define GLUT_WINDOW_RGBA GL_RGBA +# define GLUT_WINDOW_COLORMAP_SIZE GL_INDEX_BITS # ifdef GL_SAMPLES_SGIS -# define GLUT_WINDOW_NUM_SAMPLES GL_SAMPLES_SGIS +# define GLUT_WINDOW_NUM_SAMPLES GL_SAMPLES_SGIS # else -# define GLUT_WINDOW_NUM_SAMPLES GLUT_RETURN_ZERO +# define GLUT_WINDOW_NUM_SAMPLES GLUT_RETURN_ZERO # endif -# define GLUT_WINDOW_STEREO GL_STEREO - -# define GLUT_HAS_KEYBOARD 600 -# define GLUT_HAS_MOUSE 601 -# define GLUT_HAS_SPACEBALL 602 -# define GLUT_HAS_DIAL_AND_BUTTON_BOX 603 -# define GLUT_HAS_TABLET 604 -# define GLUT_NUM_MOUSE_BUTTONS 605 -# define GLUT_NUM_SPACEBALL_BUTTONS 606 -# define GLUT_NUM_BUTTON_BOX_BUTTONS 607 -# define GLUT_NUM_DIALS 608 -# define GLUT_NUM_TABLET_BUTTONS 609 +# define GLUT_WINDOW_STEREO GL_STEREO + +# define GLUT_HAS_KEYBOARD 600 +# define GLUT_HAS_MOUSE 601 +# define GLUT_HAS_SPACEBALL 602 +# define GLUT_HAS_DIAL_AND_BUTTON_BOX 603 +# define GLUT_HAS_TABLET 604 +# define GLUT_NUM_MOUSE_BUTTONS 605 +# define GLUT_NUM_SPACEBALL_BUTTONS 606 +# define GLUT_NUM_BUTTON_BOX_BUTTONS 607 +# define GLUT_NUM_DIALS 608 +# define GLUT_NUM_TABLET_BUTTONS 609 FL_EXPORT int glutDeviceGet(GLenum type); // WARNING: these values are different than GLUT uses: @@ -364,12 +362,12 @@ FL_EXPORT int glutDeviceGet(GLenum type); inline int glutGetModifiers() {return Fl::event_state() & (GLUT_ACTIVE_SHIFT | GLUT_ACTIVE_CTRL | GLUT_ACTIVE_ALT);} FL_EXPORT int glutLayerGet(GLenum); -# define GLUT_OVERLAY_POSSIBLE 800 -//#define GLUT_LAYER_IN_USE 801 -//#define GLUT_HAS_OVERLAY 802 -# define GLUT_TRANSPARENT_INDEX 803 -# define GLUT_NORMAL_DAMAGED 804 -# define GLUT_OVERLAY_DAMAGED 805 +# define GLUT_OVERLAY_POSSIBLE 800 +//#define GLUT_LAYER_IN_USE 801 +//#define GLUT_HAS_OVERLAY 802 +# define GLUT_TRANSPARENT_INDEX 803 +# define GLUT_NORMAL_DAMAGED 804 +# define GLUT_OVERLAY_DAMAGED 805 extern "C" { typedef void (*GLUTproc)(); @@ -378,16 +376,16 @@ typedef void (*GLUTproc)(); FL_EXPORT GLUTproc glutGetProcAddress(const char *procName); //inline int glutVideoResizeGet(GLenum param); -//#define GLUT_VIDEO_RESIZE_POSSIBLE 900 -//#define GLUT_VIDEO_RESIZE_IN_USE 901 -//#define GLUT_VIDEO_RESIZE_X_DELTA 902 -//#define GLUT_VIDEO_RESIZE_Y_DELTA 903 -//#define GLUT_VIDEO_RESIZE_WIDTH_DELTA 904 +//#define GLUT_VIDEO_RESIZE_POSSIBLE 900 +//#define GLUT_VIDEO_RESIZE_IN_USE 901 +//#define GLUT_VIDEO_RESIZE_X_DELTA 902 +//#define GLUT_VIDEO_RESIZE_Y_DELTA 903 +//#define GLUT_VIDEO_RESIZE_WIDTH_DELTA 904 //#define GLUT_VIDEO_RESIZE_HEIGHT_DELTA 905 -//#define GLUT_VIDEO_RESIZE_X 906 -//#define GLUT_VIDEO_RESIZE_Y 907 -//#define GLUT_VIDEO_RESIZE_WIDTH 908 -//#define GLUT_VIDEO_RESIZE_HEIGHT 909 +//#define GLUT_VIDEO_RESIZE_X 906 +//#define GLUT_VIDEO_RESIZE_Y 907 +//#define GLUT_VIDEO_RESIZE_WIDTH 908 +//#define GLUT_VIDEO_RESIZE_HEIGHT 909 //inline void glutSetupVideoResizing(); @@ -438,15 +436,15 @@ struct Fl_Glut_StrokeChar { }; struct Fl_Glut_StrokeFont { - char* Name; // The source font name - int Quantity; // Number of chars in font - GLfloat Height; // Height of the characters + char* Name; // The source font name + int Quantity; // Number of chars in font + GLfloat Height; // Height of the characters const Fl_Glut_StrokeChar** Characters;// The characters mapping }; extern FL_EXPORT Fl_Glut_StrokeFont glutStrokeRoman; extern FL_EXPORT Fl_Glut_StrokeFont glutStrokeMonoRoman; -# define GLUT_STROKE_ROMAN (&glutStrokeRoman) -# define GLUT_STROKE_MONO_ROMAN (&glutStrokeMonoRoman) +# define GLUT_STROKE_ROMAN (&glutStrokeRoman) +# define GLUT_STROKE_MONO_ROMAN (&glutStrokeMonoRoman) FL_EXPORT void glutStrokeCharacter(void *font, int character); FL_EXPORT GLfloat glutStrokeHeight(void *font); @@ -475,7 +473,3 @@ FL_EXPORT void glutWireIcosahedron(); FL_EXPORT void glutSolidIcosahedron(); #endif // !Fl_glut_H - -// -// End of "$Id$". -// @@ -1,6 +1,4 @@ // -// "$Id$" -// // Mac header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2018 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // // Do not directly include this file, instead use <FL/platform.H>. It will @@ -142,7 +140,7 @@ public: /** Localizable text for the "About xxx" application menu item */ static const char *about; /** Localizable text for the "Print Front Window" application menu item. - This menu item won't be displayed if Fl_Mac_App_Menu::print + This menu item won't be displayed if Fl_Mac_App_Menu::print is set to an empty string. */ static const char *print; @@ -166,7 +164,3 @@ public: /** @} */ -// -// End of "$Id$". -// - @@ -1,6 +1,4 @@ // -// "$Id$" -// // Math header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2020 by Bill Spitzak and others. @@ -11,23 +9,23 @@ // // https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// https://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // // Xcode on macOS includes files by recursing down into directories. // This code catches the cycle and directly includes the required file. -#ifdef fl_math_h_cyclic_include +#ifdef fl_math_h_cyclic_include # include "/usr/include/math.h" #endif #ifndef fl_math_h # define fl_math_h -# define fl_math_h_cyclic_include +# define fl_math_h_cyclic_include # include <math.h> -# undef fl_math_h_cyclic_include +# undef fl_math_h_cyclic_include # ifndef M_PI # define M_PI 3.14159265358979323846 @@ -50,8 +48,3 @@ inline double copysign(double a, double b) {return b<0 ? -a : a;} # endif // (_WIN32 || CRAY) && !__MINGW32__ #endif // !fl_math_h - - -// -// End of "$Id$". -// diff --git a/FL/names.h b/FL/names.h index 7b4700fbe..9aaef5490 100644 --- a/FL/names.h +++ b/FL/names.h @@ -1,6 +1,4 @@ // -// "$Id$" -// // Event names header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2016 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // // Thanks to Greg Ercolano for this addition. @@ -32,7 +30,7 @@ \b Example: \code - #include <FL/names.h> // array will be defined here + #include <FL/names.h> // array will be defined here int MyClass::handle(int e) { printf("Event was %s (%d)\n", fl_eventnames[e], e); // ..resulting output might be e.g. "Event was FL_PUSH (1)".. @@ -82,7 +80,7 @@ const char * const fl_eventnames[] = \b Example: \code - #include <FL/names.h> // array will be defined here + #include <FL/names.h> // array will be defined here int MyClass::my_callback(Fl_Widget *w, void*) { int fnum = w->labelfont(); // Resulting output might be e.g. "Label's font is FL_HELVETICA (0)" @@ -115,7 +113,3 @@ const char * const fl_fontnames[] = /** @} */ #endif /* FL_NAMES_H */ - -// -// End of "$Id$". -// diff --git a/FL/platform.H b/FL/platform.H index 834e30f81..7271b1feb 100644 --- a/FL/platform.H +++ b/FL/platform.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Platform header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2020 by Bill Spitzak and others. @@ -11,9 +9,9 @@ // // https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// https://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // // These are FLTK symbols that are necessary or useful for calling @@ -150,7 +148,3 @@ extern FL_EXPORT int fl_parse_color(const char* p, uchar& r, uchar& g, uchar& b) extern FL_EXPORT void fl_open_callback(void (*)(const char *)); #endif // !FL_PLATFORM_H - -// -// End of "$Id$". -// diff --git a/FL/platform_types.h b/FL/platform_types.h index c13448614..9b3fa8431 100644 --- a/FL/platform_types.h +++ b/FL/platform_types.h @@ -1,17 +1,15 @@ /* - * "$Id$" - * * Copyright 2016-2018 by Bill Spitzak and others. * * This library is free software. Distribution and use rights are outlined in * the file "COPYING" which should have been included with this file. If this * file is missing or damaged, see the license at: * - * http://www.fltk.org/COPYING.php + * https://www.fltk.org/COPYING.php * - * Please report all bugs and problems on the following page: + * Please see the following page on how to report bugs and issues: * - * http://www.fltk.org/str.php + * https://www.fltk.org/bugs.php */ /** \file @@ -101,8 +99,8 @@ typedef int FL_SOCKET; #include <sys/stat.h> #include <sys/types.h> #include <dirent.h> -# define FL_COMMAND FL_META -# define FL_CONTROL FL_CTRL +# define FL_COMMAND FL_META +# define FL_CONTROL FL_CTRL #elif defined(_WIN32) typedef struct HBITMAP__ *HBITMAP; @@ -110,7 +108,7 @@ typedef HBITMAP Fl_Offscreen; typedef HBITMAP Fl_Bitmask; typedef struct HRGN__ *Fl_Region; # if defined(_WIN64) && defined(_MSC_VER) -typedef unsigned __int64 FL_SOCKET; /* *FIXME* - FL_SOCKET (see above) */ +typedef unsigned __int64 FL_SOCKET; /* *FIXME* - FL_SOCKET (see above) */ # else typedef int FL_SOCKET; # endif @@ -153,14 +151,10 @@ typedef struct __GLXcontextRec *GLContext; #ifndef __APPLE__ -# define FL_COMMAND FL_CTRL /**< An alias for FL_CTRL on Windows and X11, or FL_META on MacOS X */ -# define FL_CONTROL FL_META /**< An alias for FL_META on Windows and X11, or FL_CTRL on MacOS X */ +# define FL_COMMAND FL_CTRL /**< An alias for FL_CTRL on Windows and X11, or FL_META on MacOS X */ +# define FL_CONTROL FL_META /**< An alias for FL_META on Windows and X11, or FL_CTRL on MacOS X */ #endif #endif /* FL_PLATFORM_TYPES_H */ #endif // FL_DOXYGEN - -/* - * End of "$Id$". - */ diff --git a/FL/win32.H b/FL/win32.H index 94cd44f78..018928d0b 100644 --- a/FL/win32.H +++ b/FL/win32.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Windows system header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2018 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // // Do not directly include this file, instead use <FL/platform.H>. It will @@ -29,7 +27,7 @@ typedef HWND Window; // this part is included only when compiling the FLTK library or if requested explicitly -#if defined(FL_LIBRARY) || defined(FL_INTERNALS) +#if defined(FL_LIBRARY) || defined(FL_INTERNALS) // In some of the distributions, the gcc header files are missing some stuff: #ifndef LPMINMAXINFO @@ -52,9 +50,9 @@ extern FL_EXPORT void fl_save_dc( HWND w, HDC dc); // most recent fl_color() or fl_rgbcolor() points at one of these: extern FL_EXPORT struct Fl_XMap { - COLORREF rgb; // this should be the type the RGB() macro returns - HPEN pen; // pen, 0 if none created yet - int brush; // ref to solid brush, 0 if none created yet + COLORREF rgb; // this should be the type the RGB() macro returns + HPEN pen; // pen, 0 if none created yet + int brush; // ref to solid brush, 0 if none created yet int pwidth; // the width of the pen, if present } *fl_current_xmap; inline COLORREF fl_RGB() {return fl_current_xmap->rgb;} @@ -69,7 +67,3 @@ extern FL_EXPORT HDC fl_GetDC(Window); extern FL_EXPORT HDC fl_makeDC(HBITMAP); #endif // FL_DOXYGEN - -// -// End of "$Id$". -// @@ -1,6 +1,4 @@ // -// "$Id$" -// // *Deprecated* platform header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2018 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // // IMPORTANT: This file is deprecated since FLTK 1.4.0. DO NOT include it. @@ -22,11 +20,7 @@ // Please #include <FL/platform.H> instead if you really need it. See // documentation in FL/platform.H to decide whether you need that file. -#if !defined(Fl_X_H) && !defined(FL_DOXYGEN) +#if !defined(Fl_X_H) && !defined(FL_DOXYGEN) # define Fl_X_H # include <FL/platform.H> #endif // !Fl_X_H - -// -// End of "$Id$". -// |
