From 57cef6a4bde017e205e54271e769de0db596d893 Mon Sep 17 00:00:00 2001
From: Michael R Sweet
Destroys the widget. Destroying single widgets is not very @@ -118,42 +124,64 @@ group immediately after destroying the children. You almost always want to destroy the parent group instead which will destroy all of the child widgets and groups in that group. -
Returns the widget type value, which is used for Forms -compatability and to simulate RTTI. +
Fl_Widget::active() returns whether the widget is +active. Fl_Widget::active_r() returns whether the +widget and all of its parents are active. An inactive widget +does not get any events, but it does get redrawn. A widget is +only active if active() is true on it and all of its +parents. -
Returns 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. +
Changing this value will send FL_ACTIVATE or +FL_DEACTIVATE to the widget if active_r() is true. +
Currently you cannot deactivate Fl_Window widgets.
-Change the size or position of the widget. This is a virtual -function so that the widget may implement its own handling of -resizing. The default version does not call the -redraw() method, but instead relies on the parent -widget to do so because the parent may know a faster way to -update the display, such as scrolling from the old position. +
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).
+Gets or sets the label alignment, which controls how the +label is displayed next to or inside the widget. The default +value is FL_ALIGN_CENTER, which centers the label +inside the widget. The value can be any of these constants +bitwise-OR'd together: -
Gets or sets the current user data (long) argument +that is passed to the callback function. + +
| Note:
+
+ This is implemented by casting the long + value to a void * and may not be portable on + some machines. + + |
+
Returns a pointer to the primary Fl_Window widget. -Returns NULL if no window is associated with this -widget. Note: for an Fl_Window widget, this returns -its parent window (if any), not this window.
Gets or sets the current callback function for the widget. +Each widget has a single callback. + + +
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. + +
Most widgets turn this flag off when they do the callback, and when +the program sets the stored value.
+ + +Hides the widget; you must still redraw the parent to see a
+change in the window. Normally you want to use the Disables keyboard focus navigation with this widget;
+normally, all widgets participate in keyboard focus navigation.
+
+
hide() method instead.
+
+
+void Fl_Window::clear_visible_focus();
+
+Fl_Color Fl_Widget::color() const
@@ -183,15 +250,68 @@ colors. See the description of the selection_color()
method for more information.
-
void Fl_Widget::color(Fl_Color)
void Fl_Widget::color(Fl_Color, Fl_Color)
Gets or sets the selection color, which is defined for Forms -compatibility and is usually used to color the widget when it is -selected, although some widgets use this color for other -purposes. You can set both colors at once with -color(a,b). +
Returns 1 if b is a child of this widget, or is +equal to this widget. Returns 0 if b is NULL. + + +
Non-zero if draw() needs to be +called. The damage value is actually a bit field that the widget +subclass can use to figure out what parts to draw. + + +
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. + + +
Gets or sets the image to use as part of the widget label. +This image is used when drawing the widget in the inactive +state. + + +
Causes a widget to invoke its callback function, optionally +with arbitrary arguments. + + +
Handles the specified event. You normally don't call this +method directly, but instead let FLTK do it when the user +interacts with the widget. + + +
Gets or sets the image to use as part of the widget label. +This image is used when drawing the widget in the active state. + + +
Returns 1 if this widget is a child of a, or is +equal to a. Returns 0 if a is NULL. +
Gets or sets the labeltype which -identifies the function that draws the label of the widget. This -is generally used for special effects such as embossing or for -using the label() pointer as another form of data such -as an icon. The value FL_NORMAL_LABEL prints the label -as plain text. - -
Gets or sets the label alignment, which controls how the -label is displayed next to or inside the widget. The default -value is FL_ALIGN_CENTER, which centers the label -inside the widget. The value can be any of these constants -bitwise-OR'd together: - -
Gets or sets the label color. The default color is FL_BLACK. +
Gets or sets the font size in pixels. The default size is 14 pixels. -
Gets or sets the current callback function for the widget. -Each widget has a single callback. +
Gets or sets the labeltype which +identifies the function that draws the label of the widget. This +is generally used for special effects such as embossing or for +using the label() pointer as another form of data such +as an icon. The value FL_NORMAL_LABEL prints the label +as plain text. -
Gets or sets the current user data (void *) argument -that is passed to the callback function. -
Gets or sets the current user data (long) argument -that is passed to the callback function. +
output() means the same as !active() except +it does not change how the widget is drawn. The widget will not +receive any events. This is useful for making scrollbars or +buttons that work as displays rather than input devices. -
| Note:
- This is implemented by casting the long - value to a void * and may not be portable on - some machines. + Fl_Group *Fl_Widget::parent() const- |
-
Returns a pointer to the parent widget. Usually this is a Fl_Group or Fl_Window. Returns +NULL if the widget has no parent. -
Causes a widget to invoke its callback function, optionally -with arbitrary arguments. +
Marks the widget as needing its draw() routine called. -
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. -
Most widgets turn this flag off when they do the callback, and when -the program sets the stored value.
+Change the size or position of the widget. This is a virtual +function so that the widget may implement its own handling of +resizing. The default version does not call the +redraw() method, but instead relies on the parent +widget to do so because the parent may know a faster way to +update the display, such as scrolling from the old position. -
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. +
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).
-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. +
Gets or sets the selection color, which is defined for Forms +compatibility and is usually used to color the widget when it is +selected, although some widgets use this color for other +purposes. You can set both colors at once with +color(a,b). -
An invisible widget never gets redrawn and does not get -events. The visible() method returns true if the -widget is set to be visible.The visible_r() method -returns true if the widget and all of its parents are visible. A -widget is only visible if visible() is true on it -and all of its 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. +
This is the same as (active() && !output() +&& visible()) but is faster. -
Fl_Widget::active() returns whether the widget is -active. Fl_Widget::active_r() returns whether the -widget and all of its parents are active. An inactive widget -does not get any events, but it does get redrawn. A widget is -only active if active() is true on it and all of its -parents. -
Changing this value will send FL_ACTIVATE or -FL_DEACTIVATE to the widget if active_r() is true. -
Currently you cannot deactivate Fl_Window widgets.
+output() means the same as !active() except -it does not change how the widget is drawn. The widget will not -receive any events. This is useful for making scrollbars or -buttons that work as displays rather than input devices. +
Gets or sets a string of text to display in a popup tooltip +window when the user hovers the mouse over the widget. The +string is not copied, so make sure any formatted string +is stored in a static, global, or allocated buffer. -
This is the same as (active() && !output() -&& visible()) but is faster. -
Marks the widget as needing its draw() routine called. +
Returns the widget type value, which is used for Forms +compatability and to simulate RTTI. -
Non-zero if draw() needs to be -called. The damage value is actually a bit field that the widget -subclass can use to figure out what parts to draw. +
Returns 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. -
Returns a pointer to the parent widget. Usually this is a Fl_Group or Fl_Window. Returns -NULL if the widget has no parent. +
Gets or sets the current user data (void *) argument +that is passed to the callback function. -
Returns 1 if b is a child of this widget, or is -equal to this widget. Returns 0 if b is NULL. -
Returns 1 if this widget is a child of a, or is -equal to a. Returns 0 if a is NULL. +
Returns a pointer to the primary Fl_Window widget. +Returns NULL if no window is associated with this +widget. Note: for an Fl_Window widget, this returns +its parent window (if any), not this window. -
Gets or sets the image to use as part of the widget label. -This image is used when drawing the widget in the inactive -state. +
Makes the widget visible; you must still redraw the parent
+widget to see a change in the window. Normally you want to use
+the Gets or sets the image to use as part of the widget label.
-This image is used when drawing the widget in the active state.
+ Enables keyboard focus navigation with this widget; note,
+however, that this will not necessarily mean that the widget
+will accept focus, but for widgets that can accept focus, this
+method enables it if it has been disabled.
- Gets or sets a string of text to display in a popup tooltip
-window when the user hovers the mouse over the widget. The
-string is not copied, so make sure any formatted string
-is stored in a static, global, or allocated buffer.
- An invisible widget never gets redrawn and does not get
+events. The visible() method returns true if the
+widget is set to be visible.The visible_r() method
+returns true if the widget and all of its parents are visible. A
+widget is only visible if visible() is true on it
+and all of its 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.
+
+ Returns non-zero if this widget will participate in keyboard
+focus navigation.
+
+
+ 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.
- Handles the specified event. You normally don't call this
-method directly, but instead let FLTK do it when the user
-interacts with the widget.
show() method
+instead.
-Fl_Image* Fl_Widget::image()
-
-void Fl_Widget::image(Fl_Image* a)
-void Fl_Widget::image(Fl_Image& a)void Fl_Window::set_visible_focus();
-const char *Fl_Widget::tooltip()
+
-void Fl_Widget::tooltip(const char *t)virtual int Fl_Widget::handle(int event)
+int Fl_Widget::visible() const
+
+
+int Fl_Widget::visible_r() const
+void Fl_Widget::show()
+void Fl_Widget::hide()void Fl_Window::visible_focus();
+
+Fl_When Fl_Widget::when() const
+
+
+
void Fl_Widget::when(Fl_When)