From d7b88a3bcc7e76f38ee5799be7722fd5a10781ef Mon Sep 17 00:00:00 2001
From: Michael R Sweet The second form of the constructor sets the box to the specified box type.
-
- The second form of the constructor sets the box to the specified box
+type. Each line in the browser is identified by number. The numbers
-start at one (this is so that zero can be reserved for "no line"
-in the selective browsers). Unless otherwise noted, the methods do
-not check to see if the passed line number is in range and legal. It
-must always be greater than zero and <= size().
-
- Each line contains a null-terminated string of text and a void
-* data pointer. The text string is displayed, the void *
-pointer can be used by the callbacks to reference the object the text
-describes.
-
- The base class does nothing when the user clicks on it. The subclasses
-Fl_Select_Browser,
-Fl_Hold_Browser, and
-Fl_Multi_Browser
-react to user clicks to select lines in the browser and do callbacks.
-
- The base class called
-Fl_Browser_ provides the scrolling and selection
-mechanisms of this and all the subclasses, but the dimensions and
-appearance of each item are determined by the subclass. You can use
-Fl_Browser_ to display information other than text, or text
-that is dynamically produced from your own data structures. If you find
-that loading the browser is a lot of work or is inefficient, you may
-want to make a subclass of Fl_Browser_.
-
- The second form sets the column separator to c. This will only
-have an effect if you also set column_widths().
-
- The second form sets the current array to w. Make sure the last
-entry is zero.
-
- The second form sets the data for line n.
-
- The second form sets the current prefix to c. Set the prefix
-to 0 to disable formatting.
-
- The second form sets the text for line n.
-
- The second form sets the top line in the browser to n.
-
- The second form sets the vertical scrollbar position to p.
-
- Each line in the browser is identified by number. The numbers
+start at one (this is so that zero can be reserved for "no line" in
+the selective browsers). Unless otherwise noted, the methods do not
+check to see if the passed line number is in range and legal. It must
+always be greater than zero and <= size(). Each line contains a null-terminated string of text and a void *
+ data pointer. The text string is displayed, the void *
+ pointer can be used by the callbacks to reference the object the text
+describes. The base class does nothing when the user clicks on it. The
+subclasses
+Fl_Select_Browser,
+Fl_Hold_Browser, and
+Fl_Multi_Browser react to user clicks to select lines in
+the browser and do callbacks. The base class called
+Fl_Browser_ provides the scrolling and selection mechanisms of
+this and all the subclasses, but the dimensions and appearance of each
+item are determined by the subclass. You can use Fl_Browser_
+ to display information other than text, or text that is dynamically
+produced from your own data structures. If you find that loading the
+browser is a lot of work or is inefficient, you may want to make a
+subclass of Fl_Browser_. The second form sets the column separator to c. This will
+only have an effect if you also set column_widths(). The second form sets the current array to w. Make sure the
+last entry is zero. The second form sets the data for line n. The second form sets the current prefix to c. Set the
+prefix to 0 to disable formatting. The second form sets the text for line n. The second form sets the top line in the browser to n. The second form sets the vertical scrollbar position to p. This has been designed so that the subclass has complete control
-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.
-
- A great deal of work has been done so that the "height" of a data
-object does not need to be determined until it is drawn. This is
-useful if actually figuring out the size of an object requires
-accessing image data or doing stat() on a file or doing some
-other slow operation.
-
- The second form sets the default text color to color
-
- The second form sets the default text font to font
-
- The second form sets the default text size to size
-
-
-
+ +----Fl_Browser
+
+
+ This has been designed so that the subclass has complete control
+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. A great deal of work has been done so that the "height" of a data
+object does not need to be determined until it is drawn. This is
+useful if actually figuring out the size of an object requires
+accessing image data or doing stat() on a file or doing some
+other slow operation. The second form sets the default text color to color The second form sets the default text font to font The second form sets the default text size to size Buttons generate callbacks when they are clicked by the user. You
-control exactly when and how by changing the values for type() and
-when().
-
- Buttons can also generate callbacks in response to
-FL_SHORTCUT events. The button can either have an explicit
-shortcut() value or a letter
-shortcut can be indicated in the label() with an '&' character
-before it. For the label shortcut it does not matter if Alt is
-held down, but if you have an input field in the same window, the user
-will have to hold down the Alt key so that the input field does
-not eat the event first as an FL_KEYBOARD event.
-
- The second form sets the down box type. The default value of 0
-causes FLTK to figure out the correct matching down version of
-box().
-
- The second form sets the shortcut key to key. 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 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 other bits indicates
-a "don't care" setting).
-
- Buttons generate callbacks when they are clicked by the user. You
+control exactly when and how by changing the values for type()
+ and when(). Buttons can also generate callbacks in response to FL_SHORTCUT
+ events. The button can either have an explicit
+shortcut() value or a letter shortcut can be indicated in
+the label() with an ''character before it. For the label
+shortcut it does not matter if Alt is held down, but if you have
+an input field in the same window, the user will have to hold down the
+Alt key so that the input field does not eat the event first as an
+FL_KEYBOARD event. The second form sets the down box type. The default value of 0
+causes FLTK to figure out the correct matching down version of box()
+. The second form sets the shortcut key to key. 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 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 other bits indicates a "don't care"
+setting). The second form of autosize sets the auto-sizing property to
-onoff.
-
- The second form of autosize sets the auto-sizing property
+to onoff. The Fl_Check_Button subclass display the "on" state by
-turning on a light, rather than drawing pushed in. The shape of the
-"light" is initially set to FL_DIAMOND_DOWN_BOX. The color of the
-light when on is controlled with selection_color(), which defaults to
-FL_RED.
-
- The Fl_Check_Button subclass display the "on" state by
+turning on a light, rather than drawing pushed in. The shape of the
+"light" is initially set to FL_DIAMOND_DOWN_BOX. The color of the
+light when on is controlled with selection_color(), which
+defaults to FL_RED. The only difference between this and a
-Fl_Menu_Button is that the name of the most recent chosen
-menu item is displayed inside the box, while the label is displayed
-outside the box. However, since the use of this is most often to
-control a single variable rather than do individual callbacks, some of
-the Fl_Menu_Button methods are redescribed here in those terms.
-
- When the user picks an item off the menu the value() is set
-to that item and then the callback is done.
-
- All three mouse buttons pop up the menu. The Forms behavior of the
-first two buttons to increment/decrement the choice is not
-implemented. This could be added with a subclass, however.
-
- The menu will also pop up in response to shortcuts indicated by
-putting a '&' character in the label(). See
-Fl_Button for a description of this.
-
- Typing the shortcut() of any of the items will do exactly
-the same as when you pick the item with the mouse. The '&' character
-in item names are only looked at when the menu is popped up, however.
-
- The constructor sets menu() to NULL. See Fl_Menu_ for the methods to set or change
-the menu.
-
- The only difference between this and a
+Fl_Menu_Button is that the name of the most recent chosen
+menu item is displayed inside the box, while the label is displayed
+outside the box. However, since the use of this is most often to
+control a single variable rather than do individual callbacks, some of
+the Fl_Menu_Button methods are redescribed here in those
+terms. When the user picks an item off the menu the value() is set
+to that item and then the callback is done. All three mouse buttons pop up the menu. The Forms behavior of the
+first two buttons to increment/decrement the choice is not implemented.
+ This could be added with a subclass, however. The menu will also pop up in response to shortcuts indicated by
+putting a ''character in the label(). See
+Fl_Button for a description of this. Typing the shortcut() of any of the items will do exactly
+the same as when you pick the item with the mouse. The ''character in
+item names are only looked at when the menu is popped up, however. The constructor sets menu() to NULL. See
+Fl_Menu_ for the methods to set or change the menu. The third form of value returns the displayed time in seconds
-since the UNIX epoch (January 1, 1970).
-
-
-
+ +----Fl_Clock
+
+
+ The third form of value returns the displayed time in
+seconds since the UNIX epoch (January 1, 1970). It is highly recommended that you put the following code before the
-first show() of any window in your program:
-
- It is highly recommended that you put the following code before the
+first show() of any window in your program: There are five types of free, which determine when the handle
-function is called:
-
- There are five types of free, which determine when the handle
+function is called: An FL_INPUT_FREE accepts FL_FOCUS events. A FL_CONTINUOUS_FREE
-sets a timeout callback 100 times a second and provides a FL_STEP
-event, this has obvious detrimental effects on machine performance.
-FL_ALL_FREE does both. FL_SLEEPING_FREE are deactivated.
-
- An FL_INPUT_FREE accepts FL_FOCUS events. A FL_CONTINUOUS_FREE sets
+a timeout callback 100 times a second and provides a FL_STEP event,
+this has obvious detrimental effects on machine performance.
+FL_ALL_FREE does both. FL_SLEEPING_FREE are deactivated. OpenGL hardware typically provides some overlay bit planes, which
-are very useful for drawing UI controls atop your 3D graphics. If the
-overlay hardware is not provided, FLTK tries to simulate the overlay,
-This works pretty well if your graphics are double buffered, but not
-very well for single-buffered.
-
- The draw() method can only use OpenGL calls. Do not
-attempt to call X, any of the functions in <FL/fl_draw.H>, or
-glX directly. Do not call gl_start() or
-gl_finish().
-
- If double-buffering is enabled in the window, the back and front buffers
-are swapped after this function is completed.
-
- 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 this is a top-level window this will unfortunately also
-cause the 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!
-
- OpenGL hardware typically provides some overlay bit planes, which
+are very useful for drawing UI controls atop your 3D graphics. If the
+overlay hardware is not provided, FLTK tries to simulate the overlay,
+This works pretty well if your graphics are double buffered, but not
+very well for single-buffered. The draw() method can only use OpenGL calls. Do not
+attempt to call X, any of the functions in <FL/fl_draw.H>, or glX
+ directly. Do not call gl_start() or gl_finish(). If double-buffering is enabled in the window, the back and front
+buffers are swapped after this function is completed. 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
+this is a top-level window this will unfortunately also cause the
+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! Both this function and Fl_Gl_Window::draw() should check
-Fl_Gl_Window::valid() and set the same transformation. If you
-don't your code may not work on other systems. Depending on the OS,
-and on whether overlays are real or simulated, the OpenGL context may
-be the same or different between the overlay and main window.
-
-
-
+ Both this function and Fl_Gl_Window::draw() should check
+Fl_Gl_Window::valid() and set the same transformation. If you
+don't your code may not work on other systems. Depending on the OS,
+and on whether overlays are real or simulated, the OpenGL context may
+be the same or different between the overlay and main window. Don't forget to end() the group or window!
-
- In these examples the gray area is the resizable: The resizable may be set to the group itself (this is the default value
-for an Fl_Group, although NULL is the default for an
-Fl_Window), in which case all the contents are resized. If the
-resizable is NULL then all widgets remain a fixed size and
-distance from the top-left corner.
-
- It is possible to achieve any type of resize behavior by using an
-invisible Fl_Box as the resizable and/or by using a hierarchy of
-child Fl_Group's.
-
-
-
+ +----Fl_Pack, Fl_Scroll, Fl_Tabs, Fl_Tile, Fl_Window
+
+
+ Don't forget to end() the group or window! In these examples the gray area is the resizable:
+ The resizable may be set to the group itself (this is the default
+value for an Fl_Group, although NULL is the default
+for an Fl_Window), in which case all the contents are resized.
+If the resizable is NULL then all widgets remain a fixed size
+and distance from the top-left corner. It is possible to achieve any type of resize behavior by using an
+invisible Fl_Box as the resizable and/or by using a hierarchy
+of child Fl_Group's. See Fl_Browser for methods to add
-and remove lines from the browser.
-
- See Fl_Browser for
+methods to add and remove lines from the browser. The second two forms change the text and set the mark and the point
-to the end of it. The string is copied to the internal buffer. Passing
-NULL is the same as "". This returns non-zero if the new
-value is different than the current one. You can use the second
-version to directly set the length if you know it already or want to
-put nul's in the text.
-
- The second two forms change the text and set the mark and the point
+to the end of it. The string is copied to the internal buffer. Passing
+NULL is the same as "". This returns non-zero if the new value is
+different than the current one. You can use the second version to
+directly set the length if you know it already or want to put nul's in
+the text. This can act like any of the subclasses of Fl_Input, by setting
-type() to one of the following values:
-
- This can act like any of the subclasses of Fl_Input, by setting
+type() to one of the following values: Changing these values causes a redraw(). The new values
-are bounds checked. The return value is non-zero if the new position
-is different than the old one. position(n) is the same as
-position(n,n). mark(n) is the same as
-position(position(),n).
-
- Set start and end equal to not delete anything. Set
-insert to NULL to not insert anything.
-
- length must be zero or strlen(insert), this saves
-a tiny bit of time if you happen to already know the length of the
-insertion, or can be used to insert a portion of a string or a string
-containing nul's.
-
- a and b are clamped to the 0..size()
-range, so it is safe to pass any values.
-
- cut() and insert() are just inline functions that
-call replace().
-
- If you want the data to go into the clipboard, do
-Fl_Input_::copy() before calling Fl_Input_::cut(), or
-do Fl_Input_::copy_cuts() afterwards.
-
- Changing these values causes a redraw(). The new values
+are bounds checked. The return value is non-zero if the new position
+is different than the old one. position(n) is the same as
+position(n,n). mark(n) is the same as
+position(position(),n). Set start and end equal to not delete anything.
+ Set insert to NULL to not insert anything. length must be zero or strlen(insert), this saves
+a tiny bit of time if you happen to already know the length of the
+insertion, or can be used to insert a portion of a string or a string
+containing nul's. a and b are clamped to the 0..size()
+ range, so it is safe to pass any values. cut() and insert() are just inline functions that
+call replace(). If you want the data to go into the clipboard, do
+Fl_Input_::copy() before calling Fl_Input_::cut(), or do
+Fl_Input_::copy_cuts() afterwards. The Fl_Light_Button subclass display 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.
-
- The Fl_Light_Button subclass display 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. The class contains a pointer to an array of structures of type
-Fl_Menu_Item.
-These describe the contents of the menu. Usually the array is a large
-initialization constant, but there are methods to build it
-dynamically.
-
- Currently there can be only one global() menu. Setting a new one
-will replace the old one. There is no way to remove the global()
-setting (including destroying the menu).
-
- The second form splits the string at any | characters and then does
-add(s,0,0,0,0) with each section. This is often useful if you
-are just using the value, and is compatable with some Forms programs.
-
- Text is a string of the form "foo/bar/baz", this example will result
-in a submenu called "foo" and one in that called "bar" and and entry
-called "baz". The text is copied to new memory and can be freed. The
-other arguments are copied into the menu item unchanged.
-
- If an item exists already with that name then it is replaced with
-this new one. Otherwise this new one is added to the end of the
-correct menu or submenu. The return value is the offset into the
-array that the new entry was placed at.
-
- No bounds checking is done, the table must be big enough for all the
-entries you plan to add. Don't forget that there is a NULL terminator
-on the end, and the first time a item is added to a submenu three
-items are added (the title and the NULL terminator, as well as the
-actual menu item)
-
- The return value is the index into the array that the entry was put.
-
- The class contains a pointer to an array of structures of type
+Fl_Menu_Item. These describe the contents of the menu.
+ Usually the array is a large initialization constant, but there are
+methods to build it dynamically. Currently there can be only one global()menu. Setting a new
+one will replace the old one. There is no way to remove the
+global() setting (including destroying the menu). The second form splits the string at any | characters and then does
+add(s,0,0,0,0) with each section. This is often useful if you are
+just using the value, and is compatable with some Forms programs. Text is a string of the form "foo/bar/baz", this example will result
+in a submenu called "foo" and one in that called "bar" and and entry
+called "baz". The text is copied to new memory and can be freed. The
+other arguments are copied into the menu item unchanged. If an item exists already with that name then it is replaced with
+this new one. Otherwise this new one is added to the end of the
+correct menu or submenu. The return value is the offset into the array
+that the new entry was placed at. No bounds checking is done, the table must be big enough for all the
+entries you plan to add. Don't forget that there is a NULL
+ terminator on the end, and the first time a item is added to a submenu
+three items are added (the title and the NULL terminator, as
+well as the actual menu item) The return value is the index into the array that the entry was put. The items on the bar and the menus they bring up are defined by a
-single Fl_Menu_Item array. Because a
-Fl_Menu_Item array defines a hierarchy, the top level menu defines the
-items in the menubar, while the submenus define the pull-down menus.
-Sub-sub menus and lower pop up to the right of the submenus.
-
- If there is an item in the top menu that is not a title of a
-submenu, then it acts like a "button" in the menubar. Clicking on
-it will pick it.
-
- When the user picks an item off the menu, the item's callback is
-done with the menubar as the Fl_Widget* argument. If the item
-does not have a callback the menubar's callback is done instead.
-
- Submenus will also pop up in response to shortcuts indicated by
-putting a '&' character in the name field of the menu item. If you
-put a '&' character in a top-level "button" then the shortcut picks
-it. The '&' character in submenus is ignored until the menu is popped
-up.
-
- Typing the shortcut() of any of the menu items will cause callbacks
-exactly the same as when you pick the item with the mouse.
-
- The constructor sets menu() to NULL. See Fl_Menu_ for the methods to set or change
-the menu.
-
- labelsize(), labelfont(), and
-labelcolor() are used to control how the menubar items are
-drawn. They are initialized from the Fl_Menu static
-variables, but you can change them if desired.
-
- label() is ignored unless you change align() to
-put it outside the menubar.
-
- The items on the bar and the menus they bring up are defined by a
+single Fl_Menu_Item
+ array. Because a Fl_Menu_Item array defines a hierarchy, the
+top level menu defines the items in the menubar, while the submenus
+define the pull-down menus. Sub-sub menus and lower pop up to the right
+of the submenus. If there is an item in the top menu that is not a title of a
+submenu, then it acts like a "button" in the menubar. Clicking on it
+will pick it. When the user picks an item off the menu, the item's callback is
+done with the menubar as the Fl_Widget* argument. If the item
+does not have a callback the menubar's callback is done instead. Submenus will also pop up in response to shortcuts indicated by
+putting a ''character in the name field of the menu item. If you put a
+''character in a top-level "button" then the shortcut picks it. The
+''character in submenus is ignored until the menu is popped up. Typing the shortcut() of any of the menu items will cause
+callbacks exactly the same as when you pick the item with the mouse. The constructor sets menu() to NULL. See
+Fl_Menu_ for the methods to set or change the menu. labelsize(), labelfont(), and labelcolor()
+ are used to control how the menubar items are drawn. They are
+initialized from the Fl_Menu static variables, but you can
+change them if desired. label() is ignored unless you change align() to
+put it outside the menubar. 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(),
-see below.
-
- The menu will also pop up in response to shortcuts indicated by
-putting a '&' character in the label().
-
- Typing the shortcut() of any of the menu items will cause
+ +----Fl_Menu_Button
+
+
+ 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()
+, see below. The menu will also pop up in response to shortcuts indicated by
+putting a ''character in the label(). Typing the shortcut() of any of the menu items will cause
callbacks exactly the same as when you pick the item with the mouse.
-The '&' character in menu item names are only looked at when the menu
-is popped up, however.
-
- When the user picks an item off the menu, the item's callback is
-done with the menu_button as the Fl_Widget* argument. If the item
-does not have a callback the menu_button's callback is done instead.
-
- The constructor sets menu() to NULL. See Fl_Menu_ for the methods to set or change
-the menu.
-
- A popup menu button is invisible and does not interfere with any
-events other than the mouse button specified (and any shortcuts). The
-widget can be stretched to cover all your other widgets by putting it last
-in the hierarchy so it is "on top". You can also make several widgets
-covering different areas for context-sensitive popup menus.
-
- The popup menus appear with the cursor pointing at the previously
-selected item. This is a feature. If you don't like it, do
-value(0) after the menu items are picked to forget the current
-item.
-
-
-
+ The ''character in menu item names are only looked at when the menu is
+popped up, however. When the user picks an item off the menu, the item's callback is
+done with the menu_button as the Fl_Widget* argument. If the
+item does not have a callback the menu_button's callback is done
+instead. The constructor sets menu() to NULL. See
+Fl_Menu_ for the methods to set or change the menu. A popup menu button is invisible and does not interfere with any
+events other than the mouse button specified (and any shortcuts). The
+widget can be stretched to cover all your other widgets by putting it
+last in the hierarchy so it is "on top". You can also make several
+widgets covering different areas for context-sensitive popup menus. The popup menus appear with the cursor pointing at the previously
+selected item. This is a feature. If you don't like it, do
+value(0) after the menu items are picked to forget the current
+item. You should use the method functions to access structure members and
-not access them directly to avoid compatibility problems with future
-releases of FLTK.
-
- 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 other bits indicates
-a "don't care" setting).
-
- X,Y is the position of the mouse cursor, relative to the
-window that got the most recent event (usually you can pass
-Fl::event_x() and Fl::event_y() unchanged here).
-
- title is a character string title for the menu. If non-zero
-a small box appears above the menu with the title in it.
-
- The menu is positioned so the cursor is centered over the item
-picked. This will work even if picked is in a submenu.
-If picked is zero or not in the menu item table the menu is
-positioned with the cursor in the top-left corner.
-
- button is a pointer to an Fl_Menu_
-from which the color and boxtypes for the menu are pulled. If NULL
-then defaults are used.
-
- The title and menubar arguments are used internally by
-the Fl_Menu_ widget.
-
- You should use the method functions to access structure members and
+not access them directly to avoid compatibility problems with future
+releases of FLTK. 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 other bits indicates a "don't care"
+setting). X,Y is the position of the mouse cursor, relative to the
+window that got the most recent event (usually you can pass
+Fl::event_x() and Fl::event_y() unchanged here). title is a character string title for the menu. If
+non-zero a small box appears above the menu with the title in it. The menu is positioned so the cursor is centered over the item
+picked. This will work even if picked is in a submenu.
+If picked is zero or not in the menu item table the menu is
+positioned with the cursor in the top-left corner. button is a pointer to an
+Fl_Menu_ from which the color and boxtypes for the menu are
+pulled. If NULL then defaults are used. The title and menubar arguments are used
+internally by the Fl_Menu_ widget. See Fl_Browser for methods to add
-and remove lines from the browser.
-
- See Fl_Browser for
+methods to add and remove lines from the browser. This is far from the nirvana of text editors, and is probably only
-good for small bits of text, 10 lines at most. I think FLTK can be
-used to write a powerful text editor, but it is not going to be a
-built-in feature. Powerful text editors in a toolkit are a big source
-of bloat.
-
- This is far from the nirvana of text editors, and is probably only
+good for small bits of text, 10 lines at most. I think FLTK can be
+used to write a powerful text editor, but it is not going to be a
+built-in feature. Powerful text editors in a toolkit are a big source
+of bloat. There is a single subclass, Fl_Multiline_Output, which allows you to
-display multiple lines of text.
-
- The text may contain any characters except \0, and will correctly
-display anything, using ^X notation for unprintable control characters
-and \nnn notation for unprintable characters with the high bit set. It
-assummes the font can draw any characters in the ISO-Latin1 character
-set.
-
- The second two forms change the text and set the mark and the point
-to the end of it. The string is copied to the internal buffer. Passing
-NULL is the same as "". This returns non-zero if the new
-value is different than the current one. You can use the second
-version to directly set the length if you know it already or want to
-put nul's in the text.
-
- There is a single subclass,
+Fl_Multiline_Output, which allows you to display multiple lines of
+text. The text may contain any characters except \0, and will correctly
+display anything, using ^X notation for unprintable control characters
+and \nnn notation for unprintable characters with the high bit set. It
+assummes the font can draw any characters in the ISO-Latin1 character
+set. The second two forms change the text and set the mark and the point
+to the end of it. The string is copied to the internal buffer. Passing
+NULL is the same as "". This returns non-zero if the new value is
+different than the current one. You can use the second version to
+directly set the length if you know it already or want to put nul's in
+the text. If no hardware support is found the overlay is simulated by drawing
-directly into the on-screen copy of the double-buffered window, and
-"erased" by copying the backbuffer over it again. This means the
-overlay will blink if you change the image in the window.
-
- If no hardware support is found the overlay is simulated by drawing
+directly into the on-screen copy of the double-buffered window, and
+"erased" by copying the backbuffer over it again. This means the
+overlay will blink if you change the image in the window. If type() is FL_HORIZONTAL all the children are resized to the
-height of the Fl_Pack, and are moved next to each other horizontally.
-If type() is not FL_HORIZONTAL then the children are resized to the
-width and are stacked below each other. Then the Fl_Pack resizes
-itself to surround the child widgets.
-
- This widget is needed for the Fl_Tab. In
-addition you may want to put the Fl_Pack inside an
-Fl_Scroll.
-
- If type() is FL_HORIZONTAL all the children are
+resized to the height of the Fl_Pack, and are moved next to
+each other horizontally. If type() is not FL_HORIZONTAL
+ then the children are resized to the width and are stacked below each
+other. Then the Fl_Pack resizes itself to surround the child
+widgets. This widget is needed for the Fl_Tab.
+ In addition you may want to put the Fl_Pack inside an
+Fl_Scroll. The Fl_Round_Button subclass display the "on" state by
-turning on a light, rather than drawing pushed in. The shape of the
-"light" is initially set to FL_ROUND_DOWN_BOX. The color of the
-light when on is controlled with selection_color(), which defaults to
-FL_RED.
-
- The Fl_Round_Button subclass display the "on" state by
+turning on a light, rather than drawing pushed in. The shape of the
+"light" is initially set to FL_ROUND_DOWN_BOX. The color of the light
+when on is controlled with selection_color(), which defaults to
+FL_RED. If all of the child widgets are packed together into a solid
-rectangle then you want to set box() to FL_NO_BOX or
-one of the _FRAME types. This will result in the best output.
-However, if the child widgets are a sparse arrangment you must set
-box() to a real _BOX type. This can result in some
-blinking during redrawing, but that can be solved by using a
-Fl_Double_Window.
-
- This widget can also be used to pan around a single child widget
-"canvas". This child widget should be of your own class, with a
-draw() method that draws the contents. The scrolling is done
-by changing the x() and y() of the widget, so this
-child must use the x() and y() to position it's
-drawing. To speed up drawing it should test fl_clip().
-
- Another very useful child is a single Fl_Pack, which is itself a group that
-packs it's children together and changes size to surround them.
-Filling the Fl_Pack with Fl_Tab
-groups (and then putting normal widgets inside those) gives you a very
-powerful scrolling list of individually-openable panels.
-
- Fluid lets you create these, but you can only lay out objects that
-fit inside the Fl_Scroll without scrolling. Be sure to leave
-space for the scrollbars, as Fluid won't show these either.
-
- You cannot use Fl_Window as a child of this since the
-clipping is not conveyed to it when drawn, and it will draw over the
-scrollbars and neighboring objects.
-
- If all of the child widgets are packed together into a solid
+rectangle then you want to set box() to FL_NO_BOX or
+one of the _FRAME types. This will result in the best output.
+ However, if the child widgets are a sparse arrangment you must set
+box() to a real _BOX type. This can result in some
+blinking during redrawing, but that can be solved by using a
+Fl_Double_Window. This widget can also be used to pan around a single child widget
+"canvas". This child widget should be of your own class, with a
+draw() method that draws the contents. The scrolling is done by
+changing the x() and y() of the widget, so this child
+must use the x() and y() to position it's drawing.
+ To speed up drawing it should test fl_clip()
+. Another very useful child is a single
+Fl_Pack, which is itself a group that packs it's children
+together and changes size to surround them. Filling the Fl_Pack
+ with Fl_Tab groups (and then putting
+normal widgets inside those) gives you a very powerful scrolling list
+of individually-openable panels. Fluid lets you create these, but you can only lay out objects that
+fit inside the Fl_Scroll without scrolling. Be sure to leave
+space for the scrollbars, as Fluid won't show these either. You cannot use Fl_Window as a child of this since the
+clipping is not conveyed to it when drawn, and it will draw over the
+scrollbars and neighboring objects. Scrollbars have step(1) preset (they always return
-integers). If desired you can set the step() to non-integer
-values. You will then have to use casts to get at the floating-point
-versions of value() from Fl_Slider.
-
- Scrollbars have step(1) preset (they always return
+integers). If desired you can set the step() to non-integer
+values. You will then have to use casts to get at the floating-point
+versions of value() from Fl_Slider. See Fl_Browser for methods to add
-and remove lines from the browser.
-
- See Fl_Browser for
+methods to add and remove lines from the browser. For the "fill" sliders this is the size of the area around the end
-that causes a drag effect rather than causing the slider to jump to
-the mouse.
-
- For the "fill" sliders this is the size of the area around the end
+that causes a drag effect rather than causing the slider to jump to the
+mouse. Clicking the tab makes a child visible() (by calling
-show() on it) and all other children are invisible (by calling
-hide() on them). Usually the children are Fl_Group widgets containing several
-widgets themselves.
-
- Each child makes a card, and it's label() is printed on the
-card tab (including the label font and style). The color of that child
-is used to color the card as well. Currently this only draws nicely if
-you set box() to the default
-FL_THIN_UP_BOX or to FL_FLAT_BOX, which gets rid of
-the edges drawn on the sides and bottom.
-
- 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 "inverted" on the
-bottom, this is determined by which 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.
-
- Use add(Fl_Widget *) to add
-each child (which is probably itself a Fl_Group). The
-children should be sized to stay away from the top or bottom edge of
-the Fl_Tabs, which is where the tabs are drawn.
-
- Clicking the tab makes a child visible() (by calling
+show() on it) and all other children are invisible (by calling
+hide() on them). Usually the children are
+Fl_Group widgets containing several widgets
+themselves. Each child makes a card, and it's label() is printed on the
+card tab (including the label font and style). The color of that child
+is used to color the card as well. Currently this only draws nicely if
+you set box() to the
+default FL_THIN_UP_BOX or to FL_FLAT_BOX, which gets
+rid of the edges drawn on the sides and bottom. 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 "inverted" on the
+bottom, this is determined by which 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. Use add(Fl_Widget *)
+ to add each child (which is probably itself a Fl_Group). The
+children should be sized to stay away from the top or bottom edge of
+the Fl_Tabs, which is where the tabs are drawn. Fl_Tile allows objects to be resized to zero dimensions.
-To prevent this you can use the resizable() to limit where
-corners can be dragged to.
-
- Even though objects can be resized to zero sizes, they must
-initially have non-zero sizes so the Fl_Tile can figure out
-their layout. If desired, call position() after creating the
-children but before displaying the window to set the borders where you
-want.
-
- The "borders" are part of the children, an Fl_Tile does not
-draw any graphics of it's own. In the above example all the final
-children have FL_DOWN_BOX types, and the "ridges" you see are
-two adjacent FL_DOWN_BOX's drawn next to each other.
-
- Fl_Tile allows objects to be resized to zero dimensions.
+ To prevent this you can use the resizable() to limit where
+corners can be dragged to. Even though objects can be resized to zero sizes, they must
+initially have non-zero sizes so the Fl_Tile can figure out
+their layout. If desired, call position() after creating the
+children but before displaying the window to set the borders where you
+want. The "borders" are part of the children, an Fl_Tiledoes not
+draw any graphics of it's own. In the above example all the final
+children have FL_DOWN_BOX types, and the "ridges" you see are
+two adjacent FL_DOWN_BOX's drawn next to each other. There are probably more of these classes in fltk than any others:
-
- In the above diagram each box surrounds an actual subclass. These
-are further differentiated by setting the type() of the widget to the symbolic
-value labeling the widget. The ones labelled "0" are the default
-versions with a type(0). For consistency the symbol
-FL_VERTICAL is defined as zero.
-
- The minimum may be greater than the maximum. This has the effect
-of "reversing" the object so the larger values are in the opposite
-direction. This also switches which end of the filled sliders is
-filled.
-
- Some widgets consider this a "soft" range. This means they will
-stop at the range, but if the user releases and grabs the control
-again and tries to move it further, it is allowed.
-
- The range may affect the display. You must redraw() the
-widget after changing the range.
-
- For precision the step is stored as the ratio of two integers,
-A/B. You can set these integers directly. Currently setting a
-floating point value sets the nearest A/1 or 1/B value possible.
-
- There are probably more of these classes in fltk than any others: In the above diagram each box surrounds an actual subclass. These
+are further differentiated by setting the
+type() of the widget to the symbolic value labeling the
+widget. The ones labelled "0" are the default versions with a
+type(0). For consistency the symbol FL_VERTICAL is
+defined as zero. The minimum may be greater than the maximum. This has the effect of
+"reversing" the object so the larger values are in the opposite
+direction. This also switches which end of the filled sliders is
+filled. Some widgets consider this a "soft" range. This means they will
+stop at the range, but if the user releases and grabs the control again
+and tries to move it further, it is allowed. The range may affect the display. You must redraw() the
+widget after changing the range. For precision the step is stored as the ratio of two integers, A/B.
+ You can set these integers directly. Currently setting a floating
+point value sets the nearest A/1 or 1/B value possible. If step() is not 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
-left button by 100 * step(). It is then impossible to select
-text by dragging across it, although clicking can still move the
-insertion cursor.
-
- If step() is not 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 left
+button by 100 * step(). It is then impossible to select text
+by dragging across it, although clicking can still move the insertion
+cursor. This is much lighter-weight than Fl_Value_Input because it contains no
-text editing code or character buffer.
-
- This is much lighter-weight than
+Fl_Value_Input because it contains no text editing code or
+character buffer. 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.
-
- 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).
-
- Most widgets turn this flag off when they do the callback, and when
-the program sets the stored value.
-
- Currently you cannot deactivate Fl_Window widgets.
-
- 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. 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)
+. Most widgets turn this flag off when they do the callback, and when
+the program sets the stored value. Currently you cannot deactivate Fl_Window widgets. Once you create a window, you usually add children
-Fl_Widget's to it by using window->add(child) for
-each new widget. See Fl_Group for
-more information on how to add and remove children.
-
- There are several subclasses of Fl_Window that provide
-double-buffering, overlay, menu, and OpenGL support.
-
- The window's callback is done if the user tries to close a window
-using the window manager and Fl::modal()
-is zero or equal to the window. Fl_Window has a default
-callback that calls Fl_Window::hide() and calls
-exit(0) if this is the last top-level window.
-
- Fl_Widget::box() is set 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
-you may want to change this to FL_UP_BOX.
-
- If the window is already shown then it is restored and raised to the
-top. This is really convenient because your program can call
-show() at any time, even if the window is already up. It also
-means that show() serves the purpose of raise() in
-other toolkits.
-
- 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
-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
-string passed to Fl_Window::xclass(). You should not rely on
-window managers displaying the icons.
-
- You can also call the Fl_Widget methods size(x,y)
-and position(w,h), which are inline wrappers for this virtual
-function.
-
- This method has no effect under Microsoft Windows.
-
- This method only works for the Fl_Window and Fl_Gl_Window
-classes.
-
- Once you create a window, you usually add children Fl_Widget
+'s to it by using window->add(child) for each new widget. See Fl_Group for more information
+on how to add and remove children. There are several subclasses of Fl_Window that provide
+double-buffering, overlay, menu, and OpenGL support. The window's callback is done if the user tries to close a window
+using the window manager and
+Fl::modal() is zero or equal to the window. Fl_Window
+ has a default callback that calls Fl_Window::hide() and calls
+exit(0) if this is the last top-level window. Fl_Widget::box() is set 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
+you may want to change this to FL_UP_BOX. If the window is already shown then it is restored and raised to the
+top. This is really convenient because your program can call show()
+ at any time, even if the window is already up. It also means that
+show() serves the purpose of raise() in other toolkits. 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
+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
+string passed to Fl_Window::xclass(). You should not rely on
+window managers displaying the icons. You can also call the Fl_Widget methods size(x,y)
+ and position(w,h), which are inline wrappers for this virtual
+function. This method has no effect under Microsoft Windows. This method only works for the Fl_Window and
+Fl_Gl_Window classes. You can build your Microsoft Windows applications as Console or
-WIN32 applications. If you want to use the standard C main()
-function as the entry point, FLTK includes a WinMain() function
-that will call your main() function for you.
-
- Note: The Visual C++ optimizer is known to cause problems with
-many programs. We only recommend using the "Favor Small Code"
-optimization setting.
-
+ In Visual C++ you will need to tell the compiler where to find the
+FLTK header files. This can be done by selecting "Settings" from the
+"Project" menu and then changing the "Preprocessor" settings under the
+"C/C++" tab. Similarly, you will need to add the FLTK library to the
+"Link" settings.
+ You can build your Microsoft Windows applications as Console or
+WIN32 applications. If you want to use the standard C main()
+ function as the entry point, FLTK includes a WinMain()
+ function that will call your main() function for you. Note: The Visual C++ optimizer is known to cause problems with
+many programs. We only recommend using the "Favor Small Code"
+optimization setting. The x and y parameters determine where the widget
-or window is placed on the screen. In FLTK the top left corner of the
-window or screen is the origin (i.e. x = 0, y = 0) and the units are in
-pixels.
-
- The width and height parameters determine the size
-of the widget or window in pixels. The maximum widget size is typically
-governed by the underlying window system or hardware.
-
+
+
+ The boxtype value is the style of the box that is drawn
+around the widget. Usually this is FL_NO_BOX, which means
+that no box is drawn. In our "Hello, World!" example we use
+FL_UP_BOX, which means that a raised button border will be drawn
+around the widget. You can learn more about boxtypes in
+Chapter 3.
+ The x and y parameters determine where the widget
+or window is placed on the screen. In FLTK the top left corner of the
+window or screen is the origin (i.e. x = 0, y = 0) and the units are in
+pixels. The width and height parameters determine the size
+of the widget or window in pixels. The maximum widget size is
+typically governed by the underlying window system or hardware. The labelfont method sets the typeface and style that is
-used for the label, which for this example we are using
-FL_BOLD and FL_ITALIC. You can also specify typefaces
-directly.
-
- The labelsize method sets the height of the font in pixels.
-
- The labeltype method sets the type of label. FLTK supports
-normal, embossed, shadowed, symbol, and image labels.
-
- A complete list of all label options can be found in
-Chapter 3.
-
+ All widgets support labels. In the case of window widgets, the label
+is used for the label in the title bar. Our example program calls the
+labelfont,
+labelsize, and
+labeltype methods.
+ The labelfont method sets the typeface and style that is
+used for the label, which for this example we are using FL_BOLD
+ and FL_ITALIC. You can also specify typefaces directly. The labelsize method sets the height of the font in pixels. The labeltype method sets the type of label. FLTK supports
+normal, embossed, shadowed, symbol, and image labels. A complete list of all label options can be found in
+Chapter 3. The value() method is used to get or
-set the string that is displayed:
-
- The value() method
+is used to get or set the string that is displayed: The type Fl_Boxtype stored and returned in
-Fl_Widget::box() is an enumeration defined in
-<FL/Enumerations.H>:
-
- The type Fl_Boxtype stored and returned in
+Fl_Widget::box() is an enumeration defined in
+s.H>:
+
-
-class Fl_Adjuster
-
-
-
-Class Hierarchy
-
-
-Fl_Valuator
+
+
+class Fl_Adjuster
+
+Class Hierarchy
+
+
+Fl_Valuator
|
- +----Fl_Adjuster
-
-
-Include Files
-
-
-#include <FL/Fl_Adjuster.H>
-
-
-Description
-
-The Fl_Adjuster widget was stolen from Prisms, and has
-proven to be very useful for values that need a large dynamic range.
-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
-100 * step(), the next by 10 * step() and that
-smallest button by step(). Clicking on the buttons increments
-by 10 times the amount dragging by a pixel does. Shift + click
-decrements by 10 times the amount.
-
-Methods
-
-
-
-
-Fl_Adjuster::Fl_Adjuster(int x, int y, int w, int h, const char *label = 0)
-
-Creates a new Fl_Adjuster widget using the given position, size, and
-label string. It looks best if one of the dimensions is 3 times the other.
-
-virtual Fl_Adjuster::~Fl_Adjuster()
-
-Destroys the valuator.
-
-uchar Fl_Adjuster::soft() const
-
-If "soft" is turned on, the user is allowed to drag the value outside
-the range. If they drag the value to one of the ends, let go, then
-grab again and continue to drag, they can get to any value. Default
-is one.
-
-
-
+ +----Fl_Adjuster
+
+
+
-void Fl_Adjuster::soft(uchar)Include Files
+
+
+#include <FL/Fl_Adjuster.H>
+
+
+Description
+ The Fl_Adjuster widget was stolen from Prisms, and has proven
+to be very useful for values that need a large dynamic range. 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 100 *
+step(), the next by 10 * step() and that smallest button
+by step(). Clicking on the buttons increments by 10 times the
+amount dragging by a pixel does. Shift + click decrements by 10 times
+the amount.
+Methods
+
+
+Fl_Adjuster::Fl_Adjuster(int x, int
+y, int w, int h, const char *label = 0)
+ Creates a new Fl_Adjuster widget using the given position,
+size, and label string. It looks best if one of the dimensions is 3
+times the other.
+virtual Fl_Adjuster::~Fl_Adjuster()
+
+ Destroys the valuator.
+uchar Fl_Adjuster::soft() const
+
+ If "soft" is turned on, the user is allowed to drag the value outside
+the range. If they drag the value to one of the ends, let go, then
+grab again and continue to drag, they can get to any value. Default is
+one.
\ No newline at end of file
diff --git a/documentation/Fl_Box.html b/documentation/Fl_Box.html
index e702d863d..4aa5cffeb 100644
--- a/documentation/Fl_Box.html
+++ b/documentation/Fl_Box.html
@@ -1,52 +1,39 @@
-
-
-
-
void Fl_Adjuster::soft(uchar)
-
-class Fl_Box
-
-
-
-Class Hierarchy
-
-
-Fl_Widget
+
+
+class Fl_Box
+
+Class Hierarchy
+
+
+Fl_Widget
|
- +----Fl_Box
-
-
-Include Files
-
-
-#include <FL/Fl_Box.H>
-
-
-Description
-
-This widget simply draws its box, and possibly it's label. Putting it
-before some other widgets and making it big enough to surround them
-will let you draw a frame around them.
-
-Methods
-
-
-
-Fl_Box::Fl_Box(int x, int y, int w, int h, const char * = 0)
-
-The first constructor sets box() to FL_NO_BOX, which
-means it is invisible. However such widgets are useful as placeholders
-or Fl_Group::resizable()
-values. To change the box to something visible, use box(n).
-
-
-Fl_Box::Fl_Box(Fl_Boxtype b, int x, int y, int w, int h, const char *)Fl_Box::~Fl_Box(void)
-
-The destructor removes the box.
-
-
-
+ +----Fl_Box
+
+
+Include Files
+
+
+#include <FL/Fl_Box.H>
+
+
+Description
+ This widget simply draws its box, and possibly it's label. Putting it
+before some other widgets and making it big enough to surround them
+will let you draw a frame around them.
+Methods
+
+Fl_Box::Fl_Box(int x, int y, int w, int h,
+const char * = 0)
+
+ The first constructor sets box() to FL_NO_BOX, which
+means it is invisible. However such widgets are useful as placeholders
+or Fl_Group::resizable()
+ values. To change the box to something visible, use box(n).
+
Fl_Box::Fl_Box(Fl_Boxtype b, int x, int y, int w, int h, const
+char *)Fl_Box::~Fl_Box(void)
+ The destructor removes the box.
\ No newline at end of file
diff --git a/documentation/Fl_Browser.html b/documentation/Fl_Browser.html
index c0219955c..cfd6c9ba8 100644
--- a/documentation/Fl_Browser.html
+++ b/documentation/Fl_Browser.html
@@ -1,276 +1,200 @@
-
-
-
-
-
-class Fl_Browser
-
-
-
-Class Hierarchy
-
-
-Fl_Browser_
+
+
+class Fl_Browser
+
+Class Hierarchy
+
+
+Fl_Browser_
|
- +----Fl_Browser
+ +----Fl_Browser
|
- +----Fl_Hold_Browser, Fl_Multi_Browser, Fl_Select_Browser
-
-
-Include Files
-
-
-#include <FL/Fl_Browser.H>
-
-
-Description
-
-The Fl_Browser widget displays a scrolling list of text 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.
-
-Methods
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Fl_Browser::Fl_Browser(int, int, int, int, const char * = 0)
-
-The constructor makes an empty browser.
-
-Fl_Browser::~Fl_Browser(void)
-
-The destructor deletes all list items and destroys the browser.
-
-void Fl_Browser::add(const char *, void * = 0)
-
-Add a new line to the end of the browser. The text is copied using the
-strdup() function. It may also be NULL to make a
-blank line. The void * argument is returned as the
-data() of the new item.
-
-void Fl_Browser::clear()
-
-Remove all the lines in the browser.
-
-uchar Fl_Browser::column_char() const
-
-The first form gets the current column separator character. By default this is
-'\t' (tab).
-
-
-void Fl_Browser::column_char(char c)const int *Fl_Browser::column_widths() const
-
-The first form gets the current column width array. This array is
-zero-terminated and specifies the widths in pixels of each column. The
-text is split at each column_char() and each part is formatted
-into it's own column. After the last column any remaining text is
-formatted into the space between the last column and the right edge of
-the browser, even if the text contains instances of
-column_char(). The default value is a one-element array of
-just a zero, which makes there are no columns.
-
-
-void Fl_Browser::column_widths(const int *w)void *Fl_Browser::data(int n) const
-
-The first form returns the data for line n. If n is
-out of range this returns NULL.
-
-
-void Fl_Browser::data(int n, void *)uchar Fl_Browser::format_char() const
-
-The first form 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:
-
-
-void Fl_Browser::format_char(char c)
-
-
-Notice that the @. Print rest of line, don't look for more '@' signs
-
- @@ Print rest of line starting with '@'
-
- @l Use a large (24 point) font
-
- @m Use a medium large (18 point) font
-
- @s Use a small (11 point) font
-
- @b Use a bold font (adds FL_BOLD to font)
-
- @i Use an italic font (adds FL_ITALIC to font)
-
- @f or @t Use a fixed-pitch
- font (sets font to FL_COURIER)
-
- @c Center the line horizontally
-
- @r Right-justify the text
-
- @B0, @B1, ... @B255 Fill the backgound with fl_color(n)
-
- @C0, @C1, ... @C255 Use fl_color(n) to draw the text
-
- @F0, @F1, ... Use fl_font(n) to draw the text
-
- @S1, @S2, ... Use point size n to draw the text
-
- @u or @_ Underline the text.
-
- @- draw an engraved line through the middle.
-@. command can be used to reliably
-terminate the parsing. To print a random string in a random color,
-use sprintf("@C%d@.%s", color, string) and it will work even
-if the string starts with a digit or has the format character in it.
-
-void Fl_Browser::hide(int n)
-
-Makes line n invisible, preventing selection by the user. The line
-can still be selected under program control.
-
-void Fl_Browser::insert(int n, const char *, void * = 0)
-
-Insert a new line before line n. If n >
-size() then the line is added to the end.
-
-int Fl_Browser::load(const char *filename)
-
-Clears the browser and reads the file, adding each line from the file
-to the browser. If the filename is NULL or a zero-length
-string then this just clears the browser. This returns zero if there
-was any error in opening or reading the file, in which case
-errno is set to the system error. The data() of each
-line is set to NULL.
-
-void Fl_Browser::move(int to, int from)
-
-Line from is removed and reinserted at to; to
-is calculated after the line is removed.
-
-int Fl_Browser::position() const
-
-The first form returns the current vertical scrollbar position, where 0
-corresponds to the top. If there is not vertical scrollbar then this
-will always return 0.
-
-
-void Fl_Browser::position(int p)void Fl_Browser::remove(int n)
-
-Remove line n and make the browser one line shorter.
-
-void Fl_Browser::show(int n)
-
-Makes line n visible for selection.
-
-int Fl_Browser::size() const
-
-Returns how many lines are in the browser. The last line number is
-equal to this.
-
-const char *Fl_Browser::text(int n) const
-
-The first form returns the text for line n. If n is
-out of range it returns NULL.
-
-
-void Fl_Browser::text(int n, const char *)int Fl_Browser::topline() const
-
-The first form returns the current top line in the browser. If there is no
-vertical scrollbar then this will always return 1.
-
-
-void Fl_Browser::topline(int n)int Fl_Browser::visible(int n) const
-
-Returns a non-zero value if line n is visible.
-
-
-
+ +----Fl_Hold_Browser, Fl_Multi_Browser, Fl_Select_Browser
+
+
+Include Files
+
+
+#include <FL/Fl_Browser.H>
+
+
+Description
+ The Fl_Browser widget displays a scrolling list of text
+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.
+Methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Fl_Browser::Fl_Browser(int, int, int,
+int, const char * = 0)
+ The constructor makes an empty browser.
+Fl_Browser::~Fl_Browser(void)
+ The destructor deletes all list items and destroys the browser.
+void Fl_Browser::add(const char *, void * =
+0)
+ Add a new line to the end of the browser. The text is copied using
+the strdup() function. It may also be NULL to make a
+blank line. The void * argument is returned as the data()
+ of the new item.
+void Fl_Browser::clear()
+ Remove all the lines in the browser.
+uchar Fl_Browser::column_char() const
+
+ The first form gets the current column separator character. By default
+this is '\t' (tab).
+
void Fl_Browser::column_char(char c)const int
+*Fl_Browser::column_widths() const
+
+ The first form gets the current column width array. This array is
+zero-terminated and specifies the widths in pixels of each column. The
+text is split at each column_char() and each part is formatted
+into it's own column. After the last column any remaining text is
+formatted into the space between the last column and the right edge of
+the browser, even if the text contains instances of column_char()
+. The default value is a one-element array of just a zero, which makes
+there are no columns.
+
void Fl_Browser::column_widths(const int *w)void *Fl_Browser::data(int n) const
+
+ The first form returns the data for line n. If n is
+out of range this returns NULL.
+
void Fl_Browser::data(int n, void *)uchar Fl_Browser::format_char() const
+
+ The first form 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:
+
void Fl_Browser::format_char(char c)
+
+ Notice that the @. Print rest of line, don't look for more '@' signs @@ Print rest of line starting with '@' @l Use a large (24 point) font @m Use a medium large (18 point) font @s Use a small (11 point) font @b Use a bold font (adds FL_BOLD to font) @i Use an italic font (adds FL_ITALIC to font) @f or @t Use a fixed-pitch
+ font (sets font to FL_COURIER) @c Center the line horizontally @r Right-justify the text @B0, @B1, ... @B255 Fill the backgound with
+fl_color(n) @C0, @C1, ... @C255 Use fl_color(n) to draw the text @F0, @F1, ... Use fl_font(n) to draw the text @S1, @S2, ... Use point size n to draw the text @u or @_ Underline the text. @- draw an engraved line through the middle. @. command can be used to reliably
+terminate the parsing. To print a random string in a random color, use
+sprintf("@C%d@.%s", color, string) and it will work even if the
+string starts with a digit or has the format character in it.
+void Fl_Browser::hide(int n)
+ Makes line n invisible, preventing selection by the user.
+ The line can still be selected under program control.
+void Fl_Browser::insert(int n, const char
+*, void * = 0)
+ Insert a new line before line n. If n >
+size() then the line is added to the end.
+int Fl_Browser::load(const char *filename)
+
+ Clears the browser and reads the file, adding each line from the file
+to the browser. If the filename is NULL or a zero-length
+string then this just clears the browser. This returns zero if there
+was any error in opening or reading the file, in which case errno
+ is set to the system error. The data() of each line is set
+to NULL.
+void Fl_Browser::move(int to, int from)
+ Line from is removed and reinserted at to; to
+ is calculated after the line is removed.
+int Fl_Browser::position() const
+
+ The first form returns the current vertical scrollbar position, where
+0 corresponds to the top. If there is not vertical scrollbar then this
+will always return 0.
+
void Fl_Browser::position(int p)void Fl_Browser::remove(int n)
+ Remove line n and make the browser one line shorter.
+void Fl_Browser::show(int n)
+ Makes line n visible for selection.
+int Fl_Browser::size() const
+ Returns how many lines are in the browser. The last line number is
+equal to this.
+const char *Fl_Browser::text(int n) const
+
+ The first form returns the text for line n. If n is
+out of range it returns NULL.
+
void Fl_Browser::text(int n, const char *)int Fl_Browser::topline() const
+
+ The first form returns the current top line in the browser. If there
+is no vertical scrollbar then this will always return 1.
+
void Fl_Browser::topline(int n)int Fl_Browser::visible(int n) const
+ Returns a non-zero value if line n is visible.
\ No newline at end of file
diff --git a/documentation/Fl_Browser_.html b/documentation/Fl_Browser_.html
index fc8456f51..037fd211f 100644
--- a/documentation/Fl_Browser_.html
+++ b/documentation/Fl_Browser_.html
@@ -1,171 +1,134 @@
-
-
-
-
-
-class Fl_Browser_
-
-
-
-Class Hierarchy
-
-
-Fl_Widget
+
+
+class Fl_Browser_
+
+Class Hierarchy
+
+
+Fl_Widget
|
- +----Fl_Browser_
+ +----Fl_Browser_
|
- +----Fl_Browser
-
-
-Include Files
-
-
-#include <FL/Fl_Browser_.H>
-
-
-Description
-
-This is the base class for browsers. To be useful it must be
-subclassed and several virtual functions defined. The Forms-compatable
-browser and the file chooser's browser are subclassed off of this.
-
-Methods
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Fl_Browser::Fl_Browser(int, int, int, int, const char * = 0)
-
-The constructor makes an empty browser.
-
-Fl_Browser::~Fl_Browser(void)
-
-The destructor deletes all list items and destroys the browser.
-
-void Fl_Browser_::has_scrollbar(int h)
-
-By default you can scroll in both directions, and the scrollbars
-disappear if the data will fit in the widget. has_scrollbar()
-changes this based on the value of h:
-
-
-
-
-0 - No scrollbars
-
- Fl_Browser_::HORIZONTAL - Only a horizontal scrollbar.
-
- Fl_Browser_::VERTICAL - Only a vertical scrollbar.
-
- Fl_Browser_::BOTH - The default is both scrollbars.
-
- Fl_Browser_::HORIZONTAL_ALWAYS - Horizontal
- scrollbar always on, vertical always off.
-
- Fl_Browser_::VERTICAL_ALWAYS - Vertical
- scrollbar always on, horizontal always off.
-
- Fl_Browser_::BOTH_ALWAYS - Both always on.
-Fl_Color Fl_Browser_::textcolor() const
-
-The first form gets the default text color for the lines in the
-browser.
-
-
-void Fl_Browser_::textcolor(Fl_Color color)Fl_Font Fl_Browser_::textfont() const
-
-The first form gets the default text font for the lines in the
-browser.
-
-
-void Fl_Browser_::textfont(Fl_Font font)uchar Fl_Browser_::textsize() const
-
-The first form gets the default text size for the lines in the
-browser.
-
-
-void Fl_Browser_::textsize(uchar size)Include Files
+
+
+#include <FL/Fl_Browser_.H>
+
+
+Description
+ This is the base class for browsers. To be useful it must be
+subclassed and several virtual functions defined. The Forms-compatable
+browser and the file chooser's browser are subclassed off of this.
+Methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Fl_Browser::Fl_Browser(int, int,
+int, int, const char * = 0)
+ The constructor makes an empty browser.
+Fl_Browser::~Fl_Browser(void)
+ The destructor deletes all list items and destroys the browser.
+void
+Fl_Browser_::has_scrollbar(int h)
+ By default you can scroll in both directions, and the scrollbars
+disappear if the data will fit in the widget. has_scrollbar() changes
+this based on the value of h:
+
+
+0 - No scrollbars Fl_Browser_::HORIZONTAL - Only a horizontal scrollbar. Fl_Browser_::VERTICAL - Only a vertical scrollbar. Fl_Browser_::BOTH - The default is both scrollbars. Fl_Browser_::HORIZONTAL_ALWAYS - Horizontal scrollbar
+always on, vertical always off. Fl_Browser_::VERTICAL_ALWAYS - Vertical scrollbar
+always on, horizontal always off. Fl_Browser_::BOTH_ALWAYS - Both always on. Fl_Color Fl_Browser_::textcolor()
+const
+
+ The first form gets the default text color for the lines in the
+browser.
+
void Fl_Browser_::textcolor(Fl_Color color)Fl_Font Fl_Browser_::textfont() const
+
+ The first form gets the default text font for the lines in the
+browser.
+
void Fl_Browser_::textfont(Fl_Font font)uchar Fl_Browser_::textsize() const
+
+ The first form gets the default text size for the lines in the
+browser.
+
void Fl_Browser_::textsize(uchar size)
-
-class Fl_Button
-
-
-
-Class Hierarchy
-
-
-Fl_Widget
+
+
+class Fl_Button
+
+Class Hierarchy
+
+
+Fl_Widget
|
- +----Fl_Button
+ +----Fl_Button
|
- +----Fl_Check_Button, Fl_Light_Button, Fl_Repeat_Button,
- Fl_Return_Button, Fl_Round_Button
-
-
-Include Files
-
-
-#include <FL/Fl_Button.H>
-
-
-Description
-
-Methods
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Fl_Button::Fl_Button(int x, int y, int w, int h, const char *label = 0)
-
-The constructor creates the button using the position, size, and label.
-
-Fl_Button::~Fl_Button(void)
-
-The destructor removed the button.
-
-int Fl_Button::clear()
-
-Same as value(0).
-
-Fl_Boxtype Fl_Button::down_box() const
-
-The first form returns the current down box type, which is drawn when
-value() is non-zero.
-
-
-void Fl_Button::down_box(Fl_Boxtype bt)int Fl_Button::set()
-
-Same as value(1).
-
-void Fl_Button::setonly()
-
-Turns on this button and turns off all other radio buttons in the
-group (calling value(1) or set() does not do this).
-
-ulong Fl_Button::shortcut() const
-
-The first form returns the current shortcut key for the button.
-
-
-void Fl_Button::shortcut(ulong key)FL_ALT
-| 'a', FL_ALT | (FL_F + 10), or just
-'a'. A value of 0 disables the shortcut.
-
-uchar Fl_Button::type() const
-
-The first form of type() returns the current button type,
-which can be one of:
-
-
-void Fl_Button::type(uchar t)
-
-
-The second form sets the button type to t.
-
-0: The value is unchanged.
-
- FL_TOGGLE_BUTTON: The value is inverted.
-
- FL_RADIO_BUTTON: The value is set to 1, and all
- other buttons in the current group with
- type() == FL_RADIO_BUTTON are set to zero.
-char Fl_Button::value() const
-
-The first form returns the current value (0 or 1). The second form sets
-the current value.
-
-
-int Fl_Button::value(int)Fl_When Fl_Widget::when() const
-
-Controls when callbacks are done. The following values are useful,
-the default value is
-void Fl_Widget::when(Fl_When w)FL_WHEN_RELEASE:
-
-
-
-
-
-
+ +----Fl_Check_Button, Fl_Light_Button, Fl_Repeat_Button,
+ Fl_Return_Button, Fl_Round_Button
+
+
+0: The callback is not done, instead changed() is
- turned on.
-
- FL_WHEN_RELEASE: The callback is done after the user
- successfully clicks the button, or when a shortcut is typed.
-
- 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).
-Include Files
+
+
+#include <FL/Fl_Button.H>
+
+
+Description
+Methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Fl_Button::Fl_Button(int x, int y, int
+w, int h, const char *label = 0)
+ The constructor creates the button using the position, size, and
+label.
+Fl_Button::~Fl_Button(void)
+ The destructor removed the button.
+int Fl_Button::clear()
+ Same as value(0).
+Fl_Boxtype Fl_Button::down_box() const
+
+ The first form returns the current down box type, which is drawn when
+value() is non-zero.
+
void Fl_Button::down_box(Fl_Boxtype bt)int Fl_Button::set()
+ Same as value(1).
+void Fl_Button::setonly()
+ Turns on this button and turns off all other radio buttons in the
+group (calling value(1) or set() does not do this).
+ulong Fl_Button::shortcut() const
+
+ The first form returns the current shortcut key for the button.
+
void Fl_Button::shortcut(ulong key)FL_ALT | 'a'
+, FL_ALT | (FL_F + 10), or just 'a'. A value
+of 0 disables the shortcut. uchar Fl_Button::type() const
+
+ The first form of type() returns the current button type,
+which can be one of:
+
void Fl_Button::type(uchar t)
+
+ The second form sets the button type to t.
+0: The value is unchanged. FL_TOGGLE_BUTTON: The value is inverted. FL_RADIO_BUTTON: The value is set to 1, and all other
+buttons in the current group with type() == FL_RADIO_BUTTON
+ are set to zero. char Fl_Button::value() const
+
+ The first form returns the current value (0 or 1). The second form
+sets the current value.
+
int Fl_Button::value(int)Fl_When Fl_Widget::when() const
+
+ Controls when callbacks are done. The following values are useful,
+the default value is
void Fl_Widget::when(Fl_When w)FL_WHEN_RELEASE:
+
+
+
\ No newline at end of file
diff --git a/documentation/Fl_Chart.html b/documentation/Fl_Chart.html
index 5a9d527ab..83c6834eb 100644
--- a/documentation/Fl_Chart.html
+++ b/documentation/Fl_Chart.html
@@ -1,162 +1,119 @@
-
-
-
-0: The callback is not done, instead changed() is
+ turned on. FL_WHEN_RELEASE: The callback is done after the user
+ successfully clicks the button, or when a shortcut is typed. 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).
-
-class Fl_Chart
-
-
-
-Class Hierarchy
-
-
-Fl_Widget
+
+
+class Fl_Chart
+
+Class Hierarchy
+
+
+Fl_Widget
|
- +----Fl_Chart
-
-
-Include Files
-
-
-#include <FL/Fl_Chart.H>
-
-
-Description
-
-This widget displays simple charts and is provided for forms compatibility.
-
-Methods
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Fl_Chart::Fl_Chart(int x, int y, int w, int h, const char *label = 0)
-
-Creates a new Fl_Chart widget using the given position, size, and
-label string. The default boxtype is FL_NO_BOX.
-
-virtual Fl_Chart::~Fl_Chart()
-
-Destroys the Fl_Chart widget and all of its data.
-
-void add(double value, const char *label = NULL, uchar color = 0)
-
-The add method adds the value and optionally label
-and color to the chart.
-
-uchar autosize(void) const
-
-The autosize method controls whether or not the chart will
-automatically adjust the bounds of the chart. The first form returns a
-boolean value that is non-zero if auto-sizing is enabled and zero is auto-sizing
-is disabled.
-
-
-void autosize(uchar onoff)void bounds(double *a, double *b)
-
-The bounds method gets or sets the lower and upper bounds of the chart
-values to a and b respectively.
-
-
-void bounds(double a, double b)void clear(void)
-
-The clear method removes all values from the chart.
-
-void insert(int pos, double value, const char *label = NULL, uchar color = 0)
-
-The insert method inserts a data value at the given position
-pos. Position 0 is the first data value.
-
-int maxsize(void) const
-
-The maxsize method gets or sets the maximum number of data values for
-a chart.
-
-
-void maxsize(int n)void replace(int pos, double value, const char *label = NULL, uchar color = 0)
-
-The replace method replaces data value pos with
-value, label, and color. Position 0 is
-the first data value.
-
-int size(void) const
-
-The size method returns the number of data values in the chart.
-
-uchar type() const
-
-The first form of type() returns the current chart type.
-The chart type can be one of the following:
-
+ +----Fl_Chart
+
+
+
-void type(uchar t)Include Files
+
+
+#include <FL/Fl_Chart.H>
+
+
+Description
+ This widget displays simple charts and is provided for forms
+compatibility.
+Methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Fl_Chart::Fl_Chart(int x, int y, int w,
+int h, const char *label = 0)
+ Creates a new Fl_Chart widget using the given position, size,
+and label string. The default boxtype is FL_NO_BOX.
+virtual Fl_Chart::~Fl_Chart()
+ Destroys the Fl_Chart widget and all of its data.
+void add(double value, const char *label =
+NULL, uchar color = 0)
+ The add method adds the value and optionally
+label and color to the chart.
+uchar autosize(void) const
+
+ The autosize method controls whether or not the chart will
+automatically adjust the bounds of the chart. The first form returns a
+boolean value that is non-zero if auto-sizing is enabled and zero is
+auto-sizing is disabled.
+
void autosize(uchar onoff)void bounds(double *a, double *b)
+
+ The bounds method gets or sets the lower and upper bounds of
+the chart values to a and b respectively.
+
void bounds(double a, double b)void clear(void)
+ The clear method removes all values from the chart.
+void insert(int pos, double value, const
+char *label = NULL, uchar color = 0)
+ The insert method inserts a data value at the given position
+pos. Position 0 is the first data value.
+int maxsize(void) const
+
+ The maxsize method gets or sets the maximum number of data
+values for a chart.
+
void maxsize(int n)void replace(int pos, double value, const
+char *label = NULL, uchar color = 0)
+ The replace method replaces data value pos with
+value, label, and color. Position 0 is the
+first data value.
+int size(void) const
+ The size method returns the number of data values in the
+chart.
+uchar type() const
+
+ The first form of type() returns the current chart type. The
+chart type can be one of the following:
void type(uchar t)
-
-
-The second form of type() sets the chart type to t.
-
-

-
-class Fl_Check_Button
-
-
-
-Class Hierarchy
-
-
-Fl_Button
+
+
+class Fl_Check_Button
+
+Class Hierarchy
+
+
+Fl_Button
|
- +----Fl_Check_Button
-
-
-Include Files
-
-
-#include <FL/Fl_Check_Button.H>
-
-
-Description
-
-Buttons generate callbacks when they are clicked by the user. You
-control exactly when and how by changing the values for type() and
-when().
-
-Methods
-
-
-
-Fl_Check_Button::Fl_Check_Button(int x, int y, int w, int h, const char *label = 0)
-
-Creates a new Fl_Check_Button widget using the given position,
-size, and label string.
-
-Fl_Check_Button::~Fl_Check_Button()
-
-The destructor deletes the check button.
-
-
-
+ +----Fl_Check_Button
+
+
+Include Files
+
+
+#include <FL/Fl_Check_Button.H>
+
+
+Description
+ Buttons generate callbacks when they are clicked by the user. You
+control exactly when and how by changing the values for type()
+ and when().
+Methods
+
+
+Fl_Check_Button::Fl_Check_Button(int x, int y, int w, int h, const char
+*label = 0)
+ Creates a new Fl_Check_Button widget using the given
+position, size, and label string.
+
+Fl_Check_Button::~Fl_Check_Button()
+ The destructor deletes the check button.
\ No newline at end of file
diff --git a/documentation/Fl_Choice.html b/documentation/Fl_Choice.html
index 96b4337dc..e6f52706a 100644
--- a/documentation/Fl_Choice.html
+++ b/documentation/Fl_Choice.html
@@ -1,110 +1,80 @@
-
-
-
-
-
-class Fl_Choice
-
-
-
-Class Hierarchy
-
-
-Fl_Menu_
+
+
+class Fl_Choice
+
+Class Hierarchy
+
+
+Fl_Menu_
|
- +----Fl_Choice
-
-
-Include Files
-
-
-#include <FL/Fl_Choice.H>
-
-
-Description
-
-This is a button that when pushed pops up a menu (or hierarchy of
-menus) defined by an array of Fl_Menu_Item
-objects. Motif calls this an OptionButton.
-
-Methods
-
-
-
-
-Fl_Choice::Fl_Choice(int x, int y, int w, int h, const char *label = 0)
-
-Creates a new Fl_Choice widget using the given position, size, and
-label string. The default boxtype is FL_UP_BOX.
-
-virtual Fl_Choice::~Fl_Choice()
-
-The destructor removes the Fl_Choice widget and all of its menu items.
-
-int Fl_Choice::value() const
-
-The value is the index into the Fl_Menu array of the last item chosen
-by the user. It is zero initially. You can set it as an integer, or
-set it with a pointer to a menu item. The set routines return
-non-zero if the new value is different than the old one. Changing it
-causes a redraw().
-
-
-int Fl_Choice::value(int)
-int Fl_Choice::value(const Fl_Menu *)int Fl_Widget::changed() const
-
-This value is true if the user picks a different value. It is
-turned off by value() and just before doing a callback (the
-callback can turn it back on if desired).
-
-void Fl_Widget::set_changed()
-
-This method sets the changed() flag.
-
-void Fl_Widget::clear_changed()
-
-This method clears the changed() flag.
-
-Fl_Boxtype Fl_Choice::down_box() const
-
-The first form gets the current down box, which is used when the menu
-is popped up. The default down box type is FL_DOWN_BOX
-
-The second form sets the current down box type to b.
-
-
-
+ +----Fl_Choice
+
+
+
-void Fl_Choice::down_box(Fl_Boxtype b)Include Files
+
+
+#include <FL/Fl_Choice.H>
+
+
+Description
+ This is a button that when pushed pops up a menu (or hierarchy of
+menus) defined by an array of
+Fl_Menu_Item objects. Motif calls this an OptionButton.
+Methods
+
+Fl_Choice::Fl_Choice(int x, int y, int
+w, int h, const char *label = 0)
+ Creates a new Fl_Choice widget using the given position,
+size, and label string. The default boxtype is FL_UP_BOX.
+virtual Fl_Choice::~Fl_Choice()
+ The destructor removes the Fl_Choice widget and all of its
+menu items.
+int Fl_Choice::value() const
+
+ The value is the index into the Fl_Menu array of the last
+item chosen by the user. It is zero initially. You can set it as an
+integer, or set it with a pointer to a menu item. The set routines
+return non-zero if the new value is different than the old one.
+ Changing it causes a redraw().
+
int Fl_Choice::value(int)
+
int Fl_Choice::value(const Fl_Menu *)int Fl_Widget::changed() const
+ This value is true if the user picks a different value. It is
+turned off by value() and just before doing a callback (the
+callback can turn it back on if desired).
+void Fl_Widget::set_changed()
+ This method sets the changed() flag.
+void Fl_Widget::clear_changed()
+ This method clears the changed() flag.
+Fl_Boxtype Fl_Choice::down_box() const
+
+ The first form gets the current down box, which is used when the menu
+is popped up. The default down box type is FL_DOWN_BOX The
+second form sets the current down box type to b.
\ No newline at end of file
diff --git a/documentation/Fl_Clock.html b/documentation/Fl_Clock.html
index e1da8a9e9..0ddb2a10b 100644
--- a/documentation/Fl_Clock.html
+++ b/documentation/Fl_Clock.html
@@ -1,78 +1,56 @@
-
-
-
-
void Fl_Choice::down_box(Fl_Boxtype b)
-
-class Fl_Clock
-
-
-
-Class Hierarchy
-
-
-Fl_Widget
+
+
+class Fl_Clock
+
+Class Hierarchy
+
+
+Fl_Widget
|
- +----Fl_Clock
-
-
-Include Files
-
-
-#include <FL/Fl_Clock.H>
-
-
-Description
-
-This widget provides a round analog clock display and is provided for
-Forms compatibility. It installs a 1-second timeout callback using
-Fl::add_timeout().
-
-Methods
-
-
-
-Fl_Clock::Fl_Clock(int x, int y, int w, int h, const char *label = 0)
-
-Creates a new Fl_Clock widget using the given position, size, and
-label string. The default boxtype is FL_NO_BOX.
-
-virtual Fl_Clock::~Fl_Clock()
-
-The destructor also deletes all the children. 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
-Fl_Clock and all of it's children can be automatic (local)
-variables, but you must declare the Fl_Clock first, so
-that it is destroyed last.
-
-int Fl_Clock::hour() const
-
-Returns the current hour (0 to 23).
-
-int Fl_Clock::minute() const
-
-Returns the current minute (0 to 59).
-
-int Fl_Clock::second() const
-
-Returns the current second (0 to 60, 60 = leap second).
-
-void Fl_Clock::value(ulong v)
-
-The first two forms of value set the displayed time to the given
-UNIX time value or specific hours, minutes, and seconds.
-
-
-void Fl_Clock::value(int h, int m, int s)
-ulong Fl_Clock::value(void)Include Files
+
+
+#include <FL/Fl_Clock.H>
+
+
+Description
+ This widget provides a round analog clock display and is provided for
+Forms compatibility. It installs a 1-second timeout callback using
+Fl::add_timeout().
+Methods
+
+Fl_Clock::Fl_Clock(int x, int y, int w,
+int h, const char *label = 0)
+ Creates a new Fl_Clock widget using the given position, size,
+and label string. The default boxtype is FL_NO_BOX.
+virtual Fl_Clock::~Fl_Clock()
+ The destructor also deletes all the children. 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
+Fl_Clock and all of it's children can be automatic (local)
+variables, but you must declare the Fl_Clockfirst, so
+that it is destroyed last.
+int Fl_Clock::hour() const
+ Returns the current hour (0 to 23).
+int Fl_Clock::minute() const
+ Returns the current minute (0 to 59).
+int Fl_Clock::second() const
+ Returns the current second (0 to 60, 60 = leap second).
+void Fl_Clock::value(ulong v)
+
+ The first two forms of value set the displayed time to the
+given UNIX time value or specific hours, minutes, and seconds.
+
void Fl_Clock::value(int h, int m, int s)
+
ulong Fl_Clock::value(void)
-
-class Fl_Color_Chooser
-
-
-
-Class Hierarchy
-
-
-Fl_Group
+
+
+class Fl_Color_Chooser
+
+Class Hierarchy
+
+
+Fl_Group
|
- +----Fl_Color_Chooser
-
-
-Include Files
-
-
-#include <FL/Fl_Color_Chooser.H>
-
-
-Description
-
-The Fl_Color_Chooser widget provides a standard RGB color
-chooser. You can place any number of these into a panel of your own
-design. This widget contains the hue box, value slider, and rgb input
-fields from the above diagram (it does not have the color chips or the
-Cancel or OK buttons). The callback is done every time the user
-changes the rgb value. It is not done if they move the hue control in
-a way that produces the same rgb value, such as when saturation
-or value is zero.
-
-Methods
-
-
-
-
-Fl_Color_Chooser::Fl_Color_Chooser(int x, int y, int w, int h, const char *label = 0)
-
-Creates a new Fl_Color_Chooser widget using the given
-position, size, and label string. The recommended dimensions are
-200x95. The color is initialized to black.
-
-virtual Fl_Color_Chooser::~Fl_Color_Chooser()
-
-The destructor removes the color chooser and all of its controls.
-
-double Fl_Color_Chooser::hue() const
-
-Return the current hue. 0 <= hue < 6. Zero is red, one is
-yellow, two is green, etc. This value is convienent for the internal
-calculations - some other systems consider hue to run from zero to
-one, or from 0 to 360.
-
-double Fl_Color_Chooser::saturation() const
-
-Returns the saturation. 0 <= saturation <= 1.
-
-double Fl_Color_Chooser::value() const
-
-Returns the value/brightness. 0 <= value <= 1.
-
-double Fl_Color_Chooser::r() const
-
-Returns the current red value. 0 <= r <= 1.
-
-double Fl_Color_Chooser::g() const
-
-Returns the current green value. 0 <= g <= 1.
-
-double Fl_Color_Chooser::b() const
-
-Returns the current blue value. 0 <= b <= 1.
-
-int Fl_Color_Chooser::rgb(double, double,
-double)
-
-Sets the current rgb color values. Does not do the callback. Does
-not clamp (but out of range values will produce psychedelic effects in
-the hue selector).
-
-int Fl_Color_Chooser::hsv(double,double,double)
-
-Set the hsv values. The passed values are clamped (or for hue,
-modulus 6 is used) to get legal values. Does not do the callback.
-
-static void Fl_Color_Chooser::hsv2rgb(double, double,
-double, double&, double&, double&)
-
-This static method converts HSV colors to RGB colorspace.
-
-static void Fl_Color_Chooser::rgb2hsv(double, double, double, double&,
-double&, double&)
-
-This static method converts RGB colors to HSV colorspace.
-
-
-
+ +----Fl_Color_Chooser
+
+
+Include Files
+
+
+#include <FL/Fl_Color_Chooser.H>
+
+
+Description
+ The Fl_Color_Chooser widget provides a standard RGB color
+chooser. You can place any number of these into a panel of your own
+design. This widget contains the hue box, value slider, and rgb input
+fields from the above diagram (it does not have the color chips or the
+Cancel or OK buttons). The callback is done every time the user
+changes the rgb value. It is not done if they move the hue control in
+a way that produces the same rgb value, such as when saturation
+or value is zero.
+Methods
+
+
+Fl_Color_Chooser::Fl_Color_Chooser(int x, int y, int w, int h, const
+char *label = 0)
+ Creates a new Fl_Color_Chooser widget using the given
+position, size, and label string. The recommended dimensions are
+200x95. The color is initialized to black.
+virtual
+Fl_Color_Chooser::~Fl_Color_Chooser()
+ The destructor removes the color chooser and all of its controls.
+double Fl_Color_Chooser::hue() const
+
+ Return the current hue. 0 <= hue < 6. Zero is red, one is yellow,
+two is green, etc. This value is convienent for the internal
+calculations - some other systems consider hue to run from zero to one,
+or from 0 to 360.
+double
+Fl_Color_Chooser::saturation() const
+ Returns the saturation. 0 <= saturation <= 1.
+double Fl_Color_Chooser::value()
+const
+ Returns the value/brightness. 0 <= value <= 1.
+double Fl_Color_Chooser::r() const
+ Returns the current red value. 0 <= r <= 1.
+double Fl_Color_Chooser::g() const
+ Returns the current green value. 0 <= g <= 1.
+double Fl_Color_Chooser::b() const
+ Returns the current blue value. 0 <= b <= 1.
+int Fl_Color_Chooser::rgb(double,
+double, double)
+ Sets the current rgb color values. Does not do the callback. Does
+not clamp (but out of range values will produce psychedelic effects in
+the hue selector).
+int
+Fl_Color_Chooser::hsv(double,double,double)
+ Set the hsv values. The passed values are clamped (or for hue,
+modulus 6 is used) to get legal values. Does not do the callback.
+static void
+Fl_Color_Chooser::hsv2rgb(double, double, double, double&, double&,
+double&)
+ This static method converts HSV colors to RGB colorspace.
+static void
+Fl_Color_Chooser::rgb2hsv(double, double, double, double&, double&,
+double&)
+ This static method converts RGB colors to HSV colorspace.
+
\ No newline at end of file
diff --git a/documentation/Fl_Counter.html b/documentation/Fl_Counter.html
index 42551fefa..d7832f9c2 100644
--- a/documentation/Fl_Counter.html
+++ b/documentation/Fl_Counter.html
@@ -1,66 +1,47 @@
-
-
-
-
-
-class Fl_Counter
-
-
-
-Class Hierarchy
-
-
-Fl_Valuator
+
+
+class Fl_Counter
+
+Class Hierarchy
+
+
+Fl_Valuator
|
- +----Fl_Counter
-
-
-Include Files
-
-
-#include <FL/Fl_Counter.H>
-
-
-Description
-
-The Fl_Counter widget is provided for forms compatibility. It
-controls a single floating point value.
-
-Methods
-
-
-
-
-Fl_Counter::Fl_Counter(int x, int y, int w, int h, const char *label = 0)
-
-Creates a new Fl_Counter widget using the given position, size, and
-label string. The default type is FL_NORMAL_COUNTER.
-
-virtual Fl_Counter::~Fl_Counter()
-
-Destroys the valuator.
-
-double Fl_Counter::lstep() const
-
-Get or set the increment for the double-arrow buttons. The default
-value is 1.0.
-
-
-void Fl_Counter::lstep(double)type(uchar)
-
-Sets the type of counter:
-
-
-
-
-
-
+ +----Fl_Counter
+
+
+Include Files
+
+
+#include <FL/Fl_Counter.H>
+
+
+Description
+ The Fl_Counter widget is provided for forms compatibility.
+ It controls a single floating point value.
+Methods
+
+
+Fl_Counter::Fl_Counter(int x, int y,
+int w, int h, const char *label = 0)
+ Creates a new Fl_Counter widget using the given position,
+size, and label string. The default type is FL_NORMAL_COUNTER.
+virtual Fl_Counter::~Fl_Counter()
+ Destroys the valuator.
+double Fl_Counter::lstep() const
+
+ Get or set the increment for the double-arrow buttons. The default
+value is 1.0.
+
void Fl_Counter::lstep(double)type(uchar)
+ Sets the type of counter:
+
+
+
\ No newline at end of file
diff --git a/documentation/Fl_Dial.html b/documentation/Fl_Dial.html
index 2e732440a..ff70b6db1 100644
--- a/documentation/Fl_Dial.html
+++ b/documentation/Fl_Dial.html
@@ -1,65 +1,45 @@
-
-
-
-
-
-class Fl_Dial
-
-
-
-Class Hierarchy
-
-
-Fl_Valuator
+
+
+class Fl_Dial
+
+Class Hierarchy
+
+
+Fl_Valuator
|
- +----Fl_Dial
-
-
-Include Files
-
-
-#include <FL/Fl_Dial.H>
-
-
-Description
-
-The Fl_Dial widget provides a circular dial to control a
-single floating point value.
-
-Methods
-
-
-
-Fl_Dial::Fl_Dial(int x, int y, int w, int h, const char *label = 0)
-
-Creates a new Fl_Dial widget using the given position, size, and
-label string. The default type is FL_NORMAL_DIAL.
-
-virtual Fl_Dial::~Fl_Dial()
-
-Destroys the valuator.
-
-void Fl_Dial::angles(short a, short b)
-
-Sets the angles used for the minimum and maximum values. By default these
-are 0 and 360, respectively.
-
-type(uchar)
-
-Sets the type of the dial to:
-
-
-
+Include Files
+
+
+#include <FL/Fl_Dial.H>
+
+
+Description
+ The Fl_Dial widget provides a circular dial to control a
+single floating point value.
+Methods
+
+Fl_Dial::Fl_Dial(int x, int y, int w, int
+h, const char *label = 0)
+ Creates a new Fl_Dial widget using the given position, size,
+and label string. The default type is FL_NORMAL_DIAL.
+virtual Fl_Dial::~Fl_Dial()
+ Destroys the valuator.
+void Fl_Dial::angles(short a, short b)
+ Sets the angles used for the minimum and maximum values. By default
+these are 0 and 360, respectively.
+type(uchar)
+ Sets the type of the dial to:
+
+
+
\ No newline at end of file
diff --git a/documentation/Fl_Double_Window.html b/documentation/Fl_Double_Window.html
index 9018b850c..ffe154f76 100644
--- a/documentation/Fl_Double_Window.html
+++ b/documentation/Fl_Double_Window.html
@@ -1,66 +1,58 @@
-
-
-
-
-
-class Fl_Double_Window
-
-
-
-Class Hierarchy
-
-
-Fl_Window
+
+
+class Fl_Double_Window
+
+Class Hierarchy
+
+
+Fl_Window
|
- +----Fl_Double_Window
-
-
-Include Files
-
-
-#include <FL/Fl_Double_Window.H>
-
-
-Description
-
-The Fl_Double_Window class provides a double-buffered window.
-If possible this will use the X double buffering extension (Xdbe). If
-not, it will draw the window data into an off-screen pixmap, and then
-copy it to the on-screen window.
-
-
+ +----Fl_Double_Window
+
+
+Include Files
+
+
+#include <FL/Fl_Double_Window.H>
+
+
+Description
+ The Fl_Double_Window class provides a double-buffered window.
+ If possible this will use the X double buffering extension (Xdbe). If
+not, it will draw the window data into an off-screen pixmap, and then
+copy it to the on-screen window.
+
+
Fl::visual(FL_DOUBLE|FL_INDEX)
-
-
-This makes sure you can use Xdbe on servers where double buffering does
-not exist for every visual.
-
-Methods
-
-
-
-
-Fl_Double_Window::Fl_Double_Window(int x, int y, int w, int h, const char *label = 0)
-
-Creates a new Fl_Double_Window widget using the given position, size, and
-label (title) string.
-
-virtual Fl_Double_Window::~Fl_Double_Window()
-
-The destructor also deletes all the children. This allows a
-whole tree to be deleted at once, without having to keep a pointer to all
-the children in the user code.
-
-ulong Fl_Double_Window::pixmap() const
Returns the off-screen pixmap or back buffer. This value is zero until
the first time flush() is called.
+">
+
+
\ No newline at end of file
diff --git a/documentation/Fl_End.html b/documentation/Fl_End.html
index 7c21a8db2..75597f35f 100644
--- a/documentation/Fl_End.html
+++ b/documentation/Fl_End.html
@@ -1,29 +1,24 @@
-
-
-
-
-
-class Fl_End
-
-
-
-Class Hierarchy
-
-
-Fl_Group----Fl_End
-
-
-Include Files
-
-
-#include <FL/Fl_Group.H>
-
-
-Description
-
-This is a dummy class that allows you to end a group in a constructor list of a class:
-
-class MyClass {
+
+
+class Fl_End
+
+Class Hierarchy
+
+
+Fl_Group----Fl_End
+
+
+Include Files
+
+
+#include <FL/Fl_Group.H>
+
+
+Description
+ This is a dummy class that allows you to end a group in a constructor
+list of a class:
+
+
class MyClass {
Fl_Group group;
Fl_Button button_in_group;
Fl_End end;
@@ -35,17 +30,11 @@ MyClass::MyClass() :
button_in_group(20,20,60,30),
end(),
button_outside_group(10,120,60,30)
-{}
-
-Methods
-
-
-
-
-Fl_End::Fl_End
-
-The constructor does Fl_Group::current()->end().
-
-
-
+{}
+
+Methods
+
+
+Fl_End::Fl_End
+ The constructor does Fl_Group::current()->end().
\ No newline at end of file
diff --git a/documentation/Fl_Float_Input.html b/documentation/Fl_Float_Input.html
index ef005b4a8..fe52eadfe 100644
--- a/documentation/Fl_Float_Input.html
+++ b/documentation/Fl_Float_Input.html
@@ -1,47 +1,35 @@
-
-
-
-
-
-class Fl_Float_Input
-
-
-
-Class Hierarchy
-
-
-Fl_Input
+
+
+class Fl_Float_Input
+
+Class Hierarchy
+
+
+Fl_Input
|
- +----Fl_Float_Input
-
-
-Include Files
-
-
-#include <FL/Fl_Input.H>
-
-
-Description
-
-The Fl_Float_Input class is a subclass of Fl_Input that
-displays its input in red when the value string is not a legal floating point
-value.
-
-Methods
-
-
-
-Fl_Float_Input::Fl_Float_Input(int x, int y, int w, int h, const char *label = 0)
-
-Creates a new Fl_Float_Input widget using the given position, size, and
-label string. The default boxtype is FL_DOWN_BOX.
-
-virtual Fl_Float_Input::~Fl_Float_Input()
-
-Destroys the widget and any value associated with it.
-
-
-
+ +----Fl_Float_Input
+
+
+Include Files
+
+
+#include <FL/Fl_Input.H>
+
+
+Description
+ The Fl_Float_Input class is a subclass of Fl_Input
+ that displays its input in red when the value string is not a legal
+floating point value.
+Methods
+
+
+Fl_Float_Input::Fl_Float_Input(int x, int y, int w, int h, const char
+*label = 0)
+ Creates a new Fl_Float_Input widget using the given position,
+size, and label string. The default boxtype is FL_DOWN_BOX.
+virtual
+Fl_Float_Input::~Fl_Float_Input()
+ Destroys the widget and any value associated with it.
\ No newline at end of file
diff --git a/documentation/Fl_Free.html b/documentation/Fl_Free.html
index 55616cb30..c444faebe 100644
--- a/documentation/Fl_Free.html
+++ b/documentation/Fl_Free.html
@@ -1,74 +1,65 @@
-
-
-
-
-
-class Fl_Free
-
-
-
-Class Hierarchy
-
-
-Fl_Widget
+
+
+class Fl_Free
+
+Class Hierarchy
+
+
+Fl_Widget
|
- +----Fl_Free
-
-
-Include Files
-
-
-#include <FL/Fl_Free.H>
-
-
-Description
-
-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.
-
-
+ +----Fl_Free
+
+
+Include Files
+
+
+#include <FL/Fl_Free.H>
+
+
+Description
+ 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.
+
+
#define FL_NORMAL_FREE 1
#define FL_SLEEPING_FREE 2
#define FL_INPUT_FREE 3
#define FL_CONTINUOUS_FREE 4
#define FL_ALL_FREE 5
-
-
-Methods
-
-
-
-Fl_Free(uchar type, int, int, int, int, const char*l, FL_HANDLEPTR hdl)
-
-The constructor takes both the type and the handle function.
-The handle function should be declared as follows:
-
-
+
+
+Methods
+
+Fl_Free(uchar type, int, int, int, int,
+const char*l, FL_HANDLEPTR hdl)
+ The constructor takes both the type and the handle
+ function. The handle function should be declared as follows:
+
+
int
handle_function(Fl_Widget *w,
int event,
float event_x,
float event_y,
char key)
-
-
-This function is called from the the handle() method in
-response to most events, and is called by the draw() method.
-The event argument contains the event type:
-
-
+
+
+ This function is called from the the handle() method in
+response to most events, and is called by the draw() method.
+The event argument contains the event type:
+
+
// old event names for compatability:
#define FL_MOUSE FL_DRAG
#define FL_DRAW 0
@@ -76,12 +67,8 @@ The event argument contains the event type:
#define FL_FREEMEM 12
#define FL_FREEZE FL_UNMAP
#define FL_THAW FL_MAP
-
-
-virtual Fl_Free::~Fl_Free()
-
-The destructor will call the handle function with the event
-FL_FREE_MEM.
-
-
-
+
+
+virtual Fl_Free::~Fl_Free()
+ The destructor will call the handle function with the event
+FL_FREE_MEM.
\ No newline at end of file
diff --git a/documentation/Fl_Gl_Window.html b/documentation/Fl_Gl_Window.html
index 47828b47c..205d3225c 100644
--- a/documentation/Fl_Gl_Window.html
+++ b/documentation/Fl_Gl_Window.html
@@ -1,166 +1,134 @@
-
-
-
-
-
-class Fl_Gl_Window
-
-
-
-Class Hierarchy
-
-
-Fl_Widget
+
+
+class Fl_Gl_Window
+
+Class Hierarchy
+
+
+Fl_Widget
|
- +----Fl_Gl_Window
+ +----Fl_Gl_Window
|
- +----Fl_Pack, Fl_Scroll, Fl_Tabs, Fl_Tile, Fl_Window
-
-
-Include Files
-
-
-#include <FL/Fl_Gl_Window.H>
-
-
-Description
-
-The Fl_Gl_Window widget sets things up so OpenGL works, and
-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.
-
-Methods
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Fl_Gl_Window::Fl_Gl_Window(int x, int y, int w, int h, const char *label = 0)
-
-Creates a new Fl_Gl_Window widget using the given position, size, and
-label string. The default boxtype is FL_NO_BOX. The default mode is
-FL_RGB|FL_DOUBLE|FL_DEPTH.
-
-virtual Fl_Gl_Window::~Fl_Gl_Window()
-
-The destructor removes the widget and destroys the OpenGL context associated
-with it.
-
-virtual void Fl_Gl_Window::draw(void)
-
-Fl_Gl_Window::draw() is a pure virtual method. You must
-subclass Fl_Gl_Window and provide an implementation for
-draw(). You may also provide an implementation of
-draw_overlay() if you want to draw into the overlay planes. You can
-avoid reinitializing the viewport and lights and other things by
-checking valid() at the start of draw() and only
-doing the initialization if it is false.
-
-const int Fl_Gl_Window::mode() const
-
-Set or change the OpenGL capabilites of the window. The value can be
-any of the following OR'd together:
-
-
-int Fl_Gl_Window::mode(int m)
-
-
-FL_RGB and FL_SINGLE have a value of zero, so they are
-"on" unless you give FL_INDEX or FL_DOUBLE.
-
-static int Fl_Gl_Window::can_do(int)
-
-Returns non-zero if the hardware supports the given or current OpenGL mode.
-
-
-int Fl_Gl_Window::can_do() constchar Fl_Gl_Window::valid() const
-
-Fl_Gl_Window::valid() is turned off when FLTK creates a
-new context for this window or when the window resizes, and is turned
-on after draw() is called. You can use this inside your draw()
-method to avoid unneccessarily initializing the OpenGL context. Just
-do this:
-
-
-void Fl_Gl_Window::valid(char i)
+ +----Fl_Pack, Fl_Scroll, Fl_Tabs, Fl_Tile, Fl_Window
+
+
+Include Files
+
+
+#include <FL/Fl_Gl_Window.H>
+
+
+Description
+ The Fl_Gl_Window widget sets things up so OpenGL works, and
+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.
+Methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Fl_Gl_Window::Fl_Gl_Window(int x,
+int y, int w, int h, const char *label = 0)
+ Creates a new Fl_Gl_Window widget using the given position,
+size, and label string. The default boxtype is FL_NO_BOX. The
+default mode is FL_RGB|FL_DOUBLE|FL_DEPTH.
+virtual
+Fl_Gl_Window::~Fl_Gl_Window()
+ The destructor removes the widget and destroys the OpenGL context
+associated with it.
+virtual void Fl_Gl_Window::draw(void)
+Fl_Gl_Window::draw() is a pure virtual method. You must
+subclass Fl_Gl_Window and provide an implementation for
+draw(). You may also provide an implementation of draw_overlay()
+if you want to draw into the overlay planes. You can avoid
+reinitializing the viewport and lights and other things by checking
+valid() at the start of draw() and only doing the
+initialization if it is false.
+const int Fl_Gl_Window::mode() const
+
+ Set or change the OpenGL capabilites of the window. The value can be
+any of the following OR'd together:
+
int Fl_Gl_Window::mode(int m)
+
+FL_RGB and FL_SINGLE have a value of zero, so they
+are "on" unless you give FL_INDEX or FL_DOUBLE.
+static int Fl_Gl_Window::can_do(int)
+
+ Returns non-zero if the hardware supports the given or current OpenGL
+mode.
+
int Fl_Gl_Window::can_do() constchar Fl_Gl_Window::valid() const
+
+Fl_Gl_Window::valid() is turned off when FLTK creates a new
+context for this window or when the window resizes, and is turned on
+afterdraw() is called. You can use this inside your
+draw() method to avoid unneccessarily initializing the OpenGL
+context. Just do this:
+
void Fl_Gl_Window::valid(char i)
+
void mywindow::draw() {
if (!valid()) {
glViewport(0,0,w(),h());
@@ -171,16 +139,17 @@ void mywindow::draw() {
... draw your geometry here ...
}
-
+
+ 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
+draw() returns.
+
void Fl_Gl_Window::invalidate();
-
void Fl_Gl_Window::valid(char i);
+
void Fl_Gl_Window::invalidate();
+
void Fl_Gl_Window::valid(char i);
-Fl_Gl_Window::valid() is turned off when FLTK creates a
+Fl_Gl_Window::valid() is turned off when FLTK creates a
new context for this window and by the window resizing, and is turned
-on after draw() is called. You can use this inside your draw()
+on after draw() is called. You can use this inside your draw()
method to avoid unneccessarily initializing the OpenGL context. Just
do this:
-void mywindow::draw() {
+
+void mywindow::draw() {
if (!valid()) {
glViewport(0,0,w(),h());
glFrustum(...);
@@ -189,77 +158,61 @@ do this:
}
... draw your geometry here ...
}
-
-
-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 draw() returns.
-
-void Fl_Gl_Window::invalidate()
-
-The invalidate() method turns off valid() and is
-equivalent to calling value(0).
-
-void Fl_Gl_Window::ortho()
-
-Set the projection so 0,0 is in the lower left of the window and each
-pixel is 1 unit wide/tall. If you are drawing 2D images, your
-draw() method may want to call this if valid() is
-false.
-
-void Fl_Gl_Window::make_current()
-
-The make_current() method selects the OpenGL context for the
-widget. It is called automatically prior to the draw() method
-being called and can also be used to implement feedback and/or selection
-within the handle() method.
-
-void Fl_Gl_Window::make_overlay_current()
-
-The make_overlay_current() method selects the OpenGL context
-for the widget's overlay. It is called automatically prior to the
-draw_overlay() method being called and can also be used to
-implement feedback and/or selection within the handle()
-method.
-
-void Fl_Gl_Window::swap_buffers()
-
-The swap_buffers() method swaps the back and front buffers.
-It is called automatically after the draw() method is called.
-
-void Fl_Gl_Window::hide()
-
-Hides the window and destroys the OpenGL context.
-
-int Fl_Gl_Window::can_do_overlay()
-
-Returns true if the hardware overlay is possible. If this is false,
-FLTK will try to simulate the overlay, with significant loss of update
-speed. Calling this will cause FLTK to open the display.
-
-void Fl_Gl_Window::redraw_overlay()
-
-This method causes draw_overlay to be called at a later time.
-Initially the overlay is clear, if you want the window to display
-something in the overlay when it first appears, you must call this
-immediately after you show() your window.
-
-virtual void Fl_Gl_Window::draw_overlay()
-
-You must implement this virtual function if you want to draw into the
-overlay. The overlay is cleared before this is called. You should
-draw anything that is not clear using OpenGL. You must use
-gl_color(i) to choose colors (it allocates them from the colormap
-using system-specific calls), and remember that you are in an indexed
-OpenGL mode and drawing anything other than flat-shaded will probably
-not work.
-
-void Fl_Gl_Window::invalidate()
+ The invalidate() method turns off valid() and is
+equivalent to calling value(0).
+void Fl_Gl_Window::ortho()
+ Set the projection so 0,0 is in the lower left of the window and each
+pixel is 1 unit wide/tall. If you are drawing 2D images, your
+draw() method may want to call this if valid() is false.
+void Fl_Gl_Window::make_current()
+
+ The make_current() method selects the OpenGL context for the
+widget. It is called automatically prior to the draw() method
+being called and can also be used to implement feedback and/or
+selection within the handle() method.
+void
+Fl_Gl_Window::make_overlay_current()
+ The make_overlay_current() method selects the OpenGL context
+for the widget's overlay. It is called automatically prior to the
+draw_overlay() method being called and can also be used to
+implement feedback and/or selection within the handle()
+ method.
+void Fl_Gl_Window::swap_buffers()
+
+ The swap_buffers() method swaps the back and front buffers.
+It is called automatically after the draw() method is called.
+void Fl_Gl_Window::hide()
+ Hides the window and destroys the OpenGL context.
+int
+Fl_Gl_Window::can_do_overlay()
+ Returns true if the hardware overlay is possible. If this is false,
+FLTK will try to simulate the overlay, with significant loss of update
+speed. Calling this will cause FLTK to open the display.
+void
+Fl_Gl_Window::redraw_overlay()
+ This method causes draw_overlay to be called at a later time.
+ Initially the overlay is clear, if you want the window to display
+something in the overlay when it first appears, you must call this
+immediately after you show() your window.
+virtual void
+Fl_Gl_Window::draw_overlay()
+ You must implement this virtual function if you want to draw into the
+overlay. The overlay is cleared before this is called. You should
+draw anything that is not clear using OpenGL. You must use
+gl_color(i) to choose colors (it allocates them from the colormap
+using system-specific calls), and remember that you are in an indexed
+OpenGL mode and drawing anything other than flat-shaded will probably
+not work.
+
-
-class Fl_Group
-
-
-
-Class Hierarchy
-
-
-Fl_Widget
+
+
+class Fl_Group
+
+Class Hierarchy
+
+
+Fl_Widget
|
- +----Fl_Group
+ +----Fl_Group
|
- +----Fl_Pack, Fl_Scroll, Fl_Tabs, Fl_Tile, Fl_Window
-
-
-Include Files
-
-
-#include <FL/Fl_Group.H>
-
-
-Description
-
-The Fl_Group class is the FLTK container widget. It maintains
-an array of child widgets. These children can themselves be any widget
-including Fl_Group. The most important subclass of Fl_Group
-is Fl_Window, however groups can also
-be used to control radio buttons or to enforce resize behavior.
-
-Methods
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Fl_Group::Fl_Group(int x, int y, int w, int h, const char *label = 0)
-
-Creates a new Fl_Group widget using the given position, size, and
-label string. The default boxtype is FL_NO_BOX.
-
-virtual Fl_Group::~Fl_Group()
-
-The destructor also deletes all the children. 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
-Fl_Group and all of it's children can be automatic (local)
-variables, but you must declare the Fl_Group first, so
-that it is destroyed last.
-
-void Fl_Group::add(Fl_Widget &w)
-
-Adds a widget to the group at the end of the child array.
-
-
-void Fl_Group::add(Fl_Widget *w)Fl_Group &Fl_Group::add_resizable(Fl_Widget &box)
-
-Adds a widget to the group and makes it the resizable widget.
-
-const Fl_Widget **Fl_Group::array() const
-
-Returns a pointer to the array of children. This pointer can change
-when children are added or removed!
-
-void Fl_Group::begin()
-
-begin() sets the current group so you can build the widget tree
-by just constructing the widgets. begin() is automatically called by
-the constructor for Fl_Group (and thus for Fl_Window as well).
-begin() does current(this).
-
-Fl_Widget *Fl_Group::child(int n) const
-
-Returns child n, where 0 <= n < children().
-
-int Fl_Group::children() const
-
-Returns how many child widgets the group has.
-
-static Fl_Group *Fl_Group::current()
-
-current() returns the currently active group in the widget tree.
-To prevent widgets from being added to a group, call current()
-with a NULL group.
-
-
-static void Fl_Group::current(Fl_Group *w)void Fl_Group::end()
-
-end() does current(this->parent()). Any new widgets added
-to the widget tree will be added to the parent of the group.
-
-int Fl_Group::find(const Fl_Widget *w) const
-
-Searches the child array for the widget and returns the index. Returns
-children() if the widget is
-NULL or not found.
-
-
-int Fl_Group::find(const Fl_Widget &w) constvoid Fl_Group::insert(Fl_Widget &w, int n)
-
-Inserts a widget into the child array. It is put at index n which
-must be less or equal to children(). The second version does a
-find(beforethis) and inserts using that index.
-
-
-void Fl_Group::insert(Fl_Widget &w, Fl_Widget *beforethis)void Fl_Group::remove(Fl_Widget &w)
-
-Removes a widget from the group. This does nothing if the widget
-is not currently a child of this group.
-
-void Fl_Group::resizable(Fl_Widget *box)
-
-The resizable widget defines the resizing box for the group. When the
-group is resized it calculates a new size and position for all of its
-children. Widgets that are horizontally or vertically inside the dimensions
-of the box are scaled to the new size. Widgets outside the box are moved.
-
-
-void Fl_Group::resizable(Fl_Widget &box)
-Fl_Widget *Fl_Group::resizable() const
-
-
-
-
-Include Files
+
+
+#include <FL/Fl_Group.H>
+
+
+Description
+ The Fl_Group class is the FLTK container widget. It maintains
+an array of child widgets. These children can themselves be any widget
+including Fl_Group. The most important subclass of Fl_Group
+ is Fl_Window, however
+groups can also be used to control radio buttons or to enforce resize
+behavior.
+Methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Fl_Group::Fl_Group(int x, int y, int w,
+int h, const char *label = 0)
+ Creates a new Fl_Group widget using the given position, size,
+and label string. The default boxtype is FL_NO_BOX.
+virtual Fl_Group::~Fl_Group()
+ The destructor also deletes all the children. 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
+Fl_Group and all of it's children can be automatic (local)
+variables, but you must declare the Fl_Groupfirst, so
+that it is destroyed last.
+void Fl_Group::add(Fl_Widget &w)
+
+ Adds a widget to the group at the end of the child array.
+
void Fl_Group::add(Fl_Widget *w)Fl_Group
+&Fl_Group::add_resizable(Fl_Widget &box)
+ Adds a widget to the group and makes it the resizable widget.
+const Fl_Widget **Fl_Group::array() const
+ Returns a pointer to the array of children. This pointer can change
+when children are added or removed!
+void Fl_Group::begin()
+begin() sets the current group so you can build the widget
+tree by just constructing the widgets. begin() is
+automatically called by the constructor for Fl_Group (and thus for
+Fl_Window as well). begin() does current(this).
+Fl_Widget *Fl_Group::child(int n) const
+ Returns child n, where 0
+
+.
+int Fl_Group::children() const
+ Returns how many child widgets the group has.
+static Fl_Group *Fl_Group::current()
+
+current() returns the currently active group in the widget
+tree. To prevent widgets from being added to a group, call current()
+ with a NULL group.
+
static void Fl_Group::current(Fl_Group *w)void Fl_Group::end()
+end() does current(this->parent()). Any new widgets
+added to the widget tree will be added to the parent of the group.
+int Fl_Group::find(const Fl_Widget *w) const
+
+ Searches the child array for the widget and returns the index. Returns children() if the widget is
+NULL or not found.
+
int Fl_Group::find(const Fl_Widget &w) constvoid Fl_Group::insert(Fl_Widget &w, int n)
+
+ Inserts a widget into the child array. It is put at index n
+ which must be less or equal to children(). The second version does a
+find(beforethis) and inserts using that index.
+
void Fl_Group::insert(Fl_Widget &w, Fl_Widget *beforethis)void Fl_Group::remove(Fl_Widget &w)
+ Removes a widget from the group. This does nothing if the widget is
+not currently a child of this group.
+void Fl_Group::resizable(Fl_Widget *box)
+
+ The resizable widget defines the resizing box for the group. When the
+group is resized it calculates a new size and position for all of its
+children. Widgets that are horizontally or vertically inside the
+dimensions of the box are scaled to the new size. Widgets outside the
+box are moved.
+
void Fl_Group::resizable(Fl_Widget &box)
+
Fl_Widget *Fl_Group::resizable() const

-
-class Fl_Hold_Browser
-
-
-
-Class Hierarchy
-
-
-Fl_Browser
+
+
+class Fl_Hold_Browser
+
+Class Hierarchy
+
+
+Fl_Browser
|
- +----Fl_Hold_Browser
-
-
-Include Files
-
-
-#include <FL/Fl_Hold_Browser.H>
-
-
-Description
-
-The Fl_Hold_Browser class is a subclass of Fl_Browser
-which lets the user select a single item, or no items by clicking on
-the empty space. As long as the mouse button is held down the item
-pointed to by it is highlighted, and this highlighting remains on when
-the mouse button is released. Normally the callback is done when the
-user releases the mouse, but you can change this with when().
-
-Methods
-
-
-
-
-Fl_Hold_Browser::Fl_Hold_Browser(int x, int y, int w, int h, const char *label = 0)
-
-Creates a new Fl_Hold_Browser widget using the given position, size, and
-label string. The default boxtype is FL_DOWN_BOX.
-
-virtual Fl_Hold_Browser::~Fl_Hold_Browser()
-
-The destructor also deletes all the items in the list.
-
-int Fl_Browser::deselect()
-
-Same as value(0).
-
-int Fl_Browser::select(int,int=1)
-
-You can use these for compatibility with
-Fl_Multi_Browser. If you
-turn on the selection of more than one line the results are
-unpredictable.
-
-
-int Fl_Browser::selected(int) constint Fl_Browser::value() const
-
-Set or get which line is selected. This returns zero if no line is
-selected, so be aware that this can happen in a callback.
-
-
-
+ +----Fl_Hold_Browser
+
+
+
-void Fl_Browser::value(int)Include Files
+
+
+#include <FL/Fl_Hold_Browser.H>
+
+
+Description
+ The Fl_Hold_Browser class is a subclass of Fl_Browser
+ which lets the user select a single item, or no items by clicking on
+the empty space. As long as the mouse button is held down the item
+pointed to by it is highlighted, and this highlighting remains on when
+the mouse button is released. Normally the callback is done when the
+user releases the mouse, but you can change this with when().
+Methods
+
+
+Fl_Hold_Browser::Fl_Hold_Browser(int x, int y, int w, int h, const char
+*label = 0)
+ Creates a new Fl_Hold_Browser widget using the given
+position, size, and label string. The default boxtype is FL_DOWN_BOX
+.
+virtual
+Fl_Hold_Browser::~Fl_Hold_Browser()
+ The destructor also deletes all the items in the list.
+int Fl_Browser::deselect()
+ Same as value(0).
+int Fl_Browser::select(int,int=1)
+
+ You can use these for compatibility with
+Fl_Multi_Browser. If you turn on the selection of more
+than one line the results are unpredictable.
+
int Fl_Browser::selected(int) constint Fl_Browser::value() const
+
+ Set or get which line is selected. This returns zero if no line is
+selected, so be aware that this can happen in a callback.
\ No newline at end of file
diff --git a/documentation/Fl_Input.html b/documentation/Fl_Input.html
index 89e10d235..98614ffb9 100644
--- a/documentation/Fl_Input.html
+++ b/documentation/Fl_Input.html
@@ -1,256 +1,179 @@
-
-
-
-
void Fl_Browser::value(int)
-
-class Fl_Input
-
-
-
-Class Hierarchy
-
-
-Fl_Input_
+
+
+class Fl_Input
+
+Class Hierarchy
+
+
+Fl_Input_
|
- +----Fl_Input
+ +----Fl_Input
|
- +----Fl_Float_Input, Fl_Int_Input,
- Fl_Multiline_Input, Fl_Secret_Input
-
-
-Include Files
-
-
-#include <FL/Fl_Input.H>
-
-
-Description
-
-This is the FLTK text input widget. It displays a single line of text
-and lets the user edit it. Normally it is drawn with an inset box and
-a white background. The text may contain any characters (even 0), and
-will correctly display anything, using ^X notation for unprintable
-control characters and \nnn notation for unprintable characters with
-the high bit set. It assummes the font can draw any characters in the
-ISO8859-1 character set.
-
-
-
-
-
-Mouse button 1
-Moves the cursor to this point. Drag selects characters. Double
-click selects words. Triple click selects all text. Shift+click
-extends the selection.
-
-Mouse button 2
-Insert the current X selection at the cursor (unlike Motif this
-does not move the insertion point to the mouse). If the widget does
-not have the input focus (and thus no cursor) it puts the cursor where
-clicked and inserts the selection there.
-
-Mouse button 3
-Currently acts like button 1.
-
-Backspace
-Deletes one character to the left, or deletes the
-selected region.
-
-Enter
-May cause the callback, see when().
-
-^A or Home
-Go to start of line.
-
-^B or Left
-Move left
-
-^C
-Copy the selection to the clipboard
-
-^D or Delete
-Deletes one character to the right or deletes the selected region.
-Due to silly historical X problems, the Delete key will act like
-Backspace until you type a "real" backspace.
-
-^E or End
-Go to the end of line.
-
-^F or Right
-Move right
-
-^K
-Delete to the end of line (next \n character) or deletes
-a single \n character. These deletions are all concatenated into the
-clipboard.
-
-^N or Down
-Move down (for Fl_Multiline_Input only, otherwise it moves to the
-next input field).
-
-^P or Up
-Move up (for Fl_Multiline_Input only, otherwise it moves to the
-previous input field).
-
-^Q or
-
RightCtrl or
ComposeStart a compose-character sequence. The
-next one or two keys typed define the character to insert. This also
-can be used to "quote" control characters.
-
-^U
-Delete everything.
-
-^V or ^Y
-Paste the clipboard
-
-^X or ^W
-Copy the region to the clipboard and delete it.
-
-^Z or ^_
-Undo. 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.
-
-Shift+move
-Move the cursor but also extend the selection.
-
-Methods
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Fl_Input::Fl_Input(int x, int y, int w, int h, const char *label = 0)
-
-Creates a new Fl_Input widget using the given position, size, and
-label string. The default boxtype is FL_DOWN_BOX.
-
-virtual Fl_Input::~Fl_Input()
-
-Destroys the widget and any value associated with it.
-
-const char *Fl_Input::value() const
-
-The first form returns the current value, which is a pointer to the
-internal buffer and is valid only until the next event is
-handled.
-
-
-int Fl_Input::value(const char*)
-int Fl_Input::value(const char*, int)int Fl_Input::static_value(const char*)
-
-Change the text and set the mark and the point to the end of it. The
-string is not copied. If the user edits the string it is copied
-to the internal buffer then. This can save a great deal of time and
-memory if your program is rapidly changing the values of text fields,
-but this will only work if the passed string remains unchanged until
-either the Fl_Input is destroyed or value() is called
-again.
-
-
-int Fl_Input::static_value(const char*, int)int Fl_Input::size() const
-
-Returns the number of characters in value(). This may be greater than
-strlen(value()) if there are nul characters in it.
-
-char Fl_Input::index(int) const
-
-Same as value()[n], but may be faster in plausible implementations.
-No bounds checking is done.
-
-Fl_When Fl_Widget::when() const
-
-Controls when callbacks are done. The following values are useful,
-the default value is FL_WHEN_RELEASE:
-
-
-void Fl_Widget::when(Fl_When)
-
-
-Fl_Color Fl_Input::textcolor() const
-
-Gets or sets the color of the text in the input field.
-
-
-void Fl_Input::textcolor(Fl_Color)Fl_Font Fl_Input::textfont() const
-
-Gets or sets the font of the text in the input field.
-
-
-void Fl_Input::textfont(Fl_Font)uchar Fl_Input::textsize() const
-
-Gets or sets the size of the text in the input field.
-
-
-void Fl_Input::textsize(uchar)Fl_Color Fl_Input::cursor_color() const
-
-Get or set the color of the cursor. This is black by default.
-
-
-
+ +----Fl_Float_Input, Fl_Int_Input,
+ Fl_Multiline_Input, Fl_Secret_Input
+
+
+
-void Fl_Input::cursor_color(Fl_Color)Include Files
+
+
+#include <FL/Fl_Input.H>
+
+
+Description
+ This is the FLTK text input widget. It displays a single line of text
+and lets the user edit it. Normally it is drawn with an inset box and
+a white background. The text may contain any characters (even 0), and
+will correctly display anything, using ^X notation for unprintable
+control characters and \nnn notation for unprintable characters with
+the high bit set. It assummes the font can draw any characters in the
+ISO8859-1 character set.
+
+
+
+Mouse button 1 Moves the cursor to this point.
+ Drag selects characters. Double click selects words. Triple click
+selects all text. Shift+click extends the selection.
+Mouse button 2 Insert the current X selection at
+the cursor (unlike Motif this does not move the insertion point to the
+mouse). If the widget does not have the input focus (and thus no
+cursor) it puts the cursor where clicked and inserts the selection
+there.
+Mouse button 3 Currently acts like button 1.
+Backspace Deletes one character to the left, or
+deletes the selected region.
+Enter May cause the callback, see when().
+^A or Home Go to start of line.
+^B or Left Move left
+^C Copy the selection to the clipboard
+^D or Delete Deletes one character to the right
+or deletes the selected region. Due to silly historical X problems,
+the Delete key will act like Backspace until you type a "real"
+backspace.
+^E or End Go to the end of line.
+^F or Right Move right
+^K Delete to the end of line (next \n character)
+or deletes a single \n character. These deletions are all concatenated
+into the clipboard.
+^N or Down Move down (for Fl_Multiline_Input
+only, otherwise it moves to the next input field).
+^P or Up Move up (for Fl_Multiline_Input only,
+otherwise it moves to the previous input field).
+^Q or
+
RightCtrl or
+
ComposeStart a compose-character
+ sequence. The next one or two keys typed define the character to
+insert. This also can be used to "quote" control characters.
+^U Delete everything.
+^V or ^Y Paste the clipboard
+^X or ^W Copy the region to the clipboard and
+delete it.
+^Z or ^_ Undo. 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.
+Shift+move Move the cursor but also extend the
+selection. Methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Fl_Input::Fl_Input(int x, int y, int w,
+int h, const char *label = 0)
+ Creates a new Fl_Input widget using the given position, size,
+and label string. The default boxtype is FL_DOWN_BOX.
+virtual Fl_Input::~Fl_Input()
+ Destroys the widget and any value associated with it.
+const char *Fl_Input::value() const
+
+ The first form returns the current value, which is a pointer to the
+internal buffer and is valid only until the next event is handled.
+
int Fl_Input::value(const char*)
+
int Fl_Input::value(const char*, int)int Fl_Input::static_value(const
+char*)
+
+ Change the text and set the mark and the point to the end of it. The
+string is not copied. If the user edits the string it is copied
+to the internal buffer then. This can save a great deal of time and
+memory if your program is rapidly changing the values of text fields,
+but this will only work if the passed string remains unchanged until
+either the Fl_Input is destroyed or value() is called
+again.
+
int Fl_Input::static_value(const char*, int)int Fl_Input::size() const
+ Returns the number of characters in value(). This may be
+greater than strlen(value()) if there are nul characters in
+it.
+char Fl_Input::index(int) const
+ Same as value()[n], but may be faster in plausible
+implementations. No bounds checking is done.
+Fl_When Fl_Widget::when() const
+
+ Controls when callbacks are done. The following values are useful,
+the default value is FL_WHEN_RELEASE:
+
void Fl_Widget::when(Fl_When)
+
+Fl_Color Fl_Input::textcolor() const
+
+ Gets or sets the color of the text in the input field.
+
void Fl_Input::textcolor(Fl_Color)Fl_Font Fl_Input::textfont() const
+
+ Gets or sets the font of the text in the input field.
+
void Fl_Input::textfont(Fl_Font)uchar Fl_Input::textsize() const
+
+ Gets or sets the size of the text in the input field.
+
void Fl_Input::textsize(uchar)Fl_Color Fl_Input::cursor_color()
+const
+
+ Get or set the color of the cursor. This is black by default.
\ No newline at end of file
diff --git a/documentation/Fl_Input_.html b/documentation/Fl_Input_.html
index 7dd9f6c63..a270f5f57 100644
--- a/documentation/Fl_Input_.html
+++ b/documentation/Fl_Input_.html
@@ -1,220 +1,172 @@
-
-
-
-
void Fl_Input::cursor_color(Fl_Color)
-
-class Fl_Input_
-
-
-
-Class Hierarchy
-
-
-Fl_Widget
+
+
+class Fl_Input_
+
+Class Hierarchy
+
+
+Fl_Widget
|
- +----Fl_Input_
+ +----Fl_Input_
|
- +----Fl_Input
-
-
-Include Files
-
-
-#include <FL/Fl_Input_.H>
-
-
-Description
-
-This is a virtual base class below
-Fl_Input. It has all the same interfaces,
-but lacks the handle() and draw() method. You may
-want to subclass it if you are one of those people who likes to change
-how the editing keys work.
-
-
+ +----Fl_Input
+
+
+Include Files
+
+
+#include <FL/Fl_Input_.H>
+
+
+Description
+ This is a virtual base class below
+Fl_Input. It has all the same interfaces, but lacks the
+handle() and draw() method. You may want to subclass it
+if you are one of those people who likes to change how the editing keys
+work.
+
+
#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
-
-
-Methods
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Fl_Input_::Fl_Input_(int x, int y, int w, int h, const char *label = 0)
-
-Creates a new Fl_Input_ widget using the given position, size, and
-label string. The default boxtype is FL_DOWN_BOX.
-
-virtual Fl_Input_::~Fl_Input_()
-
-The destructor removes the widget and any value associated with it.
-
-int Fl_Input_::wordboundary(int i) const
-
-Returns true if position i is at the start or end of a word.
-
-int Fl_Input_::lineboundary(int i) const
-
-Returns true if position i is at the start or end of a line.
-
-void Fl_Input_::drawtext(int,int,int,int)
-
-Draw the text in the passed bounding box. If damage() &
-FL_DAMAGE_ALL is true, this assummes the area has already been
-erased to color(). Otherwise it does minimal update and
-erases the area itself.
-
-void Fl_Input_::handletext(int e,int,int,int,int)
-
-Default handler for all event types. Your handle() method
+
+
+Methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Fl_Input_::Fl_Input_(int x, int y, int
+w, int h, const char *label = 0)
+ Creates a new Fl_Input_ widget using the given position,
+size, and label string. The default boxtype is FL_DOWN_BOX.
+virtual Fl_Input_::~Fl_Input_()
+ The destructor removes the widget and any value associated with it.
+int Fl_Input_::wordboundary(int i)
+const
+ Returns true if position i is at the start or end of a word.
+int Fl_Input_::lineboundary(int i)
+const
+ Returns true if position i is at the start or end of a line.
+void Fl_Input_::drawtext(int,int,int,int)
+
+ Draw the text in the passed bounding box. If damage()
+FL_DAMAGE_ALL is true, this assummes the area has already been
+erased to color(). Otherwise it does minimal update and
+erases the area itself.
+void Fl_Input_::handletext(int
+e,int,int,int,int)
+ Default handler for all event types. Your handle() method
should call this for all events that it does not handle completely.
-You must pass it the same bounding box as passed to draw().
-Handles FL_PUSH, FL_DRAG, FL_RELEASE to
-select text, handles FL_FOCUS and FL_UNFOCUS to show
-and hide the cursor.
-
-int Fl_Input_::up_down_position(int i, int keepmark=0)
-
-Do the correct thing for arrow keys. Sets the position (and mark if
-keepmark is zero) to somewhere in the same line as
-i, such that pressing the arrows repeatedly will cause the
-point to move up and down.
-
-void Fl_Input_::maybe_do_callback()
-
-Does the callback if changed() is true or if when() &
-FL_WHEN_NOT_CHANGED is non-zero. You should call this at any
-point you think you should generate a callback.
-
-int Fl_Input_::position() const
-
-The input widget maintains two pointers into the string. The "position" is
-where the cursor is. The "mark" is the other end of the selected
-text. If they are equal then there is no selection. Changing this
-does not affect the clipboard (use copy() to do that).
-
-
-int Fl_Input_::position(int new_position, int new_mark)
-int Fl_Input_::position(int new_position_and_new_mark)int Fl_Input_::mark() const
-
-Gets or sets the current selection mark. mark(n) is the same
-as position(position(),n).
-
-
-int Fl_Input_::mark(int new_mark)int Fl_Input_::replace(int a, int b, const char *insert, int length=0)
-
-This call does all editing of the text. It deletes the region between
-a and b (either one may be less or equal to the
-other), and then inserts the string insert at that point and
-leaves the mark() and position() after the
-insertion. Does the callback if when() & FL_WHEN_CHANGED and
-there is a change.
-
-int Fl_Input_::cut()
-
-Fl_Input_::cut() deletes the current selection.
-cut(n) deletes n characters after the
-position(). cut(-n) deletes n characters
-before the position(). cut(a,b) deletes the
-characters between offsets a and b. A,
-b, and n are all clamped to the size of the string.
-The mark and point are left where the deleted text was.
-
-
-int Fl_Input_::cut(int n)
-int Fl_Input_::cut(int a, int b);int Fl_Input_::insert(const char *t,int l=0)
-
-Insert the string t at the current position, and leave the
-mark and position after it. If l is not zero then it is
-assummed to be strlen(t).
-
-int Fl_Input_::copy()
-
-Put the current selection between mark() and
-position() into the clipboard. Does not replace the old
-clipboard contents if position() and mark() are
-equal.
-
-int Fl_Input_::undo()
-
-Does undo of several previous calls to replace(). Returns
-non-zero if any change was made.
-
-int Fl_Input_::copy_cuts()
-
-Copy all the previous contiguous cuts from the undo information to the
-clipboard. This is used to make ^K work.
-
-
-
+ You must pass it the same bounding box as passed to draw().
+ Handles FL_PUSH, FL_DRAG, FL_RELEASE to
+select text, handles FL_FOCUS and FL_UNFOCUS to show
+and hide the cursor.
+int
+Fl_Input_::up_down_position(int i, int keepmark=0)
+ Do the correct thing for arrow keys. Sets the position (and mark if
+keepmark is zero) to somewhere in the same line as i, such
+that pressing the arrows repeatedly will cause the point to move up and
+down.
+void
+Fl_Input_::maybe_do_callback()
+ Does the callback if changed() is true or if when()
+FL_WHEN_NOT_CHANGED is non-zero. You should call this at any
+point you think you should generate a callback.
+int Fl_Input_::position() const
+
+ The input widget maintains two pointers into the string. The
+"position" is where the cursor is. The "mark" is the other end of the
+selected text. If they are equal then there is no selection. Changing
+this does not affect the clipboard (use copy() to do that).
+
int Fl_Input_::position(int new_position, int new_mark)
+
int Fl_Input_::position(int new_position_and_new_mark)int Fl_Input_::mark() const
+
+ Gets or sets the current selection mark. mark(n) is the same
+as position(position(),n).
+
int Fl_Input_::mark(int new_mark)int Fl_Input_::replace(int a, int b,
+const char *insert, int length=0)
+ This call does all editing of the text. It deletes the region between
+a and b (either one may be less or equal to the other),
+and then inserts the string insert at that point and leaves
+the mark() and position() after the insertion. Does
+the callback if when() FL_WHEN_CHANGED and there is a change.
+int Fl_Input_::cut()
+
+Fl_Input_::cut() deletes the current selection. cut(n)
+ deletes n characters after the position().
+cut(-n) deletes n characters before the position()
+. cut(a,b) deletes the characters between offsets a
+ and b. A, b, and n are all clamped
+to the size of the string. The mark and point are left where the
+deleted text was.
+
int Fl_Input_::cut(int n)
+
int Fl_Input_::cut(int a, int b);int Fl_Input_::insert(const char *t,int
+l=0)
+ Insert the string t at the current position, and leave the
+mark and position after it. If l is not zero then it is
+assummed to be strlen(t).
+int Fl_Input_::copy()
+ Put the current selection between mark() and position()
+ into the clipboard. Does not replace the old clipboard contents if
+position() and mark() are equal.
+int Fl_Input_::undo()
+ Does undo of several previous calls to replace(). Returns
+non-zero if any change was made.
+int Fl_Input_::copy_cuts()
+ Copy all the previous contiguous cuts from the undo information to the
+clipboard. This is used to make ^K work.
\ No newline at end of file
diff --git a/documentation/Fl_Int_Input.html b/documentation/Fl_Int_Input.html
index e76cc43ef..78382ebc2 100644
--- a/documentation/Fl_Int_Input.html
+++ b/documentation/Fl_Int_Input.html
@@ -1,47 +1,34 @@
-
-
-
-
-
-class Fl_Int_Input
-
-
-
-Class Hierarchy
-
-
-Fl_Input
+
+
+class Fl_Int_Input
+
+Class Hierarchy
+
+
+Fl_Input
|
- +----Fl_Int_Input
-
-
-Include Files
-
-
-#include <FL/Fl_Input.H>
-
-
-Description
-
-The Fl_Int_Input class is a subclass of Fl_Input that
-displays its input in red when the value string is not a legal integer
-value.
-
-Methods
-
-
-
-
-Fl_Int_Input::Fl_Int_Input(int x, int y, int w, int h, const char *label = 0)
-
-Creates a new Fl_Int_Input widget using the given position, size, and
-label string. The default boxtype is FL_DOWN_BOX.
-
-virtual Fl_Int_Input::~Fl_Int_Input()
-
-Destroys the widget and any value associated with it.
-
-
-
+ +----Fl_Int_Input
+
+
+Include Files
+
+
+#include <FL/Fl_Input.H>
+
+
+Description
+ The Fl_Int_Input class is a subclass of Fl_Input
+ that displays its input in red when the value string is not a legal
+integer value.
+Methods
+
+Fl_Int_Input::Fl_Int_Input(int x,
+int y, int w, int h, const char *label = 0)
+ Creates a new Fl_Int_Input widget using the given position,
+size, and label string. The default boxtype is FL_DOWN_BOX.
+virtual
+Fl_Int_Input::~Fl_Int_Input()
+ Destroys the widget and any value associated with it.
\ No newline at end of file
diff --git a/documentation/Fl_Light_Button.html b/documentation/Fl_Light_Button.html
index d60af5c97..658e24b1a 100644
--- a/documentation/Fl_Light_Button.html
+++ b/documentation/Fl_Light_Button.html
@@ -1,53 +1,40 @@
-
-
-
-
-
-class Fl_Light_Button
-
-
-
-Class Hierarchy
-
-
-Fl_Button
+
+
+class Fl_Light_Button
+
+Class Hierarchy
+
+
+Fl_Button
|
- +----Fl_Light_Button
-
-
-Include Files
-
-
-#include <FL/Fl_Light_Button.H>
-
-
-Description
-
-Buttons generate callbacks when they are clicked by the user. You
-control exactly when and how by changing the values for type() and
-when().
-
-Methods
-
-
-
-Fl_Light_Button::Fl_Light_Button(int x, int y, int w, int h, const char *label = 0)
-
-Creates a new Fl_Light_Button widget using the given position,
-size, and label string.
-
-Fl_Light_Button::~Fl_Light_Button()
-
-The destructor deletes the check button.
-
-
-
+ +----Fl_Light_Button
+
+
+Include Files
+
+
+#include <FL/Fl_Light_Button.H>
+
+
+Description
+ Buttons generate callbacks when they are clicked by the user. You
+control exactly when and how by changing the values for type()
+ and when().
+Methods
+
+
+Fl_Light_Button::Fl_Light_Button(int x, int y, int w, int h, const char
+*label = 0)
+ Creates a new Fl_Light_Button widget using the given
+position, size, and label string.
+
+Fl_Light_Button::~Fl_Light_Button()
+ The destructor deletes the check button.
\ No newline at end of file
diff --git a/documentation/Fl_Menu_.html b/documentation/Fl_Menu_.html
index f35816496..93fafc7e7 100644
--- a/documentation/Fl_Menu_.html
+++ b/documentation/Fl_Menu_.html
@@ -1,220 +1,163 @@
-
-
-
-
-
-class Fl_Menu_
-
-
-
-Class Hierarchy
-
-
-Fl_Widget
+
+
+class Fl_Menu_
+
+Class Hierarchy
+
+
+Fl_Widget
|
- +----Fl_Menu_----Fl_Menu_Item
+ +----Fl_Menu_----Fl_Menu_Item
|
- +----Fl_Choice, Fl_Menu_Bar, Fl_Menu_Button
-
-
-Include Files
-
-
-#include <FL/Fl_Menu_.H>
-
-
-Description
-
-All widgets that have a menu in FLTK are subclassed off of this class.
-Currently FLTK provides you with
-Fl_Menu_Button,
-Fl_Menu_Bar, and
-Fl_Choice.
-
-Methods
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Fl_Menu_::Fl_Menu_(int x, int y, int w, int h, const char *label = 0)
-
-Creates a new Fl_Menu_ widget using the given position, size, and
-label string. The default boxtype is FL_NO_BOX.
-
-virtual Fl_Menu_::~Fl_Menu_()
-
-Destroys the menu and its items.
-
-const Fl_Menu_Item* Fl_Menu_::menu() const
-
-Get or set the menu array directly. Setting it to NULL indicates that
-you want the widget to allocate its own array.
-
-
-void Fl_Menu_::menu(const Fl_Menu_Item*)int Fl_Menu_::value() const
-
-The value is the index into menu() of the last item chosen by the
-user. It is zero initially. You can set it as an integer, or set it
-with a pointer to a menu item. The set routines return non-zero if
-the new value is different than the old one.
-
-
-int Fl_Menu_::value(int)
-int Fl_Menu_::value(const Fl_Menu_Item*)const Fl_Menu_Item* Fl_Menu_::test_shortcut()
-
-Only call this in response to FL_SHORTCUT events. If the event
-matches an entry in the menu that entry is selected and the callback
-will be done (or changed() will be set). This allows shortcuts
-directed at one window to call menus in another.
-
-void Fl_Menu_::global()
-
-Make the shortcuts for this menu work no matter what window has the
-focus when you type it. This is done by using Fl::add_handler(). This
-Fl_Menu_ widget does not have to be visible (ie the window it
-is in can be hidden, or it does not have to be put in a window at all).
-
-const char* Fl_Menu_::text() const
-
-Returns the title of the last item chosen, or of item i.
-
-
-const char* Fl_Menu_::text(int i) constint Fl_Menu_::size() const
-
-This returns menu()->size(), which is how many entries are in
-the array, not counting the NULL ending, but including all
-submenus titles and the NULL's that end them. If the menu is
-NULL this returns zero.
-
-int Fl_Menu_::add(const char *,const char *,Fl_Callback *,void *v=0,int f=0)
-
-The first form adds a new menu item, with a title string,
-shortcut string, callback, argument to the callback,
-and flags. If menu() was originally set with NULL
-then space is allocated for the new item. If instead you gave it an
-array then the array must have enough empty space for the new item.
-The title string is copied, but the shortcut is not.
-
-
-int Fl_Menu_::add(const char *)void Fl_Menu_::clear()
-
-Delete all the menu items. Don't do this if you used menu(x) to
-set it to your own array. You should do this before destroying the
-Fl_Menu_ widget if it uses it's own array.
-
-void Fl_Menu_::replace(int n, const char *)
-
-Changes the text of item n. The passed string is copied.
-
-void Fl_Menu_::remove(int n)
-
-Deletes item n from the menu.
-
-void Fl_Menu_::shortcut(int i, int n);
-
-Changes the shortcut of item i to n.
-
-void Fl_Menu_::mode(int i,int x);
-
-Changes the flags of item i.
-
-Fl_Color Fl_Menu_::textcolor() const
-
-Get or set the current color of menu item labels.
-
-
-void Fl_Menu_::textcolor(Fl_Color)Fl_Font Fl_Menu_::textfont() const
-
-Get or set the current font of menu item labels.
-
-
-void Fl_Menu_::textfont(Fl_Font)uchar Fl_Menu_::textsize() const
-
-Get or set the font size of menu item labels.
-
-
-void Fl_Menu_::textsize(uchar)Fl_Boxtype Fl_Menu_::down_box() const
-
-This box type is used to surround the currently-selected items in the
-menus. If this is FL_NO_BOX then it acts like
-FL_THIN_UP_BOX and selection_color() acts like
-FL_WHITE, for back compatability.
-
-
-
+ +----Fl_Choice, Fl_Menu_Bar, Fl_Menu_Button
+
+
+
-void Fl_Menu_::down_box(Fl_Boxtype)Include Files
+
+
+#include <FL/Fl_Menu_.H>
+
+
+Description
+ All widgets that have a menu in FLTK are subclassed off of this class.
+Currently FLTK provides you with
+Fl_Menu_Button,
+Fl_Menu_Bar, and Fl_Choice
+.
+Methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Fl_Menu_::Fl_Menu_(int x, int y, int w,
+int h, const char *label = 0)
+ Creates a new Fl_Menu_ widget using the given position, size,
+and label string. The default boxtype is FL_NO_BOX.
+virtual Fl_Menu_::~Fl_Menu_()
+ Destroys the menu and its items.
+const Fl_Menu_Item* Fl_Menu_::menu() const
+
+ Get or set the menu array directly. Setting it to NULL
+ indicates that you want the widget to allocate its own array.
+
void Fl_Menu_::menu(const Fl_Menu_Item*)int Fl_Menu_::value() const
+
+ The value is the index into menu() of the last item chosen by
+the user. It is zero initially. You can set it as an integer, or set
+it with a pointer to a menu item. The set routines return non-zero if
+the new value is different than the old one.
+
int Fl_Menu_::value(int)
+
int Fl_Menu_::value(const Fl_Menu_Item*)const Fl_Menu_Item*
+Fl_Menu_::test_shortcut()
+ Only call this in response to FL_SHORTCUT events. If the
+event matches an entry in the menu that entry is selected and the
+callback will be done (or changed() will be set). This allows
+shortcuts directed at one window to call menus in another.
+void Fl_Menu_::global()
+ Make the shortcuts for this menu work no matter what window has the
+focus when you type it. This is done by using
+Fl::add_handler(). This Fl_Menu_ widget does not
+have to be visible (ie the window it is in can be hidden, or it does
+not have to be put in a window at all).
+const char* Fl_Menu_::text() const
+
+ Returns the title of the last item chosen, or of item i.
+
const char* Fl_Menu_::text(int i) constint Fl_Menu_::size() const
+ This returns menu()->size(), which is how many entries are in
+the array, not counting the NULL ending, but including all
+submenus titles and the NULL's that end them. If the menu is
+NULL this returns zero.
+int Fl_Menu_::add(const char *,const char
+*,Fl_Callback *,void *v=0,int f=0)
+
+ The first form adds a new menu item, with a title string,
+shortcut string, callback, argument to the callback, and
+flags. If menu() was originally set with NULL then
+space is allocated for the new item. If instead you gave it an array
+then the array must have enough empty space for the new item. The
+title string is copied, but the shortcut is not.
+
int Fl_Menu_::add(const char *)void Fl_Menu_::clear()
+ Delete all the menu items. Don't do this if you used menu(x)
+ to set it to your own array. You should do this before destroying the
+Fl_Menu_ widget if it uses it's own array.
+void Fl_Menu_::replace(int n, const char *)
+
+ Changes the text of item n. The passed string is copied.
+void Fl_Menu_::remove(int n)
+ Deletes item n from the menu.
+void Fl_Menu_::shortcut(int i, int n);
+ Changes the shortcut of item i to n.
+void Fl_Menu_::mode(int i,int x);
+ Changes the flags of item i.
+Fl_Color Fl_Menu_::textcolor() const
+
+ Get or set the current color of menu item labels.
+
void Fl_Menu_::textcolor(Fl_Color)Fl_Font Fl_Menu_::textfont() const
+
+ Get or set the current font of menu item labels.
+
void Fl_Menu_::textfont(Fl_Font)uchar Fl_Menu_::textsize() const
+
+ Get or set the font size of menu item labels.
+
void Fl_Menu_::textsize(uchar)Fl_Boxtype Fl_Menu_::down_box() const
+
+ This box type is used to surround the currently-selected items in the
+menus. If this is FL_NO_BOX then it acts like
+FL_THIN_UP_BOX and selection_color() acts like
+FL_WHITE, for back compatability.
\ No newline at end of file
diff --git a/documentation/Fl_Menu_Bar.html b/documentation/Fl_Menu_Bar.html
index d8ff312cf..38cfbe521 100644
--- a/documentation/Fl_Menu_Bar.html
+++ b/documentation/Fl_Menu_Bar.html
@@ -1,85 +1,63 @@
-
-
-
-
void Fl_Menu_::down_box(Fl_Boxtype)
-
-class Fl_Menu_Bar
-
-
-
-Class Hierarchy
-
-
-Fl_Menu_
+
+
+class Fl_Menu_Bar
+
+Class Hierarchy
+
+
+Fl_Menu_
|
- +----Fl_Menu_Bar
-
-
-Include Files
-
-
-#include <FL/Fl_Menu_Bar.H>
-
-
-Description
-
-This widget provides a standard menubar interface. Usually you will
-put this widget along the top edge of your window. The height of the
-widget should be 30 for the menu titles to draw correctly with the default
-font.
-
-
-
-Methods
-
-
-
-
-Fl_Menu_Bar::Fl_Menu_Bar(int x, int y, int w, int h, const char *label = 0)
-
-Creates a new Fl_Menu_Bar widget using the given position, size, and
-label string. The default boxtype is FL_UP_BOX.
-
-virtual Fl_Menu_Bar::~Fl_Menu_Bar()
-
-The destructor removes the Fl_Menu_Bar widget and all of its menu items.
-
-
-
+ +----Fl_Menu_Bar
+
+
+Include Files
+
+
+#include <FL/Fl_Menu_Bar.H>
+
+
+Description
+ This widget provides a standard menubar interface. Usually you will
+put this widget along the top edge of your window. The height of the
+widget should be 30 for the menu titles to draw correctly with the
+default font.
+
Methods
+
+Fl_Menu_Bar::Fl_Menu_Bar(int x, int
+y, int w, int h, const char *label = 0)
+ Creates a new Fl_Menu_Bar widget using the given position,
+size, and label string. The default boxtype is FL_UP_BOX.
+virtual Fl_Menu_Bar::~Fl_Menu_Bar()
+
+ The destructor removes the Fl_Menu_Bar widget and all of its
+menu items.
\ No newline at end of file
diff --git a/documentation/Fl_Menu_Button.html b/documentation/Fl_Menu_Button.html
index 43bd2d6a6..f3b7eaac0 100644
--- a/documentation/Fl_Menu_Button.html
+++ b/documentation/Fl_Menu_Button.html
@@ -1,101 +1,79 @@
-
-
-
-
-
-class Fl_Menu_Button
-
-
-
-Class Hierarchy
-
-
-Fl_Menu_
+
+
+class Fl_Menu_Button
+
+Class Hierarchy
+
+
+Fl_Menu_
|
- +----Fl_Menu_Button
-
-
-Include Files
-
-
-#include <FL/Fl_Menu_Button.H>
-
-
-Description
-
-This is a button that when pushed pops up a menu (or hierarchy of
-menus) defined by an array of Fl_Menu_Item
-objects.
-
-
-
-Include Files
+
+
+#include <FL/Fl_Menu_Button.H>
+
+
+Description
+ This is a button that when pushed pops up a menu (or hierarchy of
+menus) defined by an array of
+Fl_Menu_Item objects.
+
Methods
-
-
-
-
-Fl_Menu_Button::Fl_Menu_Button(int x, int y, int w, int h, const char *label = 0)
-
-Creates a new Fl_Menu_Button widget using the given position, size, and
-label string. The default boxtype is FL_UP_BOX.
-
-virtual Fl_Menu_Button::~Fl_Menu_Button()
-
-The destructor removes the Fl_Menu_Button widget and all of its menu items.
-
-const Fl_Menu* Fl_Menu_Button::popup()
-
-Act exactly as though the user clicked the button or typed the shortcut
-key. The menu appears, it waits for the user to pick an item, and if
-they pick one it sets value() and does the callback or sets
-changed() as described above. The menu item is returned or
-NULL if the user dismisses the menu.
-
-void Fl_Widget::type(uchar)
-
-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. For convienece the
-constants Fl_Menu_Button::POPUP1, POPUP2, POPUP3, POPUP12, POPUP13,
-POPUP23, and POPUP123 are defined.
-Fl_Menu_Button::POPUP3 is usually what you want.
-
-Methods
+
+
+Fl_Menu_Button::Fl_Menu_Button(int x, int y, int w, int h, const char
+*label = 0)
+ Creates a new Fl_Menu_Button widget using the given position,
+size, and label string. The default boxtype is FL_UP_BOX.
+virtual
+Fl_Menu_Button::~Fl_Menu_Button()
+ The destructor removes the Fl_Menu_Button widget and all of
+its menu items.
+const Fl_Menu* Fl_Menu_Button::popup()
+
+ Act exactly as though the user clicked the button or typed the
+shortcut key. The menu appears, it waits for the user to pick an item,
+and if they pick one it sets value() and does the callback or
+sets changed() as described above. The menu item is returned
+or NULLif the user dismisses the menu.
+void Fl_Widget::type(uchar)
+ 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. For convienece the
+constants Fl_Menu_Button::POPUP1, POPUP2, POPUP3, POPUP12, POPUP13,
+POPUP23, and POPUP123 are defined.
+Fl_Menu_Button::POPUP3 is usually what you want.
+
-
-struct Fl_Menu_Item
-
-
-
-Class Hierarchy
-
-
-Fl_Widget
+
+
+struct Fl_Menu_Item
+
+Class Hierarchy
+
+
+Fl_Widget
|
- +----Fl_Menu_Item----Fl_Menu_
-
-
-Include Files
-
-
-#include <FL/Fl_Menu_Item.H>
-
-
-Description
-
-The Fl_Menu_Item structure defines a single menu item that is
-used by the Fl_Menu_ class. This structure is defined in
-<FL/Fl_Menu_Item.H>
-
-
+ +----Fl_Menu_Item----Fl_Menu_
+
+
+Include Files
+
+
+#include <FL/Fl_Menu_Item.H>
+
+
+Description
+ The Fl_Menu_Item structure defines a single menu item that is
+used by the Fl_Menu_ class. This structure is defined in
+<FL/Fl_Menu_Item.H>
+
+
struct Fl_Menu_Item {
const char* text; // label()
ulong shortcut_;
@@ -51,316 +45,251 @@ enum { // values for flags:
FL_MENU_DIVIDER = 0x80,
FL_MENU_HORIZONTAL = 0x100
};
-
-
-Typically menu items are statically defined; for example:
-
-
-
+ 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
+possible to make seperate submenu arrays with FL_SUBMENU_POINTER
+ flags.
+
-
+
- 
+
+
+ Typically menu items are statically defined; for example:
+
+
-
-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 possible to make seperate submenu arrays with
-FL_SUBMENU_POINTER flags.
-
-
-
+
-
Fl_Menu_Item popup[] = {
- {"&alpha", FL_ALT+'a', the_cb, (void*)1},
- {"&beta", FL_ALT+'b', the_cb, (void*)2},
- {"gamma", FL_ALT+'c', the_cb, (void*)3, FL_MENU_DIVIDER},
- {"&strange", 0, strange_cb},
- {"&charm", 0, charm_cb},
- {"&truth", 0, truth_cb},
- {"b&eauty", 0, beauty_cb},
- {"sub&menu", 0, 0, 0, FL_SUBMENU},
- {"one"},
- {"two"},
- {"three"},
+ {", FL_ALT+'a', the_cb, (void*)1},
+ {", FL_ALT+'b', the_cb, (void*)2},
+ {"gamma", FL_ALT+'c', the_cb, (void*)3, FL_MENU_DIVIDER},
+ {", 0, strange_cb},
+ {", 0, charm_cb},
+ {", 0, truth_cb},
+ {"b, 0, beauty_cb},
+ {"sub, 0, 0, 0, FL_SUBMENU},
+ {"one"},
+ {"two"},
+ {"three"},
{0},
- {"inactive", FL_ALT+'i', 0, 0, FL_MENU_INACTIVE|FL_MENU_DIVIDER},
- {"invisible",FL_ALT+'i', 0, 0, FL_MENU_INVISIBLE},
- {"check", FL_ALT+'i', 0, 0, FL_MENU_TOGGLE|FL_MENU_VALUE},
- {"box", FL_ALT+'i', 0, 0, FL_MENU_TOGGLE},
+ {"inactive", FL_ALT+'i', 0, 0, FL_MENU_INACTIVE|FL_MENU_DIVIDER},
+ {"invisible",FL_ALT+'i', 0, 0, FL_MENU_INVISIBLE},
+ {"check", FL_ALT+'i', 0, 0, FL_MENU_TOGGLE|FL_MENU_VALUE},
+ {"box", FL_ALT+'i', 0, 0, FL_MENU_TOGGLE},
{0}};
- Methods
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-const char* Fl_Menu_Item::label() const
-
-This is the title of the item. A NULL here indicates the end of the
-menu (or of a submenu). A '&' in the item will print an underscore
-under the next letter, and if the menu is popped up that letter will
-be a "shortcut" to pick that item. To get a real '&' put two in a
-row.
-
-
-void Fl_Menu_Item::label(const char*)
-void Fl_Menu_Item::label(Fl_Labeltype, const char*)Fl_Labeltype Fl_Menu_Item::labeltype() const
-
-A labeltype identifies a routine that draws the label of the
-widget. This can be used for special effects such as emboss, or to use
-the label() pointer as another form of data such as a bitmap.
-The value FL_NORMAL_LABEL prints the label as text.
-
-
-void Fl_Menu_Item::labeltype(Fl_Labeltype)Fl_Color Fl_Menu_Item::labelcolor() const
-
-This color is passed to the labeltype routine, and is typically the
-color of the label text. This defaults to FL_BLACK. If this
-color is not black fltk will not use overlay bitplanes to draw
-the menu - this is so that images put in the menu draw correctly.
-
-
-void Fl_Menu_Item::labelcolor(Fl_Color)Fl_Font Fl_Menu_Item::labelfont() const
-
-Fonts are identified by small 8-bit indexes into a table. See the enumeration list for predefined fonts. The
-default value is a Helvetica font. The function Fl::set_font() can define new fonts.
-
-
-void Fl_Menu_Item::labelfont(Fl_Font)uchar Fl_Menu_Item::labelsize() const
-
-Gets or sets the label font pixel size/height.
-
-
-void Fl_Menu_Item::labelsize(uchar)typedef void (Fl_Callback)(Fl_Widget*, void*)
-
-Each item has space for a callback function and an argument for that
-function. Due to back compatability, the Fl_Menu_Item itself
-is not passed to the callback, instead you have to get it by calling
-((Fl_Menu_*)w)->mvalue() where w is the widget
-argument.
-
-
-Fl_Callback* Fl_Menu_Item::callback() const
-void Fl_Menu_Item::callback(Fl_Callback*, void* = 0)
-void Fl_Menu_Item::callback(void (*)(Fl_Widget*))void* Fl_Menu_Item::user_data() const
-
-Get or set the user_data argument that is sent to the callback
-function.
-
-
-void Fl_Menu_Item::user_data(void*)void Fl_Menu_Item::callback(void (*)(Fl_Widget*, long), long = 0)
-
-For convenience you can also define the callback as taking a
-long argument. This is implemented by casting this to a
-Fl_Callback and casting the long to a void*
-and may not be portable to some machines.
-
-
-long Fl_Menu_Item::argument() const
-void Fl_Menu_Item::argument(long)void Fl_Menu_Item::do_callback(Fl_Widget*)
-
-Call the Fl_Menu_Item item's callback, and provide the
-Fl_Widget argument (and optionally override the user_data()
-argument). You must first check that callback() is non-zero before
-calling this.
-
-
-void Fl_Menu_Item::do_callback(Fl_Widget*, void*)
-void Fl_Menu_Item::do_callback(Fl_Widget*, long)ulong Fl_Menu_Item::shortcut() const
-
-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 FL_ALT+'a' or FL_ALT+FL_F+10 or
-just 'a'. A value of zero disables the shortcut.
-
-
-void Fl_Menu_Item::shortcut(ulong)int Fl_Menu_Item::submenu() const
-
-Returns true if either FL_SUBMENU or
-FL_SUBMENU_POINTER is on in the flags. FL_SUBMENU
-indicates an embedded submenu that goes from the next item through the
-next one with a NULL label().
-FL_SUBMENU_POINTER indicates that user_data() is a
-pointer to another menu array.
-
-int Fl_Menu_Item::checkbox() const
-
-Returns true if a checkbox will be drawn next to this item. This is
-true if FL_MENU_TOGGLE or FL_MENU_RADIO is set in the flags.
-
-int Fl_Menu_Item::radio() const
-
-Returns true if this item is a radio item. When a radio button is
-selected all "adjacent" radio buttons are turned off. A set of radio
-items is delimited by an item that has radio() false, or by an item
-with FL_MENU_DIVIDER turned on.
-
-int Fl_Menu_Item::value() const
-
-Returns the current value of the check or radio item.
-
-void Fl_Menu_Item::set()
-
-Turns the check or radio item "on" for the menu item. Note that this does not
-turn off any adjacent radio items like set_only() does.
-
-void Fl_Menu_Item::setonly()
-
-Turns the radio item "on" for the menu item and turns off adjacent radio
-item.
-
-void Fl_Menu_Item::clear()
-
-Turns the check or radio item "off" for the menu item.
-
-int Fl_Menu_Item::visible() const
-
-Gets the visibility of an item.
-
-void Fl_Menu_Item::show()
-
-Makes an item visible in the menu.
-
-void Fl_Menu_Item::hide()
-
-Hides an item in the menu.
-
-int Fl_Menu_Item::active() const
-
-Get whether or not the item can be picked.
-
-void Fl_Menu_Item::activate()
-
-Allows a menu item to be picked.
-
-void Fl_Menu_Item::deactivate()
-
-Prevents a menu item from being picked. Note that this will also cause the
-menu item to appear grayed-out.
-
-const Fl_Menu_Item *Fl_Menu_Item::popup(int X, int Y, const char* title = 0, const Fl_Menu_Item* picked = 0, const Fl_Menu_* button = 0) const
-
-This method is called by widgets that want to display menus. The menu
-stays up until the user picks an item or dismisses it. The selected
-item (or NULL if none) is returned. This does not do the
-callbacks or change the state of check or radio items.
-
-const Fl_Menu_Item *Fl_Menu_Item::pulldown(int X, int Y, int W, int H, const Fl_Menu_Item* picked = 0, const Fl_Menu_* button = 0, const Fl_Menu_Item* title = 0, int menubar=0) const
-
-pulldown() is similar to popup(), but a rectangle is
-provided to position the menu. The menu is made at least W
-wide, and the picked item is centered over the rectangle (like
-Fl_Choice uses). If picked is zero or not found, the
-menu is aligned just below the rectangle (like a pulldown menu).
-
-const Fl_Menu_Item* Fl_Menu_Item::test_shortcut() const
-
-This is designed to be called by a widgets handle() method in
-response to a FL_SHORTCUT event. If the current event matches
-one of the items shortcut, that item is returned. If the keystroke
-does not match any shortcuts then NULL is returned. This only
-matches the shortcut() fields, not the letters in the title
-preceeded by '&'.
-
-int Fl_Menu_Item::size()
-
-Return the offset of the NULL terminator that ends this menu,
-correctly skipping over submenus. To copy a menu you should copy
-size() + 1 structures.
-
-const Fl_Menu_Item* Fl_Menu_Item::next(int n=1) const
-
-Advance a pointer by n items through a menu array, skipping the
-contents of submenus and invisible items. There are two calls so that
-you can advance through const and non-const data.
-
-
-
+
+
-Fl_Menu_Item* Fl_Menu_Item::next(int n=1);Methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+const char* Fl_Menu_Item::label() const
+
+ This is the title of the item. A NULL here indicates the end
+of the menu (or of a submenu). A ''in the item will print an
+underscore under the next letter, and if the menu is popped up that
+letter will be a "shortcut" to pick that item. To get a real ''put two
+in a row.
+
void Fl_Menu_Item::label(const char*)
+
void Fl_Menu_Item::label(Fl_Labeltype, const char*)Fl_Labeltype
+Fl_Menu_Item::labeltype() const
+
+ A labeltype identifies a routine that draws the label of the
+widget. This can be used for special effects such as emboss, or to use
+the label() pointer as another form of data such as a bitmap.
+ The value FL_NORMAL_LABEL prints the label as text.
+
void Fl_Menu_Item::labeltype(Fl_Labeltype)Fl_Color Fl_Menu_Item::labelcolor()
+const
+
+ This color is passed to the labeltype routine, and is typically the
+color of the label text. This defaults to FL_BLACK. If this
+color is not black fltk will not use overlay bitplanes to draw
+the menu - this is so that images put in the menu draw correctly.
+
void Fl_Menu_Item::labelcolor(Fl_Color)Fl_Font Fl_Menu_Item::labelfont()
+const
+
+ Fonts are identified by small 8-bit indexes into a table. See the
+enumeration list for predefined fonts. The default value is a
+Helvetica font. The function
+Fl::set_font() can define new fonts.
+
void Fl_Menu_Item::labelfont(Fl_Font)uchar Fl_Menu_Item::labelsize() const
+
+ Gets or sets the label font pixel size/height.
+
void Fl_Menu_Item::labelsize(uchar)typedef void
+(Fl_Callback)(Fl_Widget*, void*)
+
+ Each item has space for a callback function and an argument for that
+function. Due to back compatability, the Fl_Menu_Item itself
+is not passed to the callback, instead you have to get it by calling
+((Fl_Menu_*)w)->mvalue() where w is the widget argument.
+
Fl_Callback* Fl_Menu_Item::callback() const
+
void Fl_Menu_Item::callback(Fl_Callback*, void* = 0)
+
void Fl_Menu_Item::callback(void (*)(Fl_Widget*))void* Fl_Menu_Item::user_data() const
+
+ Get or set the user_data argument that is sent to the
+callback function.
+
void Fl_Menu_Item::user_data(void*)void Fl_Menu_Item::callback(void
+(*)(Fl_Widget*, long), long = 0)
+
+ For convenience you can also define the callback as taking a long
+ argument. This is implemented by casting this to a Fl_Callback
+ and casting the long to a void* and may not be
+portable to some machines.
+
long Fl_Menu_Item::argument() const
+
void Fl_Menu_Item::argument(long)void
+Fl_Menu_Item::do_callback(Fl_Widget*)
+
+ Call the Fl_Menu_Item item's callback, and provide the
+Fl_Widget argument (and optionally override the user_data()
+argument). You must first check that callback() is non-zero
+before calling this.
+
void Fl_Menu_Item::do_callback(Fl_Widget*, void*)
+
void Fl_Menu_Item::do_callback(Fl_Widget*, long)ulong Fl_Menu_Item::shortcut() const
+
+ 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
+FL_ALT+'a' or FL_ALT+FL_F+10 or just 'a'. A value of
+zero disables the shortcut.
+
void Fl_Menu_Item::shortcut(ulong)int Fl_Menu_Item::submenu() const
+ Returns true if either FL_SUBMENU or FL_SUBMENU_POINTER
+ is on in the flags. FL_SUBMENU indicates an embedded submenu
+that goes from the next item through the next one with a NULL
+label(). FL_SUBMENU_POINTER indicates that user_data()
+ is a pointer to another menu array.
+int Fl_Menu_Item::checkbox() const
+ Returns true if a checkbox will be drawn next to this item. This is
+true if FL_MENU_TOGGLE or FL_MENU_RADIO is set in the
+flags.
+int Fl_Menu_Item::radio() const
+ Returns true if this item is a radio item. When a radio button is
+selected all "adjacent" radio buttons are turned off. A set of radio
+items is delimited by an item that has radio() false, or by an
+item with FL_MENU_DIVIDER turned on.
+int Fl_Menu_Item::value() const
+ Returns the current value of the check or radio item.
+void Fl_Menu_Item::set()
+ Turns the check or radio item "on" for the menu item. Note that this
+does not turn off any adjacent radio items like set_only()
+ does.
+void Fl_Menu_Item::setonly()
+ Turns the radio item "on" for the menu item and turns off adjacent
+radio item.
+void Fl_Menu_Item::clear()
+ Turns the check or radio item "off" for the menu item.
+int Fl_Menu_Item::visible() const
+ Gets the visibility of an item.
+void Fl_Menu_Item::show()
+ Makes an item visible in the menu.
+void Fl_Menu_Item::hide()
+ Hides an item in the menu.
+int Fl_Menu_Item::active() const
+ Get whether or not the item can be picked.
+void Fl_Menu_Item::activate()
+ Allows a menu item to be picked.
+void Fl_Menu_Item::deactivate()
+ Prevents a menu item from being picked. Note that this will also cause
+the menu item to appear grayed-out.
+const Fl_Menu_Item
+*Fl_Menu_Item::popup(int X, int Y, const char* title = 0, const
+Fl_Menu_Item* picked = 0, const Fl_Menu_* button = 0) const
+ This method is called by widgets that want to display menus. The menu
+stays up until the user picks an item or dismisses it. The selected
+item (or NULL if none) is returned. This does not do the
+callbacks or change the state of check or radio items.
+const Fl_Menu_Item
+*Fl_Menu_Item::pulldown(int X, int Y, int W, int H, const Fl_Menu_Item*
+picked = 0, const Fl_Menu_* button = 0, const Fl_Menu_Item* title = 0,
+int menubar=0) const
+pulldown() is similar to popup(), but a rectangle is
+provided to position the menu. The menu is made at least W
+ wide, and the picked item is centered over the rectangle
+(like Fl_Choice uses). If picked is zero or not
+found, the menu is aligned just below the rectangle (like a pulldown
+menu).
+const Fl_Menu_Item*
+Fl_Menu_Item::test_shortcut() const
+ This is designed to be called by a widgets handle() method in
+response to a FL_SHORTCUT event. If the current event matches
+one of the items shortcut, that item is returned. If the keystroke
+does not match any shortcuts then NULL is returned. This only
+matches the shortcut() fields, not the letters in the title
+preceeded by '
+int Fl_Menu_Item::size()
+ Return the offset of the NULL terminator that ends this menu,
+correctly skipping over submenus. To copy a menu you should copy
+size() + 1 structures.
+const Fl_Menu_Item*
+Fl_Menu_Item::next(int n=1) const
+
+ Advance a pointer by n items through a menu array, skipping
+the contents of submenus and invisible items. There are two calls so
+that you can advance through const and non-const data.
\ No newline at end of file
diff --git a/documentation/Fl_Menu_Window.html b/documentation/Fl_Menu_Window.html
index a58017f96..3772e328c 100644
--- a/documentation/Fl_Menu_Window.html
+++ b/documentation/Fl_Menu_Window.html
@@ -1,59 +1,45 @@
-
-
-
-
Fl_Menu_Item* Fl_Menu_Item::next(int n=1);
-
-class Fl_Menu_Window
-
-
-
-Class Hierarchy
-
-
-Fl_Single_Window
+
+
+class Fl_Menu_Window
+
+Class Hierarchy
+
+
+Fl_Single_Window
|
- +----Fl_Menu_Window
-
-
-Include Files
-
-
-#include <FL/Fl_Menu_Window.H>
-
-
-Description
-
-The Fl_Menu_Window widget is a window type used for menus. By
-default the window is drawn in the hardware overlay planes if they are
-available so that the menu don't force the rest of the window to
-redraw.
-
-Methods
-
-
-
-Fl_Menu_Window::Fl_Menu_Window(int x, int y, int w, int h, const char *label = 0)
-
-Creates a new Fl_Menu_Window widget using the given position, size, and
-label string.
-
-virtual Fl_Menu_Window::~Fl_Menu_Window()
-
-Destroys the window and all of its children.
-
-Fl_Menu_Window::clear_overlay();
-
-Tells FLTK to use normal drawing planes instead of overlay planes. This is
-usually necessary if your menu contains multi-color pixmaps.
-
-Fl_Menu_Window::set_overlay()
-
-Tells FLTK to use hardware overlay planes if they are available.
-
-
-
+ +----Fl_Menu_Window
+
+
+Include Files
+
+
+#include <FL/Fl_Menu_Window.H>
+
+
+Description
+ The Fl_Menu_Window widget is a window type used for menus. By
+default the window is drawn in the hardware overlay planes if they are
+available so that the menu don't force the rest of the window to
+redraw.
+Methods
+
+
+Fl_Menu_Window::Fl_Menu_Window(int x, int y, int w, int h, const char
+*label = 0)
+ Creates a new Fl_Menu_Window widget using the given position,
+size, and label string.
+virtual
+Fl_Menu_Window::~Fl_Menu_Window()
+ Destroys the window and all of its children.
+
+Fl_Menu_Window::clear_overlay();
+ Tells FLTK to use normal drawing planes instead of overlay planes.
+This is usually necessary if your menu contains multi-color pixmaps.
+Fl_Menu_Window::set_overlay()
+ Tells FLTK to use hardware overlay planes if they are available.
+
\ No newline at end of file
diff --git a/documentation/Fl_Multi_Browser.html b/documentation/Fl_Multi_Browser.html
index fb868c42d..f02b4e27b 100644
--- a/documentation/Fl_Multi_Browser.html
+++ b/documentation/Fl_Multi_Browser.html
@@ -1,73 +1,56 @@
-
-
-
-
-
-class Fl_Multi_Browser
-
-
-
-Class Hierarchy
-
-
-Fl_Browser
+
+
+class Fl_Multi_Browser
+
+Class Hierarchy
+
+
+Fl_Browser
|
- +----Fl_Multi_Browser
-
-
-Include Files
-
-
-#include <FL/Fl_Multi_Browser.H>
-
-
-Description
-
-The Fl_Multi_Browser class is a subclass of
-Fl_Browser which lets the user select any set of the lines.
-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 shift + click toggles the items. This is
-different then how forms did it. Normally the callback is done when
-the user releases the mouse, but you can change this with
-when().
-
-Methods
-
-
-
-
-Fl_Multi_Browser::Fl_Multi_Browser(int x, int y, int w, int h, const char *label = 0)
-
-Creates a new Fl_Multi_Browser widget using the given position, size, and
-label string. The default boxtype is FL_DOWN_BOX.
-
-virtual Fl_Multi_Browser::~Fl_Multi_Browser()
-
-The destructor also deletes all the items in the list.
-
-int Fl_Browser::deselect()
-
-Deselects all lines.
-
-int Fl_Browser::select(int,int=1)
-
-Selects one or more lines or gets the current selection state of a line.
-
-
-int Fl_Browser::selected(int) constint Fl_Browser::value() const
-
-Selects a single line or gets the last toggled line. This returns zero
-if no line has been toggled, so be aware that this can happen in a callback.
-
-
-
+ +----Fl_Multi_Browser
+
+
+
-void Fl_Browser::value(int)Include Files
+
+
+#include <FL/Fl_Multi_Browser.H>
+
+
+Description
+ The Fl_Multi_Browser class is a subclass of Fl_Browser
+ which lets the user select any set of the lines. 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 shift + click toggles the items. This is different then how forms
+did it. Normally the callback is done when the user releases the
+mouse, but you can change this with when().
+Methods
+
+
+Fl_Multi_Browser::Fl_Multi_Browser(int x, int y, int w, int h, const
+char *label = 0)
+ Creates a new Fl_Multi_Browser widget using the given
+position, size, and label string. The default boxtype is FL_DOWN_BOX
+.
+virtual
+Fl_Multi_Browser::~Fl_Multi_Browser()
+ The destructor also deletes all the items in the list.
+int Fl_Browser::deselect()
+ Deselects all lines.
+int Fl_Browser::select(int,int=1)
+
+ Selects one or more lines or gets the current selection state of a
+line.
+
int Fl_Browser::selected(int) constint Fl_Browser::value() const
+
+ Selects a single line or gets the last toggled line. This returns zero
+if no line has been toggled, so be aware that this can happen in a
+callback.
\ No newline at end of file
diff --git a/documentation/Fl_Multiline_Input.html b/documentation/Fl_Multiline_Input.html
index 1b157eace..278b591a3 100644
--- a/documentation/Fl_Multiline_Input.html
+++ b/documentation/Fl_Multiline_Input.html
@@ -1,53 +1,43 @@
-
-
-
-
void Fl_Browser::value(int)
-
-class Fl_Multiline_Input
-
-
-
-Class Hierarchy
-
-
-Fl_Input
+
+
+class Fl_Multiline_Input
+
+Class Hierarchy
+
+
+Fl_Input
|
- +----Fl_Multiline_Input
-
-
-Include Files
-
-
-#include <FL/Fl_Input.H>
-
-
-Description
-
-This input field displays '\n' characters as new lines rather than ^J,
-and accepts the Return, Tab, and up and down arrow keys. This is for
-editing multiline text.
-
-Methods
-
-
-
-Fl_Multiline_Input::Fl_Multiline_Input(int x, int y, int w, int h, const char *label = 0)
-
-Creates a new Fl_Multiline_Input widget using the given position, size, and
-label string. The default boxtype is FL_DOWN_BOX.
-
-virtual Fl_Multiline_Input::~Fl_Multiline_Input()
-
-Destroys the widget and any value associated with it.
-
-
-
+ +----Fl_Multiline_Input
+
+
+Include Files
+
+
+#include <FL/Fl_Input.H>
+
+
+Description
+ This input field displays '\n' characters as new lines rather than ^J,
+and accepts the Return, Tab, and up and down arrow keys. This is for
+editing multiline text.
+Methods
+
+
+Fl_Multiline_Input::Fl_Multiline_Input(int x, int y, int w, int h,
+const char *label = 0)
+ Creates a new Fl_Multiline_Input widget using the given
+position, size, and label string. The default boxtype is FL_DOWN_BOX
+.
+virtual
+Fl_Multiline_Input::~Fl_Multiline_Input()
+ Destroys the widget and any value associated with it.
\ No newline at end of file
diff --git a/documentation/Fl_Multiline_Output.html b/documentation/Fl_Multiline_Output.html
index d6d53bd24..19445661d 100644
--- a/documentation/Fl_Multiline_Output.html
+++ b/documentation/Fl_Multiline_Output.html
@@ -1,46 +1,38 @@
-
-
-
-
-
-class Fl_Multiline_Output
-
-
-
-Class Hierarchy
-
-
-Fl_Output
+
+
+class Fl_Multiline_Output
+
+Class Hierarchy
+
+
+Fl_Output
|
- +----Fl_Multiline_Output
-
-
-Include Files
-
-
-#include <FL/Fl_Multiline_Output.H>
-
-
-Description
-
-This widget is a subclass of Fl_Output that displays multiple lines
-of text. It also displays tab characters as whitespace to the next column.
-
-Methods
-
-
-
-Fl_Multiline_Output::Fl_Multiline_Output(int x, int y, int w, int h, const char *label = 0)
-
-Creates a new Fl_Multiline_Output widget using the given position, size, and
-label string. The default boxtype is FL_DOWN_BOX.
-
-virtual Fl_Multiline_Output::~Fl_Multiline_Output()
-
-Destroys the widget and any value associated with it.
-
-
-
+ +----Fl_Multiline_Output
+
+
+Include Files
+
+
+#include <FL/Fl_Multiline_Output.H>
+
+
+Description
+ This widget is a subclass of Fl_Output that displays multiple
+lines of text. It also displays tab characters as whitespace to the
+next column.
+Methods
+
+
+Fl_Multiline_Output::Fl_Multiline_Output(int x, int y, int w, int h,
+const char *label = 0)
+ Creates a new Fl_Multiline_Output widget using the given
+position, size, and label string. The default boxtype is FL_DOWN_BOX
+.
+virtual
+Fl_Multiline_Output::~Fl_Multiline_Output()
+ Destroys the widget and any value associated with it.
\ No newline at end of file
diff --git a/documentation/Fl_Output.html b/documentation/Fl_Output.html
index 0039eebb0..7e9c91679 100644
--- a/documentation/Fl_Output.html
+++ b/documentation/Fl_Output.html
@@ -1,108 +1,80 @@
-
-
-
-
-
-class Fl_Output
-
-
-
-Class Hierarchy
-
-
-Fl_Input_
+
+
+class Fl_Output
+
+Class Hierarchy
+
+
+Fl_Input_
|
- +----Fl_Output
+ +----Fl_Output
|
- +----Fl_Multiline_Output
-
-
-Include Files
-
-
-#include <FL/Fl_Output.H>
-
-
-Description
-
-This widget displays a piece of text. When you set the value(),
-Fl_Output does a strcpy() to it's 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 fields or programs.
-
-
-
-Methods
-
-
-
-
-Fl_Output::Fl_Output(int x, int y, int w, int h, const char *label = 0)
-
-Creates a new Fl_Output widget using the given position, size, and
-label string. The default boxtype is FL_DOWN_BOX.
-
-virtual Fl_Output::~Fl_Output()
-
-Destroys the widget and any value associated with it.
-
-const char *Fl_Output::value() const
-
-The first form returns the current value, which is a pointer to the
-internal buffer and is valid only until the value is changed.
-
-
-int Fl_Output::value(const char*)
-int Fl_Output::value(const char*, int)int Fl_Output::size() const
-
-Returns the number of characters in value(). This may be greater than
-strlen(value()) if there are nul characters in it.
-
-char Fl_Output::index(int) const
-
-Same as value()[n], but may be faster in plausible implementations.
-No bounds checking is done.
-
-Fl_Color Fl_Output::textcolor() const
-
-Gets or sets the color of the text in the input field.
-
-
-void Fl_Output::textcolor(Fl_Color)Fl_Font Fl_Output::textfont() const
-
-Gets or sets the font of the text in the input field.
-
-
-void Fl_Output::textfont(Fl_Font)uchar Fl_Output::textsize() const
-
-Gets or sets the size of the text in the input field.
-
-
-
+ +----Fl_Multiline_Output
+
+
+
-void Fl_Output::textsize(uchar)Include Files
+
+
+#include <FL/Fl_Output.H>
+
+
+Description
+ This widget displays a piece of text. When you set the value()
+, Fl_Output does a strcpy() to it's 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
+fields or programs.
+
Methods
+
+
+Fl_Output::Fl_Output(int x, int y, int
+w, int h, const char *label = 0)
+ Creates a new Fl_Output widget using the given position,
+size, and label string. The default boxtype is FL_DOWN_BOX.
+virtual Fl_Output::~Fl_Output()
+ Destroys the widget and any value associated with it.
+const char *Fl_Output::value() const
+
+ The first form returns the current value, which is a pointer to the
+internal buffer and is valid only until the value is changed.
+
int Fl_Output::value(const char*)
+
int Fl_Output::value(const char*, int)int Fl_Output::size() const
+ Returns the number of characters in value(). This may be
+greater than strlen(value()) if there are nul characters in
+it.
+char Fl_Output::index(int) const
+ Same as value()[n], but may be faster in plausible
+implementations. No bounds checking is done.
+Fl_Color Fl_Output::textcolor() const
+
+ Gets or sets the color of the text in the input field.
+
void Fl_Output::textcolor(Fl_Color)Fl_Font Fl_Output::textfont() const
+
+ Gets or sets the font of the text in the input field.
+
void Fl_Output::textfont(Fl_Font)uchar Fl_Output::textsize() const
+
+ Gets or sets the size of the text in the input field.
diff --git a/documentation/Fl_Overlay_Window.html b/documentation/Fl_Overlay_Window.html
index b9b0218de..aff4ef694 100644
--- a/documentation/Fl_Overlay_Window.html
+++ b/documentation/Fl_Overlay_Window.html
@@ -1,70 +1,56 @@
-
-
-
-
void Fl_Output::textsize(uchar)
-
-class Fl_Overlay_Window
-
-
-
-Class Hierarchy
-
-
-Fl_Double_Window
+
+
+class Fl_Overlay_Window
+
+Class Hierarchy
+
+
+Fl_Double_Window
|
- +----Fl_Overlay_Window
-
-
-Include Files
-
-
-#include <FL/Fl_Overlay_Window.H>
-
-
-Description
-
-This window provides double buffering and also the ability to draw the
-"overlay" which is another picture placed on top of the main image.
-The overlay is designed to be a rapidly-changing but simple graphic
-such as a mouse selection box. Fl_Overlay_Window uses the
-overlay planes provided by your graphics hardware if they are available.
-
-Methods
-
-
-
-Fl_Overlay_Window::Fl_Overlay_Window(int x, int y, int w, int h, const char *label = 0)
-
-Creates a new Fl_Overlay_Window widget using the given position, size, and
-label (title) string.
-
-virtual Fl_Overlay_Window::~Fl_Overlay_Window()
-
-Destroys the window and all child widgets.
-
-virtual void Fl_Overlay_Window::draw_overlay() = 0
-
-You must subclass Fl_Overlay_Window and provide this method. It is
-just like a draw() method, except it draws the overlay. The overlay
-will have already been "cleared" when this is called. You can use any
-of the routines described in <FL/fl_draw.H>.
-
-void Fl_Overlay_Window::redraw_overlay()
-
-Call this to indicate that the overlay data has changed and needs to
-be redrawn. The overlay will be clear until the first time this is
-called, so if you want an initial display you must call this after
-calling show().
-
-
-
+ +----Fl_Overlay_Window
+
+
+Include Files
+
+
+#include <FL/Fl_Overlay_Window.H>
+
+
+Description
+ This window provides double buffering and also the ability to draw the
+"overlay" which is another picture placed on top of the main image. The
+overlay is designed to be a rapidly-changing but simple graphic such as
+a mouse selection box. Fl_Overlay_Window uses the overlay
+planes provided by your graphics hardware if they are available.
+Methods
+
+
+Fl_Overlay_Window::Fl_Overlay_Window(int x, int y, int w, int h, const
+char *label = 0)
+ Creates a new Fl_Overlay_Window widget using the given
+position, size, and label (title) string.
+virtual
+Fl_Overlay_Window::~Fl_Overlay_Window()
+ Destroys the window and all child widgets.
+virtual void
+Fl_Overlay_Window::draw_overlay() = 0
+ You must subclass Fl_Overlay_Window and provide this method.
+ It is just like a draw() method, except it draws the overlay.
+ The overlay will have already been "cleared" when this is called. You
+can use any of the routines described in
+<FL/fl_draw.H>.
+void Fl_Overlay_Window::redraw_overlay()
+
+ Call this to indicate that the overlay data has changed and needs to
+be redrawn. The overlay will be clear until the first time this is
+called, so if you want an initial display you must call this after
+calling show().
\ No newline at end of file
diff --git a/documentation/Fl_Pack.html b/documentation/Fl_Pack.html
index b7e70cb9e..5eb0a324e 100644
--- a/documentation/Fl_Pack.html
+++ b/documentation/Fl_Pack.html
@@ -1,103 +1,80 @@
-
-
-
-
-
-class Fl_Pack
-
-
-
-Class Hierarchy
-
-
-Fl_Group
+
+
+class Fl_Pack
+
+Class Hierarchy
+
+
+Fl_Group
|
- +----Fl_Pack
-
-
-Include Files
-
-
-#include <FL/Fl_Pack.H>
-
-
-Description
-
-This widget was designed to add the functionality of compressing
-and aligning widgets.
-
-Methods
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Fl_Pack::Fl_Pack(int x, int y, int w, int h, const char *label = 0)
-
-Creates a new Fl_Pack widget using the given position, size, and
-label string. The default boxtype is FL_NO_BOX.
-
-virtual Fl_Pack::~Fl_Pack()
-
-The destructor also deletes all the children. 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
-Fl_Pack and all of it's children can be automatic (local)
-variables, but you must declare the Fl_Pack first, so
-that it is destroyed last.
-
-int Fl_Pack::spacing() const
-
-Gets or sets the number of extra pixels of blank space that are added between
-the children.
-
-
-
+ +----Fl_Pack
+
+
+
-void Fl_Pack::spacing(int)Include Files
+
+
+#include <FL/Fl_Pack.H>
+
+
+Description
+ This widget was designed to add the functionality of compressing and
+aligning widgets.
+Methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Fl_Pack::Fl_Pack(int x, int y, int w, int
+h, const char *label = 0)
+ Creates a new Fl_Pack widget using the given position, size,
+and label string. The default boxtype is FL_NO_BOX.
+virtual Fl_Pack::~Fl_Pack()
+ The destructor also deletes all the children. 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
+Fl_Pack and all of it's children can be automatic (local)
+variables, but you must declare the Fl_Packfirst, so
+that it is destroyed last.
+int Fl_Pack::spacing() const
+
+ Gets or sets the number of extra pixels of blank space that are added
+between the children.
\ No newline at end of file
diff --git a/documentation/Fl_Positioner.html b/documentation/Fl_Positioner.html
index 30c3ac288..d714cc6b1 100644
--- a/documentation/Fl_Positioner.html
+++ b/documentation/Fl_Positioner.html
@@ -1,97 +1,69 @@
-
-
-
-
void Fl_Pack::spacing(int)
-
-class Fl_Positioner
-
-
-
-Class Hierarchy
-
-
-Fl_Widget
+
+
+class Fl_Positioner
+
+Class Hierarchy
+
+
+Fl_Widget
|
- +----Fl_Positioner
-
-
-Include Files
-
-
-#include <FL/Fl_Positioner.H>
-
-
-Description
-
-This class is provided for Forms compatibility. It provides 2D input.
-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().
-
-
-
-Methods
-
-
-
-
-
-
-
-
-
-Fl_Positioner::Fl_Positioner(int x, int y, int w, int h, const char *label = 0)
-
-Creates a new Fl_Positioner widget using the given position, size, and
-label string. The default boxtype is FL_NO_BOX.
-
-virtual Fl_Positioner::~Fl_Positioner()
-
-Deletes the widget.
-
-void Fl_Positioner::value(float *x, float *y) const
-
-Returns the current position in x and y.
-
-void xbounds(float *xmin, float *xmax)
-
-Gets or sets the X axis bounds.
-
-
-void xbounds(float xmin, float xmax)void xstep(float x)
-
-Sets the stepping value for the X axis.
-
-float Fl_Positioner::xvalue(void) const
-
-Gets or sets the X axis coordinate.
-
-
-void Fl_Positioner::xvalue(float x)void ybounds(float *ymin, float *ymay)
-
-Gets or sets the Y axis bounds.
-
-
-void ybounds(float ymin, float ymay)void ystep(float y)
-
-Sets the stepping value for the Y axis.
-
-float Fl_Positioner::yvalue(void) const
-
-Gets or sets the Y axis coordinate.
-
-
-
+ +----Fl_Positioner
+
+
+
-void Fl_Positioner::yvalue(float y)Include Files
+
+
+#include <FL/Fl_Positioner.H>
+
+
+Description
+ This class is provided for Forms compatibility. It provides 2D input.
+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().
+
Methods
+
+
+
+
+
+
+
+Fl_Positioner::Fl_Positioner(int x, int y, int w, int h, const char
+*label = 0)
+ Creates a new Fl_Positioner widget using the given position,
+size, and label string. The default boxtype is FL_NO_BOX.
+virtual
+Fl_Positioner::~Fl_Positioner()
+ Deletes the widget.
+void Fl_Positioner::value(float *x,
+float *y) const
+ Returns the current position in x and y.
+void xbounds(float *xmin, float *xmax)
+
+ Gets or sets the X axis bounds.
+
void xbounds(float xmin, float xmax)void xstep(float x)
+ Sets the stepping value for the X axis.
+float Fl_Positioner::xvalue(void) const
+
+ Gets or sets the X axis coordinate.
+
void Fl_Positioner::xvalue(float x)void ybounds(float *ymin, float *ymay)
+
+ Gets or sets the Y axis bounds.
+
void ybounds(float ymin, float ymay)void ystep(float y)
+ Sets the stepping value for the Y axis.
+float Fl_Positioner::yvalue(void) const
+
+ Gets or sets the Y axis coordinate.
\ No newline at end of file
diff --git a/documentation/Fl_Repeat_Button.html b/documentation/Fl_Repeat_Button.html
index 60129ffdc..078011daa 100644
--- a/documentation/Fl_Repeat_Button.html
+++ b/documentation/Fl_Repeat_Button.html
@@ -1,45 +1,34 @@
-
-
-
-
void Fl_Positioner::yvalue(float y)
-
-class Fl_Repeat_Button
-
-
-
-Class Hierarchy
-
-Fl_Button
+
+
+class Fl_Repeat_Button
+
+Class Hierarchy
+
+
Fl_Button
|
- +----Fl_Repeat_Button
-
-
-Include Files
-
-#include <FL/Fl_Repeat_Button.H>
-
-Description
-
-The Fl_Repeat_Button is a subclass of Fl_Button that
-generates a callback when it is pressed and then repeatedly generates
-callbacks as long as it is held down. The speed of the repeat is fixed
-and depends on the implementation.
-
-Methods
-
-
-
-Fl_Repeat_Button::Fl_Repeat_Button(int x, int y, int w, int h, const char *label = 0)
-
-Creates a new Fl_Repeat_Button widget using the given position, size, and
-label string. The default boxtype is FL_UP_BOX.
-
-virtual Fl_Repeat_Button::~Fl_Repeat_Button()
-
-Deletes the button.
-
-
-
+ +----Fl_Repeat_Button
+
+
+Include Files
+
+
#include <FL/Fl_Repeat_Button.H>
+
+Description
+ The Fl_Repeat_Button is a subclass of Fl_Button that
+generates a callback when it is pressed and then repeatedly generates
+callbacks as long as it is held down. The speed of the repeat is fixed
+and depends on the implementation.
+Methods
+
+
+Fl_Repeat_Button::Fl_Repeat_Button(int x, int y, int w, int h, const
+char *label = 0)
+ Creates a new Fl_Repeat_Button widget using the given
+position, size, and label string. The default boxtype is FL_UP_BOX
+.
+virtual
+Fl_Repeat_Button::~Fl_Repeat_Button()
+ Deletes the button.
\ No newline at end of file
diff --git a/documentation/Fl_Return_Button.html b/documentation/Fl_Return_Button.html
index 8ecfbef31..a6a740ea9 100644
--- a/documentation/Fl_Return_Button.html
+++ b/documentation/Fl_Return_Button.html
@@ -1,44 +1,33 @@
-
-
-
-
-
-class Fl_Return_Button
-
-
-
-Class Hierarchy
-
-Fl_Button
+
+
+class Fl_Return_Button
+
+Class Hierarchy
+
+
Fl_Button
|
- +----Fl_Return_Button
-
-
-Include Files
-
-#include <FL/Fl_Return_Button.H>
-
-Description
-
-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.
-
-Methods
-
-
-
-Fl_Return_Button::Fl_Return_Button(int x, int y, int w, int h, const char *label = 0)
-
-Creates a new Fl_Return_Button widget using the given position, size, and
-label string. The default boxtype is FL_UP_BOX.
-
-virtual Fl_Return_Button::~Fl_Return_Button()
-
-Deletes the button.
-
-
-
+ +----Fl_Return_Button
+
+
+Include Files
+
+
#include <FL/Fl_Return_Button.H>
+
+Description
+ 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.
+Methods
+
+
+Fl_Return_Button::Fl_Return_Button(int x, int y, int w, int h, const
+char *label = 0)
+ Creates a new Fl_Return_Button widget using the given
+position, size, and label string. The default boxtype is FL_UP_BOX
+.
+virtual
+Fl_Return_Button::~Fl_Return_Button()
+ Deletes the button.
\ No newline at end of file
diff --git a/documentation/Fl_Roller.html b/documentation/Fl_Roller.html
index 5bc7f0c74..e2f4e199d 100644
--- a/documentation/Fl_Roller.html
+++ b/documentation/Fl_Roller.html
@@ -1,46 +1,32 @@
-
-
-
-
-
-class Fl_Roller
-
-
-
-Class Hierarchy
-
-
-Fl_Valuator
+
+
+class Fl_Roller
+
+Class Hierarchy
+
+
+Fl_Valuator
|
- +----Fl_Roller
-
-
-Include Files
-
-
-#include <FL/Fl_Roller.H>
-
-
-Description
-
-The Fl_Roller widget is a "dolly" control commonly used to
-move 3D objects.
-
-Methods
-
-
-
-
-Fl_Roller::Fl_Roller(int x, int y, int w, int h, const char *label = 0)
-
-Creates a new Fl_Roller widget using the given position, size, and
-label string. The default boxtype is FL_NO_BOX.
-
-virtual Fl_Roller::~Fl_Roller()
-
-Destroys the valuator.
-
-
-
+ +----Fl_Roller
+
+
+Include Files
+
+
+#include <FL/Fl_Roller.H>
+
+
+Description
+ The Fl_Roller widget is a "dolly" control commonly used to
+move 3D objects.
+Methods
+
+
+Fl_Roller::Fl_Roller(int x, int y, int
+w, int h, const char *label = 0)
+ Creates a new Fl_Roller widget using the given position,
+size, and label string. The default boxtype is FL_NO_BOX.
+virtual Fl_Roller::~Fl_Roller()
+ Destroys the valuator.
\ No newline at end of file
diff --git a/documentation/Fl_Round_Button.html b/documentation/Fl_Round_Button.html
index 648d17a0a..2c7ea9d3a 100644
--- a/documentation/Fl_Round_Button.html
+++ b/documentation/Fl_Round_Button.html
@@ -1,53 +1,40 @@
-
-
-
-
-
-class Fl_Round_Button
-
-
-
-Class Hierarchy
-
-
-Fl_Button
+
+
+class Fl_Round_Button
+
+Class Hierarchy
+
+
+Fl_Button
|
- +----Fl_Round_Button
-
-
-Include Files
-
-
-#include <FL/Fl_Round_Button.H>
-
-
-Description
-
-Buttons generate callbacks when they are clicked by the user. You
-control exactly when and how by changing the values for type() and
-when().
-
-Methods
-
-
-
-Fl_Round_Button::Fl_Round_Button(int x, int y, int w, int h, const char *label = 0)
-
-Creates a new Fl_Round_Button widget using the given position,
-size, and label string.
-
-Fl_Round_Button::~Fl_Round_Button()
-
-The destructor deletes the check button.
-
-
-
+ +----Fl_Round_Button
+
+
+Include Files
+
+
+#include <FL/Fl_Round_Button.H>
+
+
+Description
+ Buttons generate callbacks when they are clicked by the user. You
+control exactly when and how by changing the values for type()
+ and when().
+Methods
+
+
+Fl_Round_Button::Fl_Round_Button(int x, int y, int w, int h, const char
+*label = 0)
+ Creates a new Fl_Round_Button widget using the given
+position, size, and label string.
+
+Fl_Round_Button::~Fl_Round_Button()
+ The destructor deletes the check button.
\ No newline at end of file
diff --git a/documentation/Fl_Scroll.html b/documentation/Fl_Scroll.html
index 41136476c..2140e93d1 100644
--- a/documentation/Fl_Scroll.html
+++ b/documentation/Fl_Scroll.html
@@ -1,135 +1,99 @@
-
-
-
-
-
-class Fl_Scroll
-
-
-
-Class Hierarchy
-
-
-Fl_Group
+
+
+class Fl_Scroll
+
+Class Hierarchy
+
+
+Fl_Group
|
- +----Fl_Scroll
-
-
-Include Files
-
-
-#include <FL/Fl_Scroll.H>
-
-
-Description
-
-This container widget lets you maneuver around a set of widgets
-much larger than your window. If the child widgets are larger than
-the size of this object then scrollbars will appear so that you can
-scroll over to them:
-
-
-
-Methods
-
-
-
-Fl_Scroll::Fl_Scroll(int x, int y, int w, int h, const char *label = 0)
-
-Creates a new Fl_Scroll widget using the given position, size, and
-label string. The default boxtype is FL_NO_BOX.
-
-virtual Fl_Scroll::~Fl_Scroll()
-
-The destructor also deletes all the children. 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
-Fl_Scroll and all of it's children can be automatic (local)
-variables, but you must declare the Fl_Scroll first, so
-that it is destroyed last.
-
-void Fl_Widget::type(int)
-
-By default you can scroll in both directions, and the scrollbars
-disappear if the data will fit in the area of the scroll. type()
-can change this:
-
-
-
-
-void Fl_Scroll::scrollbar.align(int)
-
-This is used to change what side the scrollbars are drawn on. If the
-FL_ALIGN_LEFT bit is on, the vertical scrollbar is on the
-left. If the FL_ALIGN_TOP bit is on, the horizontal scrollbar
-is on the top.
-
-
-void Fl_Scroll::hscrollbar.align(int)int Fl_Scroll::xposition() const
-
-Gets the current horizontal scrolling position.
-
-int Fl_Scroll::yposition() const
-
-Gets the current vertical scrolling position.
-
-void Fl_Scroll::position(int w, int h)
-
-Sets the upper-lefthand corner of the scrolling region.
-
-
-
+ +----Fl_Scroll
+
+
+Include Files
+
+
+#include <FL/Fl_Scroll.H>
+
+
+Description
+ This container widget lets you maneuver around a set of widgets much
+larger than your window. If the child widgets are larger than the size
+of this object then scrollbars will appear so that you can scroll over
+to them:
+
Methods
+
+Fl_Scroll::Fl_Scroll(int x, int y, int
+w, int h, const char *label = 0)
+ Creates a new Fl_Scroll widget using the given position,
+size, and label string. The default boxtype is FL_NO_BOX.
+virtual Fl_Scroll::~Fl_Scroll()
+ The destructor also deletes all the children. 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
+Fl_Scroll and all of it's children can be automatic (local)
+variables, but you must declare the Fl_Scrollfirst, so
+that it is destroyed last.
+void Fl_Widget::type(int)
+ By default you can scroll in both directions, and the scrollbars
+disappear if the data will fit in the area of the scroll. type()
+ can change this:
+
+
+void Fl_Scroll::scrollbar.align(int)
+
+ This is used to change what side the scrollbars are drawn on. If the
+FL_ALIGN_LEFT bit is on, the vertical scrollbar is on the left.
+ If the FL_ALIGN_TOP bit is on, the horizontal scrollbar is on
+the top.
+
void Fl_Scroll::hscrollbar.align(int)int Fl_Scroll::xposition() const
+ Gets the current horizontal scrolling position.
+int Fl_Scroll::yposition() const
+ Gets the current vertical scrolling position.
+void Fl_Scroll::position(int w, int h)
+
+ Sets the upper-lefthand corner of the scrolling region.
\ No newline at end of file
diff --git a/documentation/Fl_Scrollbar.html b/documentation/Fl_Scrollbar.html
index 535831546..01e59a38e 100644
--- a/documentation/Fl_Scrollbar.html
+++ b/documentation/Fl_Scrollbar.html
@@ -1,78 +1,59 @@
-
-
-
-
-
-class Fl_Scrollbar
-
-
-
-Class Hierarchy
-
-
-Fl_Slider
+
+
+class Fl_Scrollbar
+
+Class Hierarchy
+
+
+Fl_Slider
|
- +----Fl_Scrollbar
-
-
-Include Files
-
-
-#include <FL/Fl_Scrollbar.H>
-
-
-Description
-
-The Fl_Scrollbar widget displays a slider with arrow buttons
-at the ends of the scrollbar. Clicking on the arrows move up/left and
-down/right by linesize(). Scrollbars also accept
-FL_SHORTCUT events: the arrows move by linesize(),
-and vertical scrollbars take Page Up/Down (they move by the page size
-minus linesize()) and Home/End (they jump to the top or
-bottom).
-
-Methods
-
-
-
-
-Fl_Scrollbar::Fl_Scrollbar(int x, int y, int w, int h, const char *label = 0)
-
-Creates a new Fl_Scrollbar widget using the given position,
-size, and label string. You need to do type(FL_HORIZONTAL) if
-you want a horizontal scrollbar.
-
-virtual Fl_Scrollbar::~Fl_Scrollbar()
-
-Destroys the valuator.
-
-int Fl_Scrollbar::linesize() const
-
-This number controls how big the steps are that the arrow keys do. In
-addition page up/down move by the size last sent to value()
-minus one linesize(). The default is 16.
-
-
-void Fl_Scrollbar::linesize(int i)int Fl_Scrollbar::value()
-
-The first form returns the integer value of the scrollbar. You can get
-the floating point value with Fl_Slider::value().
-
-The second form sets value(), range(), and
-slider_size() to make a variable-sized scrollbar. You should
-call this every time your window changes size, your data changes size,
-or your scroll position changes (even if in response to a callback from
-this scrollbar). All necessary calls to redraw() are done.
-
-
-
+ +----Fl_Scrollbar
+
+
+
-int Fl_Scrollbar::value(int position, int size, int top, int total)Include Files
+
+
+#include <FL/Fl_Scrollbar.H>
+
+
+Description
+ The Fl_Scrollbar widget displays a slider with arrow buttons
+at the ends of the scrollbar. Clicking on the arrows move up/left and
+down/right by linesize(). Scrollbars also accept
+FL_SHORTCUT events: the arrows move by linesize(), and
+vertical scrollbars take Page Up/Down (they move by the page size minus
+linesize()) and Home/End (they jump to the top or bottom).
+Methods
+
+Fl_Scrollbar::Fl_Scrollbar(int x,
+int y, int w, int h, const char *label = 0)
+ Creates a new Fl_Scrollbar widget using the given position,
+size, and label string. You need to do type(FL_HORIZONTAL) if
+you want a horizontal scrollbar.
+virtual
+Fl_Scrollbar::~Fl_Scrollbar()
+ Destroys the valuator.
+int Fl_Scrollbar::linesize() const
+
+ This number controls how big the steps are that the arrow keys do. In
+addition page up/down move by the size last sent to value()
+ minus one linesize(). The default is 16.
+
void Fl_Scrollbar::linesize(int i)int Fl_Scrollbar::value()
+
+ The first form returns the integer value of the scrollbar. You can get
+the floating point value with Fl_Slider::value(). The second
+form sets value(), range(), and slider_size()
+ to make a variable-sized scrollbar. You should call this every time
+your window changes size, your data changes size, or your scroll
+position changes (even if in response to a callback from this
+scrollbar). All necessary calls to redraw() are done.
\ No newline at end of file
diff --git a/documentation/Fl_Secret_Input.html b/documentation/Fl_Secret_Input.html
index ee62a6ec8..c24f3b145 100644
--- a/documentation/Fl_Secret_Input.html
+++ b/documentation/Fl_Secret_Input.html
@@ -1,47 +1,36 @@
-
-
-
-
int Fl_Scrollbar::value(int position, int size, int top, int total)
+
-
-class Fl_Secret_Input
-
-
-
-Class Hierarchy
-
-
-Fl_Input
+
+
+class Fl_Secret_Input
+
+Class Hierarchy
+
+
+Fl_Input
|
- +----Fl_Secret_Input
-
-
-Include Files
-
-
-#include <FL/Fl_Input.H>
-
-
-Description
-
-The Fl_Secret_Input class is a subclass of Fl_Input that
-displays its input as a string of asterisks. This subclass is usually used
-to recieve passwords and other "secret" information.
-
-Methods
-
-
-
-Fl_Secret_Input::Fl_Secret_Input(int x, int y, int w, int h, const char *label = 0)
-
-Creates a new Fl_Secret_Input widget using the given position, size, and
-label string. The default boxtype is FL_DOWN_BOX.
-
-virtual Fl_Secret_Input::~Fl_Secret_Input()
-
-Destroys the widget and any value associated with it.
-
-
-
+ +----Fl_Secret_Input
+
+
+Include Files
+
+
+#include <FL/Fl_Input.H>
+
+
+Description
+ The Fl_Secret_Input class is a subclass of Fl_Input
+ that displays its input as a string of asterisks. This subclass is
+usually used to recieve passwords and other "secret" information.
+Methods
+
+
+Fl_Secret_Input::Fl_Secret_Input(int x, int y, int w, int h, const char
+*label = 0)
+ Creates a new Fl_Secret_Input widget using the given
+position, size, and label string. The default boxtype is FL_DOWN_BOX
+.
+virtual
+Fl_Secret_Input::~Fl_Secret_Input()
+ Destroys the widget and any value associated with it.
\ No newline at end of file
diff --git a/documentation/Fl_Select_Browser.html b/documentation/Fl_Select_Browser.html
index b29fbb944..029f74c7d 100644
--- a/documentation/Fl_Select_Browser.html
+++ b/documentation/Fl_Select_Browser.html
@@ -1,72 +1,53 @@
-
-
-
-
-
-class Fl_Select_Browser
-
-
-
-Class Hierarchy
-
-
-Fl_Browser
+
+
+class Fl_Select_Browser
+
+Class Hierarchy
+
+
+Fl_Browser
|
- +----Fl_Select_Browser
-
-
-Include Files
-
-
-#include <FL/Fl_Select_Browser.H>
-
-
-Description
-
-The Fl_Select_Browser class is a subclass of Fl_Browser
-which lets the user select a single item, or no items by clicking on
-the empty space. As long as the mouse button is held down the item
-pointed to by it is highlighted. Normally the callback is done when the
-user presses the mouse, but you can change this with when().
-
-Methods
-
-
-
-
-Fl_Select_Browser::Fl_Select_Browser(int x, int y, int w, int h, const char *label = 0)
-
-Creates a new Fl_Select_Browser widget using the given position, size, and
-label string. The default boxtype is FL_DOWN_BOX.
-
-virtual Fl_Select_Browser::~Fl_Select_Browser()
-
-The destructor also deletes all the items in the list.
-
-int Fl_Browser::deselect()
-
-Same as value(0).
-
-int Fl_Browser::select(int,int=1)
-
-You can use these for compatibility with
-Fl_Multi_Browser. If you
-turn on the selection of more than one line the results are
-unpredictable.
-
-
-int Fl_Browser::selected(int) constint Fl_Browser::value() const
-
-Returns the number of the highlighted item, or zero if none. Notice
-that this is going to be zero except during a callback!
-
-
-
+ +----Fl_Select_Browser
+
+
+Include Files
+
+
+#include <FL/Fl_Select_Browser.H>
+
+
+Description
+ The Fl_Select_Browser class is a subclass of Fl_Browser
+ which lets the user select a single item, or no items by clicking on
+the empty space. As long as the mouse button is held down the item
+pointed to by it is highlighted. Normally the callback is done when the
+user presses the mouse, but you can change this with when().
+Methods
+
+
+Fl_Select_Browser::Fl_Select_Browser(int x, int y, int w, int h, const
+char *label = 0)
+ Creates a new Fl_Select_Browser widget using the given
+position, size, and label string. The default boxtype is FL_DOWN_BOX
+.
+virtual
+Fl_Select_Browser::~Fl_Select_Browser()
+ The destructor also deletes all the items in the list.
+int Fl_Browser::deselect()
+ Same as value(0).
+int Fl_Browser::select(int,int=1)
+
+ You can use these for compatibility with
+Fl_Multi_Browser. If you turn on the selection of more
+than one line the results are unpredictable.
+
int Fl_Browser::selected(int) constint Fl_Browser::value() const
+ Returns the number of the highlighted item, or zero if none. Notice
+that this is going to be zero except during a callback!
\ No newline at end of file
diff --git a/documentation/Fl_Single_Window.html b/documentation/Fl_Single_Window.html
index 9f0e297ea..f0f628d0f 100644
--- a/documentation/Fl_Single_Window.html
+++ b/documentation/Fl_Single_Window.html
@@ -1,49 +1,37 @@
-
-
-
-
-
-class Fl_Single_Window
-
-
-
-Class Hierarchy
-
-
-Fl_Window
+
+
+class Fl_Single_Window
+
+Class Hierarchy
+
+
+Fl_Window
|
- +----Fl_Single_Window
-
-
-Include Files
-
-
-#include <FL/Fl_Single_Window.H>
-
-
-Description
-
-This is the same as Fl_Window. However, it is possible that
-some implementations will provide double-buffered windows by default.
-This subclass can be used to force single-buffering. This may be
-useful for modifying existing programs that use incremental update, or
-for some types of image data, such as a movie flipbook.
-
-Methods
-
-
-
-Fl_Single_Window::Fl_Single_Window(int x, int y, int w, int h, const char *label = 0)
-
-Creates a new Fl_Single_Window widget using the given position, size, and
-label (title) string.
-
-virtual Fl_Single_Window::~Fl_Single_Window()
-
-Destroys the window and all child widgets.
-
-
-
+ +----Fl_Single_Window
+
+
+Include Files
+
+
+#include <FL/Fl_Single_Window.H>
+
+
+Description
+ This is the same as Fl_Window. However, it is possible that
+some implementations will provide double-buffered windows by default.
+This subclass can be used to force single-buffering. This may be
+useful for modifying existing programs that use incremental update, or
+for some types of image data, such as a movie flipbook.
+Methods
+
+
+Fl_Single_Window::Fl_Single_Window(int x, int y, int w, int h, const
+char *label = 0)
+ Creates a new Fl_Single_Window widget using the given
+position, size, and label (title) string.
+virtual
+Fl_Single_Window::~Fl_Single_Window()
+ Destroys the window and all child widgets.
\ No newline at end of file
diff --git a/documentation/Fl_Slider.html b/documentation/Fl_Slider.html
index 295c06e0f..469a4f808 100644
--- a/documentation/Fl_Slider.html
+++ b/documentation/Fl_Slider.html
@@ -1,101 +1,77 @@
-
-
-
-
-
-class Fl_Slider
-
-
-
-Class Hierarchy
-
-
-Fl_Valuator
+
+
+class Fl_Slider
+
+Class Hierarchy
+
+
+Fl_Valuator
|
- +----Fl_Slider
+ +----Fl_Slider
|
- +----Fl_Scrollbar, Fl_Value_Slider
-
-
-Include Files
-
-
-#include <FL/Fl_Slider.H>
-
-
-Description
-
-The Fl_Slider widget contains a sliding knob inside a box. It
-if often used as a scrollbar. Moving the box all the way to the
-top/left sets it to the minimum(), and to the bottom/right to
-the maximum(). The minimum() may be greater than the
-maximum() to reverse the slider direction.
-
-Methods
-
-
-
-
-Fl_Slider::Fl_Slider(int x, int y, int w, int h, const char *label = 0)
-
-Creates a new Fl_Slider widget using the given position, size, and
-label string. The default boxtype is FL_NO_BOX.
-
-virtual Fl_Slider::~Fl_Slider()
-
-Destroys the valuator.
-
-int Fl_Slider::scrollvalue(int windowtop, int windowsize, int first, int totalsize)
-
-Returns Fl_Scrollbar::value().
-
-Fl_Boxtype Fl_Slider::slider() const
-
-Set the type of box to draw for the moving part of the slider. The
-color of the moving part (or of the notch in it for the nice sliders)
-is controlled by selection_color(). The default value of zero
-causes the slider to figure out what to draw from box().
-
-
-void Fl_Slider::slider(Fl_Boxtype)float Fl_Slider::slider_size() const
-
-Get or set the dimensions of the moving piece of slider. This is the
-fraction of the size of the entire widget. If you set this to 1 then
-the slider cannot move. The default value is .08.
-
-
-void Fl_Slider::slider_size(float)uchar Fl_Widget::type() const
-
-Setting this changes how the slider is drawn, which can be one of the following:
-
-
-void Fl_Widget::type(uchar t)
-
-
-
-
+ +----Fl_Scrollbar, Fl_Value_Slider
+
+
+Include Files
+
+
+#include <FL/Fl_Slider.H>
+
+
+Description
+ The Fl_Slider widget contains a sliding knob inside a box. It
+if often used as a scrollbar. Moving the box all the way to the
+top/left sets it to the minimum(), and to the bottom/right to
+the maximum(). The minimum() may be greater than the
+maximum() to reverse the slider direction.
+Methods
+
+
+Fl_Slider::Fl_Slider(int x, int y, int
+w, int h, const char *label = 0)
+ Creates a new Fl_Slider widget using the given position,
+size, and label string. The default boxtype is FL_NO_BOX.
+virtual Fl_Slider::~Fl_Slider()
+ Destroys the valuator.
+int Fl_Slider::scrollvalue(int
+windowtop, int windowsize, int first, int totalsize)
+ Returns
+Fl_Scrollbar::value().
+Fl_Boxtype Fl_Slider::slider() const
+
+ Set the type of box to draw for the moving part of the slider. The
+color of the moving part (or of the notch in it for the nice sliders)
+is controlled by selection_color(). The default value of zero
+causes the slider to figure out what to draw from box().
+
void Fl_Slider::slider(Fl_Boxtype)float Fl_Slider::slider_size() const
+
+ Get or set the dimensions of the moving piece of slider. This is the
+fraction of the size of the entire widget. If you set this to 1 then
+the slider cannot move. The default value is .08.
+
void Fl_Slider::slider_size(float)uchar Fl_Widget::type() const
+
+ Setting this changes how the slider is drawn, which can be one of the
+following:
+
void Fl_Widget::type(uchar t)
+
+
\ No newline at end of file
diff --git a/documentation/Fl_Tabs.html b/documentation/Fl_Tabs.html
index 3018aeecd..e0f7196f1 100644
--- a/documentation/Fl_Tabs.html
+++ b/documentation/Fl_Tabs.html
@@ -1,85 +1,64 @@
-
-
-
-
-
-class Fl_Tabs
-
-
-
-Class Hierarchy
-
-
-Fl_Group
+
+
+class Fl_Tabs
+
+Class Hierarchy
+
+
+Fl_Group
|
- +----Fl_Tabs
-
-
-Include Files
-
-
-#include <FL/Fl_Tab.H>
-
-
-Description
-
-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.
-
-
-
-Methods
-
-
-
-Fl_Tab::Fl_Tab(int x, int y, int w, int h, const char *label = 0)
-
-Creates a new Fl_Tab widget using the given position, size, and
-label string. The default boxtype is FL_THIN_UP_BOX.
-
-virtual Fl_Tab::~Fl_Tab()
-
-The destructor also deletes all the children. 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
-Fl_Tab and all of it's children can be automatic (local)
-variables, but you must declare the Fl_Tab first, so
-that it is destroyed last.
-
-Fl_Widget* Fl_Tabs::value() const
-
-Gets or sets the currently visible widget/tab.
-
-
-
+ +----Fl_Tabs
+
+
+
-int Fl_Tabs::value(Fl_Widget*)Include Files
+
+
+#include <FL/Fl_Tab.H>
+
+
+Description
+ 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.
+
Methods
+
+Fl_Tab::Fl_Tab(int x, int y, int w, int h,
+const char *label = 0)
+ Creates a new Fl_Tab widget using the given position, size,
+and label string. The default boxtype is FL_THIN_UP_BOX.
+virtual Fl_Tab::~Fl_Tab()
+ The destructor also deletes all the children. 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
+Fl_Tab and all of it's children can be automatic (local)
+variables, but you must declare the Fl_Tabfirst, so
+that it is destroyed last.
+Fl_Widget* Fl_Tabs::value() const
+
+ Gets or sets the currently visible widget/tab.
\ No newline at end of file
diff --git a/documentation/Fl_Tile.html b/documentation/Fl_Tile.html
index ffb85a603..abbd8fc5f 100644
--- a/documentation/Fl_Tile.html
+++ b/documentation/Fl_Tile.html
@@ -1,85 +1,65 @@
-
-
-
-
int Fl_Tabs::value(Fl_Widget*)
-
-class Fl_Tile
-
-
-
-Class Hierarchy
-
-
-Fl_Widget
+
+
+class Fl_Tile
+
+Class Hierarchy
+
+
+Fl_Widget
|
- +----Fl_Tile
+ +----Fl_Tile
|
- +----Fl_Pack, Fl_Scroll, Fl_Tabs, Fl_Tile, Fl_Window
-
-
-Include Files
-
-
-#include <FL/Fl_Tile.H>
-
-
-Description
-
-The Fl_Tile class lets you resize the children by dragging the
-border between them:
-
-
-
-Methods
-
-
-
-
-Fl_Tile::Fl_Tile(int x, int y, int w, int h, const char *label = 0)
-
-Creates a new Fl_Tile widget using the given position, size, and
-label string. The default boxtype is FL_NO_BOX.
-
-virtual Fl_Tile::~Fl_Tile()
-
-The destructor also deletes all the children. 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
-Fl_Tile and all of it's children can be automatic (local)
-variables, but you must declare the Fl_Tile first, so
-that it is destroyed last.
-
-void Fl_Tile::position(from_x, from_y, to_x, to_y)
-
-Drag the intersection at from_x,from_y to to_x,to_y.
-This redraws all the necessary children.
-
-void Fl_Tile::resizable(Fl_Widget&)
-
-The "resizable" child widget (which should be invisible) limits where
-the border can be dragged to. If you don't set it, it will be possible
-to drag the borders right to the edge, and thus resize objects on the
-edge to zero width or height. The resizable() widget is not
-resized by dragging any borders.
-
-
-
+ +----Fl_Pack, Fl_Scroll, Fl_Tabs, Fl_Tile, Fl_Window
+
+
+Include Files
+
+
+#include <FL/Fl_Tile.H>
+
+
+Description
+ The Fl_Tile class lets you resize the children by dragging
+the border between them:
+
Methods
+
+
+Fl_Tile::Fl_Tile(int x, int y, int w, int
+h, const char *label = 0)
+ Creates a new Fl_Tile widget using the given position, size,
+and label string. The default boxtype is FL_NO_BOX.
+virtual Fl_Tile::~Fl_Tile()
+ The destructor also deletes all the children. 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
+Fl_Tile and all of it's children can be automatic (local)
+variables, but you must declare the Fl_Tilefirst, so
+that it is destroyed last.
+void Fl_Tile::position(from_x, from_y,
+to_x, to_y)
+ Drag the intersection at from_x,from_y to to_x,to_y.
+ This redraws all the necessary children.
+void Fl_Tile::resizable(Fl_Widget The
+"resizable" child widget (which should be invisible) limits where the
+border can be dragged to. If you don't set it, it will be possible to
+drag the borders right to the edge, and thus resize objects on the edge
+to zero width or height. The resizable() widget is not
+resized by dragging any borders.
+
\ No newline at end of file
diff --git a/documentation/Fl_Timer.html b/documentation/Fl_Timer.html
index 950ec82a3..fef3acc77 100644
--- a/documentation/Fl_Timer.html
+++ b/documentation/Fl_Timer.html
@@ -1,81 +1,58 @@
-
-
-
-
-
-class Fl_Timer
-
-
-
-Class Hierarchy
-
-
-Fl_Widget
+
+
+class Fl_Timer
+
+Class Hierarchy
+
+
+Fl_Widget
|
- +----Fl_Timer
-
-
-Include Files
-
-
-#include <FL/Fl_Timer.H>
-
-
-Description
-
-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 Fl::add_timeout() instead.
-
-Methods
-
-
-
-Fl_Timer::Fl_Timer(uchar type, int x, int y, int w, int h, const char *label = 0)
-
-Creates a new Fl_Timer widget using the given type, position, size, and
-label string. The type parameter can be any of the following symbolic
-constants:
-
-
-
-
-virtual Fl_Timer::~Fl_Timer()
-
-Destroys the timer and removes the timeout.
-
-char direction() const
-
-Gets or sets the direction of the timer. If the direction is zero then
-the timer will count up, otherwise it will count down from the initial
-value().
-
-
-void direction(char d)char suspended() const
-
-Gets or sets whether the timer is suspended.
-
-
-void suspended(char d)float value() const
-
-Gets or sets the current timer value.
-
-
-
+ +----Fl_Timer
+
+
+
-void value(float)Include Files
+
+
+#include <FL/Fl_Timer.H>
+
+
+Description
+ 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
+Fl::add_timeout() instead.
+Methods
+
+Fl_Timer::Fl_Timer(uchar type, int x, int
+y, int w, int h, const char *label = 0)
+ Creates a new Fl_Timer widget using the given type, position,
+size, and label string. The type parameter can be any of the
+following symbolic constants:
+
+
+virtual Fl_Timer::~Fl_Timer()
+ Destroys the timer and removes the timeout.
+char direction() const
+
+ Gets or sets the direction of the timer. If the direction is zero
+then the timer will count up, otherwise it will count down from the
+initial value().
+
void direction(char d)char suspended() const
+
+ Gets or sets whether the timer is suspended.
+
void suspended(char d)float value() const
+
+ Gets or sets the current timer value.
\ No newline at end of file
diff --git a/documentation/Fl_Valuator.html b/documentation/Fl_Valuator.html
index 584c91270..ea0c8ca36 100644
--- a/documentation/Fl_Valuator.html
+++ b/documentation/Fl_Valuator.html
@@ -1,182 +1,136 @@
-
-
-
-
void value(float)
-
-class Fl_Valuator
-
-
-
-Class Hierarchy
-
-
-Fl_Widget
+
+
+class Fl_Valuator
+
+Class Hierarchy
+
+
+Fl_Widget
|
- +----Fl_Valuator
+ +----Fl_Valuator
|
- +----Fl_Adjuster, Fl_Counter, Fl_Dial, Fl_Roller,
- Fl_Slider, Fl_Value_Input, Fl_Value_Output,
-
-
-Include Files
-
-
-#include <FL/Fl_Valuator.H>
-
-
-Description
-
-The Fl_Valuator class controls a single floating-point value
-and provides a consistent interface to set the value, range, and step,
-and insures that callbacks are done the same for every object.
-
-
-
-Methods
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Fl_Valuator::Fl_Valuator(int x, int y, int w, int h, const char *label = 0)
-
-Creates a new Fl_Valuator widget using the given position, size, and
-label string. The default boxtype is FL_NO_BOX.
-
-virtual Fl_Valuator::~Fl_Valuator()
-
-Destroys the valuator.
-
-double Fl_Valuator::value() const
-
-Get or set the current value. The new value is not clamped or
-otherwise changed before storing it. Use clamp() or
-round() to modify the value before calling this if you want.
-If the new value is different than the current one the object is
-redrawn. The initial value is zero.
-
-
-int Fl_Valuator::value(double)double Fl_Valuator::minimum() const
-
-Gets or sets the minimum value for the valuator.
-
-
-void Fl_Valuator::minimum(double)double Fl_Valuator::maximum() const
-
-Gets or sets the maximum value for the valuator.
-
-
-void Fl_Valuator::maximum(double)void Fl_Valuator::range(double min, double max);
-
-Sets the minimum and maximum values for the valuator. When the user
-manipulates the widget, the value is limited to this range. This
-clamping is done after rounding to the step value (this makes a
-difference if the range is not a multiple of the step).
-
-double Fl_Valuator::step() const
-
-Get or set the step value. As the user moves the mouse the value is
-rounded to the nearest multiple of the step value. This is done
-before clamping it to the range. For most
-objects the default step is zero.
-
-
-void Fl_Valuator::step(double)
-void Fl_Valuator::step(int A, int B)int Fl_Valuator::format(char*, double)
-
-Format the passed value to show enough digits so that for the current
-step value. If the step has been set to zero then it does a
-%g format. The characters are written into the passed buffer.
-
-double Fl_Valuator::round(double)
-
-Round the passed value to the nearest step increment. Does nothing if
-step is zero.
-
-double Fl_Valuator::clamp(double)
-
-Clamp the passed value to the valuator range.
-
-double Fl_Valuator::increment(double,int n)
-
-Adds n times the step value to the passed value. If step was set to
-zero it uses fabs(maximum() - minimum()) / 100.
-
-int Fl_Widget::changed() const
-
-This value is true if the user has moved the slider. It is turned
-off by value(x) and just before doing a callback (the callback can
-turn it back on if desired).
-
-void Fl_Widget::set_changed()
-
-Sets the changed() flag.
-
-
void Fl_Widget::clear_changed()
-
-Clears the changed() flag.
-
-
-
+ +----Fl_Adjuster, Fl_Counter, Fl_Dial, Fl_Roller,
+ Fl_Slider, Fl_Value_Input, Fl_Value_Output,
+
+
+Include Files
+
+
+#include <FL/Fl_Valuator.H>
+
+
+Description
+ The Fl_Valuator class controls a single floating-point value
+and provides a consistent interface to set the value, range, and step,
+and insures that callbacks are done the same for every object.
+
Methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Fl_Valuator::Fl_Valuator(int x, int
+y, int w, int h, const char *label = 0)
+ Creates a new Fl_Valuator widget using the given position,
+size, and label string. The default boxtype is FL_NO_BOX.
+virtual Fl_Valuator::~Fl_Valuator()
+
+ Destroys the valuator.
+double Fl_Valuator::value() const
+
+ Get or set the current value. The new value is not clamped or
+otherwise changed before storing it. Use clamp() or round()
+ to modify the value before calling this if you want. If the new value
+is different than the current one the object is redrawn. The initial
+value is zero.
+
int Fl_Valuator::value(double)double Fl_Valuator::minimum() const
+
+ Gets or sets the minimum value for the valuator.
+
void Fl_Valuator::minimum(double)double Fl_Valuator::maximum() const
+
+ Gets or sets the maximum value for the valuator.
+
void Fl_Valuator::maximum(double)void Fl_Valuator::range(double min,
+double max);
+ Sets the minimum and maximum values for the valuator. When the user
+manipulates the widget, the value is limited to this range. This
+clamping is done after rounding to the step value (this makes a
+difference if the range is not a multiple of the step).
+double Fl_Valuator::step() const
+
+ Get or set the step value. As the user moves the mouse the value is
+rounded to the nearest multiple of the step value. This is done
+before clamping it to the range. For most objects the default step
+is zero.
+
void Fl_Valuator::step(double)
+
void Fl_Valuator::step(int A, int B)int Fl_Valuator::format(char*, double)
+
+ Format the passed value to show enough digits so that for the current
+step value. If the step has been set to zero then it does a %g
+ format. The characters are written into the passed buffer.
+double Fl_Valuator::round(double)
+ Round the passed value to the nearest step increment. Does nothing if
+step is zero.
+double Fl_Valuator::clamp(double)
+ Clamp the passed value to the valuator range.
+double
+Fl_Valuator::increment(double,int n)
+ Adds n times the step value to the passed value. If step was
+set to zero it uses fabs(maximum() - minimum()) / 100.
+int Fl_Widget::changed() const
+ This value is true if the user has moved the slider. It is turned off
+by value(x) and just before doing a callback (the callback can
+turn it back on if desired).
+void Fl_Widget::set_changed()
+Sets the changed() flag.
+void Fl_Widget::clear_changed()
+
+ Clears the changed() flag.
\ No newline at end of file
diff --git a/documentation/Fl_Value_Input.html b/documentation/Fl_Value_Input.html
index 597d07f27..9dfd5d9df 100644
--- a/documentation/Fl_Value_Input.html
+++ b/documentation/Fl_Value_Input.html
@@ -1,89 +1,71 @@
-
-
-
-
-
-class Fl_Value_Input
-
-
-
-Class Hierarchy
-
-
-Fl_Valuator
+
+
+class Fl_Value_Input
+
+Class Hierarchy
+
+
+Fl_Valuator
|
- +----Fl_Value_Input
-
-
-Include Files
-
-
-#include <FL/Fl_Value_Input.H>
-
-
-Description
-
-The Fl_Value_Input widget displays a floating point value.
-The user can click in the text field and edit it (there is in fact
-a hidden Fl_Value_Input widget with
-type(FL_FLOAT_INPUT) in there), and when they hit return
-or tab the value updates to what they typed and the callback is done.
-
-Methods
-
-
-
-
-Fl_Value_Input::Fl_Value_Input(int x, int y, int w, int h, const char *label = 0)
-
-Creates a new Fl_Value_Input widget using the given position, size, and
-label string. The default boxtype is FL_NO_BOX.
-
-virtual Fl_Value_Input::~Fl_Value_Input()
-
-Destroys the valuator.
-
-Fl_Color Fl_Value_Input::cursor_color() const
-
-Get or set the color of the cursor. This is black by default.
-
-
-void Fl_Value_Input::cursor_color(Fl_Color)uchar Fl_Value_Input::soft() const
-
-If "soft" is turned on, the user is allowed to drag the value outside
-the range. If they drag the value to one of the ends, let go, then
-grab again and continue to drag, they can get to any value. Default
-is one.
-
-
-void Fl_Value_Input::soft(uchar)Fl_Color Fl_Value_Input::textcolor() const
-
-Gets or sets the color of the text in the value box.
-
-
-void Fl_Value_Input::textcolor(Fl_Color)Fl_Font Fl_Value_Input::textfont() const
-
-Gets or sets the typeface of the text in the value box.
-
-
-
void Fl_Value_Input::textfont(Fl_Font)uchar Fl_Value_Input::textsize() const
-
-Gets or sets the size of the text in the value box.
-
-
-
+ +----Fl_Value_Input
+
+
+
-void Fl_Value_Input::textsize(uchar)Include Files
+
+
+#include <FL/Fl_Value_Input.H>
+
+
+Description
+ The Fl_Value_Input widget displays a floating point value.
+The user can click in the text field and edit it (there is in fact a
+hidden Fl_Value_Input widget with
+type(FL_FLOAT_INPUT) in there), and when they hit return or tab
+the value updates to what they typed and the callback is done.
+Methods
+
+
+Fl_Value_Input::Fl_Value_Input(int x, int y, int w, int h, const char
+*label = 0)
+ Creates a new Fl_Value_Input widget using the given position,
+size, and label string. The default boxtype is FL_NO_BOX.
+virtual
+Fl_Value_Input::~Fl_Value_Input()
+ Destroys the valuator.
+Fl_Color
+Fl_Value_Input::cursor_color() const
+
+ Get or set the color of the cursor. This is black by default.
+
void Fl_Value_Input::cursor_color(Fl_Color)uchar Fl_Value_Input::soft() const
+
+ If "soft" is turned on, the user is allowed to drag the value outside
+the range. If they drag the value to one of the ends, let go, then
+grab again and continue to drag, they can get to any value. Default is
+one.
+
void Fl_Value_Input::soft(uchar)Fl_Color
+Fl_Value_Input::textcolor() const
+
+ Gets or sets the color of the text in the value box.
+
void Fl_Value_Input::textcolor(Fl_Color)Fl_Font Fl_Value_Input::textfont()
+const
+
+ Gets or sets the typeface of the text in the value box.
+
+
void Fl_Value_Input::textfont(Fl_Font)uchar Fl_Value_Input::textsize()
+const
+
+ Gets or sets the size of the text in the value box.
\ No newline at end of file
diff --git a/documentation/Fl_Value_Output.html b/documentation/Fl_Value_Output.html
index 254f7ded0..d021f1ea1 100644
--- a/documentation/Fl_Value_Output.html
+++ b/documentation/Fl_Value_Output.html
@@ -1,80 +1,64 @@
-
-
-
-
void Fl_Value_Input::textsize(uchar)
-
-class Fl_Value_Output
-
-
-
-Class Hierarchy
-
-
-Fl_Valuator
+
+
+class Fl_Value_Output
+
+Class Hierarchy
+
+
+Fl_Valuator
|
- +----Fl_Value_Output
-
-
-Include Files
-
-
-#include <FL/Fl_Value_Output.H>
-
-
-Description
-
-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
-100 * step().
-
-Methods
-
-
-
-
-Fl_Value_Output::Fl_Value_Output(int x, int y, int w, int h, const char *label = 0)
-
-Creates a new Fl_Value_Output widget using the given position, size, and
-label string. The default boxtype is FL_NO_BOX.
-
-virtual Fl_Value_Output::~Fl_Value_Output()
-
-Destroys the valuator.
-
-uchar Fl_Value_Output::soft() const
-
-If "soft" is turned on, the user is allowed to drag the value outside
-the range. If they drag the value to one of the ends, let go, then
-grab again and continue to drag, they can get to any value. Default
-is one.
-
-
-void Fl_Value_Output::soft(uchar)Fl_Color Fl_Value_Output::textcolor() const
-
-Gets or sets the color of the text in the value box.
-
-
-void Fl_Value_Output::textcolor(Fl_Color)Fl_Font Fl_Value_Output::textfont() const
-
-Gets or sets the typeface of the text in the value box.
-
-
-
void Fl_Value_Output::textfont(Fl_Font)uchar Fl_Value_Output::textsize() const
-
-Gets or sets the size of the text in the value box.
-
-
-
+ +----Fl_Value_Output
+
+
+
-void Fl_Value_Output::textsize(uchar)Include Files
+
+
+#include <FL/Fl_Value_Output.H>
+
+
+Description
+ 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
+100 * step().
+Methods
+
+
+Fl_Value_Output::Fl_Value_Output(int x, int y, int w, int h, const char
+*label = 0)
+ Creates a new Fl_Value_Output widget using the given
+position, size, and label string. The default boxtype is FL_NO_BOX
+.
+virtual
+Fl_Value_Output::~Fl_Value_Output()
+ Destroys the valuator.
+uchar Fl_Value_Output::soft() const
+
+ If "soft" is turned on, the user is allowed to drag the value outside
+the range. If they drag the value to one of the ends, let go, then
+grab again and continue to drag, they can get to any value. Default is
+one.
+
void Fl_Value_Output::soft(uchar)Fl_Color
+Fl_Value_Output::textcolor() const
+
+ Gets or sets the color of the text in the value box.
+
void Fl_Value_Output::textcolor(Fl_Color)Fl_Font
+Fl_Value_Output::textfont() const
+
+ Gets or sets the typeface of the text in the value box.
+
+
void Fl_Value_Output::textfont(Fl_Font)uchar Fl_Value_Output::textsize()
+const
+
+ Gets or sets the size of the text in the value box.
\ No newline at end of file
diff --git a/documentation/Fl_Value_Slider.html b/documentation/Fl_Value_Slider.html
index b8be9ef6d..847330b3e 100644
--- a/documentation/Fl_Value_Slider.html
+++ b/documentation/Fl_Value_Slider.html
@@ -1,67 +1,52 @@
-
-
-
-
void Fl_Value_Output::textsize(uchar)
-
-class Fl_Value_Slider
-
-
-
-Class Hierarchy
-
-
-Fl_Slider
+
+
+class Fl_Value_Slider
+
+Class Hierarchy
+
+
+Fl_Slider
|
- +----Fl_Value_Slider
-
-
-Include Files
-
-
-#include <FL/Fl_Value_Slider.H>
-
-
-Description
-
-The Fl_Value_Slider widget is a Fl_Slider widget with
-a box displaying the current value.
-
-
-
-Methods
-
-
-
-
-Fl_Value_Slider::Fl_Value_Slider(int x, int y, int w, int h, const char *label = 0)
-
-Creates a new Fl_Value_Slider widget using the given position,
-size, and label string. The default boxtype is FL_DOWN_BOX.
-
-virtual Fl_Value_Slider::~Fl_Value_Slider()
-
-Destroys the valuator.
-
-Fl_Color Fl_Value_Slider::textcolor() const
-
-Gets or sets the color of the text in the value box.
-
-
-void Fl_Value_Slider::textcolor(Fl_Color)Fl_Font Fl_Value_Slider::textfont() const
-
-Gets or sets the typeface of the text in the value box.
-
-
-
void Fl_Value_Slider::textfont(Fl_Font)uchar Fl_Value_Slider::textsize() const
-
-Gets or sets the size of the text in the value box.
-
-
-
-
+ +----Fl_Value_Slider
+
+
+
-void Fl_Value_Slider::textsize(uchar)Include Files
+
+
+#include <FL/Fl_Value_Slider.H>
+
+
+Description
+ The Fl_Value_Slider widget is a Fl_Slider widget
+with a box displaying the current value.
+
Methods
+
+
+Fl_Value_Slider::Fl_Value_Slider(int x, int y, int w, int h, const char
+*label = 0)
+ Creates a new Fl_Value_Slider widget using the given
+position, size, and label string. The default boxtype is FL_DOWN_BOX
+.
+virtual
+Fl_Value_Slider::~Fl_Value_Slider()
+ Destroys the valuator.
+Fl_Color
+Fl_Value_Slider::textcolor() const
+
+ Gets or sets the color of the text in the value box.
+
void Fl_Value_Slider::textcolor(Fl_Color)Fl_Font
+Fl_Value_Slider::textfont() const
+
+ Gets or sets the typeface of the text in the value box.
+
+
void Fl_Value_Slider::textfont(Fl_Font)uchar Fl_Value_Slider::textsize()
+const
+
+ Gets or sets the size of the text in the value box.
\ No newline at end of file
diff --git a/documentation/Fl_Widget.html b/documentation/Fl_Widget.html
index 933e1ef7e..1009a0726 100644
--- a/documentation/Fl_Widget.html
+++ b/documentation/Fl_Widget.html
@@ -1,368 +1,293 @@
-
-
-
-
void Fl_Value_Slider::textsize(uchar)
-
-class Fl_Widget
-
-
-
-Class Hierarchy
-
-
-Fl_Widget
+
+
+class Fl_Widget
+
+Class Hierarchy
+
+
+Fl_Widget
|
- +----Fl_Box, Fl_Browser, Fl_Button, Fl_Chart, Fl_Clock,
- Fl_Free, Fl_Group, Fl_Input, Fl_Menu_, Fl_Positioner,
- Fl_Timer, Fl_Valuator
-
-
-Include Files
-
-
-#include <FL/Fl_Widget.H>
-
-
-Description
-
-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.
-
-Methods
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Fl_Widget::Fl_Widget(int x, int y, int w, int h, const char* label=0);
-
-This is the protected constructor for an Fl_Widget, but all derived
-widgets have a matching public constructor. It takes a value for
-x(), y(), w(), h(), and an optional value for label().
-
-virtual Fl_Widget::~Fl_Widget();
-
-Destroying single widgets is not very common. It is your
-responsibility to either remove() them from any enclosing group, or to
-destroy that group immediately after destroying the children.
-
-uchar Fl_Widget::type() const;
-
-This value is used for Forms compatability and to simulate RTTI.
-
-short Fl_Widget::x() const
-
-The position of the upper-left corner of the widget in its enclosing
-Fl_Window (not its parent if that is not an Fl_Window), and its
-width and height.
-
-
-short Fl_Widget::y() const
-short Fl_Widget::w() const
-short Fl_Widget::h() constvirtual void Fl_Widget::resize(int,int,int,int)
-
-Change the size or position of the widget. This is a virtual function
-so the widget may implement it's own handling of resizing. The
-default version does not do redraw(), that is the parent
-widget's responsibility (this is because the parent may know a faster
-way to update the display, such as scrolling from the old position).
-
-
-void Fl_Widget::position(short x,short y)
-void Fl_Widget::size(short w,short h)Fl_Window* Fl_Widget::window() const;
-
-Return a pointer to the Fl_Window
-that this widget is in (it will skip any and all parent widgets between
-this and the window). Returns NULL if none. Note: for an
-Fl_Window, this returns it's parent window (if any),
-not this window.
-
-Fl_Boxtype Fl_Widget::box() const
-
-The box() identifies a routine that draws the background of the
-widget. See Box Types for the available
-types. The default depends on the widget, but is usually FL_NO_BOX
-or FL_UP_BOX.
-
-
-void Fl_Widget::box(Fl_Boxtype)Fl_Color Fl_Widget::color() const
-
-This color is passed to the box routine. Color is an index into an
-internal table of rgb colors. For most widgets this defaults to
-FL_GRAY. See the enumeration list
-for predefined colors. Use
-Fl::set_color() to redefine colors.
-
-
-void Fl_Widget::color(Fl_Color)Fl_Color Fl_Widget::selection_color() const
-
-For Forms compatibility a second color is defined. This 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(a,b).
-
-
-void Fl_Widget::selection_color(Fl_Color)
-void Fl_Widget::color(Fl_Color, Fl_Color)const char* Fl_Widget::label() const
-
-The label is printed somewhere on the widget or next to it. The
-string is not copied, the passed pointer is stored unchanged in
-the widget.
-
-
-void Fl_Widget::label(const char*)void Fl_Widget::label(Fl_Labeltype, const char*)
-
-A labeltype identifies a routine that
-draws the label of the widget. This can be used for special effects
-such as emboss, or to use the label() pointer as another form
-of data such as a bitmap. The value FL_NORMAL_LABEL prints
-the label as text.
-
-
-uchar Fl_Widget::labeltype() const
-void Fl_Widget::labeltype(Fl_Labeltype)Fl_Align Fl_Widget::align() const
-
-How the label is printed next to or inside the widget. The default
-value is FL_ALIGN_CENTER, which centers the label. The value
-can be any of these constants or'd together:
-
-
-void Fl_Widget::align(Fl_Align)
-
-
-Fl_Color Fl_Widget::labelcolor() const
-
-This color is passed to the labeltype routine, and is typically the
-color of the label text. This defaults to FL_BLACK.
-
-
-void Fl_Widget::labelcolor(Fl_Color)Fl_Font Fl_Widget::labelfont() const
-
-Fonts are identified by small 8-bit indexes into a table. See the
-enumeration list for predefined typefaces. The
-default value uses a Helvetica typeface (Arial for Microsoft®
-Windows®). The function Fl::set_font()
- can define new typefaces.
-
-
-void Fl_Widget::labelfont(Fl_Font)uchar Fl_Widget::labelsize() const
-
-Fonts are further identified by a point size. The default is 14.
-
-
-void Fl_Widget::labelsize(uchar)typedef void (Fl_Callback)(Fl_Widget*, void*)
-
-Each widget has a single callback. You can set it or examine it with
-these methods.
-
-
-Fl_Callback* Fl_Widget::callback() const
-void Fl_Widget::callback(Fl_Callback*, void* = 0)void* Fl_Widget::user_data() const
-
-You can also just change the void * second argument to the callback
-with the user_data methods.
-
-
-void Fl_Widget::user_data(void*)void Fl_Widget::callback(void (*)(Fl_Widget*, long), long = 0)
-
-For convenience you can also define the callback as taking a long
-argument. This is implemented by casting this to a
-Fl_Callback and casting the long to a void *
-and may not be portable to some machines.
-
-
-long Fl_Widget::argument() const
-void Fl_Widget::argument(long)void Fl_Widget::callback(void (*)(Fl_Widget*))
-
-For convenience you can also define the callback as taking only one
-argument. This is implemented by casting this to a
-Fl_Callback and may not be portable to some machines.
-
-void Fl_Widget::do_callback()
-
-You can cause a widget to do its callback at any time, and even pass
-arbitrary arguments.
-
-
-void Fl_Widget::do_callback(Fl_Widget*, void* = 0)
-void Fl_Widget::do_callback(Fl_Widget*, long)int Fl_Widget::changed() const
-
-Fl_Widget::changed() is a flag that is turned on when the user
-changes the value stored in the widget. This is only used by
-subclasses of Fl_Widget that store values, but is in the base
-class so it is easier to scan all the widgets in a panel and
-do_callback() on the changed ones in response to an "OK"
-button.
-
-
-void Fl_Widget::set_changed()
-void Fl_Widget::clear_changed()Fl_When Fl_Widget::when() const
-
-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 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.
-
-
-void Fl_Widget::when(Fl_When)static void Fl_Widget::default_callback(Fl_Widget*, void*)
-
-The default callback, which puts a pointer to the widget on the queue
-returned by Fl::readqueue(). You
-may want to call this from your own callback.
-
-int Fl_Widget::visible() const
-
-An invisible widget never gets redrawn and does not get events. An
-widget is really visible if visible() is true on it and all
-it's parents. Changing it will send FL_SHOW or
-FL_HIDE events to the widget. Do not change it if the
-parent is not visible, as this will send false FL_SHOW or
-FL_HIDE events to the widget. redraw() is called
-if necessary on this or the parent.
-
-
-void Fl_Widget::show()
-void Fl_Widget::hide()int Fl_Widget::active() const
-
-Fl_Widget::active() returns whether the widget is active. An
-inactive widget does not get any events, but it does get redrawn. A
-widget is active if active() is true on it and all it's
-parents. Changing this value will send FL_ACTIVATE or
-FL_DEACTIVATE to the widget. Do not change it if the
-parent is not active, as this will send false FL_ACTIVATE or
-FL_DEACTIVATE events to the widget.
-
-
-void Fl_Widget::activate()
-void Fl_Widget::deactivate()int Fl_Widget::activevisible() const
-
-This is the same as active() && visible() but is faster.
-
-void Fl_Widget::redraw()
-
-Mark the widget as needing its draw() routine called.
-
-uchar Fl_Widget::damage() const
-
-Non-zero if draw() needs to be called. Actually this is a bit
-field that the widget subclass can use to figure out what parts to
-draw.
-
-Fl_Widget *Fl_Widget::parent() const
-
-Returns a pointer to the parent widget. Usually this is a
-Fl_Group or
-int Fl_Widget::contains(Fl_Widget* b) const
-
-Returns true if b is a child of this widget, or is equal to
-this widget. Returns false if b is NULL.
-
-int Fl_Widget::inside(const Fl_Widget* a) const
-
-Returns true if this is a child of a, or is equal to a.
-Returns false if a is NULL.
-
-int Fl_Widget::take_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 an widget. Returns true if the widget
-accepted the focus.
-
-
-
+ +----Fl_Box, Fl_Browser, Fl_Button, Fl_Chart, Fl_Clock,
+ Fl_Free, Fl_Group, Fl_Input, Fl_Menu_, Fl_Positioner,
+ Fl_Timer, Fl_Valuator
+
+
+Include Files
+
+
+#include <FL/Fl_Widget.H>
+
+
+Description
+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.
+Methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Fl_Widget::Fl_Widget(int x, int y, int w, int h, const char*
+label=0);
+ This is the protected constructor for an Fl_Widget, but all derived
+widgets have a matching public constructor. It takes a value for x(),
+y(), w(), h(), and an optional value for label().
+virtual Fl_Widget::~Fl_Widget();
+ Destroying single widgets is not very common. It is your
+responsibility to either remove() them from any enclosing group, or to
+destroy that group immediately after destroying the children.
+uchar Fl_Widget::type() const;
+ This value is used for Forms compatability and to simulate RTTI.
+short Fl_Widget::x() const
+
+ The position of the upper-left corner of the widget in its enclosing
+Fl_Window (not its parent if that is not an Fl_Window), and its
+width and height.
+
short Fl_Widget::y() const
+
short Fl_Widget::w() const
+
short Fl_Widget::h() constvirtual void
+Fl_Widget::resize(int,int,int,int)
+
+ Change the size or position of the widget. This is a virtual function
+so the widget may implement it's own handling of resizing. The default
+version does not do redraw(), that is the parent widget's
+responsibility (this is because the parent may know a faster way to
+update the display, such as scrolling from the old position).
+
void Fl_Widget::position(short x,short y)
+
void Fl_Widget::size(short w,short h)Fl_Window* Fl_Widget::window() const;
+ Return a pointer to the Fl_Window
+ that this widget is in (it will skip any and all parent widgets
+between this and the window). Returns NULL if none. Note:
+for an Fl_Window, this returns it's parent window (if
+any), not this window.
+Fl_Boxtype Fl_Widget::box() const
+
+ The box() identifies a routine that draws the background of
+the widget. See Box Types for the
+available types. The default depends on the widget, but is usually
+FL_NO_BOX or FL_UP_BOX.
+
void Fl_Widget::box(Fl_Boxtype)Fl_Color Fl_Widget::color() const
+
+ This color is passed to the box routine. Color is an index into an
+internal table of rgb colors. For most widgets this defaults to
+FL_GRAY. See the
+enumeration list for predefined colors. Use
+Fl::set_color() to redefine colors.
+
void Fl_Widget::color(Fl_Color)Fl_Color
+Fl_Widget::selection_color() const
+
+ For Forms compatibility a second color is defined. This 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(a,b).
+
void Fl_Widget::selection_color(Fl_Color)
+
void Fl_Widget::color(Fl_Color, Fl_Color)const char* Fl_Widget::label() const
+
+ The label is printed somewhere on the widget or next to it. The
+string is not copied, the passed pointer is stored unchanged in
+the widget.
+
void Fl_Widget::label(const char*)void Fl_Widget::label(Fl_Labeltype,
+const char*)
+
+ A labeltype identifies a routine that
+draws the label of the widget. This can be used for special effects
+such as emboss, or to use the label() pointer as another form
+of data such as a bitmap. The value FL_NORMAL_LABEL prints
+the label as text.
+
uchar Fl_Widget::labeltype() const
+
void Fl_Widget::labeltype(Fl_Labeltype)Fl_Align Fl_Widget::align() const
+
+ How the label is printed next to or inside the widget. The default
+value is FL_ALIGN_CENTER, which centers the label. The value
+can be any of these constants or'd together:
+
void Fl_Widget::align(Fl_Align)
+
+
+Fl_Color Fl_Widget::labelcolor() const
+
+ This color is passed to the labeltype routine, and is typically the
+color of the label text. This defaults to FL_BLACK.
+
void Fl_Widget::labelcolor(Fl_Color)Fl_Font Fl_Widget::labelfont() const
+
+ Fonts are identified by small 8-bit indexes into a table. See the
+enumeration list for predefined typefaces. The default value uses a
+Helvetica typeface (Arial for Microsoft® Windows®). The function
+Fl::set_font() can define new typefaces.
+
void Fl_Widget::labelfont(Fl_Font)uchar Fl_Widget::labelsize() const
+
+ Fonts are further identified by a point size. The default is 14.
+
void Fl_Widget::labelsize(uchar)typedef void (Fl_Callback)(Fl_Widget*,
+void*)
+
+ Each widget has a single callback. You can set it or examine it with
+these methods.
+
Fl_Callback* Fl_Widget::callback() const
+
void Fl_Widget::callback(Fl_Callback*, void* = 0)void* Fl_Widget::user_data() const
+
+ You can also just change the void * second argument to the
+callback with the user_data methods.
+
void Fl_Widget::user_data(void*)void Fl_Widget::callback(void
+(*)(Fl_Widget*, long), long = 0)
+
+ For convenience you can also define the callback as taking a long
+argument. This is implemented by casting this to a Fl_Callback
+ and casting the long to a void * and may not be
+portable to some machines.
+
long Fl_Widget::argument() const
+
void Fl_Widget::argument(long)void Fl_Widget::callback(void (*)(Fl_Widget*))
+ For convenience you can also define the callback as taking only one
+argument. This is implemented by casting this to a Fl_Callback
+ and may not be portable to some machines.
+void Fl_Widget::do_callback()
+
+ You can cause a widget to do its callback at any time, and even pass
+arbitrary arguments.
+
void Fl_Widget::do_callback(Fl_Widget*, void* = 0)
+
void Fl_Widget::do_callback(Fl_Widget*, long)int Fl_Widget::changed() const
+
+Fl_Widget::changed() is a flag that is turned on when the user
+changes the value stored in the widget. This is only used by
+subclasses of Fl_Widget that store values, but is in the base
+class so it is easier to scan all the widgets in a panel and
+do_callback() on the changed ones in response to an "OK" button.
+
void Fl_Widget::set_changed()
+
void Fl_Widget::clear_changed()Fl_When Fl_Widget::when() const
+
+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 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.
+
void Fl_Widget::when(Fl_When)static void
+Fl_Widget::default_callback(Fl_Widget*, void*)
+ The default callback, which puts a pointer to the widget on the queue
+returned by Fl::readqueue()
+. You may want to call this from your own callback.
+int Fl_Widget::visible() const
+
+ An invisible widget never gets redrawn and does not get events. An
+widget is really visible if visible() is true on it and all
+it's parents. Changing it will send FL_SHOW or FL_HIDE
+ events to the widget. Do not change it if the parent is not
+visible, as this will send false FL_SHOW or FL_HIDE
+ events to the widget. redraw() is called if necessary on
+this or the parent.
+
void Fl_Widget::show()
+
void Fl_Widget::hide()int Fl_Widget::active() const
+
+Fl_Widget::active() returns whether the widget is active. An
+inactive widget does not get any events, but it does get redrawn. A
+widget is active if active() is true on it and all it's
+parents. Changing this value will send FL_ACTIVATE or
+FL_DEACTIVATE to the widget. Do not change it if the parent is
+not active, as this will send false FL_ACTIVATE or
+FL_DEACTIVATE events to the widget.
+
void Fl_Widget::activate()
+
void Fl_Widget::deactivate()
+int Fl_Widget::activevisible() const
+
+ This is the same as active() && visible() but is faster.
+void Fl_Widget::redraw()
+ Mark the widget as needing its draw() routine called.
+uchar Fl_Widget::damage() const
+ Non-zero if draw() needs to be called. Actually this is a
+bit field that the widget subclass can use to figure out what parts to
+draw.
+Fl_Widget *Fl_Widget::parent() const
+ Returns a pointer to the parent widget. Usually this is a
+Fl_Group or
+int Fl_Widget::contains(Fl_Widget* b) const Returns true if b
+ is a child of this widget, or is equal to this widget. Returns false
+if b is NULL.
+int Fl_Widget::inside(const Fl_Widget* a)
+const
+ Returns true if this is a child of a, or is equal to a
+. Returns false if a is NULL.
+int Fl_Widget::take_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 an widget. Returns true if the widget
+accepted the focus.
\ No newline at end of file
diff --git a/documentation/Fl_Window.html b/documentation/Fl_Window.html
index c087e10f0..bfd8a828a 100644
--- a/documentation/Fl_Window.html
+++ b/documentation/Fl_Window.html
@@ -1,341 +1,257 @@
-
-
-
-
-
-class Fl_Window
-
-
-
-Class Hierarchy
-
-
-Fl_Group
+
+
+class Fl_Window
+
+Class Hierarchy
+
+
+Fl_Group
|
- +----Fl_Window
+ +----Fl_Window
|
- +----Fl_Double_Window, Fl_Gl_Window,
- Fl_Overlay_Window, Fl_Single_Window
-
-
-Include Files
-
-
-#include <FL/Fl_Window.H>
-
-
-Description
-
-This widget produces an actual window. This can either be a main
-window, with a border and title and all the window management
-controls, or a "subwindow" inside a window. This is controlled
-by whether or not the window has a parent().
-
-Methods
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Fl_Window::Fl_Window(int x, int y, int w, int h, const char *title = 0)
-
-The first constructor takes 4 int arguments to create the window with
-a preset position and size. The second constructor with 2 arguments
-will create the window with a preset size, but the window manager
-will choose the position according to it's own whims.
-
-
-Fl_Window::Fl_Window(int w, int h, const char *title = 0)virtual Fl_Window::~Fl_Window()
-
-The destructor also deletes all the children. 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
-Fl_Window and all of it's children can be automatic (local)
-variables, but you must declare the Fl_Window first, so
-that it is destroyed last.
-
-void Fl_Window::size_range(int minw, int minh, int maxw=0, int maxh=0, int dw=0, int dh=0, int aspect=0)
-
-Set the allowable range the user can resize this window to. This only
-works for top-level windows.
-
-
-
-
-If this function is not called, FLTK tries to figure out the range
-from the setting of resizeable():
-
-
-
-
-It is undefined what happens if the current size does not fit in
-the constraints passed to size_range().
-
-virtual void Fl_Window::show()
-
-Put the window on the screen. Usually this has the side effect of
-opening the display. The second two forms are used for top-level
-windows and allow standard arguments to be parsed from the
-command-line.
-
-
-int Fl_Window::show(int argc, char **argv, int i)
-void Fl_Window::show(int argc, char **argv)virtual void Fl_Window::hide()
-
-Remove the window from the screen. If the window is already hidden or
-has not been shown then this does nothing (and is harmless). Under the
-X Window System this actually destroys the xid.
-
-int Fl_Window::shown() const
-
-Returns non-zero if show() has been called (but not hide()).
-You can tell if a window is iconified with (w->shown() && !w->visible()).
-
-void Fl_Window::iconize()
-
-Iconifies the window. If you call this when shown() is false
-it will show() it as an icon. If the window is already
-iconified this does nothing.
-
-Fl_Window *Fl::first_window()
-
-Returns the first shown() window in the widget hierarchy.
-If no windows are displayed first_window returns NULL.
-
-Fl_Window *Fl::next_window(const Fl_Window*)
-
-Returns the next shown() window in the hierarchy. You can use this
-call to iterate through all the windows that are shown().
-
-void Fl_Window::resize(int,int,int,int)
-
-Change the size and position of the window. If shown() is
-true, these changes are communicated to the window server (which may
-refuse that size and cause a further resize). If shown() is
-false, the size and position are used when show() is called.
-See Fl_Group for the effect of
-resizing on the child widgets.
-
-void Fl_Window::free_position()
-
-Undoes the effect of a previous resize() or show() so
-that the next time show() is called the window manager is free
-to position the window.
-
-void Fl_Window::hotspot(int x, int y, int offscreen = 0)
-
-position() the window so that the mouse is pointing at the
-given position, or at the center of the given widget, which may be the
-window itself. If the optional offscreen parameter is
-non-zero, then the window is allowed to extend off the screen (this
-does not work with some X window managers).
-
-
-void Fl_Window::hotspot(const Fl_Widget*, int offscreen = 0)
-void Fl_Window::hotspot(const Fl_Widget& p, int offscreen = 0)void Fl_Window::fullscreen()
-
-Makes the window completely fill the screen, without any window manager
-border visible. You must use fullscreen_off() to undo this.
-This may not work with all window managers.
-
-int Fl_Window::fullscreen_off(int x, int y, int w, int h)
-
-Turns off any side effects of fullscreen() and does
-resize(x,y,w,h).
-
-int Fl_Window::border(int)
-
-Gets or sets whether or not the window manager border is around the
-window. The default value is true. border(n) can be used to
-turn the border on and off, and returns non-zero if the value has been
-changed. Under most X window managers this does not work after
-show() has been called, although SGI's 4DWM does work.
-
-
-uchar Fl_Window::border() constvoid Fl_Window::clear_border()
-
-clear_border() is a fast inline function to turn the border
-off. It only works before show() is called.
-
-void Fl_Window::set_modal()
-
-A "modal" window, when shown(), will prevent any events from
-being delivered to other windows in the same program, and will also
-remain on top of the other windows (if the X window manager supports
-the "transient for" property). Several modal windows may be shown at
-once, in which case only the last one shown gets events. You can see
-which window (if any) is modal by calling Fl::modal().
-
-uchar Fl_Window::modal() const
-
-Returns true if this window is modal.
-
-void Fl_Window::set_non_modal()
-
-A "non-modal" window (terminology borrowed from Microsoft Windows) acts
-like a modal() one in that it remains on top, but it has no
-effect on event delivery. There are three states for a window:
-modal, non-modal, and normal.
-
-uchar Fl_Window::non_modal() const
-
-Returns true if this window is modal or non-modal.
-
-void Fl_Window::label(const char*)
-
-Gets or sets the window title bar label.
-
-
-const char* Fl_Window::label() constvoid Fl_Window::iconlabel(const char*)
-
-Gets or sets the icon label.
-
-
-const char* Fl_Window::iconlabel() constvoid Fl_Window::xclass(const char*)
-
-A string used to tell the system what type of window this is.
-Mostly this identifies the picture to draw in the icon. Under X,
-this is turned into a XA_WM_CLASS pair by truncating at the
-first non-alphanumeric character and capitalizing the first character,
-and the second one if the first is 'x'. Thus "foo" turns into "foo,
-Foo", and "xprog.1" turns into "xprog, XProg". This only works if
-called before calling show().
-
-
-const char* Fl_Window::xclass() constvoid Fl_Window::make_current()
-
-make_current() sets things up so that the drawing functions in
-<FL/fl_draw.H> will go into this
-window. This is useful for incremental update of windows, such as in an
-idle callback, which will make your program behave much better if it
-draws a slow graphic. Danger: incremental update is very hard to
-debug and maintain!
-
-static Fl_Window* Fl_Window::current()
-
-Returns the last window that was made current.
-
-
-
+ +----Fl_Double_Window, Fl_Gl_Window,
+ Fl_Overlay_Window, Fl_Single_Window
+
+
+Include Files
+
+
+#include <FL/Fl_Window.H>
+
+
+Description
+ This widget produces an actual window. This can either be a main
+window, with a border and title and all the window management controls,
+or a "subwindow" inside a window. This is controlled by whether or not
+the window has a parent().
+Methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Fl_Window::Fl_Window(int x, int y, int
+w, int h, const char *title = 0)
+
+ The first constructor takes 4 int arguments to create the window with
+a preset position and size. The second constructor with 2 arguments
+will create the window with a preset size, but the window manager will
+choose the position according to it's own whims.
+
Fl_Window::Fl_Window(int w, int h, const char *title = 0)virtual Fl_Window::~Fl_Window()
+ The destructor also deletes all the children. 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
+Fl_Window and all of it's children can be automatic (local)
+variables, but you must declare the Fl_Windowfirst, so
+that it is destroyed last.
+void Fl_Window::size_range(int minw,
+int minh, int maxw=0, int maxh=0, int dw=0, int dh=0, int aspect=0)
+ Set the allowable range the user can resize this window to. This only
+works for top-level windows.
+
+
+ If this function is not called, FLTK tries to figure out the range
+from the setting of resizeable()
+:
+
+
+ It is undefined what happens if the current size does not fit in the
+constraints passed to size_range().
+virtual void Fl_Window::show()
+
+ Put the window on the screen. Usually this has the side effect of
+opening the display. The second two forms are used for top-level
+windows and allow standard arguments to be parsed from the
+command-line.
+
int Fl_Window::show(int argc, char **argv, int i)
+
void Fl_Window::show(int argc, char **argv)virtual void Fl_Window::hide()
+ Remove the window from the screen. If the window is already hidden or
+has not been shown then this does nothing (and is harmless). Under
+the X Window System this actually destroys the xid.
+int Fl_Window::shown() const
+ Returns non-zero if show() has been called (but not hide()
+). You can tell if a window is iconified with (w->shown()
+&!w->visible()).
+void Fl_Window::iconize()
+ Iconifies the window. If you call this when shown() is false
+it will show() it as an icon. If the window is already
+iconified this does nothing.
+Fl_Window *Fl::first_window()
+ Returns the first shown() window in the widget hierarchy. If
+no windows are displayed first_window returns NULL.
+Fl_Window *Fl::next_window(const
+Fl_Window*)
+ Returns the next shown() window in the hierarchy. You can
+use this call to iterate through all the windows that are shown().
+void Fl_Window::resize(int,int,int,int)
+ Change the size and position of the window. If shown() is
+true, these changes are communicated to the window server (which may
+refuse that size and cause a further resize). If shown() is
+false, the size and position are used when show() is called.
+See Fl_Group for the effect
+of resizing on the child widgets.
+void Fl_Window::free_position()
+ Undoes the effect of a previous resize() or show()
+ so that the next time show() is called the window manager is
+free to position the window.
+void Fl_Window::hotspot(int x, int y, int
+offscreen = 0)
+
+position() the window so that the mouse is pointing at the
+given position, or at the center of the given widget, which may be the
+window itself. If the optional offscreen parameter is
+non-zero, then the window is allowed to extend off the screen (this
+does not work with some X window managers).
+
void Fl_Window::hotspot(const Fl_Widget*, int offscreen = 0)
+
void Fl_Window::hotspot(const Fl_Widgetp, int offscreen = 0)void Fl_Window::fullscreen()
+ Makes the window completely fill the screen, without any window
+manager border visible. You must use fullscreen_off() to undo
+this. This may not work with all window managers.
+int Fl_Window::fullscreen_off(int
+x, int y, int w, int h)
+ Turns off any side effects of fullscreen() and does
+resize(x,y,w,h).
+int Fl_Window::border(int)
+
+ Gets or sets whether or not the window manager border is around the
+window. The default value is true. border(n) can be used to
+turn the border on and off, and returns non-zero if the value has been
+changed. Under most X window managers this does not work after
+show() has been called, although SGI's 4DWM does work.
+
uchar Fl_Window::border() constvoid Fl_Window::clear_border()
+clear_border() is a fast inline function to turn the border
+off. It only works before show() is called.
+void Fl_Window::set_modal()
+ A "modal" window, when shown(), will prevent any events from
+being delivered to other windows in the same program, and will also
+remain on top of the other windows (if the X window manager supports
+the "transient for" property). Several modal windows may be shown at
+once, in which case only the last one shown gets events. You can see
+which window (if any) is modal by calling
+Fl::modal().
+uchar Fl_Window::modal() const
+ Returns true if this window is modal.
+void Fl_Window::set_non_modal()
+ A "non-modal" window (terminology borrowed from Microsoft Windows)
+acts like a modal() one in that it remains on top, but it has
+no effect on event delivery. There are three states for a
+window: modal, non-modal, and normal.
+uchar Fl_Window::non_modal() const
+ Returns true if this window is modal or non-modal.
+void Fl_Window::label(const char*)
+
+ Gets or sets the window title bar label.
+
const char* Fl_Window::label() constvoid Fl_Window::iconlabel(const char*)
+
+ Gets or sets the icon label.
+
const char* Fl_Window::iconlabel() constvoid Fl_Window::xclass(const char*)
+
+ A string used to tell the system what type of window this is. Mostly
+this identifies the picture to draw in the icon. Under X, this is
+turned into a XA_WM_CLASS pair by truncating at the first
+non-alphanumeric character and capitalizing the first character, and
+the second one if the first is 'x'. Thus "foo" turns into "foo, Foo",
+and "xprog.1" turns into "xprog, XProg". This only works if called
+before calling show().
+
const char* Fl_Window::xclass() constvoid Fl_Window::make_current()
+make_current() sets things up so that the drawing functions in <FL/fl_draw.H> will go into this
+window. This is useful for incremental update of windows, such as in an
+idle callback, which will make your program behave much better if it
+draws a slow graphic. Danger: incremental update is very hard to
+debug and maintain!
+static Fl_Window* Fl_Window::current()
+ Returns the last window that was made current.
\ No newline at end of file
diff --git a/documentation/basics.html b/documentation/basics.html
index 57bec8472..563179b59 100644
--- a/documentation/basics.html
+++ b/documentation/basics.html
@@ -1,210 +1,170 @@
-
-
-
+
2 - FLTK Basics
-
-This chapter will teach you the basics of compiling programs that use
-FLTK.
-
+ This chapter will teach you the basics of compiling programs that use
+FLTK.
Naming
-
-All public symbols in FLTK start with the characters 'F' and 'L':
-
-
-
-
-
+ All public symbols in FLTK start with the characters 'F' and 'L':
+
+
Header Files
-
-The proper way to include FLTK header files is:
-
-
-#include <FL/Fl_xyz.H>
-
-
-Microsoft Windows developers please note: case *is* significant
-under other operating systems, and the C standard uses the forward
-slash (/) to separate directories. The following #include
-directives are *not* recommended for portability reasons:
-
-
-#include <fl\fl_xyz.h>
-#include <fl/fl_xyz.h>
-#include <FL\Fl_xyz.H>
-
-
+ The proper way to include FLTK header files is:
+
+
+#include <FL/Fl_xyz.H>
+
+
+Microsoft Windows developers please note: case *is* significant
+under other operating systems, and the C standard uses the forward
+slash (/) to separate directories. The following #include
+ directives are *not* recommended for portability reasons:
+
+
+#include <fl\fl_xyz.h>
+#include <fl/fl_xyz.h>
+#include <FL\Fl_xyz.H>
+
+
Compiling Programs with Standard Compilers
-
-Under UNIX (and under Microsoft Windows when using the GNU development tools)
-you will probably need to tell the compiler where to find the header files.
-This is usually done using the -I option:
-
-
+ Under UNIX (and under Microsoft Windows when using the GNU development
+tools) you will probably need to tell the compiler where to find the
+header files. This is usually done using the -I option:
+
+
CC -I/usr/local/include ...
gcc -I/usr/local/include ...
-
-
-Similarly, when linking your application you will need to tell the compiler
-to use the FLTK library:
-
-
+
+
+ Similarly, when linking your application you will need to tell the
+compiler to use the FLTK library:
+
+
CC ... -L/usr/local/lib -lfltk -lXext -lX11 -lm
gcc ... -L/usr/local/lib -lfltk -lXext -lX11 -lm
-
-
+
+
Compiling Programs with Microsoft Visual C++
-
-In Visual C++ you will need to tell the compiler where to find the FLTK
-header files. This can be done by selecting "Settings" from the
-"Project" menu and then changing the "Preprocessor" settings under the
-"C/C++" tab. Similarly, you will need to add the FLTK library to the
-"Link" settings.
-
-Writing Your First FLTK Program
-
-All programs must include the file <FL/Fl.H>. In
-addition the program must include a header file for each FLTK class it
-uses. Listing 1 shows a simple "Hello, World!" program that uses
-FLTK to display the window.
-
-
-Listing 1 - "hello.cxx"
-
-
-#include <FL/Fl.H>
-#include <FL/Fl_Window.H>
-#include <FL/Fl_Box.H>
+ All programs must include the file <FL/Fl.H In addition the
+program must include a header file for each FLTK class it uses.
+ Listing 1 shows a simple "Hello, World!" program that uses FLTK to
+display the window.
+
+
+ After including the required header files, the program then creates a
+window:
+Listing 1 - "hello.cxx"
+
+
+#include <FL/Fl.H>
+#include <FL/Fl_Window.H>
+#include <FL/Fl_Box.H>
int main(int argc, char **argv) {
Fl_Window *window = new Fl_Window(300,180);
- Fl_Box *box = new Fl_Box(FL_UP_BOX,20,40,260,100,"Hello, World!");
- box->labelsize(36);
- box->labelfont(FL_BOLD+FL_ITALIC);
- box->labeltype(FL_SHADOW_LABEL);
- window->end();
- window->show(argc, argv);
+ Fl_Box *box = new Fl_Box(FL_UP_BOX,20,40,260,100,"Hello, World!");
+ box->labelsize(36);
+ box->labelfont(FL_BOLD+FL_ITALIC);
+ box->labeltype(FL_SHADOW_LABEL);
+ window->end();
+ window->show(argc, argv);
return Fl::run();
}
-
-
-After including the required header files, the program then creates a
-window:
-
-
-Fl_Window *window = new Fl_Window(300,180);
-
-
-and a box with the "Hello, World!" string in it:
-
-
-Fl_Box *box = new Fl_Box(FL_UP_BOX,20,40,260,100,"Hello, World!");
-
-
-Next, we set the size, font, and style of the label:
-
-
-box->labelsize(36);
-box->labelfont(FL_BOLD+FL_ITALIC);
-box->labeltype(FL_SHADOW_LABEL);
-
-
-Finally, we show the window and enter the FLTK event loop:
-
-
-window->end();
-window->show(argc, argv);
-return Fl::run();
-
-
-The resulting program will display the window below. You can quit
-the program by closing the window or pressing the ESCape key.
-
-
+
+Fl_Window *window = new Fl_Window(300,180);
+
+
+ and a box with the "Hello, World!" string in it:
+
+
+Fl_Box *box = new Fl_Box(FL_UP_BOX,20,40,260,100,"Hello, World!");
+
+
+ Next, we set the size, font, and style of the label:
+
+
+box->labelsize(36);
+box->labelfont(FL_BOLD+FL_ITALIC);
+box->labeltype(FL_SHADOW_LABEL);
+
+
+ Finally, we show the window and enter the FLTK event loop:
+
+
+window->end();
+window->show(argc, argv);
+return Fl::run();
+
+
+ The resulting program will display the window below. You can quit the
+program by closing the window or pressing the ESCape key.
+
Creating the Widgets
-
-The widgets are created using the C++ new operator; the arguments
-to the constructors are usually one of the following:
-
-
+ The widgets are created using the C++ new operator; the
+arguments to the constructors are usually one of the following:
+
+
Fl_Widget(boxtype, x, y, width, height)
Fl_Widget(x, y, width, height)
Fl_Widget(width, height)
-
-
-The boxtype value is the style of the box that is drawn around
-the widget. Usually this is FL_NO_BOX, which means that no
-box is drawn. In our "Hello, World!" example we use FL_UP_BOX,
-which means that a raised button border will be drawn around the
-widget. You can learn more about boxtypes in Chapter
-3.
-
-Labels
-
-All widgets support labels. In the case of window widgets, the label
-is used for the label in the title bar. Our example program calls the
-labelfont,
-labelsize, and
-labeltype methods.
-
-Showing the Window
-
-The show() method shows the widget or window. For windows you can
-also provide the command-line arguments to allow users to customize the
-appearance, size, and position of your windows.
-
+ The show() method shows the widget or window. For windows
+you can also provide the command-line arguments to allow users to
+customize the appearance, size, and position of your windows.
The Main Event Loop
-
-FLTK provides the Fl:run() method to enter
-a standard event processing loop. This is equivalent to the following
-code:
-
-
+ FLTK provides the Fl:run()
+ method to enter a standard event processing loop. This is equivalent
+to the following code:
+
+
while (Fl::wait());
-
-
-Fl::run() does not return until all of the windows under FLTK control
-are closed (either by the user or your program).
-
-
-
+
+
+Fl::run() does not return until all of the windows under FLTK
+control are closed (either by the user or your program).
\ No newline at end of file
diff --git a/documentation/common.html b/documentation/common.html
index 18911c86b..4a85c4fe2 100644
--- a/documentation/common.html
+++ b/documentation/common.html
@@ -1,389 +1,338 @@
-
-
-
-3 - Common Widgets and Attributes
-
-This chapter describes many of the widgets that are provided with FLTK and covers how
-to query and set the standard attributes.
-
+
+3 - Common Widgets and Attributes
+ This chapter describes many of the widgets that are provided with FLTK
+and covers how to query and set the standard attributes.
Buttons
-
-FLTK provides many types of buttons:
-
-
-
-
-For all of these buttons you just need to include the corresponding
-<FL/Fl_xyz_Button.H> header file. The constructor takes the
-bounding box of the button and optionally a label string:
-
-
-Fl_Button *button = new Fl_Button(x, y, width, height, "label");
+ FLTK provides many types of buttons:
+
+
+ For all of these buttons you just need to include the corresponding
+<FL/Fl_xyz_Button.H> header file. The constructor takes the
+bounding box of the button and optionally a label string:
+
+
+Fl_Button *button = new Fl_Button(x, y, width, height, "label");
Fl_Light_Button *lbutton = new Fl_Light_Button(x, y, width, height);
-Fl_Round_Button *rbutton = new Fl_Round_Button(x, y, width, height, "label");
-
-
-Each button has an associated type()
-which allows it to behave as a push button, toggle button, or radio button:
-
-
-button->type(0);
-lbutton->type(FL_TOGGLE_BUTTON);
-rbutton->type(FL_RADIO_BUTTON);
-
-
-For toggle and radio buttons, the value()
-method returns the current button state (0 = off, 1 = on). The
-set() and
-clear() methods can be used on toggle
-buttons to turn a toggle button on or off, respectively. Radio buttons can
-be turned on with the setonly()
-method; this will also turn off other radio buttons in the current group.
-
+Fl_Round_Button *rbutton = new Fl_Round_Button(x, y, width, height, "label");
+
+
+ Each button has an associated
+type() which allows it to behave as a push button, toggle
+button, or radio button:
+
+
+button->type(0);
+lbutton->type(FL_TOGGLE_BUTTON);
+rbutton->type(FL_RADIO_BUTTON);
+
+
+ For toggle and radio buttons, the
+value() method returns the current button state (0 = off,
+1 = on). The set() and
+clear() methods can be used on toggle buttons to turn a
+toggle button on or off, respectively. Radio buttons can be turned on
+with the setonly() method; this
+will also turn off other radio buttons in the current group.
Text
-
-FLTK provides several text widgets for displaying and receiving text:
-
-
-
-
-The Fl_Output and Fl_Multiline_Output widgets allow the
-user to copy text from the output field but not change it.
-
-
-Fl_Input *input = new Fl_Input(x, y, width, height, "label");
-input->value("Now is the time for all good men...");
-
-
+ FLTK provides several text widgets for displaying and receiving text:
+
+
+ The Fl_Output and Fl_Multiline_Output widgets allow
+the user to copy text from the output field but not change it.
+
+
+Fl_Input *input = new Fl_Input(x, y, width, height, "label");
+input->value("Now is the time for all good men...");
+
+
Valuators
-
-Unlike text widgets, valuators keep track of numbers instead of strings.
-FLTK provides the following valuators:
-
-
-
-
-The value() method gets and sets the
-current value of the widget. The
-minimum() and maximum
-methods set the range of values that are reported by the widget.
-
+ Unlike text widgets, valuators keep track of numbers instead of
+strings. FLTK provides the following valuators:
+
+
+ The value()
+ method gets and sets the current value of the widget. The
+minimum() and
+maximum methods set the range of values that are reported by
+the widget.
Groups
-
-The Fl_Group widget class is used as a general purpose "container"
-widget. Besides grouping radio buttons, the groups are used to encapsulate
-windows, tabs, and scrolled windows. The following group classes are available
-with FLTK:
-
-
-
-
+ The Fl_Group widget class is used as a general purpose
+"container" widget. Besides grouping radio buttons, the groups are
+used to encapsulate windows, tabs, and scrolled windows. The following
+group classes are available with FLTK:
+
+
Setting the Size and Position of Widgets
-
-The size and position of widgets is usually set when you create them. You
-can change this at any time using the position, resize(),
-and size methods:
-
-
-button->position(x, y);
-group->resize(x, y, width, height);
-window->size(width, height);
-
-
-Changing the size or position of a widget will cause a redraw of that widget
-and its children.
-
-Colors
-
-FLTK manages a virtual color palette of "standard" colors. The
-standard colors are:
-
-
-
-
-The widget color can be set using the color() method:
-
-
-button->color(FL_RED);
-
-
-Similarly, the label color can be set using the labelcolor() method:
-
-
-button->labelcolor(FL_WHITE);
-
-
-Box Types
-
-
+
+button->position(x, y);
+group->resize(x, y, width, height);
+window->size(width, height);
+
+
+ Changing the size or position of a widget will cause a redraw of that
+widget and its children.
+Colors
+ FLTK manages a virtual color palette of "standard" colors. The
+standard colors are:
+
+
+ The widget color can be set using the color() method:
+
+
+button->color(FL_RED);
+
+
+ Similarly, the label color can be set using the labelcolor()
+ method:
+
+
+button->labelcolor(FL_WHITE);
+
+
+Box Types
+
+ The drawing function is passed the bounding box and background color +for the widget: +
void xyz_draw(int x, int y, int w, int h, Fl_Color c) {
...
}
-
-
-A simple drawing function might fill a rectangle with the given
-color and then draw a black outline:
-
-++ + A simple drawing function might fill a rectangle with the given color +and then draw a black outline: +
void xyz_draw(int x, int y, int w, int h, Fl_Color c) {
fl_color(c);
fl_rectf(x, y, w, h);
fl_color(FL_BLACK);
fl_rect(x, y, w, h);
}
-
-
+
+
+ The Fl::set_boxtype() method adds or replaces the specified +box type: +
#define XYZ_BOX FL_FREE_BOXTYPE Fl::set_boxtype(XYZ_BOX, xyz_draw, 1, 1, 2, 2); -- -The last 4 arguments to Fl::set_boxtype() are the offsets -for the bounding box that should be subtracted when drawing the label -inside the box. - -
+ To setup your own label type you will need to write two functions to +draw and measure the label. The draw function is called with a pointer +to a Fl_Label structure containing the +label information, the bounding box for the label, and the label +alignment: +
void xyz_draw(Fl_Label *label, int x, int y, int w, int h, Fl_Align align) {
...
}
-
-
-The label should be drawn inside this bounding box, even if
-FL_ALIGN_INSIDE is not enabled. The function is not called if
-the label value is NULL.
-
-The measure function is called with a pointer to a Fl_Label structure -and references to the width and height: - -
-void xyz_measure(Fl_Label *label, int &w, int &h) {
+
+
+ The label should be drawn inside this bounding box, even if
+FL_ALIGN_INSIDE is not enabled. The function is not called if the
+label value is NULL.
+The measure function is called with a pointer to a +Fl_Label structure and references to the width and height:
+
+void xyz_measure(Fl_Label *label, int w int h {
...
}
-
-
-It should measure the size of the label and set w and h to
-the size it will occupy.
-
+
+
+ It should measure the size of the label and set w and h
+ to the size it will occupy.
+ The Fl::set_labeltype method creates a label type using your +draw and measure functions: +
#define XYZ_LABEL FL_FREE_LABELTYPE Fl::set_labeltype(XYZ_LABEL, xyz_draw, xyz_measure); -- -The label type number n can be any integer value starting at -the constant FL_FREE_LABELTYPE. Once you have added the label -type you can use the labeltype() method to select your label -type. - -
The Fl::set_labeltype method can also be used to overload an -existing label type such as FL_NORMAL_LABEL. - -
The FL_SYMBOL_LABEL label type uses the label() -string to look up a small drawing procedure in a hash table. For -historical reasons the string always starts with '@', if it starts with -something else (or the symbol is not found) the label is drawn -normally: - -

The Fl::set_labeltype method can also be used to overload +an existing label type such as FL_NORMAL_LABEL.
+The FL_SYMBOL_LABEL label type uses the label() + string to look up a small drawing procedure in a hash table. For +historical reasons the string always starts with '@', if it starts with +something else (or the symbol is not found) the label is drawn +normally: +

+ Callbacks are functions that are called when the value of a widget +changes. A callback function is sent a Fl_Widget pointer of +the widget that changed and optionally a pointer to data of some sort: +
void xyz_callback(Fl_Widget *w, void *data) {
...
}
-
-
-The callback() method sets the callback function for a widget. You
-can optionally pass a pointer to some data needed for the callback:
-
-++ + The callback() method sets the callback function for a +widget. You can optionally pass a pointer to some data needed for the +callback: +
int xyz_data; -button->callback(xyz_callback, &xyz_data); -- -Normally callbacks are performed only when the value of the widget -changes. You can change this using the -when() method: - -
-button->when(FL_WHEN_NEVER); -button->when(FL_WHEN_CHANGED); -button->when(FL_WHEN_RELEASE); -button->when(FL_WHEN_RELEASE_ALWAYS); -button->when(FL_WHEN_ENTER_KEY); -button->when(FL_WHEN_ENTER_KEY_ALWAYS); -button->when(FL_WHEN_CHANGED | FL_WHEN_NOT_CHANGED); -- +button->callback(xyz_callback, data); + + + Normally callbacks are performed only when the value of the widget +changes. You can change this using the +when() method: +
+button->when(FL_WHEN_NEVER); +button->when(FL_WHEN_CHANGED); +button->when(FL_WHEN_RELEASE); +button->when(FL_WHEN_RELEASE_ALWAYS); +button->when(FL_WHEN_ENTER_KEY); +button->when(FL_WHEN_ENTER_KEY_ALWAYS); +button->when(FL_WHEN_CHANGED | FL_WHEN_NOT_CHANGED); ++
-button->shortcut(FL_Enter); -button->shortcut(FL_SHIFT + 'b'); -button->shortcut(FL_CTRL + 'b'); -button->shortcut(FL_ALT + 'b'); -button->shortcut(FL_CTRL + FL_ALT + 'b'); -- -The shortcut value is the key event value (the ASCII value or one of -the special keys like FL_Enter) combined with any modifiers -(like shift, alt, and control). - - - + Shortcuts are key sequences that activate widgets (usually buttons or +menu items). The shortcut() method registers a shortcut for a +widget: +
+button->shortcut(FL_Enter); +button->shortcut(FL_SHIFT + 'b'); +button->shortcut(FL_CTRL + 'b'); +button->shortcut(FL_ALT + 'b'); +button->shortcut(FL_CTRL + FL_ALT + 'b'); ++ + The shortcut value is the key event value (the ASCII value or one of +the special keys like FL_Enter) combined with any modifiers +(like shift, alt, and control). \ No newline at end of file diff --git a/documentation/drawing.html b/documentation/drawing.html index 9219273eb..df1e395fb 100644 --- a/documentation/drawing.html +++ b/documentation/drawing.html @@ -1,681 +1,507 @@ - - - +
In addition, the system may provide clipping when updating windows, -this clip region may be more complex than a simple rectangle. - -
For colormapped displays, a color cell will be allocated out of -fl_colormap the first time you use a color. If the colormap -fills up then a least-squares algorithm is used to find the closest -color. - -
If a complete circle is drawn it will fit inside the passed -bounding box. The two angles are measured in degrees counterclockwise -from 3'oclock and are the starting and ending angle of the arc, a2 -must be greater or equal to a1. - -
fl_arc() draws a 1-pixel thick line (notice this has a different -number of arguments than the fl_arc() described -below. - -
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. - -
fl_chord() is not yet implemented. - -
fl_gap() should only be called between
-fl_begin_complex_polygon() and
-fl_end_complex_polygon(). To outline the polygon, use
-fl_begin_loop() and replace each fl_gap() with
-fl_end_loop();fl_begin_loop().
-
-void fl_vertex(float x, float y)
-
-Add a single vertex to the current path.
-
-void fl_curve(float x, float y, float x1, float y1, float x2, float y2, float x3, float y3)
-
-Add a series of points on a Bezier curve to the path. The curve ends
-(and two of the points) are at x,y and x3,y3.
-
-void fl_arc(float x, float y, float r, float start, float end)
-
-Add a series of points to the current path on the arc of a circle (you
-can get elliptical paths by using scale and rotate before calling
-this). x,y are the center of the circle, and r is
-its radius. fl_arc() takes start and end
-angles that are measured in degrees counter-clockwise from 3 o'clock.
-If end is less than start then it draws the arc in a
-clockwise direction.
-
-void fl_circle(float x, float y, float r)
-
-fl_circle() is equivalent to fl_arc(...,0,360) but
-may be faster. It must be the only thing in the path: if you
-want a circle as part of a complex polygon you must use
-fl_arc(). This draws incorrectly if the transformation is
-both rotated and non-square scaled.
-
-Text
-
-All text is drawn in the current font. It is
-undefined whether this location or the characters are modified by the
-current transformation.
-
-void fl_draw(const char *, float x, float y)
-
-Draw a nul-terminated string or an array of n characters
-starting at the given location.
-
-
-void fl_draw(const char *, int n, float x, float y)void fl_draw(const char *, int x, int y, int w, int h, Fl_Align)
-
-Fancy string drawing function which is used to draw all the labels.
-The string is formatted and aligned inside the passed box. Handles
-'\t' and '\n', expands all other control characters to ^X, and aligns
-inside or against the edges of the box. See Fl_Widget::align() for values for
-align. The value FL_ALIGN_INSIDE is ignored, as this
-function always prints inside the box.
-
-void fl_measure(const char *, int &w, int &h)
-
-Measure how wide and tall the string will be when printed by the
-fl_draw(...align) function. If the incoming w is
-non-zero it will wrap to that width.
-
-int fl_height()
-
-Recommended minimum line spacing for the current font. You can also
-just use the value of size passed to
-fl_font().
-
-int fl_descent()
-
-Recommended distance above the bottom of a fl_height() tall
-box to draw the text at so it looks centered vertically in that box.
-
-float fl_width(const char*)
-
-Return the width of a nul-terminated string, a sequence of n
-characters, or a single character.
-
-
-float fl_width(const char*, int n)
-float fl_width(uchar)const char *fl_shortcut_label(ulong)
-
-Unparse a shortcut value as used by Fl_Button or Fl_Menu_Item into a human-readable
-string like "Alt+N". This only works if the shortcut is a character
-key or a numbered function key. If the shortcut is zero an empty
-string is returned. The return value points at a static buffer that is
-overwritten with each call.
-
-Fonts
-
-void fl_font(int face, int size)
-
-Set the current font, which is then used by the routines described
-above. You may call this outside a draw context if necessary to call
-fl_width(), but on X this will open the display.
-
-
The font is identified by a face and a size. The -size of the font is measured in pixels (i.e. it is not -"resolution [in]dependent"). Lines should be spaced size -pixels apart (or more). - -
The face is an index into an internal table. Initially -only the first 16 faces are filled in. There are symbolic names for -them: FL_HELVETICA, FL_TIMES, FL_COURIER, -and modifier values FL_BOLD and FL_ITALIC which can -be added to these, and FL_SYMBOL and -FL_ZAPF_DINGBATS. Faces greater than 255 cannot be used in -Fl_Widget labels, since it stores the index as a byte. - -
The type Fl_Cursor is an enumeration defined in <Enumerations.H>. The -double-headed arrows are bitmaps provided by FLTK on X, the others are -provided by system-defined cursors. Under X you can get any XC_cursor -value by passing Fl_Cursor((XC_foo/2)+1). - -
The following standard cursors are available: - -
Using this is tricky. You should make a widget with both a -handle() and draw() method. draw() should -call fl_overlay_clear() before doing anything else. Your -handle() method should call window()->make_current() -and then fl_overlay_rect() after FL_DRAG events, and -should call fl_overlay_clear() after a FL_RELEASE -event. - -
It is highly recommended that you put the following code before the -first show() of any window in your program to get rid -of the dithering if possible: - -
+ This chapter covers the drawing functions that are provided with FLTK. +When Can You Draw Things in FLTK?
+ There are only certain places you can execute drawing code in FLTK. +Calling these functions at other places will result in undefined +behavior! +
In addition, the system may provide clipping when updating windows, +this clip region may be more complex than a simple rectangle.
+For colormapped displays, a color cell will be allocated out of +fl_colormap the first time you use a color. If the colormap fills +up then a least-squares algorithm is used to find the closest color.
+If a complete circle is drawn it will fit inside the passed bounding +box. The two angles are measured in degrees counterclockwise from +3'oclock and are the starting and ending angle of the arc, a2 + must be greater or equal to a1.
+fl_arc() draws a 1-pixel thick line (notice this has a +different number of arguments than the fl_arc() + described below.
+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.
+fl_chord() is not yet implemented.
+fl_gap() should only be called between +fl_begin_complex_polygon() and fl_end_complex_polygon(). + To outline the polygon, use fl_begin_loop() and replace each +fl_gap() with fl_end_loop();fl_begin_loop().
+The font is identified by a face and a size. The +size of the font is measured in pixels (i.e. it is not +"resolution [in]dependent"). Lines should be spaced size + pixels apart (or more).
+The face is an index into an internal table. Initially +only the first 16 faces are filled in. There are symbolic names for +them: FL_HELVETICA, FL_TIMES, FL_COURIER, +and modifier values FL_BOLD and FL_ITALIC which can +be added to these, and FL_SYMBOL and FL_ZAPF_DINGBATS +. Faces greater than 255 cannot be used in Fl_Widget labels, +since it stores the index as a byte.
+The type Fl_Cursor is an enumeration defined in +<Enumerations.H>. The double-headed arrows are bitmaps +provided by FLTK on X, the others are provided by system-defined +cursors. Under X you can get any XC_cursor value by passing +Fl_Cursor((XC_foo/2)+1).
+The following standard cursors are available:
+Using this is tricky. You should make a widget with both a +handle() and draw() method. draw() should call +fl_overlay_clear() before doing anything else. Your handle() + method should call window()->make_current() and then +fl_overlay_rect() after FL_DRAG events, and should call +fl_overlay_clear() after a FL_RELEASE event.
+It is highly recommended that you put the following code before the +first show() of any window in your program to get rid +of the dithering if possible:
+Fl::visual(FL_RGB); -- -Gray scale (1-channel) images may be drawn. This is done if -abs(D) is less than 3, or by calling -fl_draw_image_mono(). Only one 8-bit sample is used for each -pixel, and on screens with different numbers of bits for red, green, -and blue only gray colors are used. Setting D greater than 1 -will let you display one channel of a color image. - -
The X version does not support all possible visuals. If FLTK -cannot draw the image in the current visual it will abort. FLTK -supports any visual of 8 bits or less, and all common TrueColor -visuals up to 32 bits. - -
The callback is called with the void * user data pointer -(this can be used to point at a structure of information about the -image), and the x, y, and w of the scan line -desired from the image. 0,0 is the upper-left corner (not -X,Y). A pointer to a buffer to put the data into is -passed. You must copy w pixels from scanline y, -starting at pixel x, to this buffer. - -
Due to cropping, less than the whole image may be requested. So -x may be greater than zero, the first y may be -greater than zero, and w may be less than W. The -buffer is long enough to store the entire W * D pixels, this -is for convienence with some decompression schemes where you must -decompress the entire line at once: decompress it into the buffer, and -then if x is not zero, copy the data over so the x'th -pixel is at the start of the buffer. - -
You can assume the y's will be consecutive, except the first one -may be greater than zero. - -
If D is 4 or more, you must fill in the unused bytes with zero. - -
To use an XPM, do: - -
-#include "foo.xpm" ++ + Gray scale (1-channel) images may be drawn. This is done if abs(D) + is less than 3, or by calling fl_draw_image_mono(). Only one +8-bit sample is used for each pixel, and on screens with different +numbers of bits for red, green, and blue only gray colors are used. + Setting D greater than 1 will let you display one channel of +a color image. +
The X version does not support all possible visuals. If FLTK +cannot draw the image in the current visual it will abort. FLTK +supports any visual of 8 bits or less, and all common TrueColor visuals +up to 32 bits.
+The callback is called with the void * user data pointer +(this can be used to point at a structure of information about the +image), and the x, y, and w of the scan line +desired from the image. 0,0 is the upper-left corner (not X,Y +). A pointer to a buffer to put the data into is passed. You must +copy w pixels from scanline y, starting at pixel x +, to this buffer.
+Due to cropping, less than the whole image may be requested. So +x may be greater than zero, the first y may be greater +than zero, and w may be less than W. The buffer is +long enough to store the entire W * D pixels, this is for +convienence with some decompression schemes where you must decompress +the entire line at once: decompress it into the buffer, and then if +x is not zero, copy the data over so the x'th pixel is at +the start of the buffer.
+You can assume the y's will be consecutive, except the +first one may be greater than zero.
+If D is 4 or more, you must fill in the unused bytes with +zero.
+To use an XPM, do:
++#include "foo.xpm" ... fl_draw_pixmap(foo, X, Y); -- -In the current version the XPM data is converted to 8-bit full color -and passed through fl_draw_image(). This is obviously not the -most efficient way to do it, and has the same visual limitations as -listed above for fl_draw_image(). Transparent colors are -replaced by the optional Fl_Color argument (this may change in -the future). - -
-#include "foo.xbm" ++ + In the current version the XPM data is converted to 8-bit full color +and passed through fl_draw_image(). This is obviously not the +most efficient way to do it, and has the same visual limitations as +listed above for fl_draw_image(). Transparent colors are +replaced by the optional Fl_Color argument (this may change in +the future). +
+#include "foo.xbm" ... Fl_Bitmap bitmap = new Fl_Bitmap(foo_bits, foo_width, foo_height); -- -
The current implementation converts the pixmap to 8 bit color data -and uses fl_draw_image() to draw -it. Thus you will get dithered colors on an 8 bit screen. - -
-#include <FL/Fl_Pixmap.H> -#include "foo.xpm" ++ +
The current implementation converts the pixmap to 8 bit color data +and uses fl_draw_image() to draw +it. Thus you will get dithered colors on an 8 bit screen.
++#include <FL/Fl_Pixmap.H> +#include "foo.xpm" ... Fl_Pixmap pixmap = new Fl_Pixmap(foo); -- -
+ Now that we've outlined the goals for our editor, we can begin with +the design of our GUI. Obviously the first thing that we need is a +window: +
Fl_Window *window; -window = new Fl_Window(640, 480, "Text Editor"); -- +window = new Fl_Window(640, 480, "Text Editor"); + +
+ Our text editor will need some global variables to keep track of +things: +
Fl_Window *window; Fl_Menu_Bar *menubar; Fl_Multiline_Input *input; @@ -47,187 +41,173 @@ Fl_Return_Button *replace_next; Fl_Button *replace_cancel; int changed = 0; -char filename[1024] = ""; -char search[256] = ""; -- -The window variable is our top-level window described previously. -We'll cover the other variables as we build the application. - +char filename[1024] = ""; +char search[256] = ""; + + + The window variable is our top-level window described +previously. We'll cover the other variables as we build the +application.
+ The first goal requires us to use a menubar and menus that define each +function the editor needs to perform. The +Fl_Menu_Item structure is used to define the menus and +items in a menubar: +
Fl_Menu_Item menuitems[] = {
- { "&File", 0, 0, 0, FL_SUBMENU },
- { "&New", FL_ALT + 'n', new_cb },
- { "&Open...", FL_ALT + 'o', open_cb, 0, FL_MENU_DIVIDER },
- { "&Save", FL_ALT + 's', save_cb },
- { "Save &As...", FL_ALT + FL_SHIFT + 's', saveas_cb, 0, FL_MENU_DIVIDER },
- { "&Quit", FL_ALT + 'q', quit_cb },
+ { "&File", 0, 0, 0, FL_SUBMENU },
+ { "&New", FL_ALT + 'n', new_cb },
+ { "&Open...", FL_ALT + 'o', open_cb, 0, FL_MENU_DIVIDER },
+ { "&Save", FL_ALT + 's', save_cb },
+ { "Save &As...", FL_ALT + FL_SHIFT + 's', saveas_cb, 0, FL_MENU_DIVIDER },
+ { "&Quit", FL_ALT + 'q', quit_cb },
{ 0 },
- { "&Edit", 0, 0, 0, FL_SUBMENU },
- { "&Undo", FL_ALT + 'z', undo_cb, 0, FL_MENU_DIVIDER },
- { "Cu&t", FL_ALT + 'x', cut_cb },
- { "&Copy", FL_ALT + 'c', copy_cb },
- { "&Paste", FL_ALT + 'v', paste_cb },
- { "&Delete", 0, delete_cb },
+ { "&Edit", 0, 0, 0, FL_SUBMENU },
+ { "&Undo", FL_ALT + 'z', undo_cb, 0, FL_MENU_DIVIDER },
+ { "Cu&t", FL_ALT + 'x', cut_cb },
+ { "&Copy", FL_ALT + 'c', copy_cb },
+ { "&Paste", FL_ALT + 'v', paste_cb },
+ { "&Delete", 0, delete_cb },
{ 0 },
- { "&Search", 0, 0, 0, FL_SUBMENU },
- { "&Find...", FL_ALT + 'f', find_cb },
- { "F&ind Again", FL_ALT + 'g', find2_cb },
- { "&Replace...", FL_ALT + 'r', replace_cb },
- { "Re&place Again", FL_ALT + 't', replace2_cb },
+ { "&Search", 0, 0, 0, FL_SUBMENU },
+ { "&Find...", FL_ALT + 'f', find_cb },
+ { "F&ind Again", FL_ALT + 'g', find2_cb },
+ { "&Replace...", FL_ALT + 'r', replace_cb },
+ { "Re&place Again", FL_ALT + 't', replace2_cb },
{ 0 },
{ 0 }
};
-
-
-Once we have the menus defined we can create the Fl_Menu_Bar widget
-and assign the menus to it with:
-
-++ + Once we have the menus defined we can create the Fl_Menu_Bar + widget and assign the menus to it with: +
Fl_Menu_Bar *menubar = new Fl_Menu_Bar(0, 0, 640, 30); -menubar->menu(menuitems); -- -We'll define the callback functions later. - +menubar->menu(menuitems); + + + We'll define the callback functions later.
+ To keep things simple our text editor will use the +Fl_Multiline_Input widget to edit the text: +
Fl_Multiline_Input *input = new Fl_Multiline_Input(0, 30, 640, 450); -- -So that we can keep track of changes to the file, we also want to add a -"changed" callback: - -
-input->callback(changed_cb); -input->when(FL_WHEN_CHANGED); -- -Finally, we want to use a mono-spaced font like FL_COURIER: - -
-input->textfont(FL_COURIER); -- + + + So that we can keep track of changes to the file, we also want to add +a "changed" callback: +
+input->callback(changed_cb); +input->when(FL_WHEN_CHANGED); ++ + Finally, we want to use a mono-spaced font like FL_COURIER: +
+input->textfont(FL_COURIER); ++

-Fl_Window *replace_dlg = new Fl_Window(300, 105, "Replace"); -Fl_Input *replace_find = new Fl_Input(70, 10, 200, 25, "Find:"); -Fl_Input *replace_with = new Fl_Input(70, 40, 200, 25, "Replace:"); -Fl_Button *replace_all = new Fl_Button(10, 70, 90, 25, "Replace All"); -Fl_Button *replace_next = new Fl_Button(105, 70, 120, 25, "Replace Next"); -Fl_Button *replace_cancel = new Fl_Button(230, 70, 60, 25, "Cancel"); -- + We can use the FLTK convenience functions for many of the editor's +dialogs, however the replace dialog needs its own custom window. To +keep things simple we will have a "find" string, a "replace" string, +and "replace all", "replace next", and "cancel" buttons. The strings +are just Fl_Input widgets, the "replace all" and "cancel" +buttons are Fl_Button widgets, and the "replace next " button +is a Fl_Return_Button widget: +

+Fl_Window *replace_dlg = new Fl_Window(300, 105, "Replace"); +Fl_Input *replace_find = new Fl_Input(70, 10, 200, 25, "Find:"); +Fl_Input *replace_with = new Fl_Input(70, 40, 200, 25, "Replace:"); +Fl_Button *replace_all = new Fl_Button(10, 70, 90, 25, "Replace All"); +Fl_Button *replace_next = new Fl_Button(105, 70, 120, 25, "Replace Next"); +Fl_Button *replace_cancel = new Fl_Button(230, 70, 60, 25, "Cancel"); ++
+ This function will be called whenever the user changes any text in the +input widget: +
void changed_cb(void) {
set_changed(1);
}
-
-
-The set_changed() function is one that we will write to set the
-changed status on the current file. We're doing it this way because some
-of the other callbacks will set the changed status to 0, and also because
-we want to show the changed status in the window's title bar.
-
+
+
+ The set_changed() function is one that we will write to set
+the changed status on the current file. We're doing it this way
+because some of the other callbacks will set the changed status to 0,
+and also because we want to show the changed status in the window's
+title bar.
+ This callback function will call +input->copy() to copy the currently selected text to the +clipboard: +
void copy_cb(void) {
- input->copy();
+ input->copy();
}
-
-
+
+
+ This callback function will call +input->copy() to copy the currently selected text to the +clipboard and then input->cut() + to delete it: +
void cut_cb(void) {
- input->copy();
- input->cut();
+ input->copy();
+ input->cut();
}
-
-
+
+
+ This callback function will call +input->cut() to delete the selected text: +
void delete_cb(void) {
- input->cut();
+ input->cut();
}
-
-
+
+
+ This callback function asks for a search string using the +fl_input() convenience function and then calls the +find2_cb() function to find the string: +
void find_cb(void) {
const char *val;
- val = fl_input("Search String:", search);
+ val = fl_input("Search String:", search);
if (val != NULL) {
// User entered a string - go find it!
strcpy(search, val);
find2_cb();
}
}
-
-
+
+
+ This function will find the next occurrence of the search string. If +the search string is blank then we want to pop up the search dialog: +
void find2_cb(void) {
const char *val, *found;
int pos;
@@ -238,182 +218,174 @@ void find2_cb(void) {
return;
}
- val = input->value() + input->mark();
+ val = input->value() + input->mark();
found = strstr(val, search);
if (found != NULL) {
// Found a match; update the position and mark...
- pos = input->mark() + found - val;
- input->position(pos, pos + strlen(search));
+ pos = input->mark() + found - val;
+ input->position(pos, pos + strlen(search));
}
- else fl_alert("No occurrences of \'%s\' found!", search);
+ else fl_alert("No occurrences of \'%s\' found!", search);
}
-
-
-If the search string cannot be found we use the
-fl_alert() convenience function to display a message to
-that effect.
-
+
+
+ If the search string cannot be found we use the
+fl_alert() convenience function to display a message to that
+effect.
+ This callback function will clear the input widget and current +filename. It also calls the check_save() function to give the +user the opportunity to save the current file first as needed: +
void new_cb(void) {
if (changed)
if (!check_save()) return;
filename[0] = '\0';
- input->value("");
+ input->value("");
set_changed(0);
}
-
-
+
+
+ This callback function will ask the user for a filename and then load +the specified file into the input widget and current filename. It also +calls the check_save() function to give the user the +opportunity to save the current file first as needed: +
void open_cb(void) {
char *newfile;
if (changed)
if (!check_save()) return;
- newfile = fl_file_chooser("Open File?", "*", filename);
+ newfile = fl_file_chooser("Open File?", "*", filename);
if (newfile != NULL) load_file(newfile);
}
-
-
-We call the load_file() function to actually load the file.
-
+
+
+ We call the load_file() function to actually load the file.
+ This callback function will send a FL_PASTE message to the input + widget using the Fl::paste() + method: +
void paste_cb(void) {
Fl::paste(*input);
}
-
-
+
+
+ The quit callback will first see if the current file has been +modified, and if so give the user a chance to save it. It then hides +the main window: +
void quit_cb(void) {
if (changed)
if (!check_save())
return;
- window->hide();
+ window->hide();
}
-
-
+
+
+ The replace callback just shows the replace dialog: +
void replace_cb(void) {
- replace_dlg->show();
+ replace_dlg->show();
}
-
-
+
+
+ This callback will replace the next occurence of the replacement +string. If nothing has been entered for the replacement string, then +the replace dialog is displayed instead: +
void replace2_cb() {
const char *find, *val, *found;
int pos;
- find = replace_find->value();
+ find = replace_find->value();
if (find[0] == '\0') {
// Search string is blank; get a new one...
- replace_dlg->show();
+ replace_dlg->show();
return;
}
- val = input->value() + input->position();
+ val = input->value() + input->position();
found = strstr(val, find);
if (found != NULL) {
// Found a match; update the position and replace text...
- pos = input->position() + found - val;
- input->replace(pos, pos + strlen(find), replace_with->value());
- input->position(pos + strlen(replace_with->value()));
+ pos = input->position() + found - val;
+ input->replace(pos, pos + strlen(find), replace_with->value());
+ input->position(pos + strlen(replace_with->value()));
}
- else fl_alert("No occurrences of \'%s\' found!", find);
+ else fl_alert("No occurrences of \'%s\' found!", find);
}
-
-
+
+
+ This callback will replace all occurences of the search string in the +file: +
void replall_cb() {
const char *find, *val, *found;
int pos;
int times;
- find = replace_find->value();
+ find = replace_find->value();
if (find[0] == '\0') {
// Search string is blank; get a new one...
- replace_dlg->show();
+ replace_dlg->show();
return;
}
- input->position(0);
+ input->position(0);
times = 0;
// Loop through the whole string
do {
- val = input->value() + input->position();
+ val = input->value() + input->position();
found = strstr(val, find);
if (found != NULL) {
// Found a match; update the position and replace text...
times ++;
- pos = input->position() + found - val;
- input->replace(pos, pos + strlen(find), replace_with->value());
- input->position(pos + strlen(replace_with->value()));
+ pos = input->position() + found - val;
+ input->replace(pos, pos + strlen(find), replace_with->value());
+ input->position(pos + strlen(replace_with->value()));
}
} while (found != NULL);
- if (times > 0) fl_message("Replaced %d occurrences.", times);
- else fl_alert("No occurrences of \'%s\' found!", find);
+ if (times > 0) fl_message("Replaced %d occurrences.", times);
+ else fl_alert("No occurrences of \'%s\' found!", find);
}
-
-
+
+
+ This callback just hides the replace dialog: +
void replcan_cb() {
- replace_dlg->hide();
+ replace_dlg->hide();
}
-
-
+
+
+ This callback saves the current file. If the current filename is +blank it calls the "save as" callback: +
void save_cb(void) {
if (filename[0] == '\0') {
// No filename - get one!
@@ -422,54 +394,47 @@ void save_cb(void) {
}
else save_file(filename);
}
-
-
-The save_file() function saves the current file to the specified
-filename.
-
+
+
+ The save_file() function saves the current file to the
+specified filename.
+ This callback asks the user for a filename and saves the current file: +
void saveas_cb(void) {
char *newfile;
- newfile = fl_file_chooser("Save File As?", "*", filename);
+ newfile = fl_file_chooser("Save File As?", "*", filename);
if (newfile != NULL) save_file(newfile);
}
-
-
-The save_file() function saves the current file to the specified
-filename.
-
+
+
+ The save_file() function saves the current file to the
+specified filename.
+ The undo callback just calls the +undo() method: +
void undo_cb(void) {
- input->undo();
+ input->undo();
}
-
-
+
+
+ This function checks to see if the current file needs to be saved. If +so, it asks the user if they want to save it: +
int check_save(void) {
if (!changed) return 1;
- if (fl_ask("The current file has not been saved.\n"
- "Would you like to save it now?")) {
+ if (fl_ask("The current file has not been saved.\n"
+ "Would you like to save it now?")) {
// Save the file...
save_cb();
@@ -477,62 +442,59 @@ int check_save(void) {
}
else return (1);
}
-
-
+
+
+ This function loads the specified file into the input widget: +
void load_file(char *newfile) {
FILE *fp;
char buffer[8192];
int nbytes;
int pos;
- input->value("");
+ input->value("");
- fp = fopen(newfile, "r");
+ fp = fopen(newfile, "r");
if (fp != NULL) {
// Was able to open file; let's read from it...
strcpy(filename, newfile);
pos = 0;
- while ((nbytes = fread(buffer, 1, sizeof(buffer), fp)) > 0) {
- input->replace(pos, pos, buffer, nbytes);
+ while ((nbytes = fread(buffer, 1, sizeof(buffer), fp)) > 0) {
+ input->replace(pos, pos, buffer, nbytes);
pos += nbytes;
}
fclose(fp);
- input->position(0);
+ input->position(0);
set_changed(0);
} else {
// Couldn't open file - say so...
- fl_alert("Unable to open \'%s\' for reading!");
+ fl_alert("Unable to open \'%s\' for reading!");
}
}
-
-
-When loading the file we use the
-input->replace() method to "replace" the text at the end of
-the buffer. The pos variable keeps track of the end of the
-buffer.
-
+
+
+ When loading the file we use the
+input->replace() method to "replace" the text at the end
+of the buffer. The pos variable keeps track of the end of the
+buffer.
+ This function saves the current buffer to the specified file: +
void save_file(char *newfile) {
FILE *fp;
- fp = fopen(newfile, "w");
+ fp = fopen(newfile, "w");
if (fp != NULL) {
// Was able to create file; let's write to it...
strcpy(filename, newfile);
- if (fwrite(input->value(), 1, input->size(), fp) < 1) {
- fl_alert("Unable to write file!");
+ if (fwrite(input->value(), 1, input->size(), fp) < 1) {
+ fl_alert("Unable to write file!");
fclose(fp);
return;
}
@@ -541,17 +503,16 @@ void save_file(char *newfile) {
set_changed(0);
} else {
// Couldn't open file - say so...
- fl_alert("Unable to create \'%s\' for writing!");
+ fl_alert("Unable to create \'%s\' for writing!");
}
}
-
-
+
+
+ This function sets the changed variable and updates the +window label accordingly: +
void set_changed(int c) {
if (c != changed) {
char title[1024];
@@ -559,7 +520,7 @@ void set_changed(int c) {
changed = c;
- if (filename[0] == '\0') strcpy(title, "Untitled");
+ if (filename[0] == '\0') strcpy(title, "Untitled");
else {
slash = strrchr(filename, '/');
if (slash == NULL) slash = strrchr(filename, '\\');
@@ -568,36 +529,29 @@ void set_changed(int c) {
else strcpy(title, filename);
}
- if (changed) strcat(title, " (modified)");
+ if (changed) strcat(title, " (modified)");
- window->label(title);
+ window->label(title);
}
}
-
-
+
+
+ The complete source for our text editor can be found in the +test/editor.cxx source file. Both the Makefile and Visual C++ +workspace include the necessary rules to build the editor. You can +also compile it using a standard compiler with: +
CC -o editor editor.cxx -lfltk -lXext -lX11 -lm -- -As noted in Chapter 1, you may need to include -compiler and linker options to tell them where to find the FLTK library. -Also, the CC command may also be called gcc or -c++ on your system. - -
Congratulations, you've just built your own text editor! - + + + As noted in Chapter 1, you may need to +include compiler and linker options to tell them where to find the FLTK +library. Also, the CC command may also be called gcc + or c++ on your system. +
Congratulations, you've just built your own text editor!


A widget indicates that it "wants" the mouse click by returning -non-zero from its handle() method. It -will then become the Fl::pushed() widget -and will get FL_DRAG and the matching FL_RELEASE -events. If 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 handle() + method. It will then become the +Fl::pushed() widget and will get FL_DRAG and the +matching FL_RELEASE events. If handle() returns zero +then FLTK will try sending the FL_PUSH to another widget.
+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_KEYBOARD -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 instructions from the -window manager it will be zero. - -
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_KEYBOARD 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 instructions from the +window manager it will be zero.
+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. - +
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.
These are all trivial inline functions and thus very fast and -small: - -
Most events are sent directly to the handle() method of the -Fl_Window that the window system says they belong to. The -window (actually the Fl_Group that Fl_Window is a -subclass of) is responsible for sending the events on to any child -widgets. To make the Fl_Group code somewhat easier, FLTK -sends some events (FL_DRAG, FL_RELEASE, -FL_KEYBOARD, FL_SHORTCUT, FL_UNFOCUS, and -FL_LEAVE) directly to leaf widgets. These procedures control -those leaf widgets: - -
These are all trivial inline functions and thus very fast and small:
+Most events are sent directly to the handle() method of the +Fl_Window that the window system says they belong to. The window +(actually the Fl_Group that Fl_Window is a subclass +of) is responsible for sending the events on to any child widgets. To +make the Fl_Group code somewhat easier, FLTK sends some events +(FL_DRAG, FL_RELEASE, FL_KEYBOARD, +FL_SHORTCUT, FL_UNFOCUS, and FL_LEAVE) directly +to leaf widgets. These procedures control those leaf widgets:
+FLUID edits and saves its state in ".fl" files. These files are -text, and you can (with care) edit them in a text editor, perhaps to -get some special effects. - -
FLUID can "compile" the .fl file into a .cxx and a .h file. The .cxx -file defines all the objects from the .fl file and the .h file -declares all the global ones. - -
A simple program can be made by putting all your code (including a -main() function) into the .fl file and thus making the .cxx -file a single source file to compile. Most programs are more complex -than this, so you write other .cxx files that call the FLUID -functions. These .cxx files must #include the .h file or -they can #include the .cxx file so it still appears to be a single -source file. - -

Normally the FLUID file defines one or more "functions", which -output C++ functions. Each function defines a one or more FLTK -windows, and all the widgets that go inside those windows. - -
Widgets created by FLUID are either "named", "complex named" or -"unnamed". A named widget has a legal C++ variable identifier as its -name (i.e. only alphanumeric and underscore). In this case FLUID -defines a global variable or class member that will point at the widget -after the function defining it is called. A "complex named" object has -punctuation such as '.' or '->' or any other symbols in its name. In -this case FLUID assigns a pointer to the widget to the name, but does -not attempt to declare it. This can be used to get the widgets into -structures. An "unnamed" widget has a blank name and no pointer to -them is stored. - -
Widgets may either call a named callback function that you write in -another source file, or you can supply a small piece of C++ source and -FLUID will write a private callback function into the .cxx file. - -
-fluid filename.fl & -- -to edit the .fl file filename.fl. If the file does not exist -you will get an error pop-up, but if you dismiss it you will be editing -a blank file of that name. You can run FLUID without any name, in -which case you will be editing an unnamed blank setup (but you can use -save-as to write it to a file). - -
You can provide any of the standard FLTK switches before the name: - -
+ The Fast Light User Interface Designer, or "FLUID", is a graphical +editor that is used to produce FLTK source code. +FLUID edits and saves its state in ".fl" files. These files are +text, and you can (with care) edit them in a text editor, perhaps to +get some special effects.
+FLUID can "compile" the .fl file into a .cxx and a .h file. The +.cxx file defines all the objects from the .fl file and the .h file +declares all the global ones.
+A simple program can be made by putting all your code (including a +main() function) into the .fl file and thus making the .cxx file a +single source file to compile. Most programs are more complex than +this, so you write other .cxx files that call the FLUID functions. + These .cxx files must #include the .h file or they can +#include the .cxx file so it still appears to be a single source +file. +
+ + Normally the FLUID file defines one or more "functions", which +output C++ functions. Each function defines a one or more FLTK +windows, and all the widgets that go inside those windows.
+Widgets created by FLUID are either "named", "complex named" or +"unnamed". A named widget has a legal C++ variable identifier as its +name (i.e. only alphanumeric and underscore). In this case FLUID +defines a global variable or class member that will point at the widget +after the function defining it is called. A "complex named" object has +punctuation such as '.' or '->' or any other symbols in its name. In +this case FLUID assigns a pointer to the widget to the name, but does +not attempt to declare it. This can be used to get the widgets into +structures. An "unnamed" widget has a blank name and no pointer to +them is stored.
+Widgets may either call a named callback function that you write in +another source file, or you can supply a small piece of C++ source and +FLUID will write a private callback function into the .cxx file.
+A Short Tutorial
++
+- Type "FLUID"
+- Pick "New/code/function" off the menu.
+- Hit Tab, Delete to delete the function name and hit OK. This is + how you get FLUID to output a "main()" function. The text "main()" + with a triangle next to it should appear highlighted in the main + window.
+- Pick "New/group/Window" off the menu.
+- Move the new window and resize it to the size you want.
+- Pick "New/buttons/Button" off the menu.
+- Hit the "OK" button to dismiss the panel that appears.
+- In the window you created, try moving the button by dragging it + around. Notice that it "snaps" to fixed locations. If you want to + drag it smoothly, hold down Alt. You can also change the size of the + steps with Edit/Preferences.
+- Try resizing the widget by dragging the edges and corners.
+- Type Alt+c to copy the widget.
+- Type Alt+v to paste a copy into the window.
+- Type Alt+v several times.
+- Drag the widgets and resize them so they don't overlap. Notice + that you have to click a widget to pick it first, then drag it.
+- Try selecting several widgets by dragging a box around them. Check + what happens when you move them, or when you drag an edge to resize + them.
+- You can also use Shift+click to toggle widgets on and off.
+- You can also select widgets by clicking on them in the list in the + main window, try that.
+- Double-click one of the widgets. You will get a control panel.
+- Try changing the "label". Try changing other items near the top of + the panel. To see any changes to the box type clearer, type "Alt+o" + to make the red overlay disappear.
+- Type "#include <stdlib.h>" into the first line of "extra code:".
+- Type "exit(0);" into the "callback:".
+- Hit OK.
+- Pick "File/Save As" off the menu.
+- Type "test.fl" into the file chooser and hit return.
+- Pick "File/Write Code" off the menu, hit OK on the confirmation +panel.
+- Go back to your terminal window. Type "more test.cxx" and "more + test.h" and you can see the code it made. Also try "more test.fl" to + see how FLUID saves its data.
+- Type "make test" (you may have to add libaries to your Makefile).
+- Type "./test" to run your program.
+- Try the buttons. The one you put the code into will exit the + program.
+- Type "Alt+Q" to exit FLUID.
+- Ok, now try to make a real program.
+Running FLUID Under UNIX
+ To run FLUID under UNIX, type: +
+fluid filename.fl+ + to edit the .fl file filename.fl. If the file does not exist +you will get an error pop-up, but if you dismiss it you will be editing +a blank file of that name. You can run FLUID without any name, in +which case you will be editing an unnamed blank setup (but you can use +save-as to write it to a file). +
You can provide any of the standard FLTK switches before the name:
+-display host:n.n -geometry WxH+X+Y -title windowtitle @@ -154,696 +107,495 @@ save-as to write it to a file). -fg color -bg color -bg2 color -- -Changing the colors may be useful to see what your interface will -look at if the user calls it with the same switches. - -
In the current version, if you don't go into the background (with -'&') then you will be able to abort FLUID by typing ^C on the terminal. -It will exit immediately, losing any changes. - -
- FLUID -c filename.fl -- -This will read the .fl file and write filename.cxx and -filename.h. The directory will be stripped, so they are written to -the current directory always. If there are any errors -reading or writing the files it will print the error and exit with a -non-zero code. In a makefile you can use a line like this: -work: - -
++ + Changing the colors may be useful to see what your interface will look +at if the user calls it with the same switches. +
In the current version, if you don't go into the background (with +'then you will be able to abort FLUID by typing ^C on the terminal. It +will exit immediately, losing any changes.
++ FLUID -c filename.fl ++ + This will read the .fl file and write filename.cxx and +filename.h. The directory will be stripped, so they are written to +the current directory always. If there are any errors reading or +writing the files it will print the error and exit with a non-zero +code. In a makefile you can use a line like this: work: +
my_panels.h my_panels.cxx: my_panels.fl fluid -c my_panels.fl -- -Some versions of make will accept rules like this to allow all .fl -files found to be compiled: - -
++ + Some versions of make will accept rules like this to allow all .fl +files found to be compiled: +
.SUFFIXES: .fl .cxx .h .fl.h .fl.cxx: fluid -c $< -- -
|
-
-The main window shows a menu bar and a scrolling browser of all the
-defined widgets. The name of the .fl file being edited is shown in
-the window title.
-
- The widgets are stored in a hierarchy. You can open and close a -level by clicking the "triangle" at the left of a widget. This -widget is the parent, and all the widgets listed below it are its -children. There can be zero children. - - The top level of the hierarchy is functions. Each of these -will produce a single C++ public function in the output .cxx file. -Calling the function will create all of its child windows. - - The second level of the hierarchy is windows. Each of these -produces an instance of class Fl_Window. - - Below that are either widgets (subclasses of Fl_Widget) or -groups of widgets (including other groups). Plain groups are -for layout, navigation, and resize purposes. Tab groups -provide the well-known file-card tab interface. - - Widgets are shown in the browser as either their name (such -as "main_panel" in the example), or if unnamed as their -type and label (such as "Button "the green""). - - |
-![]() |
-
You open widgets by double clicking them, or (to open several -widgets you have picked) by typing the F1 key. This will bring up a -control panel or window from which you can change the widget. - -
The menu bar at the top is duplicated as a pop-up menu on any -displayed window. The shortcuts for all the menu items work in any -window. The menu items are: - -
FLUID can also read .fd files produced by the Forms and XForms -"fdesign" programs. It is best to read them with Merge. FLUID does not -understand everything in a .fd file, and will print a warning message -on the controlling terminal for all data it does not understand. You -will probably need to edit the resulting setup to fix these errors. -Be careful not to save the file without changing the name, as FLUID -will write over the .fd file with its own format, which fdesign -cannot read! - + + +
| The main window shows a menu bar and a scrolling browser of all
+the defined widgets. The name of the .fl file being edited is shown in
+the window title.
+ The widgets are stored in a hierarchy. You can open and close a +level by clicking the "triangle" at the left of a widget. This widget +is the parent, and all the widgets listed below it are its +children. There can be zero children. +The top level of the hierarchy is functions. Each of these +will produce a single C++ public function in the output .cxx file. +Calling the function will create all of its child windows. +The second level of the hierarchy is windows. Each of these +produces an instance of class Fl_Window. +Below that are either widgets (subclasses of Fl_Widget) or +groups of widgets (including other groups). Plain groups are for +layout, navigation, and resize purposes. Tab groups provide the +well-known file-card tab interface. +Widgets are shown in the browser as either their name (such +as "main_panel" in the example), or if unnamed as their type + and label (such as "Button "the green""). + | ![]() |
You open widgets by double clicking them, or (to open several +widgets you have picked) by typing the F1 key. This will bring up a +control panel or window from which you can change the widget.
+The menu bar at the top is duplicated as a pop-up menu on any +displayed window. The shortcuts for all the menu items work in any +window. The menu items are:
+FLUID can also read .fd files produced by the Forms and XForms +"fdesign" programs. It is best to read them with Merge. FLUID does +not understand everything in a .fd file, and will print a warning +message on the controlling terminal for all data it does not +understand. You will probably need to edit the resulting setup to fix +these errors. Be careful not to save the file without changing the +name, as FLUID will write over the .fd file with its own format, which +fdesign cannot read!
The output file names are the same as the .fl file, with the -leading directory and trailing ".fl" stripped, and ".h" or ".cxx" -appended. Currently there is no way to override this. - + "Compiles" the data into a .cxx and .h file. These are exactly the +same as the files you get when you run FLUID with the -c switch. +
The output file names are the same as the .fl file, with the leading +directory and trailing ".fl" stripped, and ".h" or ".cxx" appended. + Currently there is no way to override this.
If the widget is a window, it is added to whatever function is -selected, or contains the current selection. - -
If the widget is a normal widget, it is added to whatever window or -group is selected. If none is, it is added to the window or group -that is the parent of the current selection. - -
To avoid confusion, it is best to select exactly one widget before -doing a paste. - -
Cut/paste is the only way to change the parent of a widget. - + Paste in the widgets in the clipboard file. +
If the widget is a window, it is added to whatever function is +selected, or contains the current selection.
+If the widget is a normal widget, it is added to whatever window or +group is selected. If none is, it is added to the window or group that +is the parent of the current selection.
+To avoid confusion, it is best to select exactly one widget before +doing a paste.
+Cut/paste is the only way to change the parent of a widget.
If they are all selected already then this selects all widgets in -that group's parent. Repeatedly typing Alt+a will select larger and -larger groups of widgets until everything is selected. - + Select all widgets in the same group as the current selection. +
If they are all selected already then this selects all widgets in +that group's parent. Repeatedly typing Alt+a will select larger and +larger groups of widgets until everything is selected.
If the function contains any unnamed windows, it will be declared -as returning an Fl_Window*. The unnamed window will be returned from -it (more than one unnamed window is useless). If the function -contains only named windows it will be declared as returning void. - -
It is possible to make the .cxx output be a self-contained program -that can be compiled and executed. This is done by deleting the -function name, in which case "main(argc,argv)" is used. The function -will call show() on all the windows it creates and then call -Fl::run(). This can be used to test resize behavior or other parts of -the user interface. I'm not sure if it is possible to create really -useful programs using just FLUID. - -
You can change the function name by double clicking the function. - + Create a new C function. You will be asked for a name for the +function. This name should be a legal C++ function template, without +the return type. You can pass arguments, they can be referred to by +code you type into the individual widgets. +
If the function contains any unnamed windows, it will be declared as +returning an Fl_Window*. The unnamed window will be returned from it +(more than one unnamed window is useless). If the function contains +only named windows it will be declared as returning void.
+It is possible to make the .cxx output be a self-contained program +that can be compiled and executed. This is done by deleting the +function name, in which case "main(argc,argv)" is used. The function +will call show() on all the windows it creates and then call Fl::run(). + This can be used to test resize behavior or other parts of the user +interface. I'm not sure if it is possible to create really useful +programs using just FLUID.
+You can change the function name by double clicking the function.
You also get the window's control panel, which is almost exactly -the same as any other Fl_Widget, and is described in the next chapter. - + Create a new Fl_Window. It is added to the currently selected +function, or to the function containing the currently selected item. +The window will appear, sized to 100x100. You will want to resize it +to whatever size you require. +
You also get the window's control panel, which is almost exactly the +same as any other Fl_Widget, and is described in the next chapter.
When you create the widget you will get the widget's control panel, -described in the next chapter. - + All other items on the New menu are subclasses of Fl_Widget. Creating +them will add them to the currently selected group or window, or the +group or window containing the currently selected widget. The initial +dimensions and position are chosen by copying the current widget, if +possible. +
When you create the widget you will get the widget's control panel, +described in the next chapter.
|
-
-When you double-click a widget or a set of widgets you will get the
-"widget attribute panel".
-
- When you change attributes using this panel, the changes are -reflected immediately in the window. It is useful to hit the "no -overlay" button (or type Alt+o) to hide the red overlay so you can see -the widgets more accurately, especially when setting the box type. - - If you have several widgets selected, they may have different -values for the fields. In this case the value for one of the -widgets is shown. But if you change this value, all the -selected widgets are changed to the new value. - - Hitting "OK" makes the changes permanent. Selecting a different -widget also makes the changes permanent. FLUID checks for simple -syntax errors in any code (such as mismatched parenthesis) before -saving any text. - - |
-![]() |
-
| When you double-click a widget or a set of widgets you will get
+the "widget attribute panel".
+ When you change attributes using this panel, the changes are +reflected immediately in the window. It is useful to hit the "no +overlay" button (or type Alt+o) to hide the red overlay so you can see +the widgets more accurately, especially when setting the box type. +If you have several widgets selected, they may have different values +for the fields. In this case the value for one of the widgets +is shown. But if you change this value, all the selected +widgets are changed to the new value. +Hitting "OK" makes the changes permanent. Selecting a different +widget also makes the changes permanent. FLUID checks for simple +syntax errors in any code (such as mismatched parenthesis) before +saving any text. + | ![]() |
You can name several widgets with "name[0]", "name[1]", "name[2]", -etc. This will cause FLUID to declare an array of pointers. The -array is big enough that the highest number found can be stored. All -widgets that in the array must be the same type. - + Name of a global C variable to declare, and to store a pointer to this +widget into. This variable will be of type "<class>*". If the name is +blank then no variable is created. +
You can name several widgets with "name[0]", "name[1]", "name[2]", +etc. This will cause FLUID to declare an array of pointers. The array +is big enough that the highest number found can be stored. All widgets +that in the array must be the same type.
Many widgets will work, and draw faster, with a "frame" instead of -a "box". A frame does not draw the colored interior, leaving whatever -was already there visible. Be careful, as FLUID may draw this ok but -the real program leave unwanted stuff inside the widget. - -
If a window is filled with child widgets, you can speed up -redrawing by changing the window's box type to "NO_BOX". FLUID will -display a checkerboard for any areas that are not colored in by boxes -(notice that this checkerboard is not drawn by the resulting program, -instead random garbage is left there). - + The boxtype to draw as a background for the widget. +
Many widgets will work, and draw faster, with a "frame" instead of a +"box". A frame does not draw the colored interior, leaving whatever +was already there visible. Be careful, as FLUID may draw this ok but +the real program leave unwanted stuff inside the widget.
+If a window is filled with child widgets, you can speed up redrawing +by changing the window's box type to "NO_BOX". FLUID will display a +checkerboard for any areas that are not colored in by boxes (notice +that this checkerboard is not drawn by the resulting program, instead +random garbage is left there).
The color to draw the box with. - +
The color to draw the box with.
Some widgets will use this color for certain parts. FLUID does not -always show the result of this: this is the color buttons draw in when -pushed down, and the color of input fields when they have the focus. - +
Some widgets will use this color for certain parts. FLUID does not +always show the result of this: this is the color buttons draw in when +pushed down, and the color of input fields when they have the focus.
You can put newlines into the string to make multiple lines, the -easiest way is by typing ctrl+j. - + String to print next to or inside the button. +
You can put newlines into the string to make multiple lines, the +easiest way is by typing ctrl+j.
From this menu you can also pick "Image...". This lets you use the contents -of an image file (currently an xpm pixmap or xbm bitmap) to label the -widget. - + How to draw the label. Normal, shadowned, engraved, and embossed +change the appearance of the text. "symbol" requires the label to +start with an '@' sign to draw a named +symbol. +
From this menu you can also pick +"Image...". This lets you use the contents of an image file +(currently an xpm pixmap or xbm bitmap) to label the widget.
Only one child can be resizable. Turning this on turns it off for -other children. - -
You can get more complex behavior by making invisible boxes the -resizable widget, or by using hierarchies of groups. Unfortunatley -the only way to test it is to compile the program. Resizing the FLUID -window is not the same as what will happen in the user program. - + If a window is resizable or has an immediate child that is resizable, +then the user will be able to resize it. In addition all the size +changes of a window or group will go "into" the resizable child. If +you have a large data display surrounded by buttons, you probably want +that data area to be resizable. +
Only one child can be resizable. Turning this on turns it off for +other children.
+You can get more complex behavior by making invisible boxes the +resizable widget, or by using hierarchies of groups. Unfortunatley the +only way to test it is to compile the program. Resizing the FLUID +window is not the same as what will happen in the user program.
In addition, no #include header file is put in the .h file. You -must provide a #include line as the first of the "extra code" which -declares your subclass. - -
The class had better be similar to the class you are spoofing. It -does not have to be a subclass. It is sometimes useful to change this -to another FLTK class: currently the only way to get a double-buffered -window is to change this field for the window to "Fl_Double_Window" -and to add "#include <FL/Fl_Double_Window.h>" to the extra code. - + This is how you put your own subclasses of Fl_Widget in. Whatever +identifier you type in here will be the class that is instantiated. +
In addition, no #include header file is put in the .h file. You +must provide a #include line as the first of the "extrawhich declares +your subclass.
+The class had better be similar to the class you are spoofing. It +does not have to be a subclass. It is sometimes useful to change this +to another FLTK class: currently the only way to get a double-buffered +window is to change this field for the window to "Fl_Double_Window" and +to add "#include <FL/Fl_Double_Window.h>" to the extra code.
If the text starts with a '#' or the word "extern" then FLUID -thinks this is an "include" line, and it is written to the .h file. -If the same include line occurs several times then only one copy is -written. - -
All other lines are "code" lines. The widget being constructed is -pointed to by the local variable 'o'. The window being constructed is -pointed to by the local variable 'w'. You can also access any -arguments passed to the function here, and any named widgets that are -before this one. - -
FLUID will check for matching parenthesis, braces, and quotes, but -does not do much other error checking. Be careful here, as it may be -hard to figure out what widget is producing an error in the compiler. -If you need more than 4 lines you probably should call a function in -your own .cxx code. - + These four fields let you type in literal lines of code to dump into +the .h or .cxx files. +
If the text starts with a '#' or the word "extern" then FLUID thinks +this is an "include" line, and it is written to the .h file. If the +same include line occurs several times then only one copy is written.
+All other lines are "code" lines. The widget being constructed is +pointed to by the local variable 'o'. The window being constructed is +pointed to by the local variable 'w'. You can also access any +arguments passed to the function here, and any named widgets that are +before this one.
+FLUID will check for matching parenthesis, braces, and quotes, but +does not do much other error checking. Be careful here, as it may be +hard to figure out what widget is producing an error in the compiler. +If you need more than 4 lines you probably should call a function in +your own .cxx code.
A name names a function in your own code. It must be declared as -"void <name>(<class>*,void*)". - -
A code snippet is inserted into a static function in the .cxx output -file. The function prototype is -"void f(<class>* o, void* v)", so you can refer to -the widget as 'o' and the user_data as 'v'. FLUID will check for -matching parenthesis, braces, and quotes, but does not do much other -error checking. Be careful here, as it may be hard to figure out what -widget is producing an error in the compiler. - -
If the callback is blank then no callback is set. - + This can either be the name of a function, or a small snippet of code. + FLUID thinks that if there is any punctuation then it is code. +
A name names a function in your own code. It must be declared as +"voidname>(<class>*,void*)".
+A code snippet is inserted into a static function in the .cxx output +file. The function prototype is "voidclass>*so you can refer to the +widget as 'o' and the user_data as 'v'. FLUID will check for matching +parenthesis, braces, and quotes, but does not do much other error +checking. Be careful here, as it may be hard to figure out what widget +is producing an error in the compiler.
+If the callback is blank then no callback is set.
This is a value for the user_data() of the widget. If blank the -default value of zero is used. This can be any piece of C code that -can be put "(void*)(<here>)". - +
This is a value for the user_data() of the widget. If blank the +default value of zero is used. This can be any piece of C code that +can be put "(void*)(<here>)".
There are rare but useful other values for the when() field that
-are not in the menu. You should use the extra code fields to put
-these values in.
-
-
- Double-clicking a window name in the browser will display it, if
-not displayed yet. From this display you can select widgets, sets of
-widgets, and move or resize them. To close a window either
-double-click it or type Esc.
-
- To select a widget, click it. To select several widgets drag a
-rectangle around them. Holding down shift will toggle the selection
-of the widgets instead.
-
- You cannot pick hidden widgets. You also cannot choose some
-widgets if they are completely overlapped by later widgets. Use the
-browser to select these widgets.
-
- The selected widgets are shown with a red "overlay" line around
-them. You can move the widgets by dragging this box. Or you can
-resize them by dragging the outer edges and corners. Hold down the
-Alt key while dragging the mouse to defeat the snap-to-grid effect for
-fine positioning.
-
- If there is a tab box displayed you can change which child is
-visible by clicking on the file tabs. The child you pick is
-selected.
-
- The arrow, tab, and shift+tab keys "navigate" the selection. Left,
-right, tab, or shift+tab move to the next or previous widgets in the
-hierarchy. Hit the right arrow enough and you will select every
-widget in the window. Up/down widgets move to the previous/next
-widgets that overlap horizontally. If the navigation does not seem to
-work you probably need to "Sort" the widgets. This is important if
-you have input fields, as FLTK uses the same rules when using arrow keys
-to move between input fields.
-
- To "open" a widget, double click it. To open several widgets
-select them and then type F1 or pick "Edit/Open" off the pop-up menu.
-
- Type Alt+o to temporarily toggle the overlay off without changing
-the selection, so you can see the widget borders.
-
- You can resize the window by using the window manager border
-controls. FLTK will attempt to round the window size to the nearest
-multiple of the grid size and makes it big enough to contain all the
-widgets (it does this using illegal X methods, so it is possible it
-will barf with some window managers!). Notice that the actual window
-in your program may not be resizable, and if it is, the effect on
-child widgets may be different.
-
- The panel for the window (which you get by double-clicking it) is
-almost identical to the panel for any other Fl_Widget. There are
-three extra items:
-
+ When to do the callback. Can be "never", "changed", "release". The
+value of "enter key" is only useful for text input fields. The "no
+change" button means the callback is done on the matching event even if
+the data is not changed.
+ There are rare but useful other values for the when() field that are
+not in the menu. You should use the extra code fields to put these
+values in. Double-clicking a window name in the browser will display it, if not
+displayed yet. From this display you can select widgets, sets of
+widgets, and move or resize them. To close a window either
+double-click it or type Esc. To select a widget, click it. To select several widgets drag a
+rectangle around them. Holding down shift will toggle the selection of
+the widgets instead. You cannot pick hidden widgets. You also cannot choose some widgets
+if they are completely overlapped by later widgets. Use the browser to
+select these widgets. The selected widgets are shown with a red "overlay" line around
+them. You can move the widgets by dragging this box. Or you can
+resize them by dragging the outer edges and corners. Hold down the Alt
+key while dragging the mouse to defeat the snap-to-grid effect for fine
+positioning. If there is a tab box displayed you can change which child is
+visible by clicking on the file tabs. The child you pick is selected. The arrow, tab, and shift+tab keys "navigate" the selection. Left,
+right, tab, or shift+tab move to the next or previous widgets in the
+hierarchy. Hit the right arrow enough and you will select every widget
+in the window. Up/down widgets move to the previous/next widgets that
+overlap horizontally. If the navigation does not seem to work you
+probably need to "Sort" the widgets. This is important if you have
+input fields, as FLTK uses the same rules when using arrow keys to move
+between input fields. To "open" a widget, double click it. To open several widgets select
+them and then type F1 or pick "Edit/Open" off the pop-up menu. Type Alt+o to temporarily toggle the overlay off without changing
+the selection, so you can see the widget borders. You can resize the window by using the window manager border
+controls. FLTK will attempt to round the window size to the nearest
+multiple of the grid size and makes it big enough to contain all the
+widgets (it does this using illegal X methods, so it is possible it
+will barf with some window managers!). Notice that the actual window
+in your program may not be resizable, and if it is, the effect on child
+widgets may be different. The panel for the window (which you get by double-clicking it) is
+almost identical to the panel for any other Fl_Widget. There are three
+extra items: Selecting "Image..." off the label style pull-down menu will bring
-up a file chooser from which you pick the image file. If an image has
-already been chosen, you can change the image used by picking
-"Image..." again. The name of the image will appear in the "label"
-field, but you can't edit it.
-
- The contents of the image file are written to the .cxx file,
-so if you wish to distribute the C code, you only need to copy the .cxx
-file, not the images. If many widgets share the same image then only
-one copy is written.
-
- However the file name is stored in the .fl file, so to read
-the .fl file you need the image files as well. Filenames are relative
-to the location the .fl file is (not necessarily the current
-directory). I recommend you either put the images in the same
-directory as the .fl file, or use absolute path names.
-
+ The string typed into here is passed to the X window manager as the
+class. This can change the icon or window decorations. On most (all?)
+window managers you will have to close the window and reopen it to see
+the effect.
+ Selecting "Image..." off the label style pull-down menu will bring
+up a file chooser from which you pick the image file. If an image has
+already been chosen, you can change the image used by picking
+"Image..." again. The name of the image will appear in the "label"
+field, but you can't edit it. The contents of the image file are written to the .cxx file,
+so if you wish to distribute the C code, you only need to copy the .cxx
+file, not the images. If many widgets share the same image then only
+one copy is written. However the file name is stored in the .fl file, so to read
+the .fl file you need the image files as well. Filenames are relative
+to the location the .fl file is (not necessarily the current
+directory). I recommend you either put the images in the same
+directory as the .fl file, or use absolute path names. FLUID runs using the default visual of your X server. This may be
-8 bits, which will give you dithered images. You may get better
-results in your actual program by adding the code "Fl::visual(FL_RGB)"
-to your code right before the first window is displayed.
-
- All widgets with the same image on them share the same code and
-source X pixmap. Thus once you have put an image on a widget, it is
-nearly free to put the same image on many other widgets.
-
- If you are using a painting program to edit an image: the only way
-to convince FLUID to read the image file again is to remove the image
-from all widgets that are using it (including ones in closed windows),
-which will cause it to free its internal copy, and then set the image
-again. You may find it easier to exit FLUID and run it again.
-
- Don't rely on how FLTK crops images that are outside the widget, as
-this may change in future versions! The cropping of inside labels
-will probably be unchanged.
-
- To more accurately place images, make a new "box" widget and put
-the image in that as the label. This is also how you can put both an
-image and text label on the same widget. If your widget is a button,
-and you want the image inside it, you must change the button's boxtype
-to FL_UP_FRAME (or another frame), otherwise when it is pushed it will
-erase the image.
-
+ FLUID runs using the default visual of your X server. This may be 8
+bits, which will give you dithered images. You may get better results
+in your actual program by adding the code "Fl::visual(FL_RGB)" to your
+code right before the first window is displayed. All widgets with the same image on them share the same code and
+source X pixmap. Thus once you have put an image on a widget, it is
+nearly free to put the same image on many other widgets. If you are using a painting program to edit an image: the only way
+to convince FLUID to read the image file again is to remove the image
+from all widgets that are using it (including ones in closed windows),
+which will cause it to free its internal copy, and then set the image
+again. You may find it easier to exit FLUID and run it again. Don't rely on how FLTK crops images that are outside the widget, as
+this may change in future versions! The cropping of inside labels will
+probably be unchanged. To more accurately place images, make a new "box" widget and put the
+image in that as the label. This is also how you can put both an image
+and text label on the same widget. If your widget is a button, and you
+want the image inside it, you must change the button's boxtype to
+FL_UP_FRAME (or another frame), otherwise when it is pushed it will
+erase the image. FLUID will read X bitmap files. These files have C source code to
-define a bitmap. Sometimes they are stored with the ".h" or ".bm"
-extension rather than the standard ".xbm".
-
- FLUID will output code to construct an Fl_Bitmap widget and use it
-to label the widget. The '1' bits in the bitmap are drawn using the
-label color of the widget. You can change the color in FLUID. The
-'0' bits are transparent.
-
- The program "bitmap" on the X distribution does an ok job of
-editing bitmaps.
-
+ FLUID will read X bitmap files. These files have C source code to
+define a bitmap. Sometimes they are stored with the ".h" or ".bm"
+extension rather than the standard ".xbm". FLUID will output code to construct an Fl_Bitmap widget and use it
+to label the widget. The '1' bits in the bitmap are drawn using the
+label color of the widget. You can change the color in FLUID. The '0'
+bits are transparent. The program "bitmap" on the X distribution does an ok job of editing
+bitmaps. FLUID will read X pixmap files as used by the libxpm library.
-These files have C source code to define a pixmap. The filenames
-usually have a ".xpm" extension.
-
- FLUID will output code to construct an Fl_Pixmap widget and use it
-to label the widget. The label color of the widget is ignored, even
-for 2-color images that could be a bitmap.
-
- XPM files can mark a single color as being transparent. Currently
-FLTK and FLUID simulate this transparency rather badly. It will use the
-color() of the widget as the background, and all widgets using the
-same pixmap are assummed to have the same color. This may be fixed in
-the future or on non-X systems.
-
- I have not found any good editors for small iconic pictures. For
-pixmaps I have used XPaint. This
-(and most other) painting programs are designed for large full color
-images and are difficult to use to edit an image of small size and few
-colors.
-
+ FLUID will read X pixmap files as used by the libxpm library. These
+files have C source code to define a pixmap. The filenames usually
+have a ".xpm" extension. FLUID will output code to construct an Fl_Pixmap widget and use it
+to label the widget. The label color of the widget is ignored, even
+for 2-color images that could be a bitmap. XPM files can mark a single color as being transparent. Currently
+FLTK and FLUID simulate this transparency rather badly. It will use
+the color() of the widget as the background, and all widgets using the
+same pixmap are assummed to have the same color. This may be fixed in
+the future or on non-X systems. I have not found any good editors for small iconic pictures. For
+pixmaps I have used
+XPaint. This (and most other) painting programs are designed for
+large full color images and are difficult to use to edit an image of
+small size and few colors. FLUID will also read GIF image files. These files are often used
-on html documents to make icons. This lets you use nice icons that
-you steal off the net in your user interface.
-
- FLUID converts these into (modified) XPM format and uses an
-Fl_Pixmap widget to label the widget. Transparency is handled the same
-as for xpm files. Notice that the conversion removes the compression,
-so the code may be much bigger than the .gif file. Only the first
-image of an animated gif file is used.
-
- Behavior and performance with large .gif files is not guaranteed!
-
-
-
+ FLUID will also read GIF image files. These files are often used on
+html documents to make icons. This lets you use nice icons that you
+steal off the net in your user interface. FLUID converts these into (modified) XPM format and uses an
+Fl_Pixmap widget to label the widget. Transparency is handled the same
+as for xpm files. Notice that the conversion removes the compression,
+so the code may be much bigger than the .gif file. Only the first
+image of an animated gif file is used. Behavior and performance with large .gif files is not guaranteed! Selecting & Moving Widgets
-
-Selecting Moving Widgets
+Border
-
-This button turns the window manager border on or off. On most window
-managers you will have to close the window and reopen it to see the
-effect.
-
+ This button turns the window manager border on or off. On most window
+managers you will have to close the window and reopen it to see the
+effect.
xclass
-
-The string typed into here is passed to the X window manager as the
-class. This can change the icon or window decorations. On most
-(all?) window managers you will have to close the window and reopen it
-to see the effect.
-
-
-Image Labels
-
-Image Labels
+Notes for all image types
-
-XBM (X bitmap files)
-
-XPM (X pixmap files)
-
-GIF files
-
-
You will need to edit your main code considerably to get it to link -with the output from FLUID. If you are not interested in this you may -have more immediate luck with the forms compatibility header, -<FL/forms.H>. - +FLUID can read the .fd files put out by +all versions of Forms and XForms fdesign. However, it will mangle them +a bit, but it prints a warning message about anything it does not +understand. FLUID cannot write fdesign files, so you should save to a +new name so you don't write over the old one. +
You will need to edit your main code considerably to get it to link +with the output from FLUID. If you are not interested in this you may +have more immediate luck with the forms compatibility header, +<FL/forms.H>.
You will also have to compile your Forms or XForms program using a -C++ compiler. The FLTK library does not provide C bindings or header -files. - -
Although FLTK was designed to be compatable with the GL Forms library -(version 0.3 or so), XForms has bloated severely and it's interface is -X-specific. Therefore, XForms compatibility is no longer a goal of -FLTK. Compatibility was limited to things that were free, or that -would add code that would not be linked in if the feature is unused, -or that was not X-specific. - -
To use any new features of FLTK, you should rewrite your code to not -use the inline functions and instead use "pure" FLTK. This will make -it a lot cleaner and make it easier to figure out how to call the FLTK -functions. Unfortunately this conversion is harder than expected and -even Digital Domain's inhouse code still uses forms.H a lot. - -
Many parts of XForms use X-specific structures like XEvent -in their interface. I did not emulate these! Unfortunately these -features (such as the "canvas" widget) are needed by most large -programs. You will need to rewrite these to use FLTK subclasses. - -
Fl_Free widgets emulate the -old Forms "free" widget. It may be useful for porting programs -that change the handle() function on widgets, but you will -still need to rewrite things. - -
Fl_Timer widgets are provided to -emulate the XForms timer. These work, but are quite inefficient and -inaccurate compared to using Fl::add_timeout(). - -
All instance variables are hidden. -If you directly refer to the x, y, w, h, label, or other fields of -your Forms widgets you will have to add empty parenthesis after each -reference. The easiest way to do this is to globally replace "->x" -with "->x()", etc. Replace "boxtype" with "box()". - -
const char * arguments to most FLTK methods are simply -stored, while Forms would strdup() the passed string. This is -most noticable with the label of widgets. Your program must always -pass static data such as a string constant or malloc'd buffer to -label(). If you are using labels to display program output -you may want to try the Fl_Output widget. - -
The default fonts and sizes are matched to the older GL version of -Forms, so all labels will draw somewhat larger than an XForms program -does. - -
fdesign outputs a setting of a "fdui" instance variable to the main -window. I did not emulate this because I wanted all instance variables -to be hidden. You can store the same information in the -user_data() field of a window. To do this, search through -the fdesign output for all occurances of "->fdui" and edit to use -"->user_data()" instead. This will require casts and is not trivial. - -
The prototype for the functions passed to fl_add_timeout() -and fl_set_idle_callback() callback are different. - -
All the following XForms calls are missing:
- -
None of this works with FLTK. Nor will it compile, the necessary -calls are not in the interface. - -
You have to make a subclass of Fl_Gl_Window and write a draw() -method and handle() method. This may require anywhere from a trivial -to a major rewrite. - -
If you draw into the overlay planes you will have to also write a -draw_overlay() method and call redraw_overlay() on the -OpenGL window. - -
One easy way to hack your program so it works is to make the -draw() and handle() methods on your window set some -static variables, storing what event happened. Then in the main loop -of your program, call Fl::wait() and then check these -variables, acting on them as though they are events read from -fl_queue. - -
The file <FL/gl.h> defines replacements for a lot of -IRISGL calls, translating them to OpenGL. There are much better -translators available that you might want to investigate. - -
An attempt has been made to emulate the "free" widget. This -appears to work quite well. It may be quicker to modify your subclass -into a "free" widget, since the "handle" functions match. - -
If your subclass draws into the overlay you are in trouble and will -have to rewrite things a lot. - -
| Forms | -FLTK | -
|---|---|
| MOUSE_X | -Fl::event_x_root() | -
| MOUSE_Y | -Fl::event_y_root() | -
| LEFTSHIFTKEY,RIGHTSHIFTKEY | -Fl::event_shift() | -
| CAPSLOCKKEY | -Fl::event_capslock() | -
| LEFTCTRLKEY,RIGHTCTRLKEY | -Fl::event_ctrl() | -
| LEFTALTKEY,RIGHTALTKEY | -Fl::event_alt() | -
| MOUSE1,RIGHTMOUSE | -Fl::event_state()&FL_BUTTON3 | -
| MOUSE2,MIDDLEMOUSE | -Fl::event_state()&FL_BUTTON2 | -
| MOUSE3,LEFTMOUSE | -Fl::event_state()&FL_BUTTON1 | -
-fl_font_name(3,"*courier-medium-r-no*"); -fl_font_name(4,"*courier-bold-r-no*"); -fl_font_name(5,"*courier-medium-o-no*"); -fl_font_name(6,"*times-medium-r-no*"); -fl_font_name(7,"*times-bold-r-no*"); -fl_font_name(8,"*times-medium-i-no*"); -fl_font_name(9,"*bookman-light-r-no*"); -fl_font_name(10,"*bookman-demi-r-no*"); -fl_font_name(11,"*bookman-light-i-no*"); -- - - + You should be able to compile existing Forms or XForms source code by +changing the include directory switch to your compiler so that the +forms.h file supplied with FLTK is included. Take a look at +forms.h to see how it works, but the basic trick is lots of inline +functions. Most of the XForms demo programs work without changes. +
You will also have to compile your Forms or XForms program using a +C++ compiler. The FLTK library does not provide C bindings or header +files.
+Although FLTK was designed to be compatable with the GL Forms +library (version 0.3 or so), XForms has bloated severely and it's +interface is X-specific. Therefore, XForms compatibility is no longer +a goal of FLTK. Compatibility was limited to things that were free, or +that would add code that would not be linked in if the feature is +unused, or that was not X-specific.
+To use any new features of FLTK, you should rewrite your code to not +use the inline functions and instead use "pure" FLTK. This will make +it a lot cleaner and make it easier to figure out how to call the FLTK +functions. Unfortunately this conversion is harder than expected and +even Digital Domain's inhouse code still uses forms.H a lot.
+Many parts of XForms use X-specific structures like XEvent + in their interface. I did not emulate these! Unfortunately these +features (such as the "canvas" widget) are needed by most large +programs. You will need to rewrite these to use FLTK subclasses.
+Fl_Free widgets emulate +the old Forms "free" widget. It may be useful for porting +programs that change the handle() function on widgets, but you +will still need to rewrite things.
+Fl_Timer widgets are +provided to emulate the XForms timer. These work, but are quite +inefficient and inaccurate compared to using +Fl::add_timeout().
+All instance variables are hidden. If you directly refer to +the x, y, w, h, label, or other fields of your Forms widgets you will +have to add empty parenthesis after each reference. The easiest way to +do this is to globally replace "->x" with "->x()", etc. Replace +"boxtype" with "box()".
+const char * arguments to most FLTK methods are simply +stored, while Forms would strdup() the passed string. This is +most noticable with the label of widgets. Your program must always +pass static data such as a string constant or malloc'd buffer to +label(). If you are using labels to display program output you +may want to try the Fl_Output + widget.
+The default fonts and sizes are matched to the older GL version of +Forms, so all labels will draw somewhat larger than an XForms program +does.
+fdesign outputs a setting of a "fdui" instance variable to the main +window. I did not emulate this because I wanted all instance variables +to be hidden. You can store the same information in the user_data() + field of a window. To do this, search through the fdesign output for +all occurances of "->fdui" and edit to use "->user_data()" instead. + This will require casts and is not trivial.
+The prototype for the functions passed to fl_add_timeout() + and fl_set_idle_callback() callback are different.
+All the following XForms calls are missing:
++
None of this works with FLTK. Nor will it compile, the necessary +calls are not in the interface.
+You have to make a subclass of +Fl_Gl_Window and write a draw() method and +handle() method. This may require anywhere from a trivial to a +major rewrite.
+If you draw into the overlay planes you will have to also write a +draw_overlay() method and call redraw_overlay() on the +OpenGL window.
+One easy way to hack your program so it works is to make the +draw() and handle() methods on your window set some +static variables, storing what event happened. Then in the main loop +of your program, call Fl::wait() and then check these +variables, acting on them as though they are events read from +fl_queue.
+The file <FL/gl.h> defines replacements for a lot of IRISGL +calls, translating them to OpenGL. There are much better translators +available that you might want to investigate.
+An attempt has been made to emulate the "free" widget. This appears +to work quite well. It may be quicker to modify your subclass into a +"free" widget, since the "handle" functions match.
+If your subclass draws into the overlay you are in trouble and will +have to rewrite things a lot.
+| Forms | FLTK |
|---|---|
| MOUSE_X | Fl::event_x_root() |
| MOUSE_Y | Fl::event_y_root() |
| LEFTSHIFTKEY,RIGHTSHIFTKEY | Fl::event_shift() |
| CAPSLOCKKEY | Fl::event_capslock() |
| LEFTCTRLKEY,RIGHTCTRLKEY | Fl::event_ctrl() |
| LEFTALTKEY,RIGHTALTKEY | Fl::event_alt() |
| MOUSE1,RIGHTMOUSE | Fl::event_state() |
| MOUSE2,MIDDLEMOUSE | Fl::event_state() |
| MOUSE3,LEFTMOUSE | Fl::event_state() |
+fl_font_name(3,"*courier-medium-r-no*"); +fl_font_name(4,"*courier-bold-r-no*"); +fl_font_name(5,"*courier-medium-o-no*"); +fl_font_name(6,"*times-medium-r-no*"); +fl_font_name(7,"*times-bold-r-no*"); +fl_font_name(8,"*times-medium-i-no*"); +fl_font_name(9,"*bookman-light-r-no*"); +fl_font_name(10,"*bookman-demi-r-no*"); +fl_font_name(11,"*bookman-light-i-no*"); ++ + \ No newline at end of file diff --git a/documentation/functions.html b/documentation/functions.html index 9bea40ce4..815d11dd0 100644 --- a/documentation/functions.html +++ b/documentation/functions.html @@ -1,319 +1,241 @@ - - - +

fl_color_chooser() pops up a window to let the user pick an -arbitrary RGB color. They can pick the hue and saturation in the "hue -box" on the left (hold down CTRL to just change the saturation), and -the brighness using the vertical slider. Or they can type the 8-bit -numbers into the RGB Fl_Value_Input fields, or drag the -mouse across them to adjust them. The pull-down menu lets the user set -the input fields to show RGB, HSV, or 8-bit RGB (0 to 255). - -
This returns non-zero if the user picks ok, and updates the RGB -values. If the user picks cancel or closes the window this returns -zero and leaves RGB unchanged. - -
If you use the color chooser on an 8-bit screen, it will allocate -all the available colors, leaving you no space to exactly represent -the color the user picks! You can however use fl_rectf() to fill a region with a -simulated color using dithering. - -








message is a string used to title the window. - -
pattern is used to limit the files listed in a directory to -those matching the pattern. This matching is done by filename_match(). Use -NULL to show all files. - -
fname is a default filename to fill in the chooser with. If -this is NULL then the last filename that was choosen is used (unless -that had a different pattern, in which case just the last directory -with no name is used). The first time the file chooser is called this -defaults to a blank string. - -
The returned value points at a static buffer that is only good -until the next time fl_file_chooser() is called. - -
You can free the returned list of files with the following code: - -
-for (int i = return_value; i > 0;) free((void*)(list[--i])); +int fl_color_chooser(const char*, double +&r, double &g, double &b) +
+ The double version takes RGB values in the range 0.0 to 1.0. The +uchar version takes RGB values in the range 0 to 255. +
int fl_color_chooser(const char *, uchar &r, uchar &g, uchar &b) ++ fl_color_chooser() pops up a window to let the user pick an +arbitrary RGB color. They can pick the hue and saturation in the "hue +box" on the left (hold down CTRL to just change the saturation), and +the brighness using the vertical slider. Or they can type the 8-bit +numbers into the RGB +Fl_Value_Input fields, or drag the mouse across them to adjust +them. The pull-down menu lets the user set the input fields to show +RGB, HSV, or 8-bit RGB (0 to 255).
+This returns non-zero if the user picks ok, and updates the RGB +values. If the user picks cancel or closes the window this returns +zero and leaves RGB unchanged.
+If you use the color chooser on an 8-bit screen, it will allocate +all the available colors, leaving you no space to exactly represent the +color the user picks! You can however use +fl_rectf() to fill a region with a simulated color using +dithering.
+int fl_show_colormap(int oldcol)
+fl_show_colormap() pops up a panel of the 256 colors you can +access with fl_color() and lets the user +pick one of them. It returns the new color index, or the old one if +the user types ESC or clicks outside the window. ++ void fl_message(const char *, ...)
+ Displays a printf-style message in a pop-up box with an "OK" button, +waits for the user to hit the button. The message will wrap to fit the +window, or may be many lines by putting \n characters into it. + The enter key is a shortcut for the OK button. ++ void fl_alert(const char *, ...)
+ Same as fl_message() except for the "!" symbol. ++ int fl_ask(const char *, ...)
+ Displays a printf-style message in a pop-up box with an "Yes" and "No" +button and waits for the user to hit a button. The return value is 1 +if the user hits Yes, 0 if they pick No. The enter key is a shortcut +for Yes and ESC is a shortcut for No. ++ int fl_choice(const char *q, const char *b0, +const char *b1, const char *b2, ...)
+ Shows the message with three buttons below it marked with the strings +b0, b1, and b2. Returns 0, 1, or 2 depending on +which button is hit. ESC is a shortcut for button 0 and the enter key +is a shortcut for button 1. Notice the "misordered" position of the +buttons. You can hide buttons by passing NULL as their +labels. ++ const char *fl_input(const char *label, const char +*deflt = 0, ...)
+ Pops up a window displaying a string, lets the user edit it, and +return the new value. The cancel button returns NULL. The +returned pointer is only valid until the next time fl_input() + is called. Due to back-compatability, the arguments to any printf +commands in the label are after the default value. ++ const char *fl_password(const char *label, +const char *deflt = 0, ...)
+ Same as fl_input() except an +Fl_Secret_Input field is used. ++ void fl_message_font(Fl_Font fontid, uchar +size)
+ Change the font and font size used for the messages in all the popups. +Fl_Widget *fl_message_icon()
+ Returns a pointer to the box at the left edge of all the popups. You +can alter the font, color, or label (including making it a Pixmap), +before calling the functions. +char *fl_file_chooser(const char * message, +const char *pattern, const char *fname)
+ FLTK provides a "tab completion" file chooser that makes it easy to +choose files from large directories. This file chooser has several +unique features, the major one being that the Tab key completes +filenames like it does in Emacs or tcsh, and the list always shows all +possible completions. ++fl_file_chooser() pops up the file chooser, waits for the user +to pick a file or Cancel, and then returns a pointer to that filename +or NULL if Cancel is chosen. + message is a string used to title the window.
+pattern is used to limit the files listed in a directory to +those matching the pattern. This matching is done by +filename_match(). Use NULL to show all files.
+fname is a default filename to fill in the chooser with. + If this is NULL then the last filename that was choosen is +used (unless that had a different pattern, in which case just the last +directory with no name is used). The first time the file chooser is +called this defaults to a blank string.
+The returned value points at a static buffer that is only good until +the next time fl_file_chooser() is called.
+void fl_file_chooser_callback(void +(*cb)(const char *))
+ Set a function that is called every time the user clicks a file in the +currently popped-up file chooser. This could be used to preview the +contents of the file. It has to be reasonably fast, and cannot create +FLTK windows. +int filename_list(const char *d, dirent +***list)
+ This is a portable and const-correct wrapper for the fl_scandir + function. d is the name of a directory (it does not matter if +it has a trailing slash or not). For each file in that directory a +"dirent" structure is created. The only portable thing about a dirent +is that dirent.d_name is the nul-terminated file name. An array of +pointers to these dirents is created and a pointer to the array is +returned in *list. The number of entries is given as a return +value. If there is an error reading the directory a number less than +zero is returned, and errno has the reason (errno + does not work under WIN32). The files are sorted in "alphanumeric" +order, where an attempt is made to put unpadded numbers in consecutive +order. +You can free the returned list of files with the following code:
+
+for (int i = return_value; i > 0;) free((void*)(list[--i])); free((void*)list); -- -
The second version takes a when bitfield, with the bits -FL_READ, FL_WRITE, and FL_EXCEPT defined, to -indicate when the callback should be done. - -
There can only be one callback of each type for a file descriptor. -Fl::remove_fd() gets rid of all the callbacks for a -given file descriptor. - -
Under UNIX any file descriptor can be monitored (files, -devices, pipes, sockets, etc.) Due to limitations in Microsoft Windows, -WIN32 applications can only monitor sockets. - -
Warning: this can absorb all your machine's time! - -
You can have multiple idle callbacks. To remove an idle callback -use Fl::remove_idle(). - -
Only Fl::wait() calls the idle callbacks. -Fl::wait(time), Fl::check(), and Fl::ready() -ignore them so that these functions may be called by the idle callbacks -themselves without having to worry about recursion. - -
The idle callback can call any FLTK functions. However if you call -something that calls Fl::wait() (such as a message pop-up) you -should first remove the idle callback so that it does not recurse. - -
This code will print "TICK" each second on stdout, no matter what -else the user or program does: - -
+static void Fl::add_fd(int fd, void (*cb)(int, void +*), void * = 0) +
+ Add file descriptor fd to listen to. When the fd + becomes ready for reading the callback is done. The callback is +passed the fd and the arbitrary void * argument. +Fl::wait() will return immediately after calling the callback. +
static void Fl::add_fd(int fd, int when, void (*cb)(int, void *), +void * = 0) +
static void Fl::remove_fd(int)The second version takes a when bitfield, with the bits +FL_READ, FL_WRITE, and FL_EXCEPT defined, to +indicate when the callback should be done.
+There can only be one callback of each type for a file descriptor. +Fl::remove_fd() gets rid of all the callbacks for a given +file descriptor.
+Under UNIX any file descriptor can be monitored (files, +devices, pipes, sockets, etc.) Due to limitations in Microsoft Windows, +WIN32 applications can only monitor sockets.
+static void Fl::add_handler(int (*f)(int))
+ Install a function to parse unrecognized events. If FLTK cannot +figure out what to do with an event, it calls each of these functions +(most recent first) until one of them returns non-zero. If none of +them returns non zero then the event is ignored. Events that cause +this to be called are: +
Warning: this can absorb all your machine's time!
+You can have multiple idle callbacks. To remove an idle callback use Fl::remove_idle().
+Only Fl::wait() calls the idle callbacks. Fl::wait(time) +, Fl::check(), and Fl::ready() ignore them so that +these functions may be called by the idle callbacks themselves without +having to worry about recursion.
+The idle callback can call any FLTK functions. However if you call +something that calls Fl::wait() (such as a message pop-up) you +should first remove the idle callback so that it does not recurse.
+This code will print "TICK" each second on stdout, no matter what +else the user or program does:
+
void callback(void *) {
- printf("TICK\n");
+ printf("TICK\n");
Fl::add_timeout(1.0,callback);
}
@@ -321,519 +243,385 @@ main() {
Fl::add_timeout(1.0,callback);
Fl::run();
}
-
-
-To use the switch parser, call Fl::args(...) near the start of -your program. This does not open the display, instead switches -that need the display open are stashed into static variables. Then -you must display your first window by calling -window->show(argc,argv), which will do anything -stored in the static variables. - -
callback lets you define your own switches. It is called -with the same argc and argv, and with i the index of each word. -The callback should return zero if the switch is unrecognized, and not -change i. It should return non-zero if the switch is recognized, and -add at least 1 to i (it can add more to consume words after the -switch). This function is called before any other tests, so you can -override any FLTK switch. - -
On return i is set to the index of the first non-switch. -This is either: - -
All switches may be abbreviated to two letters and case is ignored: - -
If you change the belowmouse widget, the previous one and all -parents (that don't contain the new widget) are sent FL_LEAVE -events. Changing this does not send FL_ENTER to this -or any widget, because sending FL_ENTER is supposed to -test if the widget wants the mouse (by it returning non-zero -from handle()). - -
++ +
To use the switch parser, call Fl::args(...) near the start +of your program. This does not open the display, instead +switches that need the display open are stashed into static variables. +Then you must display your first window by calling +window->show(argc,argv), which will do anything stored in the +static variables.
+callback lets you define your own switches. It is called +with the same argc and argv, and with i the +index of each word. The callback should return zero if the switch is +unrecognized, and not change i. It should return non-zero if +the switch is recognized, and add at least 1 to i (it can add +more to consume words after the switch). This function is called +before any other tests, so you can override any FLTK switch.
+On return i is set to the index of the first non-switch. +This is either:
+All switches may be abbreviated to two letters and case is ignored:
+If you change the belowmouse widget, the previous one and all +parents (that don't contain the new widget) are sent FL_LEAVE + events. Changing this does not send FL_ENTER to this +or any widget, because sending FL_ENTER is supposed to test + if the widget wants the mouse (by it returning non-zero from +handle()).
+
while (!calculation_done()) {
calculate();
Fl::check();
if (user_hit_abort_button()) break;
}
-
-
-This returns non-zero if any windows are displayed, and 0 if no
-windows are displayed.
-
-The second form directly 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. - -
Fl::event_key(int) returns true if the given key was held -down (or pressed) during 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 -now. Under X this requires a round-trip to the server and is -much slower than Fl::event_key(int). - -
Keys are identified by the unshifted values. FLTK defines a -set of symbols that should work on most modern machines for every key -on the keyboard: - -
On WIN32 Fl::get_key(FL_KP_Enter) and -Fl::event_key(FL_KP_Enter) do not work. - -
Under X this is the result of calling XLookupString(). - -
If you change Fl::focus(), the previous widget and all -parents (that don't contain the new widget) are sent -FL_UNFOCUS events. Changing the focus does not send -FL_FOCUS to this or any widget, because sending -FL_FOCUS is supposed to test if the widget wants the -focus (by it returning non-zero from handle()). - -
The integer pointed to by attributes (if the pointer is not -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. - -
Currently this only does something on WIN32. In future versions for -X it may read the window manager (KDE, Gnome, etc.) setup as well. - -
See Fl_Gl_Window for a -list of additional values for the argument. - -
Fl::event_x() and Fl::event_y()<.tt> are undefined if -the passed widget is not a mapped Fl_Window. Use -Fl::event_x_root() and Fl::event_y_root() instead. - -
Be careful that your program does not enter an infinite loop -while grab() is on. On X this will lock up your screen! - -
The second function returns the current grab window, or NULL if -none. - -
This does nothing if the current visual is not colormapped. - -
If you change the pushed widget, the previous one and all parents -(that don't contain the new widget) are sent FL_RELEASE -events. Changing this does not send FL_PUSH to this or -any widget, because sending FL_PUSH is supposed to test -if the widget wants the mouse (by it returning non-zero from -handle()). - -
++ + This returns non-zero if any windows are displayed, and 0 if no +windows are displayed. +
The second form directly 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.
+Fl::event_key(int) returns true if the given key was held +down (or pressed) during 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 +now. Under X this requires a round-trip to the server and is +much slower than Fl::event_key(int).
+Keys are identified by the unshifted values. FLTK defines a +set of symbols that should work on most modern machines for every key +on the keyboard:
+On WIN32 Fl::get_key(FL_KP_Enter) and +Fl::event_key(FL_KP_Enter) do not work.
+Under X this is the result of calling XLookupString().
+If you change Fl::focus(), the previous widget and all +parents (that don't contain the new widget) are sent FL_UNFOCUS + events. Changing the focus does not send FL_FOCUS to +this or any widget, because sending FL_FOCUS is supposed to +test if the widget wants the focus (by it returning non-zero from +handle()).
+The integer pointed to by attributes (if the pointer is not +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.
+Currently this only does something on WIN32. In future versions for +X it may read the window manager (KDE, Gnome, etc.) setup as well.
+See Fl_Gl_Window + for a list of additional values for the argument.
+Fl::event_x() and Fl::event_y() + + are undefined if the +passed widget is not a mapped Fl_Window. Use +Fl::event_x_root() and Fl::event_y_root() instead.
+Be careful that your program does not enter an infinite loop +while grab() is on. On X this will lock up your screen!
+The second function returns the current grab window, or NULL + if none.
+This does nothing if the current visual is not colormapped.
+If you change the pushed widget, the previous one and all parents +(that don't contain the new widget) are sent FL_RELEASE + events. Changing this does not send FL_PUSH to this +or any widget, because sending FL_PUSH is supposed to test + if the widget wants the mouse (by it returning non-zero from +handle()).
+
while (!calculation_done()) {
calculate();
if (Fl::ready()) {
@@ -842,225 +630,176 @@ while (!calculation_done()) {
if (user_hit_abort_button()) break;
}
}
-
-
-++ +
while (Fl::wait()); return 0; -- -
Copying the buffer every time the selection is changed is -obviously wasteful, especially for large selections. An interface will -probably be added in a future version to allow the selection to be made -by a callback function. The current interface will be emulated on top -of this. - -
The second form copies the from boxtype. - -
The second form copies one face to another. - -
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 "-*" will -select all fonts with any encoding as long as they have normal X font -names with dashes in them. Passing "*" will list every font that -exists (on X this may produce some strange output). Other values may -be useful but are system dependent. With WIN32 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. - -
The second form copies the from labeltype. - -
Only the following combinations do anything useful: - -
Your program can check its global state and update things after -each call to Fl::wait(), which can be very useful in complex programs. - -
If there are no windows (this is checked after the idle and -timeouts are called) then Fl::wait() returns zero without waiting for -any events. Your program can either exit at this point, or call -show() on some window so the GUI can continue to operate. - -The second form of Fl::wait() waits only a certain amount of -time for anything to happen. This does the same as wait() -except if the given time (in seconds) passes it returns. The return -value is how much time remains. If the return value is zero or -negative then the entire time period elapsed. - -
If you do several wait(time) calls in a row, the subsequent ones -are measured from when the first one is called, even if you do -time-consuming calculations after they return. This allows you to -accurately make something happen at regular intervals. This code will -accurately call A() once per second (as long as it takes less than a -second to execute): - -
++ +
Copying the buffer every time the selection is changed is +obviously wasteful, especially for large selections. An interface will +probably be added in a future version to allow the selection to be made +by a callback function. The current interface will be emulated on top +of this.
+The second form copies the from boxtype.
+The second form copies one face to another.
+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 +"-*" will select all fonts with any encoding as long as they have +normal X font names with dashes in them. Passing "*" will list every +font that exists (on X this may produce some strange output). Other +values may be useful but are system dependent. With WIN32 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.
+The second form copies the from labeltype.
+Only the following combinations do anything useful:
+Your program can check its global state and update things after each +call to Fl::wait(), which can be very useful in complex +programs.
+If there are no windows (this is checked after the idle and timeouts +are called) then Fl::wait() returns zero without waiting for +any events. Your program can either exit at this point, or call +show() on some window so the GUI can continue to operate. The +second form of Fl::wait() waits only a certain amount of time +for anything to happen. This does the same as wait() except +if the given time (in seconds) passes it returns. The return value is +how much time remains. If the return value is zero or negative then +the entire time period elapsed.
+If you do several wait(time) calls in a row, the subsequent +ones are measured from when the first one is called, even if you do +time-consuming calculations after they return. This allows you to +accurately make something happen at regular intervals. This code will +accurately call A() once per second (as long as it takes less +than a second to execute):
+
for (;;) {
- for (float time = 1.0; time > 0; ) time = Fl::wait(time);
+ for (float time = 1.0; time > 0; ) time = Fl::wait(time);
A();
}
-
-
-Fl::warning means that there was a recoverable problem, the -display may be messed up but the user can probably keep working (all X -protocol errors call this). Fl::error means there is a -recoverable error, but the display is so messed up it is unlikely the -user can continue (very little calls this now). Fl::fatal -must not return, as FLTK is in an unusable state, however your version -may be able to use longjmp or an exception to continue, as -long as it does not call FLTK again. - - - + + +
Fl::warning means that there was a recoverable problem, the +display may be messed up but the user can probably keep working (all X +protocol errors call this). Fl::error means there is a +recoverable error, but the display is so messed up it is unlikely the +user can continue (very little calls this now). Fl::fatal must +not return, as FLTK is in an unusable state, however your version may +be able to use longjmp or an exception to continue, as long as +it does not call FLTK again.
+ \ No newline at end of file diff --git a/documentation/glut.html b/documentation/glut.html index 643f66dc2..cbfe12a37 100644 --- a/documentation/glut.html +++ b/documentation/glut.html @@ -1,194 +1,145 @@ - - - -All files calling GLUT procedures must be compiled with C++. You may -have to alter them slightly to get them to compile without warnings, -and you may have to rename them to get make to use the C++ compiler. - -
You must link with the FLTK library. If you call any GLUT drawing -functions that FLTK does not emulate -(glutExtensionsSupported(), glutWire*(), -glutSolid*(), and glutStroke*()), you will also have -to link with the GLUT library (after the FLTK library!) - -
Most of FL/glut.H is inline functions. You should take a -look at it (and maybe at test/glut.cxx in the FLTK source) if -you are having trouble porting your GLUT program. - -
This has been tested with most of the demo programs that come with -the GLUT 3.3 distribution. - -
The strings passed as menu labels are not copied. - -
glutPostRedisplay() does not work if called from -inside a display function. You must use glutIdleFunc() -if you want your display to update continuously. - -
glutSwapBuffers() does not work from inside a display -function. This is on purpose, because FLTK swaps the buffers for you. - -
glutUseLayer() does not work well, and should only be -used to initialize transformations inside a resize callback. You -should redraw overlays by using glutOverlayDisplayFunc(). - -
Overlays are cleared before the overlay display function is called. -glutLayerGet(GLUT_OVERLAY_DAMAGED) always returns true for -compatibility with some GLUT overlay programs. You must rewrite your -code so that gl_color() is used to choose colors in an -overlay, or you will get random overlay colors. - -
glutSetCursor(GLUT_CURSOR_FULL_CROSSHAIR) just -results in a small crosshair. - -
The fonts used by glutBitmapCharacter() and -glutBitmapWidth() may be different. - -
glutInit(argc,argv) will consume different switches than GLUT -does. It accepts the switches recognized by Fl::args(), and will accept any -abbreviation of these switches (such as "-di" for "-display"). - -
-Fl_Gl_Window + You should be able to compile existing GLUT source code by including +<FL/glut.H> instead of <GL/glut.h>. This can be done by +editing the source, by changing the -I switches to the +compiler, or by providing a symbolic link from GL/glut.h to +FL/glut.H. +All files calling GLUT procedures must be compiled with C++. + You may have to alter them slightly to get them to compile without +warnings, and you may have to rename them to get make to use the C++ +compiler.
+You must link with the FLTK library. If you call any GLUT drawing +functions that FLTK does not emulate (glutExtensionsSupported() +, glutWire*(), glutSolid*(), and glutStroke*() +), you will also have to link with the GLUT library (after the +FLTK library!)
+Most of FL/glut.H is inline functions. You should take a +look at it (and maybe at test/glut.cxx in the FLTK source) if +you are having trouble porting your GLUT program.
+This has been tested with most of the demo programs that come with +the GLUT 3.3 distribution.
+Known Problems
+ The following functions and/or arguments to functions are missing, and +you will have to replace them or comment them out for your code to +compile: +
The strings passed as menu labels are not copied.
+glutPostRedisplay() does not work if called from inside a +display function. You must use glutIdleFunc() if you want +your display to update continuously.
+glutSwapBuffers() does not work from inside a display +function. This is on purpose, because FLTK swaps the buffers for you.
+glutUseLayer() does not work well, and should only be used +to initialize transformations inside a resize callback. You should +redraw overlays by using glutOverlayDisplayFunc().
+Overlays are cleared before the overlay display function is called. +glutLayerGet(GLUT_OVERLAY_DAMAGED) always returns true for +compatibility with some GLUT overlay programs. You must rewrite your +code so that gl_color() is used to choose colors in an +overlay, or you will get random overlay colors.
+glutSetCursor(GLUT_CURSOR_FULL_CROSSHAIR) just results in a +small crosshair.
+The fonts used by glutBitmapCharacter() and glutBitmapWidth() + may be different.
+glutInit(argc,argv) will consume different switches than +GLUT does. It accepts the switches recognized by +Fl::args(), and will accept any abbreviation of these +switches (such as "-di" for "-display").
+
+Fl_Gl_Window
|
- +----Fl_Glut_Window
-
-
--#include <FL/glut.H> -- -
The current GLUT window is available in the global variable -glut_window. - -
new Fl_Glut_Window(...) is the same as -glutCreateWindow() except it does not show() the window -or make the window current. - -
window->make_current() is the same as -glutSetWindow(number). If the window has not had -show() called on it yet, some functions that assumme an OpenGL -context will not work. If you do show() the window, call -make_current() again to set the context. - -
~Fl_Glut_Window() is the same as -glutDestroyWindow(). - -
+#include <FL/glut.H> ++ +
The current GLUT window is available in the global variable +glut_window.
+new Fl_Glut_Window(...) is the same as +glutCreateWindow() except it does not show() the window +or make the window current.
+window->make_current() is the same as +glutSetWindow(number). If the window has not had show() + called on it yet, some functions that assumme an OpenGL context will +not work. If you do show() the window, call make_current() + again to set the context.
+~Fl_Glut_Window() is the same as glutDestroyWindow() +.
+Many of the ideas in FLTK were developed on a NeXT (but not -using NextStep) in 1987 in a C toolkit Bill called "views". Here he -came up with passing events downward in the tree and having the handle -routine return a value indicating the used the event, and the -table-driven menus. In general he was trying to prove that complex UI -ideas could be entirely implemented in a user space toolkit, with no -knowledge or support by the system. - -
After going to film school for a few years, Bill worked at Sun -Microsystems on the (doomed) NeWS project. Here he found an even -better and cleaner windowing system, and he reimplemented "views" atop -that. NeWS did have an unnecessarily complex method of delivering -events which hurt it. But the designers did admit that perhaps the -user could write just as good of a button as they could, and officially -exposed the lower level interface. - -
With the death of NeWS Bill realized that he would have to live with -X. The biggest problem with X is the "window manager", which means -that the toolkit can no longer control the window borders or drag the -window around. - -
At Digital Domain Bill discovered another toolkit, "Forms". Forms was -similar to his work, but provided many more widgets, since it was used -in many real applications, rather then as theoretical work. He decided -to use Forms, except he integrated his table-driven menus into it. -Several very large programs were created using this version of Forms. - -
The need to switch to OpenGL and GLX, portability, and a desire to -use C++ subclassing required a rewrite of Forms. This produced the -first version of FLTK. The conversion to C++ required so many changes -it made it impossible to recompile any Forms objects. Since it was -incompatible anyway, Bill decided to incorporate his older ideas as -much as possible by simplifying the lower level interface and the event -passing mechanisim. - -
Bill received permission to release it for free on the Internet, -with the GNU general public license. Response from Internet users -indicated that the Linux market dwarfed the SGI and high-speed GL -market, so he rewrote it to use X for all drawing, greatly speeding it -up on these machines. That is the version you have now. - -
Digital Domain has since withdrawn support for FLTK. While Bill is -no longer able to actively develop it, he still contributes to FLTK in -his free time and is a part of the FLTK development team. - -
Here are some of the core features unique to FLTK: - -
FLTK uses GNU autoconf to configure itself for your UNIX platform. The -main things that the configure script will look for are the X11, OpenGL -(or Mesa), and JPEG header and library files. Make sure that they -are in the standard include/library locations. - -
You can run configure yourself to get the exact setup you need. Type -"./configure <options>", where options are: - -
To install the library, become root and type "make install". This -will copy the "fluid" executable to "bindir", the header files to "includedir", -and the library files to "libdir". - -
The second method is to use a GNU-based development tool with the files -in the "makefiles" directory. To build using one of these tools simply -copy the appropriate makeinclude and config files to the main directory -and do a make: - -
-cp makefiles/makeinclude.<env> makeinclude -cp makefiles/config.<env> config.h + +1 - Introduction to FLTK
+ The Fast Light Tool Kit ("FLTK", pronounced "fulltick") is a LGPL'd +C++ graphical user interface toolkit for X (UNIX®), OpenGL®, and +Microsoft® Windows® NT 4.0, 95, or 98. It was originally developed by +Mr. Bill Spitzak and is currently maintained by a small group of +developers across the world with a central repository in the US. +History of FLTK
+ It has always been Bill's belief that the GUI API of all modern +systems is much too high level. Toolkits (even FL) are not what +should be provided and documented as part of an operating system. The +system only has to provide arbitrary shaped but featureless windows, a +powerful set of graphics drawing calls, and a simple unalterable + method of delivering events to the owners of the windows. NeXT (if +you ignored NextStep) provided this, but they chose to hide it and +tried to push their own baroque toolkit instead... +Many of the ideas in FLTK were developed on a NeXT (but not + using NextStep) in 1987 in a C toolkit Bill called "views". Here he +came up with passing events downward in the tree and having the handle +routine return a value indicating the used the event, and the +table-driven menus. In general he was trying to prove that complex UI +ideas could be entirely implemented in a user space toolkit, with no +knowledge or support by the system.
+After going to film school for a few years, Bill worked at Sun +Microsystems on the (doomed) NeWS project. Here he found an even +better and cleaner windowing system, and he reimplemented "views" atop +that. NeWS did have an unnecessarily complex method of delivering +events which hurt it. But the designers did admit that perhaps the +user could write just as good of a button as they could, and officially +exposed the lower level interface.
+With the death of NeWS Bill realized that he would have to live with +X. The biggest problem with X is the "window manager", which means +that the toolkit can no longer control the window borders or drag the +window around.
+At Digital Domain Bill discovered another toolkit, "Forms". Forms +was similar to his work, but provided many more widgets, since it was +used in many real applications, rather then as theoretical work. He +decided to use Forms, except he integrated his table-driven menus into +it. Several very large programs were created using this version of +Forms.
+The need to switch to OpenGL and GLX, portability, and a desire to +use C++ subclassing required a rewrite of Forms. This produced the +first version of FLTK. The conversion to C++ required so many changes +it made it impossible to recompile any Forms objects. Since it was +incompatible anyway, Bill decided to incorporate his older ideas as +much as possible by simplifying the lower level interface and the event +passing mechanisim.
+Bill received permission to release it for free on the Internet, +with the GNU general public license. Response from Internet users +indicated that the Linux market dwarfed the SGI and high-speed GL +market, so he rewrote it to use X for all drawing, greatly speeding it +up on these machines. That is the version you have now.
+Digital Domain has since withdrawn support for FLTK. While Bill is +no longer able to actively develop it, he still contributes to FLTK in +his free time and is a part of the FLTK development team.
+Features
+ FLTK was designed to be statically linked. This was done by splitting +it into many small objects and desigining it so that functions that are +not used do not have pointers to them in the parts that are used, and +thus do not get linked in. This allows you to make an easy-to-install +program, or to modify FLTK to the exact requirements of your +application, without worrying about bloat. FLTK works fine as a shared +library, though, and has started being included on Linux distributions. +Here are some of the core features unique to FLTK:
+
FLTK uses GNU autoconf to configure itself for your UNIX platform. +The main things that the configure script will look for are the X11, +OpenGL (or Mesa), and JPEG header and library files. Make sure that +they are in the standard include/library locations.
+You can run configure yourself to get the exact setup you need. Type +"./configure <options>", where options are:
+To install the library, become root and type "make install". This +will copy the "fluid" executable to "bindir", the header files to +"includedir", and the library files to "libdir".
+The second method is to use a GNU-based development tool with the +files in the "makefiles" directory. To build using one of these tools +simply copy the appropriate makeinclude and config files to the main +directory and do a make:
++cp makefiles/makeinclude.<env> makeinclude +cp makefiles/config.<env> config.h make -- -
To build the XFree86 version of FLTK for OS/2, copy the appropriate -makeinclude and config files to the main directory and do a make: - -
++ +
To build the XFree86 version of FLTK for OS/2, copy the appropriate +makeinclude and config files to the main directory and do a make:
+cp makefiles/Makefile.os2x Makefile cp makefiles/makeinclude.os2x makeinclude cp makefiles/config.os2x config.h make -- -
To join the FLTK mailing list, send a message to "majordomo@easysw.com" -with "subscribe fltk" in the message body. A digest of this list is available -by subscribing to the "fltk-digest" mailing list. - -
For general support and questions, please use the FLTK mailing list -at "fltk@easysw.com". - - - + + +
To join the FLTK mailing list, send a message to +"majordomo@easysw.com" with "subscribe fltk" in the message body. A +digest of this list is available by subscribing to the "fltk-digest" +mailing list.
+For general support and questions, please use the FLTK mailing list +at "fltk@easysw.com".
+ \ No newline at end of file diff --git a/documentation/license.html b/documentation/license.html index add40a768..ff88ad13b 100644 --- a/documentation/license.html +++ b/documentation/license.html @@ -1,468 +1,376 @@ - - - -Version 2, June 1991
-Copyright (C) 1991 Free Software Foundation, Inc.
-59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
-Everyone is permitted to copy and distribute verbatim copies
-of this license document, but changing it is not allowed.
-[This is the first released version of the library GPL. It is
-numbered 2 because it goes with version 2 of the ordinary GPL.]
-
+
Version 2, June 1991
+
Copyright (C) 1991 Free Software Foundation, Inc.
+
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+
Everyone is permitted to copy and distribute verbatim copies of
+this license document, but changing it is not allowed.
+
[This is the first released version of the library GPL. It is
+numbered 2 because it goes with version 2 of the ordinary GPL.]
This license, the Library General Public License, applies to some -specially designated Free Software Foundation software, and to any -other libraries whose authors decide to use it. You can use it for -your libraries, too. - -
When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - -
To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if -you distribute copies of the library, or if you modify it. - -
For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link a program with the library, you must provide -complete object files to the recipients so that they can relink them -with the library, after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - -
Our method of protecting your rights has two steps: (1) copyright -the library, and (2) offer you this license which gives you legal -permission to copy, distribute and/or modify the library. - -
Also, for each distributor's protection, we want to make certain -that everyone understands that there is no warranty for this free -library. If the library is modified by someone else and passed on, we -want its recipients to know that what they have is not the original -version, so that any problems introduced by others will not reflect on -the original authors' reputations. - -
Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that companies distributing free -software will individually obtain patent licenses, thus in effect -transforming the program into proprietary software. To prevent this, -we have made it clear that any patent must be licensed for everyone's -free use or not licensed at all. - -
Most GNU software, including some libraries, is covered by the ordinary -GNU General Public License, which was designed for utility programs. This -license, the GNU Library General Public License, applies to certain -designated libraries. This license is quite different from the ordinary -one; be sure to read it in full, and don't assume that anything in it is -the same as in the ordinary license. - -
The reason we have a separate public license for some libraries is that -they blur the distinction we usually make between modifying or adding to a -program and simply using it. Linking a program with a library, without -changing the library, is in some sense simply using the library, and is -analogous to running a utility program or application program. However, in -a textual and legal sense, the linked executable is a combined work, a -derivative of the original library, and the ordinary General Public License -treats it as such. - -
Because of this blurred distinction, using the ordinary General -Public License for libraries did not effectively promote software -sharing, because most developers did not use the libraries. We -concluded that weaker conditions might promote sharing better. - -
However, unrestricted linking of non-free programs would deprive the -users of those programs of all benefit from the free status of the -libraries themselves. This Library General Public License is intended to -permit developers of non-free programs to use free libraries, while -preserving your freedom as a user of such programs to change the free -libraries that are incorporated in them. (We have not seen how to achieve -this as regards changes in header files, but we have achieved it as regards -changes in the actual functions of the Library.) The hope is that this -will lead to faster development of free libraries. - -
The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the libary" and a "work that uses the library". The -former contains code derived from the library, while the latter only -works together with the library. - -
Note that it is possible for a library to be covered by the ordinary -General Public License rather than by this special one. - -
A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - -
The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - -
"Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - -
Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - -
1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - -
You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - -
2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - -
- -a) The modified work must itself be a software library. - -- -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -b) You must cause the files modified to carry prominent notices -stating that you changed the files and the date of any change. - -
c) You must cause the whole of the work to be licensed at no -charge to all third parties under the terms of this License. - -
d) If a facility in the modified Library refers to a function or a -table of data to be supplied by an application program that uses -the facility, other than as an argument passed when the facility -is invoked, then you must make a good faith effort to ensure that, -in the event an application does not supply such function or -table, the facility still operates, and performs whatever part of -its purpose remains meaningful. - -
(For example, a function in a library to compute square roots has -a purpose that is entirely well-defined independent of the -application. Therefore, Subsection 2d requires that any -application-supplied function or table used by this function must -be optional: if the application does not supply it, the square -root function must still compute square roots.) - -
Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -
In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - -
3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - -
Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - -
This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - -
4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - -
If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - -
5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - -
However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - -
When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - -
If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - -
Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - -
6. As an exception to the Sections above, you may also compile or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - -
You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - -
- -a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - -- -For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the source code distributed need not include anything that is normally -distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - -b) - Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - -
c) - If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - -
d) - Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. -
It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - -
7. - You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - -
- -a) - Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - -- -8. - You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - -b) - Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. -
9. - You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - -
10. - Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - -
11. - If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -
If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -
It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -
This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - -
12. - If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - -
13. - The Free Software Foundation may publish revised and/or new -versions of the Library General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -
Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - -
14. - If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - + The licenses for most software are designed to take away your freedom +to share and change it. By contrast, the GNU General Public Licenses +are intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. +
This license, the Library General Public License, applies to some +specially designated Free Software Foundation software, and to any +other libraries whose authors decide to use it. You can use it for +your libraries, too.
+When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it in +new free programs; and that you know you can do these things.
+To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the library, or if you modify it.
+For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link a program with the library, you must provide +complete object files to the recipients so that they can relink them +with the library, after making changes to the library and recompiling +it. And you must show them these terms so they know their rights.
+Our method of protecting your rights has two steps: (1) copyright +the library, and (2) offer you this license which gives you legal +permission to copy, distribute and/or modify the library.
+Also, for each distributor's protection, we want to make certain +that everyone understands that there is no warranty for this free +library. If the library is modified by someone else and passed on, we +want its recipients to know that what they have is not the original +version, so that any problems introduced by others will not reflect on +the original authors' reputations.
+Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that companies distributing free +software will individually obtain patent licenses, thus in effect +transforming the program into proprietary software. To prevent this, +we have made it clear that any patent must be licensed for everyone's +free use or not licensed at all.
+Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License, which was designed for utility +programs. This license, the GNU Library General Public License, +applies to certain designated libraries. This license is quite +different from the ordinary one; be sure to read it in full, and don't +assume that anything in it is the same as in the ordinary license.
+The reason we have a separate public license for some libraries is +that they blur the distinction we usually make between modifying or +adding to a program and simply using it. Linking a program with a +library, without changing the library, is in some sense simply using +the library, and is analogous to running a utility program or +application program. However, in a textual and legal sense, the linked +executable is a combined work, a derivative of the original library, +and the ordinary General Public License treats it as such.
+Because of this blurred distinction, using the ordinary General +Public License for libraries did not effectively promote software +sharing, because most developers did not use the libraries. We +concluded that weaker conditions might promote sharing better.
+However, unrestricted linking of non-free programs would deprive the +users of those programs of all benefit from the free status of the +libraries themselves. This Library General Public License is intended +to permit developers of non-free programs to use free libraries, while +preserving your freedom as a user of such programs to change the free +libraries that are incorporated in them. (We have not seen how to +achieve this as regards changes in header files, but we have achieved +it as regards changes in the actual functions of the Library.) The +hope is that this will lead to faster development of free libraries.
+The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the libary" and a "work that uses the library". The +former contains code derived from the library, while the latter only +works together with the library.
+Note that it is possible for a library to be covered by the ordinary +General Public License rather than by this special one.
+A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables.
+The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".)
+"Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control +compilation and installation of the library.
+Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does and +what the program that uses the Library does.
+1. You may copy and distribute verbatim copies of +the Library's complete source code as you receive it, in any medium, +provided that you conspicuously and appropriately publish on each copy +an appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the Library.
+You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee.
+2. You may modify your copy or copies of the +Library or any portion of it, thus forming a work based on the Library, +and copy and distribute such modifications or work under the terms of +Section 1 above, provided that you also meet all of these conditions:
+a) The modified work must itself be a software +library. +These requirements apply to the modified work as a whole. + If identifiable sections of that work are not derived from the +Library, and can be reasonably considered independent and separate +works in themselves, then this License, and its terms, do not apply to +those sections when you distribute them as separate works. But when +you distribute the same sections as part of a whole which is a work +based on the Library, the distribution of the whole must be on the +terms of this License, whose permissions for other licensees extend to +the entire whole, and thus to each and every part regardless of who +wrote it. +b) You must cause the files modified to carry +prominent notices stating that you changed the files and the date of +any change.
+c) You must cause the whole of the work to be +licensed at no charge to all third parties under the terms of this +License.
+d) If a facility in the modified Library refers to +a function or a table of data to be supplied by an application program +that uses the facility, other than as an argument passed when the +facility is invoked, then you must make a good faith effort to ensure +that, in the event an application does not supply such function or +table, the facility still operates, and performs whatever part of its +purpose remains meaningful.
+(For example, a function in a library to compute square roots has a +purpose that is entirely well-defined independent of the application. + Therefore, Subsection 2d requires that any application-supplied +function or table used by this function must be optional: if the +application does not supply it, the square root function must still +compute square roots.)
+
Thus, it is not the intent of this section to claim rights or +contest your rights to work written entirely by you; rather, the intent +is to exercise the right to control the distribution of derivative or +collective works based on the Library.
+In addition, mere aggregation of another work not based on the +Library with the Library (or with a work based on the Library) on a +volume of a storage or distribution medium does not bring the other +work under the scope of this License.
+3. You may opt to apply the terms of the ordinary +GNU General Public License instead of this License to a given copy of +the Library. To do this, you must alter all the notices that refer to +this License, so that they refer to the ordinary GNU General Public +License, version 2, instead of to this License. (If a newer version +than version 2 of the ordinary GNU General Public License has appeared, +then you can specify that version instead if you wish.) Do not make +any other change in these notices.
+Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy.
+This option is useful when you wish to copy part of the code of the +Library into a program that is not a library.
+4. You may copy and distribute the Library (or a +portion or derivative of it, under Section 2) in object code or +executable form under the terms of Sections 1 and 2 above provided that +you accompany it with the complete corresponding machine-readable +source code, which must be distributed under the terms of Sections 1 +and 2 above on a medium customarily used for software interchange.
+If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to distribute +the source code, even though third parties are not compelled to copy +the source along with the object code.
+5. A program that contains no derivative of any +portion of the Library, but is designed to work with the Library by +being compiled or linked with it, is called a "work that uses the +Library". Such a work, in isolation, is not a derivative work of the +Library, and therefore falls outside the scope of this License.
+However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. Section +6 states terms for distribution of such executables.
+When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law.
+If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.)
+Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, whether +or not they are linked directly with the Library itself.
+6. As an exception to the Sections above, you may +also compile or link a "work that uses the Library" with the Library to +produce a work containing portions of the Library, and distribute that +work under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications.
+You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things:
a) Accompany the work +with the complete corresponding machine-readable source code for the +Library including whatever changes were used in the work (which must +be distributed under Sections 1 and 2 above); and, if the work is an +executable linked with the Library, with the complete machine-readable +"work that uses the Library", as object code and/or source code, so +that the user can modify the Library and then relink to produce a +modified executable containing the modified Library. (It is +understood that the user who changes the contents of definitions files +in the Library will not necessarily be able to recompile the +application to use the modified definitions.) +For an executable, the required form of the "work that +uses the Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the source code distributed need not include anything that is normally +distributed (in either source or binary form) with the major components +(compiler, kernel, and so on) of the operating system on which the +executable runs, unless that component itself accompanies the +executable. +b) Accompany the work with a written offer, valid +for at least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more than the cost +of performing this distribution.
+c) If distribution of the work is made by offering +access to copy from a designated place, offer equivalent access to +copy the above specified materials from the same place.
+d) Verify that the user has already received a copy +of these materials or that you have already sent this user a copy.
+
It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute.
+7. You may place library facilities that are a work +based on the Library side-by-side in a single library together with +other library facilities not covered by this License, and distribute +such a combined library, provided that the separate distribution of the +work based on the Library and of the other library facilities is +otherwise permitted, and provided that you do these two things:
+a) Accompany the combined library with a copy of the +same work based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the Sections +above. +8. You may not copy, modify, sublicense, +link with, or distribute the Library except as expressly provided under +this License. Any attempt otherwise to copy, modify, sublicense, link +with, or distribute the Library is void, and will automatically +terminate your rights under this License. However, parties who have +received copies, or rights, from you under this License will not have +their licenses terminated so long as such parties remain in full +compliance. +b) Give prominent notice with the combined library +of the fact that part of it is a work based on the Library, and +explaining where to find the accompanying uncombined form of the same +work.
+
9. You are not required to accept this License, +since you have not signed it. However, nothing else grants you +permission to modify or distribute the Library or its derivative works. + These actions are prohibited by law if you do not accept this License. + Therefore, by modifying or distributing the Library (or any work based +on the Library), you indicate your acceptance of this License to do so, +and all its terms and conditions for copying, distributing or modifying +the Library or works based on it.
+10. Each time you redistribute the Library (or any +work based on the Library), the recipient automatically receives a +license from the original licensor to copy, distribute, link with or +modify the Library subject to these terms and conditions. You may not +impose any further restrictions on the recipients' exercise of the +rights granted herein. You are not responsible for enforcing compliance +by third parties to this License.
+11. If, as a consequence of a court judgment or +allegation of patent infringement or for any other reason (not limited +to patent issues), conditions are imposed on you (whether by court +order, agreement or otherwise) that contradict the conditions of this +License, they do not excuse you from the conditions of this License. + If you cannot distribute so as to satisfy simultaneously your +obligations under this License and any other pertinent obligations, +then as a consequence you may not distribute the Library at all. For +example, if a patent license would not permit royalty-free +redistribution of the Library by all those who receive copies directly +or indirectly through you, then the only way you could satisfy both it +and this License would be to refrain entirely from distribution of the +Library.
+If any portion of this section is held invalid or unenforceable +under any particular circumstance, the balance of the section is +intended to apply, and the section as a whole is intended to apply in +other circumstances.
+It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is implemented +by public license practices. Many people have made generous +contributions to the wide range of software distributed through that +system in reliance on consistent application of that system; it is up +to the author/donor to decide if he or she is willing to distribute +software through any other system and a licensee cannot impose that +choice.
+This section is intended to make thoroughly clear what is believed +to be a consequence of the rest of this License.
+12. If the distribution and/or use of the Library +is restricted in certain countries either by patents or by copyrighted +interfaces, the original copyright holder who places the Library under +this License may add an explicit geographical distribution limitation +excluding those countries, so that distribution is permitted only in or +among countries not thus excluded. In such case, this License +incorporates the limitation as if written in the body of this License.
+13. The Free Software Foundation may publish +revised and/or new versions of the Library General Public License from +time to time. Such new versions will be similar in spirit to the +present version, but may differ in detail to address new problems or +concerns.
+Each version is given a distinguishing version number. If the +Library specifies a version number of this License which applies to it +and "any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation.
+14. If you wish to incorporate parts of the Library +into other free programs whose distribution conditions are incompatible +with these, write to the author to ask for permission. For software +which is copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally.
15. - BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - -
16. - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - +
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, +THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT +WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE +OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU +ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW +OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY +WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE +LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL +OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES.
With a bit of care you can also use OpenGL to draw into normal FLTK -windows. This is mostly useful because you can use Gourand shading for -drawing your widgets. To do this you use the gl_start() and gl_finish() functions around your OpenGL -code. - -
You must include FLTK's <FL/gl.h> header file. It will include -the file <GL/gl.h>, define some extra drawing functions -provided by FLTK, and include the <windows.h> header file needed -by WIN32 applications. - -
+ +9 - Using OpenGL
+ This chapter discusses using FLTK for your OpenGL applications. +Using OpenGL in FLTK
+ The easiest way to make an OpenGL display is to subclass +Fl_Gl_Window. Your subclass must implement a draw() + method which uses OpenGL calls to draw the display. Your main program +should call redraw() when the display needs to change, and +(somewhat later) FLTK will call draw(). +With a bit of care you can also use OpenGL to draw into normal FLTK +windows. This is mostly useful because you can use Gourand shading for +drawing your widgets. To do this you use the +gl_start() and gl_finish() + functions around your OpenGL code.
+You must include FLTK's <FL/gl.h> header file. It will +include the file <GL/gl.h>, define some extra drawing +functions provided by FLTK, and include the <windows.h> header +file needed by WIN32 applications.
+Making a Subclass of Fl_Gl_Window
+ To make a subclass of Fl_Gl_Window, you must provide: +
class MyWindow : public Fl_Gl_Window {
void draw();
int handle(int);
@@ -51,17 +36,16 @@ public:
MyWindow(int X, int Y, int W, int H, const char *L)
: Fl_Gl_Window(X, Y, W, H, L) {}
};
-
-
-The draw() and handle() methods are described below. Like
-any widget, you can include additional private and public data in your class
-(such as scene graph information, etc.)
-
-++ + The draw() and handle() methods are described below. + Like any widget, you can include additional private and public data in +your class (such as scene graph information, etc.) +
void MyWindow::draw() {
if (!valid()) {
... set up projection, viewport, etc ...
@@ -70,14 +54,13 @@ void MyWindow::draw() {
}
... draw ...
}
-
-
-++ +
int MyWindow::handle(int event) {
switch(event) {
case FL_PUSH:
@@ -103,16 +86,16 @@ int MyWindow::handle(int event) {
return 0;
}
}
-
-
-When handle() is called, the OpenGL context is not set up! If your
-display changes, you should call redraw() and let draw() do the work.
-Don't call any OpenGL drawing functions from inside handle()!
-
-You can call some OpenGL stuff like hit detection and texture loading -functions by doing: - -
++ + When handle() is called, the OpenGL context is not set up! + If your display changes, you should call redraw() and let +draw() do the work. Don't call any OpenGL drawing functions from +inside handle()! +
You can call some OpenGL stuff like hit detection and texture +loading functions by doing:
+
case FL_PUSH:
make_current(); // make OpenGL context current
if (!valid()) {
@@ -121,154 +104,116 @@ functions by doing:
}
... ok to call NON-DRAWING OpenGL code here, such as hit
detection, loading textures, etc...
-
-
-Your main program can now create one of your windows by doing new
-MyWindow(...). You can also use fluid by:
-
-Most important, before you show any windows (including those -that don't have OpenGL drawing) you must initialize FLTK so that it -knows it is going to use OpenGL. You may use any of the symbols -described for Fl_Gl_Window::mode() to describe -how you intend to use OpenGL: - -
++ + Your main program can now create one of your windows by doing new +MyWindow(...). You can also use fluid + by: +
Most important, before you show any windows (including those +that don't have OpenGL drawing) you must initialize FLTK so that it +knows it is going to use OpenGL. You may use any of the symbols +described for +Fl_Gl_Window::mode() to describe how you intend to use OpenGL:
+Fl::gl_visual(FL_RGB); -- -You can then put OpenGL drawing code anywhere you can draw normally -by surrounding it with: - -
++ + You can then put OpenGL drawing code anywhere you can draw normally by +surrounding it with: +
gl_start(); ... put your OpenGL code here ... gl_finish(); -- -gl_start() and gl_finish() set up an OpenGL context with -an orthographic projection so that 0,0 is the lower-left corner of the -window and each pixel is one unit. The current clipping is reproduced -with OpenGL glScissor() commands. These also synchronize the -OpenGL graphics stream with the drawing done by other X, WIN32, or FLTK -functions. - -
The same context is reused each time. If your code changes the -projection transformation or anything else you should use -glPushMatrix() and glPopMatrix() functions to put the -state back before calling gl_finish(). - -
You may want to use Fl_Window::current()->h() to get -the drawable height so you can flip the Y coordinates. - -
Unfortunately, there are a bunch of limitations you must adhere to for -maximum portability: - -
++ +gl_start() and +gl_finish() set up an OpenGL context with an orthographic +projection so that 0,0 is the lower-left corner of the window and each +pixel is one unit. The current clipping is reproduced with OpenGL +glScissor() commands. These also synchronize the OpenGL graphics +stream with the drawing done by other X, WIN32, or FLTK functions. +
The same context is reused each time. If your code changes the +projection transformation or anything else you should use +glPushMatrix() and glPopMatrix() functions to put the +state back before calling gl_finish().
+You may want to use Fl_Window::current()->h() to get the +drawable height so you can flip the Y coordinates.
+Unfortunately, there are a bunch of limitations you must adhere to +for maximum portability:
+
class OptimizerWindow : public Fl_Gl_Window {
csContext *context_; // Initialized to 0 and set by draw()...
csDrawAction *draw_action_; // Draw action...
@@ -291,33 +236,34 @@ public:
void camera(csCamera *c) {
camera_ = c;
if (context_) {
- draw_action_->setCamera(camera_);
- camera_->draw(draw_action_);
+ draw_action_->setCamera(camera_);
+ camera_->draw(draw_action_);
redraw();
}
}
};
-
+
+
+
+
The camera() Method
-
-The camera() method sets the camera (projection and viewpoint)
-to use when drawing the scene. The scene is redrawn after this call.
-
-The draw() Method
-
-The draw() method performs the needed initialization
-and does the actual drawing:
-
-+ The camera() method sets the camera (projection and +viewpoint) to use when drawing the scene. The scene is redrawn after +this call. +The draw() Method
+ The draw() method performs the needed initialization and does +the actual drawing: +
void OptimizerWindow::draw() {
if (!context_) {
// This is the first time we've been asked to draw; create the
// Optimizer context for the scene...
context_ = new csContext(fl_display, fl_visual);
- context_->ref();
- context_->makeCurrent(fl_display, fl_window);
+ context_->ref();
+ context_->makeCurrent(fl_display, fl_window);
... perform other context setup as desired ...
@@ -325,19 +271,19 @@ void OptimizerWindow::draw() {
draw_action_ = new csDrawAction;
if (camera_) {
- draw_action_->setCamera(camera_);
- camera_->draw(draw_action_);
+ draw_action_->setCamera(camera_);
+ camera_->draw(draw_action_);
}
}
if (!valid()) {
// Update the viewport for this context...
- context_->setViewport(0, 0, w(), h());
+ context_->setViewport(0, 0, w(), h());
}
// Clear the window...
- context_->clear(csContext::COLOR_CLEAR | csContext::DEPTH_CLEAR,
+ context_->clear(csContext::COLOR_CLEAR | csContext::DEPTH_CLEAR,
0.0f, // Red
0.0f, // Green
0.0f, // Blue
@@ -346,15 +292,11 @@ void OptimizerWindow::draw() {
// Then draw the scene (if any)...
if (scene_)
- draw_action_->apply(scene_);
+ draw_action_->apply(scene_);
}
-
-
+
+
-#include <FL/x.H> -- -On X you can include this file to access FLTK's X-specific functions. -Be warned that some of the structures and calls in it are subject to -change in future version of FLTK. Try to avoid doing this so your code -is portable. - -
FLTK calls this for any X events it does not recognize, or X events -with a window id that FLTK does not recognize. You can look at the X -event with the fl_xevent variable. - -
The argument is zero for unrecognized X events. These handlers are -also called for global shortcuts and some other events that the widget -they were passed to did not handle. In this case the argument is -non-zero (for example FL_SHORTCUT). - -
Besides feeding events your code should call Fl::flush() periodically so that FLTK -redraws its windows. - -
This function will call the callback functions. It will not return -until they complete. In particular if a callback pops up a modal -window (by calling fl_ask(), for -instance) it will not return until the modal function returns. - -
+ +F - Operating System Issues
+ This appendix describes the X and WIN32 specific interfaces in FLTK. +X-Specific Interface
+
+#include <FL/x.H> ++ + On X you can include this file to access FLTK's X-specific functions. + Be warned that some of the structures and calls in it are subject to +change in future version of FLTK. Try to avoid doing this so your code +is portable. +
FLTK calls this for any X events it does not recognize, or X events +with a window id that FLTK does not recognize. You can look at the X +event with the fl_xevent variable.
+The argument is zero for unrecognized X events. These handlers are +also called for global shortcuts and some other events that the widget +they were passed to did not handle. In this case the argument is +non-zero (for example FL_SHORTCUT).
+Besides feeding events your code should call +Fl::flush() periodically so that FLTK redraws its windows.
+This function will call the callback functions. It will not return +until they complete. In particular if a callback pops up a modal +window (by calling fl_ask(), +for instance) it will not return until the modal function returns.
+extern Display *fl_display; extern Window fl_window; extern GC fl_gc; extern int fl_screen; extern XVisualInfo *fl_visual; extern Colormap fl_colormap; -- -You must use them to produce Xlib calls. Don't attempt to change -them. A typical X drawing call is written like this: - -
++ + You must use them to produce Xlib calls. Don't attempt to change +them. A typical X drawing call is written like this: +
XDrawSomething(fl_display, fl_window, fl_gc, ...); -- -Other information such as the position or size of the X window can be -found by looking at Fl_Window::current(), which -returns a pointer to the Fl_Window being drawn. - -
This may call Fl::abort() if there is an error opening the display. - -
++ + Other information such as the position or size of the X window can be +found by looking at +Fl_Window::current(), which returns a pointer to the +Fl_Window being drawn. +
This may call Fl::abort() if there is an error opening the +display.
+
Fl::args(argc, argv); // do this first so $DISPLAY is set
fl_open_display();
fl_visual = find_a_good_visual(fl_display, fl_screen);
-if (!fl_visual) Fl::abort("No good visual");
-fl_colormap = make_a_colormap(fl_display, fl_visual->visual, fl_visual->depth);
+if (!fl_visual) Fl::abort("No good visual");
+fl_colormap = make_a_colormap(fl_display, fl_visual->visual, fl_visual->depth);
// it is now ok to show() windows:
-window->show(argc, argv);
-
-
-FLTK can also manage XID's provided by other libraries or programs, -and call those libraries when the window needs to be redrawn. - -
To do this, you need to make a subclass of Fl_Window and override some of these virtual -functions: - -
An example: - -
+window->show(argc, argv); ++ +
FLTK can also manage XID's provided by other libraries or programs, +and call those libraries when the window needs to be redrawn.
+To do this, you need to make a subclass of +Fl_Window and override some of these virtual functions:
+An example:
+
void MyWindow::show() {
if (shown()) {Fl_Window::show(); return;} // you must do this!
fl_open_display(); // necessary if this is first window
- // we only calcualte the necessary visual & colormap once:
+ // we only calcualte the necessary visual colormap once:
static XVisualInfo *visual;
static Colormap colormap;
if (!visual) {
visual = figure_out_visual();
colormap = XCreateColormap(fl_display, RootWindow(fl_display,fl_screen),
- vis->visual, AllocNone);
+ vis->visual, AllocNone);
}
Fl_X::make_xid(this, visual, colormap);
}
-
-
-The X region that is a combination of all damage() calls -done so far is in Fl_X::i(this)->region. If NULL -then you should redraw the entire window. The undocumented function -fl_clip_region(XRegion) will initialize the FLTK clip stack -with a region or NULL for no clipping. You must set region to -NULL afterwards as fl_clip_region() now owns it and -will delete it when done. - -
If damage() & FL_DAMAGE_EXPOSE then only X expose events -have happened. This may be useful if you have an undamaged image (such -as a backing buffer) around. - -
Here is a sample where an undamaged image is kept somewhere: - -
++ +
The X region that is a combination of all damage() calls +done so far is in Fl_X::i(this)->region. If NULL + then you should redraw the entire window. The undocumented function +fl_clip_region(XRegion) will initialize the FLTK clip stack with a +region or NULL for no clipping. You must set region to +NULL afterwards as fl_clip_region() now owns it and will +delete it when done.
+If damage() FL_DAMAGE_EXPOSE then only X expose events have +happened. This may be useful if you have an undamaged image (such as a +backing buffer) around.
+Here is a sample where an undamaged image is kept somewhere:
+
void MyWindow::flush() {
- fl_clip_region(Fl_X::i(this)->region);
- Fl_X::i(this)->region = 0;
+ fl_clip_region(Fl_X::i(this)->region);
+ Fl_X::i(this)->region = 0;
if (damage() != 2) {... draw things into backing store ...}
... copy backing store to window ...
}
-
-
-++ +
void MyWindow::hide() {
if (mypixmap) {
XFreePixmap(fl_display,mypixmap);
@@ -273,179 +218,146 @@ void MyWindow::hide() {
}
Fl_Window::hide(); // you must call this
}
-
-
-++ +
MyWindow::~MyWindow() {
hide();
}
-
-
--#include "icon.xbm" ++ +
+#include "icon.xbm"
Pixmap p = XCreateBitmapFromData(fl_display, DefaultRootWindow(fl_display),
icon_bits, icon_width, icon_height);
-window->icon((char *)p);
-
-
--#include <FL/x.H> -- -The <FL/x.H> header file defines the interface to FLTK's -WIN32-specific functions. Be warned that some of the structures -and calls in it are subject to change in future version of FLTK. Try -to avoid doing this so your code is portable. - -
You can probably combine FLTK with other libraries that make their -own WIN32 window classes. The easiest way is to call Fl::wait(), it -will call DispatchMessage for all messages to the other windows. If -necessary you can let the other library take over (as long as it calls -DispatchMessage()), but you will have to arrange for the function -Fl::flush() to be called regularily so that widgets are updated, -timeouts are handled, and the idle functions are called. - -
+window->icon((char *)p); ++ +
+#include <FL/x.H> ++ + The <FL/x.H> header file defines the interface to FLTK's +WIN32-specific functions. Be warned that some of the structures and +calls in it are subject to change in future version of FLTK. Try to +avoid doing this so your code is portable. +
You can probably combine FLTK with other libraries that make their +own WIN32 window classes. The easiest way is to call Fl::wait() +, it will call DispatchMessage for all messages to the other +windows. If necessary you can let the other library take over (as long +as it calls DispatchMessage()), but you will have to arrange +for the function Fl::flush() to be called regularily so that +widgets are updated, timeouts are handled, and the idle functions are +called.
+extern HINSTANCE fl_display; extern HWND fl_window; extern HDC fl_gc; COLORREF fl_RGB(); HPEN fl_pen(); HBRUSH fl_brush(); -- -These global variables are set before draw() is called, or by Fl_Window::make_current(). You can -refer to them when needed to produce GDI calls. Don't attempt to -change them. The functions return GDI objects for the current color -set by fl_color() and are created as needed and cached. A typical -GDI drawing call is written like this: - -
++ + These global variables are set before draw() is called, or by Fl_Window::make_current() +. You can refer to them when needed to produce GDI calls. Don't +attempt to change them. The functions return GDI objects for the +current color set by fl_color() and are created as needed and +cached. A typical GDI drawing call is written like this: +
DrawSomething(fl_gc, ..., fl_brush()); -- -It may also be useful to refer to Fl_Window::current() to get -the window's size or position. - -
-window->icon((char *)LoadIcon(fl_display, MAKEINTRESOURCE(IDI_ICON))); -- -
To always get a console window you simply create a console -application (the "/SUBSYSTEM:CONSOLE" option for the linker). For a -GUI-only application create a WIN32 application (the -"/SUBSYSTEM:WINDOWS" option for the linker). - -
FLTK includes a WinMain() function that calls the ANSI -standard main() entry point for you. This function creates -a console window when you use the debug version of the library. - -
WIN32 applications without a console cannot write to stdout or -stderr, even if they are run from a console window. Any output -is silently thrown away. - -
Fl_Gl_Window::can_do_overlay() returns true until the first -time it attempts to draw an overlay, and then correctly returns whether -or not there is overlay hardware. - -
Cut text contains ^J rather than ^M^J to break lines. This is a -feature, not a bug. - -
SetCapture (used by Fl::grab()) doesn't work, and -the main window title bar turns gray while menus are popped up. - -
FLUID does not support BMP files yet. - - - + + + It may also be useful to refer to +Fl_Window::current() to get the window's size or position. +
+window->icon((char *)LoadIcon(fl_display, MAKEINTRESOURCE(IDI_ICON))); ++ +
To always get a console window you simply create a console +application (the "/SUBSYSTEM:CONSOLE" option for the linker). For a +GUI-only application create a WIN32 application (the +"/SUBSYSTEM:WINDOWS" option for the linker).
+FLTK includes a WinMain() function that calls the ANSI +standard main() entry point for you. This function creates +a console window when you use the debug version of the library.
+WIN32 applications without a console cannot write to stdout + or stderr, even if they are run from a console window. Any +output is silently thrown away.
+Fl_Gl_Window::can_do_overlay() returns true until the first +time it attempts to draw an overlay, and then correctly returns whether +or not there is overlay hardware.
+Cut text contains ^J rather than ^M^J to break lines. This is a +feature, not a bug.
+SetCapture (used by Fl::grab()) doesn't work, and +the main window title bar turns gray while menus are popped up.
+FLUID does not support BMP files yet.
+ \ No newline at end of file diff --git a/documentation/preface.html b/documentation/preface.html index 11df6181d..63781160d 100644 --- a/documentation/preface.html +++ b/documentation/preface.html @@ -1,78 +1,62 @@ - - - - -UNIX is a registered trademark of the X Open Group, Inc. Microsoft and Windows are -registered trademarks of Microsoft Corporation. OpenGL is a registered trademark -of Silicon Graphics, Inc. - - - + FLTK is Copyright 1998-1999 by Bill Spitzak and others. Use and +distribution of FLTK is governed by the GNU Library General Public +License, located in Appendix D. +
UNIX is a registered trademark of the X Open Group, Inc. Microsoft +and Windows are registered trademarks of Microsoft Corporation. OpenGL +is a registered trademark of Silicon Graphics, Inc.
+