|
fltk 1.3.0rc3
About: FLTK (Fast Light Tool Kit) is a cross-platform C++ GUI toolkit for UNIX/Linux (X11), Microsoft Windows, and MacOS X. Release candidate.
SfR Fresh Dox: fltk-1.3.0rc3-source.tar.gz ("inofficial" and yet experimental doxygen-generated source code documentation) ![]() |
#include <Fl_Widget.H>


Public Member Functions | |
| virtual | ~Fl_Widget () |
| virtual void | draw ()=0 |
| virtual int | handle (int event) |
| Fl_Group * | parent () const |
| void | parent (Fl_Group *p) |
| uchar | type () const |
| void | type (uchar t) |
| int | x () const |
| int | y () const |
| int | w () const |
| int | h () const |
| virtual void | resize (int x, int y, int w, int h) |
| int | damage_resize (int, int, int, int) |
| void | position (int X, int Y) |
| void | size (int W, int H) |
| Fl_Align | align () const |
| void | align (Fl_Align alignment) |
| Fl_Boxtype | box () const |
| void | box (Fl_Boxtype new_box) |
| Fl_Color | color () const |
| void | color (Fl_Color bg) |
| Fl_Color | selection_color () const |
| void | selection_color (Fl_Color a) |
| void | color (Fl_Color bg, Fl_Color sel) |
| const char * | label () const |
| void | label (const char *text) |
| void | copy_label (const char *new_label) |
| void | label (Fl_Labeltype a, const char *b) |
| Fl_Labeltype | labeltype () const |
| void | labeltype (Fl_Labeltype a) |
| Fl_Color | labelcolor () const |
| void | labelcolor (Fl_Color c) |
| Fl_Font | labelfont () const |
| void | labelfont (Fl_Font f) |
| Fl_Fontsize | labelsize () const |
| void | labelsize (Fl_Fontsize pix) |
| Fl_Image * | image () |
| const Fl_Image * | image () const |
| void | image (Fl_Image *img) |
| void | image (Fl_Image &img) |
| Fl_Image * | deimage () |
| const Fl_Image * | deimage () const |
| void | deimage (Fl_Image *img) |
| void | deimage (Fl_Image &img) |
| const char * | tooltip () const |
| void | tooltip (const char *text) |
| void | copy_tooltip (const char *text) |
| Fl_Callback_p | callback () const |
| void | callback (Fl_Callback *cb, void *p) |
| void | callback (Fl_Callback *cb) |
| void | callback (Fl_Callback0 *cb) |
| void | callback (Fl_Callback1 *cb, long p=0) |
| void * | user_data () const |
| void | user_data (void *v) |
| long | argument () const |
| void | argument (long v) |
| Fl_When | when () const |
| void | when (uchar i) |
| unsigned int | visible () const |
| int | visible_r () const |
| virtual void | show () |
| virtual void | hide () |
| void | set_visible () |
| void | clear_visible () |
| unsigned int | active () const |
| int | active_r () const |
| void | activate () |
| void | deactivate () |
| unsigned int | output () const |
| void | set_output () |
| void | clear_output () |
| unsigned int | takesevents () const |
| unsigned int | changed () const |
| void | set_changed () |
| void | clear_changed () |
| int | take_focus () |
| void | set_visible_focus () |
| void | clear_visible_focus () |
| void | visible_focus (int v) |
| unsigned int | visible_focus () |
| void | do_callback () |
| void | do_callback (Fl_Widget *o, long arg) |
| void | do_callback (Fl_Widget *o, void *arg=0) |
| int | test_shortcut () |
| int | contains (const Fl_Widget *w) const |
| int | inside (const Fl_Widget *w) const |
| void | redraw () |
| void | redraw_label () |
| uchar | damage () const |
| void | clear_damage (uchar c=0) |
| void | damage (uchar c) |
| void | damage (uchar c, int x, int y, int w, int h) |
| void | draw_label (int, int, int, int, Fl_Align) const |
| void | measure_label (int &ww, int &hh) const |
| Fl_Window * | window () const |
| virtual Fl_Group * | as_group () |
| virtual Fl_Window * | as_window () |
| virtual class Fl_Gl_Window * | as_gl_window () |
| Fl_Color | color2 () const |
| void | color2 (unsigned a) |
Static Public Member Functions | |
| static void | default_callback (Fl_Widget *cb, void *d) |
| static unsigned int | label_shortcut (const char *t) |
| static int | test_shortcut (const char *, const bool require_alt=false) |
Protected Types | |
| enum | { INACTIVE = 1<<0, INVISIBLE = 1<<1, OUTPUT = 1<<2, NOBORDER = 1<<3, FORCE_POSITION = 1<<4, NON_MODAL = 1<<5, SHORTCUT_LABEL = 1<<6, CHANGED = 1<<7, OVERRIDE = 1<<8, VISIBLE_FOCUS = 1<<9, COPIED_LABEL = 1<<10, CLIP_CHILDREN = 1<<11, MENU_WINDOW = 1<<12, TOOLTIP_WINDOW = 1<<13, MODAL = 1<<14, NO_OVERLAY = 1<<15, GROUP_RELATIVE = 1<<16, COPIED_TOOLTIP = 1<<17, USERFLAG3 = 1<<29, USERFLAG2 = 1<<30, USERFLAG1 = 1<<31 } |
Protected Member Functions | |
| Fl_Widget (int x, int y, int w, int h, const char *label=0L) | |
| void | x (int v) |
| void | y (int v) |
| void | w (int v) |
| void | h (int v) |
| unsigned int | flags () const |
| void | set_flag (unsigned int c) |
| void | clear_flag (unsigned int c) |
| void | draw_box () const |
| void | draw_box (Fl_Boxtype t, Fl_Color c) const |
| void | draw_box (Fl_Boxtype t, int x, int y, int w, int h, Fl_Color c) const |
| void | draw_backdrop () const |
| void | draw_focus () |
| void | draw_focus (Fl_Boxtype t, int x, int y, int w, int h) const |
| void | draw_label () const |
| void | draw_label (int, int, int, int) const |
Friends | |
| class | Fl_Group |
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.
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.
Definition at line 109 of file Fl_Widget.H.
anonymous enum [protected] |
flags possible values enumeration. See activate(), output(), visible(), changed(), set_visible_focus()
| INACTIVE |
the widget can't receive focus, and is disabled but potentially visible |
| INVISIBLE |
the widget is not drawn but can receive events |
| OUTPUT |
for output only |
| NOBORDER |
don't draw a decoration (Fl_Window) |
| FORCE_POSITION |
don't let the window manager position the window (Fl_Window) |
| NON_MODAL |
thisis a hovering toolbar window (Fl_Window) |
| SHORTCUT_LABEL |
the label contains a shortcut we need to draw |
| CHANGED |
the widget value changed |
| OVERRIDE |
position window on top (Fl_Window) |
| VISIBLE_FOCUS |
accepts keyboard focus navigation if the widget can have the focus |
| COPIED_LABEL |
the widget label is internally copied, its destruction is handled by the widget |
| CLIP_CHILDREN |
all drawing within this widget will be clipped (Fl_Group) |
| MENU_WINDOW |
a temporary popup window, dismissed by clicking outside (Fl_Window) |
| TOOLTIP_WINDOW |
a temporary popup, transparent to events, and dismissed easily (Fl_Window) |
| MODAL |
a window blocking input to all other winows (Fl_Window) |
| NO_OVERLAY |
window not using a hardware overlay plane (Fl_Menu_Window) |
| GROUP_RELATIVE |
position this idget relative to the parent group, not to the window |
| COPIED_TOOLTIP |
the widget tooltip is internally copied, its destruction is handled by the widget |
| USERFLAG3 |
reserved for 3rd party extensions |
| USERFLAG2 |
reserved for 3rd party extensions |
| USERFLAG1 |
reserved for 3rd party extensions |
Definition at line 163 of file Fl_Widget.H.
| Fl_Widget::Fl_Widget | ( | int | x, |
| int | y, | ||
| int | w, | ||
| int | h, | ||
| const char * | label = 0L |
||
| ) | [protected] |
Creates a widget at the given position and size.
The Fl_Widget is a protected constructor, but all derived widgets have a matching public constructor. It takes a value for x(), y(), w(), h(), and an optional value for label().
| [in] | x,y | the position of the widget relative to the enclosing window |
| [in] | w,h | size of the widget in pixels |
| [in] | label | optional text for the widget label |
Definition at line 113 of file Fl_Widget.cxx.
References Fl_Group::add(), Fl_Label::align_, Fl_Label::color, Fl_Group::current(), default_callback(), Fl_Label::deimage, FL_ALIGN_CENTER, FL_FOREGROUND_COLOR, FL_GRAY, FL_HELVETICA, FL_NO_BOX, FL_NORMAL_LABEL, FL_NORMAL_SIZE, FL_WHEN_RELEASE, Fl_Label::font, H, Fl_Label::image, Fl_Label::size, Fl_Label::type, Fl_Label::value, and VISIBLE_FOCUS.
| Fl_Widget::~Fl_Widget | ( | ) | [virtual] |
Destroys the widget. Destroying single widgets is not very common. You almost always want to destroy the parent group instead, which will destroy all of the child widgets and groups in that group.
Destroys the widget, taking care of throwing focus before if any. Destruction removes the widget from any parent group! And groups when destroyed destroy all their children. This is convenient and fast.
Definition at line 168 of file Fl_Widget.cxx.
References Fl::clear_widget_pointer(), COPIED_LABEL, COPIED_TOOLTIP, default_callback(), fl_throw_focus(), flags(), Fl_Group::remove(), and Fl_Label::value.
| void Fl_Widget::activate | ( | ) |
Activates the widget. Changing this value will send FL_ACTIVATE to the widget if active_r() is true.
Definition at line 231 of file Fl_Widget.cxx.
References active(), active_r(), clear_flag(), FL_ACTIVATE, Fl::focus(), handle(), INACTIVE, inside(), redraw(), redraw_label(), and take_focus().
Referenced by active_cb(), align_cb(), align_position_cb(), align_text_image_cb(), box_cb(), color2_cb(), color_cb(), do_shell_command(), down_box_cb(), fl_activate_form(), fl_activate_object(), h_cb(), hotspot_cb(), image_browse_cb(), image_cb(), inactive_browse_cb(), inactive_cb(), max_cb(), min_cb(), print_cb(), print_menu_cb(), Fl_File_Chooser::rescan(), Fl_File_Chooser::rescan_keep_filename(), resizable_cb(), slider_size_cb(), step_cb(), subclass_cb(), subtype_cb(), textcolor_cb(), textfont_cb(), Fl_Help_Dialog::textsize(), textsize_cb(), tooltip_cb(), Fl_File_Chooser::type(), Fl_File_Chooser::value(), value_cb(), visible_cb(), w_cb(), when_button_cb(), when_cb(), x_cb(), and y_cb().
| unsigned int Fl_Widget::active | ( | ) | const [inline] |
Returns whether the widget is active.
| 0 | if the widget is inactive |
Definition at line 699 of file Fl_Widget.H.
References INACTIVE.
Referenced by activate(), active_cb(), active_r(), Fl_Widget_Type::copy_properties(), Fl_Menu_Item_Type::flags(), Fl_Tile::handle(), Fl_Repeat_Button::handle(), Fl_Group::handle(), Fl_Widget_Type::write_properties(), and Fl_Widget_Type::write_widget_code().
| int Fl_Widget::active_r | ( | ) | const |
Returns whether the widget and all of its parents are active.
| 0 | if this or any of the parent widgets are inactive |
Definition at line 255 of file Fl_Widget.cxx.
References active(), and parent().
Referenced by activate(), deactivate(), Fl_Value_Slider::draw(), Fl_Value_Output::draw(), Fl_Scrollbar::draw(), Fl_Roller::draw(), Fl_Progress::draw(), Fl_Menu_Button::draw(), Fl_Light_Button::draw(), Fl_Dial::draw(), Fl_Counter::draw(), Fl_Clock_Output::draw(), Fl_Choice::draw(), Fl_Browser_::draw(), Fl_Adjuster::draw(), draw_backdrop(), draw_box(), draw_label(), Fl_Input_::drawtext(), Fl_Text_Editor::handle(), Fl_Text_Display::handle(), Fl_Input::handle(), Fl_File_Input::handle(), Fl_Input_::handletext(), Fl_Browser::item_draw(), and takesevents().
| Fl_Align Fl_Widget::align | ( | ) | const [inline] |
Gets the label alignment.
Definition at line 344 of file Fl_Widget.H.
Referenced by align_cb(), align_position_cb(), align_text_image_cb(), Fl_Scroll::bbox(), Fl_Browser_::bbox(), Fl_Widget_Type::copy_properties(), Fl_Scroll_Type::copy_properties(), Fl_Browser_::draw(), draw_backdrop(), draw_label(), Fl_Group::draw_outside_label(), Fl_Window_Type::draw_overlay(), Fl_Browser_::Fl_Browser_(), Fl_Chart::Fl_Chart(), Fl_Choice::Fl_Choice(), Fl_Clock_Output::Fl_Clock_Output(), Fl_Counter::Fl_Counter(), Fl_File_Chooser::Fl_File_Chooser(), Fl_FormsBitmap::Fl_FormsBitmap(), Fl_FormsPixmap::Fl_FormsPixmap(), Fl_Group::Fl_Group(), Fl_Input_::Fl_Input_(), Fl_Input_Choice::Fl_Input_Choice(), Fl_Light_Button::Fl_Light_Button(), Fl_Positioner::Fl_Positioner(), Fl_Progress::Fl_Progress(), fl_set_object_lalign(), Fl_Spinner::Fl_Spinner(), Fl_Timer::Fl_Timer(), Fl_Valuator::Fl_Valuator(), Fl_Value_Input::Fl_Value_Input(), Fl_Value_Output::Fl_Value_Output(), make_about_panel(), make_class_panel(), make_code_panel(), make_codeblock_panel(), make_comment_panel(), make_data_panel(), make_decl_panel(), make_declblock_panel(), make_function_panel(), make_global_settings_window(), make_layout_window(), make_print_panel(), make_project_window(), make_settings_window(), make_shell_window(), make_sourceview(), make_template_panel(), make_widget_panel(), make_widgetbin(), Fl_Widget_Type::read_fdesign(), Fl_Widget_Type::read_property(), redraw_label(), Fl::reload_scheme(), Fl_File_Chooser::rescan_keep_filename(), Fl_Scroll::resize(), Fl_Browser_::resize(), Fl_Browser_::scrollbar_left(), Fl_Browser_::scrollbar_right(), Fl_Window::show(), Fl_Widget_Type::write_properties(), and Fl_Widget_Type::write_widget_code().
| void Fl_Widget::align | ( | Fl_Align | alignment | ) | [inline] |
Sets the label alignment. This controls how the label is displayed next to or inside the widget. The default value is FL_ALIGN_CENTER, which centers the label inside the widget.
| [in] | alignment | new label alignment |
Definition at line 353 of file Fl_Widget.H.
| long Fl_Widget::argument | ( | ) | const [inline] |
Gets the current user data (long) argument that is passed to the callback function.
Definition at line 599 of file Fl_Widget.H.
Referenced by align_cb().
| void Fl_Widget::argument | ( | long | v | ) | [inline] |
Sets the current user data (long) argument that is passed to the callback function.
Definition at line 605 of file Fl_Widget.H.
| virtual class Fl_Gl_Window* Fl_Widget::as_gl_window | ( | ) | [inline, virtual] |
Returns an Fl_Gl_Window pointer if this widget is an Fl_Gl_Window.
Use this method if you have a widget (pointer) and need to know whether this widget is derived from Fl_Gl_Window. If it returns non-NULL, then the widget in question is derived from Fl_Gl_Window.
| NULL | if this widget is not derived from Fl_Gl_Window. |
Reimplemented in Fl_Gl_Window.
Definition at line 981 of file Fl_Widget.H.
Referenced by Fl_Gl_Device_Plugin::print(), and Fl_Paged_Device::print_widget().
| virtual Fl_Group* Fl_Widget::as_group | ( | ) | [inline, virtual] |
Returns an Fl_Group pointer if this widget is an Fl_Group.
Use this method if you have a widget (pointer) and need to know whether this widget is derived from Fl_Group. If it returns non-NULL, then the widget in question is derived from Fl_Group, and you can use the returned pointer to access its children or other Fl_Group-specific methods.
Example:
void my_callback (Fl_Widget *w, void *) { Fl_Group *g = w->as_group(); if (g) printf ("This group has %d children\n",g->children()); else printf ("This widget is not a group!\n"); }
| NULL | if this widget is not derived from Fl_Group. |
Reimplemented in Fl_Group.
Definition at line 955 of file Fl_Widget.H.
| virtual Fl_Window* Fl_Widget::as_window | ( | ) | [inline, virtual] |
Returns an Fl_Window pointer if this widget is an Fl_Window.
Use this method if you have a widget (pointer) and need to know whether this widget is derived from Fl_Window. If it returns non-NULL, then the widget in question is derived from Fl_Window, and you can use the returned pointer to access its children or other Fl_Window-specific methods.
| NULL | if this widget is not derived from Fl_Window. |
Reimplemented in Fl_Window.
Definition at line 969 of file Fl_Widget.H.
Referenced by Fl_Group::draw_outside_label(), and Fl_Paged_Device::print_widget().
| Fl_Boxtype Fl_Widget::box | ( | ) | const [inline] |
Gets the box type of the widget.
Definition at line 359 of file Fl_Widget.H.
Referenced by menuwindow::autoscroll(), Fl_Scroll::bbox(), Fl_Browser_::bbox(), box_cb(), ColorChip::ColorChip(), Fl_Widget_Type::copy_properties(), Fl_Timer::draw(), Fl_FormsPixmap::draw(), Fl_FormsBitmap::draw(), Fl_Window::draw(), Fl_Value_Slider::draw(), Fl_Value_Output::draw(), Fl_Value_Input::draw(), Fl_Tree::draw(), Fl_Text_Display::draw(), Fl_Tabs::draw(), Fl_Table::draw(), Fl_Slider::draw(), Fl_Scrollbar::draw(), Fl_Scroll::draw(), Fl_Roller::draw(), Fl_Return_Button::draw(), Fl_Progress::draw(), Fl_Positioner::draw(), Fl_Pack::draw(), Fl_Menu_Button::draw(), Fl_Menu_Bar::draw(), Fl_Menu_Item::draw(), Fl_Light_Button::draw(), Fl_Input::draw(), Fl_File_Input::draw(), Fl_Dial::draw(), Fl_Counter::draw(), Flcc_ValueBox::draw(), Flcc_HueBox::draw(), Fl_Clock_Output::draw(), Fl_Choice::draw(), Fl_Chart::draw(), Fl_Button::draw(), Fl_Browser_::draw(), Fl_Adjuster::draw(), Fl_Group::draw_children(), draw_focus(), draw_label(), Fl_Input_::drawtext(), menuwindow::find_selected(), Fl_Adjuster::Fl_Adjuster(), fl_bgn_form(), Fl_Box::Fl_Box(), Fl_Browser_::Fl_Browser_(), Fl_Button::Fl_Button(), Fl_Chart::Fl_Chart(), Fl_Check_Button::Fl_Check_Button(), Fl_Choice::Fl_Choice(), Fl_Clock::Fl_Clock(), Fl_Clock_Output::Fl_Clock_Output(), Fl_Color_Chooser::Fl_Color_Chooser(), Fl_Counter::Fl_Counter(), Fl_Dial::Fl_Dial(), Fl_File_Chooser::Fl_File_Chooser(), Fl_FormsBitmap::Fl_FormsBitmap(), Fl_FormsPixmap::Fl_FormsPixmap(), Fl_Help_Dialog::Fl_Help_Dialog(), Fl_Hor_Nice_Slider::Fl_Hor_Nice_Slider(), Fl_Input_::Fl_Input_(), Fl_Input_Choice::Fl_Input_Choice(), Fl_Menu_::Fl_Menu_(), Fl_Nice_Slider::Fl_Nice_Slider(), Fl_Positioner::Fl_Positioner(), Fl_Progress::Fl_Progress(), Fl_Roller::Fl_Roller(), Fl_Round_Button::Fl_Round_Button(), Fl_Round_Clock::Fl_Round_Clock(), Fl_Scrollbar::Fl_Scrollbar(), fl_set_object_boxtype(), Fl_Slider::Fl_Slider(), Fl_Table::Fl_Table(), Fl_Tabs::Fl_Tabs(), Fl_Text_Display::Fl_Text_Display(), Fl_Timer::Fl_Timer(), Fl_Tree::Fl_Tree(), Fl_Value_Input::Fl_Value_Input(), Fl_Value_Output::Fl_Value_Output(), Fl_Wizard::Fl_Wizard(), Fl_Value_Slider::handle(), Fl_Slider::handle(), Fl_Menu_Button::handle(), Fl_Light_Button::handle(), Fl_Input::handle(), Flcc_ValueBox::handle(), Flcc_HueBox::handle(), Fl_Button::handle(), Flcc_ValueBox::handle_key(), Flcc_HueBox::handle_key(), Fl_Widget_Type::ideal_size(), Fl_Menu_Bar_Type::ideal_size(), Fl_Input_Choice_Type::ideal_size(), Fl_Choice_Type::ideal_size(), Fl_Value_Output_Type::ideal_size(), Fl_Value_Input_Type::ideal_size(), Fl_Output_Type::ideal_size(), Fl_Help_View_Type::ideal_size(), Fl_Text_Editor_Type::ideal_size(), Fl_Text_Display_Type::ideal_size(), Fl_File_Input_Type::ideal_size(), Fl_Input_Type::ideal_size(), Fl_Spinner_Type::ideal_size(), Fl_File_Browser_Type::ideal_size(), Fl_Check_Browser_Type::ideal_size(), Fl_Browser_Type::ideal_size(), live_mode_cb(), make_class_panel(), make_code_panel(), make_comment_panel(), make_data_panel(), make_decl_panel(), make_function_panel(), make_global_settings_window(), make_layout_window(), make_main_window(), make_print_panel(), make_project_window(), make_shell_window(), make_sourceview(), make_template_panel(), make_widget_panel(), make_widgetbin(), menuwindow::menuwindow(), Fl_Menu_Button::popup(), Fl_Window_Type::read_fdesign(), Fl_Widget_Type::read_fdesign(), Fl_Widget_Type::read_property(), Fl_Table::recalc_dimensions(), redraw_label(), Fl_Tabs::redraw_tabs(), Fl_Text_Display::resize(), Fl_Help_View::resize(), Fl_Button::value(), Fl_Widget_Type::write_properties(), and Fl_Widget_Type::write_widget_code().
| void Fl_Widget::box | ( | Fl_Boxtype | new_box | ) | [inline] |
Sets the box type for the widget. This identifies a routine that draws the background of the widget. See Fl_Boxtype for the available types. The default depends on the widget, but is usually FL_NO_BOX or FL_UP_BOX.
| [in] | new_box | the new box type |
Definition at line 368 of file Fl_Widget.H.
| void Fl_Widget::callback | ( | Fl_Callback0 * | cb | ) | [inline] |
Sets the current callback function for the widget. Each widget has a single callback.
| [in] | cb | new callback |
Definition at line 576 of file Fl_Widget.H.
| void Fl_Widget::callback | ( | Fl_Callback1 * | cb, |
| long | p = 0 |
||
| ) | [inline] |
Sets the current callback function for the widget. Each widget has a single callback.
| [in] | cb | new callback |
| [in] | p | user data |
Definition at line 583 of file Fl_Widget.H.
| void Fl_Widget::callback | ( | Fl_Callback * | cb | ) | [inline] |
Sets the current callback function for the widget. Each widget has a single callback.
| [in] | cb | new callback |
Definition at line 570 of file Fl_Widget.H.
| Fl_Callback_p Fl_Widget::callback | ( | ) | const [inline] |
Gets the current callback function for the widget. Each widget has a single callback.
Definition at line 557 of file Fl_Widget.H.
Referenced by callback_cb(), Fl_Table::col_width(), Fl_Browser_::Fl_Browser_(), Fl_Color_Chooser::fl_color_chooser(), Fl_Color_Chooser::Fl_Color_Chooser(), Fl_File_Chooser::Fl_File_Chooser(), Fl_Help_Dialog::Fl_Help_Dialog(), Fl_Help_View::Fl_Help_View(), Fl_Native_File_Chooser::Fl_Native_File_Chooser(), Fl_Scroll::Fl_Scroll(), fl_set_form_callback(), fl_set_object_callback(), Fl_Table::Fl_Table(), Fl_Text_Display::Fl_Text_Display(), Fl_Tree::Fl_Tree(), Fl_Value_Input::Fl_Value_Input(), Fl_Table::handle(), live_mode_cb(), main(), make_about_panel(), make_global_settings_window(), make_layout_window(), make_print_panel(), make_project_window(), make_settings_window(), make_shell_window(), make_sourceview(), make_template_panel(), make_widget_panel(), make_widgetbin(), Fl_Table::row_height(), and toggle_sourceview_cb().
| void Fl_Widget::callback | ( | Fl_Callback * | cb, |
| void * | p | ||
| ) | [inline] |
Sets the current callback function for the widget. Each widget has a single callback.
| [in] | cb | new callback |
| [in] | p | user data |
Definition at line 564 of file Fl_Widget.H.
| unsigned int Fl_Widget::changed | ( | ) | const [inline] |
Checks if the widget value changed since the last callback.
"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.
| 0 | if the value did not change |
Reimplemented in Fl_Input_Choice.
Definition at line 774 of file Fl_Widget.H.
References CHANGED.
Referenced by Fl_Input_Choice::changed(), Fl_Positioner::handle(), Shortcut_Button::handle(), Fl_Text_Editor::maybe_do_callback(), Fl_Input_::maybe_do_callback(), Fl_Menu_::picked(), Fl_Table_Row::select_all_rows(), Fl_Tree::select_only(), and set_cb().
| void Fl_Widget::clear_changed | ( | ) | [inline] |
Marks the value of the widget as unchanged.
Reimplemented in Fl_Input_Choice.
Definition at line 784 of file Fl_Widget.H.
References CHANGED.
Referenced by Fl_Input_Choice::clear_changed(), do_callback(), Fl_Positioner::handle(), Fl_Button::handle(), Fl_Valuator::handle_release(), set_cb(), Fl_Input_::static_value(), Fl_Valuator::value(), Fl_Positioner::value(), Fl_Menu_::value(), and Fl_Button::value().
| void Fl_Widget::clear_damage | ( | uchar | c = 0 | ) | [inline] |
Clears or sets the damage flags. Damage flags are cleared when parts of the widget drawing is repaired.
The optional argument c specifies the bits that are set after the call (default: 0) and not the bits that are cleared!
| [in] | c | new bitmask of damage flags (default: 0) |
Definition at line 901 of file Fl_Widget.H.
Referenced by Fl_Value_Input::draw(), Fl_Pack::draw(), Fl_Browser_::draw(), Fl_Group::draw_child(), Fl_Overlay_Window::flush(), Fl_Double_Window::flush(), Fl::flush(), Fl_Overlay_Window::redraw_overlay(), and Fl_Group::update_child().
| void Fl_Widget::clear_flag | ( | unsigned int | c | ) | [inline, protected] |
Clears a flag in the flags mask
Definition at line 159 of file Fl_Widget.H.
Referenced by activate(), Fl_Window::border(), Fl_Group::clip_children(), Fl_Window::copy_label(), copy_label(), copy_tooltip(), Fl_Window::force_position(), Fl_Window::free_position(), label(), Fl_Window::set_tooltip_window(), show(), and tooltip().
| void Fl_Widget::clear_output | ( | ) | [inline] |
Sets a widget to accept input.
Definition at line 748 of file Fl_Widget.H.
References OUTPUT.
| void Fl_Widget::clear_visible | ( | ) | [inline] |
Hides the widget. You must still redraw the parent to see a change in the window. Normally you want to use the hide() method instead.
Definition at line 693 of file Fl_Widget.H.
References INVISIBLE.
Referenced by Fl_Scroll::draw(), Fl_Browser_::draw(), Fl_Timer::Fl_Timer(), Fl_Window::Fl_Window(), Fl_Window::hide(), and Fl_Text_Display::resize().
| void Fl_Widget::clear_visible_focus | ( | ) | [inline] |
Disables keyboard focus navigation with this widget. Normally, all widgets participate in keyboard focus navigation.
Definition at line 807 of file Fl_Widget.H.
References VISIBLE_FOCUS.
Referenced by visible_focus().
| Fl_Color Fl_Widget::color | ( | ) | const [inline] |
Gets the background color of the widget.
Definition at line 374 of file Fl_Widget.H.
Referenced by Fl_Text_Display::clear_rect(), Fl_File_Chooser::color(), color2_cb(), color_cb(), Fl_Widget_Type::copy_properties(), Fl_Timer::draw(), Fl_FormsPixmap::draw(), Fl_FormsBitmap::draw(), Fl_Window::draw(), Fl_Value_Slider::draw(), Fl_Value_Output::draw(), Fl_Value_Input::draw(), Fl_Tree_Item::draw(), Fl_Text_Display::draw(), Fl_Tabs::draw(), Fl_Table::draw(), Fl_Scroll::draw(), Fl_Roller::draw(), Fl_Return_Button::draw(), Fl_Progress::draw(), Fl_Positioner::draw(), Fl_Pack::draw(), Fl_Menu_Button::draw(), Fl_Menu_Item::draw(), Fl_Light_Button::draw(), Fl_Input::draw(), Fl_File_Input::draw(), Fl_Dial::draw(), Fl_Counter::draw(), Fl_Clock_Output::draw(), Fl_Choice::draw(), Fl_Button::draw(), Fl_Browser_::draw(), Fl_Adjuster::draw(), draw_focus(), Fl_Text_Display::draw_string(), Fl_Input_::drawtext(), Fl_Browser_::Fl_Browser_(), Fl_FormsBitmap::Fl_FormsBitmap(), Fl_FormsPixmap::Fl_FormsPixmap(), Fl_Help_Dialog::Fl_Help_Dialog(), Fl_Help_View::Fl_Help_View(), Fl_Input_::Fl_Input_(), Fl_Progress::Fl_Progress(), Fl_Scrollbar::Fl_Scrollbar(), fl_set_object_color(), Fl_Table::Fl_Table(), Fl_Text_Display::Fl_Text_Display(), Fl_Tree::Fl_Tree(), Fl_Value_Input::Fl_Value_Input(), Fl_Choice::handle(), labelcolor_cb(), live_mode_cb(), make_about_panel(), make_code_panel(), make_comment_panel(), make_global_settings_window(), make_print_panel(), make_sourceview(), make_widget_panel(), menuwindow::menuwindow(), Fl_Widget_Type::read_fdesign(), Fl_Widget_Type::read_property(), textcolor_cb(), Fl_Widget_Type::write_properties(), and Fl_Widget_Type::write_widget_code().
| void Fl_Widget::color | ( | Fl_Color | bg | ) | [inline] |
Sets the background color of the widget. The color is passed to the box routine. The color is either an index into an internal table of RGB colors or an RGB color value generated using fl_rgb_color().
The default for most widgets is FL_BACKGROUND_COLOR. Use Fl::set_color() to redefine colors in the color map.
| [in] | bg | background color |
Definition at line 386 of file Fl_Widget.H.
Sets the background and selection color of the widget.
The two color form sets both the background and selection colors.
| [in] | bg | background color |
| [in] | sel | selection color |
Definition at line 411 of file Fl_Widget.H.
| Fl_Color Fl_Widget::color2 | ( | ) | const [inline] |
For back compatibility only.
Definition at line 986 of file Fl_Widget.H.
| void Fl_Widget::color2 | ( | unsigned | a | ) | [inline] |
For back compatibility only.
Definition at line 991 of file Fl_Widget.H.
| int Fl_Widget::contains | ( | const Fl_Widget * | w | ) | const |
Checks if w is a child of this widget.
| [in] | w | potential child widget |
w is a child of this widget, or is equal to this widget. Returns 0 if w is NULL. Definition at line 293 of file Fl_Widget.cxx.
Referenced by Fl::belowmouse(), Fl_Group::clear(), fl_fix_focus(), fl_throw_focus(), Fl_Table::handle(), Fl_Group::handle(), inside(), and take_focus().
| void Fl_Widget::copy_label | ( | const char * | new_label | ) |
Sets the current label. Unlike label(), this method allocates a copy of the label string instead of using the original string pointer.
The internal copy will automatically be freed whenever you assign a new label or when the widget is destroyed.
| [in] | new_label | the new label text |
Reimplemented in Fl_Window.
Definition at line 314 of file Fl_Widget.cxx.
References clear_flag(), COPIED_LABEL, flags(), redraw_label(), set_flag(), and Fl_Label::value.
| void Fl_Widget::copy_tooltip | ( | const char * | text | ) |
Sets the current tooltip text. Unlike tooltip(), this method allocates a copy of the tooltip string instead of using the original string pointer.
The internal copy will automatically be freed whenever you assign a new tooltip or when the widget is destroyed.
If no tooltip is set, the tooltip of the parent is inherited. Setting a tooltip for a group and setting no tooltip for a child will show the group's tooltip instead. To avoid this behavior, you can set the child's tooltip to an empty string ("").
| [in] | text | New tooltip text (an internal copy is made and managed) |
Definition at line 330 of file Fl_Tooltip.cxx.
References clear_flag(), COPIED_TOOLTIP, flags(), and set_flag().
| uchar Fl_Widget::damage | ( | ) | const [inline] |
Returns non-zero if draw() needs to be called. The damage value is actually a bit field that the widget subclass can use to figure out what parts to draw.
Definition at line 887 of file Fl_Widget.H.
Referenced by Fl_Slider::bounds(), Fl_Text_Display::buffer_modified_cb(), damage(), Fl_Window::draw(), Fl_Value_Slider::draw(), Fl_Value_Output::draw(), Fl_Value_Input::draw(), Fl_Text_Display::draw(), Fl_Tabs::draw(), Fl_Table::draw(), Fl_Slider::draw(), Fl_Scrollbar::draw(), Fl_Scroll::draw(), Fl_Roller::draw(), Fl_Pack::draw(), Fl_Input::draw(), Fl_Group::draw(), Fl_File_Input::draw(), Fl_Dial::draw(), Fl_Counter::draw(), Flcc_ValueBox::draw(), Flcc_HueBox::draw(), Fl_Browser_::draw(), Fl_Group::draw_children(), Fl_Input_::drawtext(), fl_handle(), Fl_Overlay_Window::flush(), Fl_Double_Window::flush(), Fl::flush(), Fl_Scrollbar::handle(), Fl_File_Input::handle(), Fl_Button::handle(), Fl_Input_::handletext(), Fl_Text_Display::highlight_data(), Fl_Color_Chooser::hsv(), Fl_Input_::position(), Fl_Paged_Device::print_widget(), Fl_Text_Display::redisplay_range(), redraw(), redraw_label(), Fl_Browser_::redraw_line(), Fl_Overlay_Window::redraw_overlay(), Fl_Table::redraw_range(), Fl_Tabs::redraw_tabs(), Fl_Color_Chooser::rgb(), Fl_Text_Display::scroll_(), Fl_Scroll::scroll_to(), menuwindow::set_selected(), Fl_Slider::slider_size(), Fl_Group::update_child(), Fl_File_Input::value(), Fl_Clock_Output::value(), Fl_Valuator::value_damage(), and Fl_Input_::yscroll().
| void Fl_Widget::damage | ( | uchar | c | ) |
Sets the damage bits for the widget. Setting damage bits will schedule the widget for the next redraw.
| [in] | c | bitmask of flags to set |
Definition at line 1469 of file Fl.cxx.
References damage(), FL_DAMAGE_CHILD, FL_WINDOW, h(), i, Fl_X::region, type(), w(), x(), XDestroyRegion(), and y().
| void Fl_Widget::damage | ( | uchar | c, |
| int | x, | ||
| int | y, | ||
| int | w, | ||
| int | h | ||
| ) |
Sets the damage bits for an area inside the widget. Setting damage bits will schedule the widget for the next redraw.
| [in] | c | bitmask of flags to set |
| [in] | x,y,w,h | size of damaged area |
Definition at line 1483 of file Fl.cxx.
References damage(), FL_DAMAGE_CHILD, FL_WINDOW, H, h(), XRectangle::height, i, parent(), Fl_X::region, type(), w(), XRectangle::width, XRectangle::x, XDestroyRegion(), XRectangleRegion(), and XRectangle::y.
| int Fl_Widget::damage_resize | ( | int | X, |
| int | Y, | ||
| int | W, | ||
| int | H | ||
| ) |
Internal use only.
Definition at line 145 of file Fl_Widget.cxx.
References h(), redraw(), resize(), w(), x(), and y().
Referenced by Fl_Browser_::draw(), and Fl_Tile::position().
| void Fl_Widget::deactivate | ( | ) |
Deactivates the widget. Inactive widgets will be drawn "grayed out", e.g. with less contrast than the active widget. Inactive widgets will not receive any keyboard or mouse button events. Other events (including FL_ENTER, FL_MOVE, FL_LEAVE, FL_SHORTCUT, and others) will still be sent. A widget is only active if active() is true on it and all of its parents.
Changing this value will send FL_DEACTIVATE to the widget if active_r() is true.
Currently you cannot deactivate Fl_Window widgets.
Reimplemented in Fl_Repeat_Button.
Definition at line 243 of file Fl_Widget.cxx.
References active_r(), FL_DEACTIVATE, fl_throw_focus(), handle(), INACTIVE, redraw(), redraw_label(), and set_flag().
Referenced by active_cb(), align_cb(), align_position_cb(), align_text_image_cb(), box_cb(), color2_cb(), color_cb(), Fl_Widget_Type::copy_properties(), Fl_Repeat_Button::deactivate(), do_shell_command(), down_box_cb(), fl_deactivate_form(), fl_deactivate_object(), Fl_Help_Dialog::Fl_Help_Dialog(), h_cb(), hotspot_cb(), image_browse_cb(), image_cb(), inactive_browse_cb(), inactive_cb(), make_print_panel(), max_cb(), min_cb(), new_cb(), print_cb(), print_menu_cb(), Fl_Widget_Type::read_property(), Fl_File_Chooser::rescan(), Fl_File_Chooser::rescan_keep_filename(), resizable_cb(), save_template_cb(), slider_size_cb(), Fl_PostScript_Printer::start_job(), step_cb(), subclass_cb(), subtype_cb(), textcolor_cb(), textfont_cb(), Fl_Help_Dialog::textsize(), textsize_cb(), tooltip_cb(), Fl_File_Chooser::type(), Fl_File_Chooser::value(), value_cb(), visible_cb(), w_cb(), when_button_cb(), when_cb(), x_cb(), and y_cb().
| void Fl_Widget::default_callback | ( | Fl_Widget * | cb, |
| void * | d | ||
| ) | [static] |
Sets the default callback for all widgets. Sets 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.
| [in] | cb | the new callback |
| [in] | d | user data associated with that callback |
Definition at line 48 of file Fl_Widget.cxx.
References obj_tail, parent(), and QUEUE_SIZE.
Referenced by Fl::default_atclose(), do_callback(), Fl_Widget(), and ~Fl_Widget().
| const Fl_Image* Fl_Widget::deimage | ( | ) | const [inline] |
Definition at line 530 of file Fl_Widget.H.
| void Fl_Widget::deimage | ( | Fl_Image & | img | ) | [inline] |
Sets the image to use as part of the widget label. This image is used when drawing the widget in the inactive state.
| [in] | img | the new image for the deactivated widget |
Definition at line 542 of file Fl_Widget.H.
| Fl_Image* Fl_Widget::deimage | ( | ) | [inline] |
Gets the image that is used as part of the widget label. This image is used when drawing the widget in the inactive state.
Definition at line 529 of file Fl_Widget.H.
Referenced by Fluid_Image::deimage(), draw_backdrop(), and Fl_Widget_Type::setinactive().
| void Fl_Widget::deimage | ( | Fl_Image * | img | ) | [inline] |
Sets the image to use as part of the widget label. This image is used when drawing the widget in the inactive state.
| [in] | img | the new image for the deactivated widget |
Definition at line 536 of file Fl_Widget.H.
| void Fl_Widget::do_callback | ( | Fl_Widget * | o, |
| long | arg | ||
| ) | [inline] |
Calls the widget callback. Causes a widget to invoke its callback function with arbitrary arguments.
| [in] | o | call the callback with o as the widget argument |
| [in] | arg | call the callback with arg as the user data argument |
Definition at line 842 of file Fl_Widget.H.
References do_callback().
Referenced by do_callback().
| void Fl_Widget::do_callback | ( | Fl_Widget * | o, |
| void * | arg = 0 |
||
| ) |
Calls the widget callback.
Causes a widget to invoke its callback function with arbitrary arguments.
| [in] | o | call the callback with o as the widget argument |
| [in] | arg | use arg as the user data argument |
Definition at line 335 of file Fl_Widget.cxx.
References clear_changed(), default_callback(), and Fl_Widget_Tracker::deleted().
| void Fl_Widget::do_callback | ( | ) | [inline] |
Calls the widget callback. Causes a widget to invoke its callback function with default arguments.
Definition at line 834 of file Fl_Widget.H.
References do_callback().
Referenced by Fl_Table::col_width(), do_callback(), Fl_Table::do_callback(), Fl_Tree::do_callback_for_item(), fl_call_object_callback(), fl_trigger_object(), Fl_Free::handle(), Fl_Tile::handle(), Fl_Text_Editor::handle(), Fl_Tabs::handle(), Fl_Table::handle(), Fl_Scrollbar::handle(), Fl_Return_Button::handle(), Fl_Repeat_Button::handle(), Fl_Positioner::handle(), Fl_Input::handle(), Flcc_ValueBox::handle(), Flcc_HueBox::handle(), Fl_Button::handle(), Fl_Browser_::handle(), Fl::handle(), Shortcut_Button::handle(), Fl_Valuator::handle_drag(), Fl_Text_Editor::handle_key(), Flcc_ValueBox::handle_key(), Flcc_HueBox::handle_key(), Fl_Valuator::handle_release(), Fl_Text_Editor::kf_backspace(), Fl_Text_Editor::kf_cut(), Fl_Text_Editor::kf_default(), Fl_Text_Editor::kf_delete(), Fl_Text_Editor::kf_enter(), Fl_Text_Editor::kf_paste(), Fl_Text_Editor::kf_undo(), Fl_Text_Editor::maybe_do_callback(), Fl_Input_::maybe_do_callback(), Fl_Color_Chooser::mode(), Fl_Menu_::picked(), print_menu_cb(), propagate_load(), Fl_Input_::replace(), Fl_Table::row_height(), Fl_Browser_::select(), set_cb(), Fl_PostScript_Printer::start_job(), template_delete_cb(), Fl_Help_View::topline(), and Fl_Input_::undo().
| virtual void Fl_Widget::draw | ( | ) | [pure virtual] |
Draws the widget. Never call this function directly. FLTK will schedule redrawing whenever needed. If your widget must be redrawn as soon as possible, call redraw() instead.
Override this function to draw your own widgets.
If you ever need to call another widget's draw method from within your own draw() method, e.g. for an embedded scrollbar, you can do it (because draw() is virtual) like this:
Fl_Widget *s = &scroll; // scroll is an embedded Fl_Scrollbar s->draw(); // calls Fl_Scrollbar::draw()
Implemented in Fl_Adjuster, Fl_Box, Fl_Browser_, Fl_Button, Fl_Chart, Fl_Choice, Fl_Clock_Output, Flcc_HueBox, Flcc_ValueBox, Fl_Counter, Fl_Dial, Fl_File_Input, Fl_FormsBitmap, Fl_FormsPixmap, Fl_Free, Fl_Gl_Window, Fl_Group, Fl_Input, Fl_Light_Button, Fl_Menu_Bar, Fl_Menu_Button, Fl_Pack, Fl_Positioner, Fl_Progress, Fl_Return_Button, Fl_Roller, Fl_Scroll, Fl_Scrollbar, Fl_Slider, Fl_Table, Fl_Tabs, Fl_Text_Display, Fl_Timer, Fl_Tree, Fl_Value_Input, Fl_Value_Output, Fl_Value_Slider, Fl_Window, Fl_Glut_Window, Shortcut_Button, and Fl_TooltipBox.
Referenced by Fl_Value_Input::draw(), Fl_Group::draw_child(), Fl_Paged_Device::print_widget(), and Fl_Group::update_child().
| void Fl_Widget::draw_backdrop | ( | ) | const [protected] |
If FL_ALIGN_IMAGE_BACKDROP is set, the image or deimage will be drawn
Definition at line 406 of file fl_boxtype.cxx.
References active_r(), align(), deimage(), FL_ALIGN_IMAGE_BACKDROP, and image().
Referenced by Fl_Button::draw(), and draw_box().
| void Fl_Widget::draw_box | ( | Fl_Boxtype | t, |
| Fl_Color | c | ||
| ) | const [protected] |
Draws a box of type t, of color c at the widget's position and size.
Definition at line 417 of file fl_boxtype.cxx.
References draw_box().
| void Fl_Widget::draw_box | ( | ) | const [protected] |
Draws the widget box according its box style
Definition at line 401 of file fl_boxtype.cxx.
References draw_backdrop().
Referenced by Fl_Timer::draw(), Fl_FormsPixmap::draw(), Fl_FormsBitmap::draw(), Fl_Window::draw(), Fl_Value_Slider::draw(), Fl_Value_Output::draw(), Fl_Tree::draw(), Fl_TooltipBox::draw(), Fl_Text_Display::draw(), Fl_Tabs::draw(), Fl_Table::draw(), Fl_Slider::draw(), Fl_Scrollbar::draw(), Fl_Scroll::draw(), Fl_Roller::draw(), Fl_Return_Button::draw(), Fl_Progress::draw(), Fl_Positioner::draw(), Fl_Pack::draw(), Fl_Menu_Button::draw(), Fl_Menu_Bar::draw(), Fl_Light_Button::draw(), Fl_Input::draw(), Fl_Group::draw(), Fl_File_Input::draw(), Fl_Dial::draw(), Fl_Counter::draw(), Flcc_ValueBox::draw(), Flcc_HueBox::draw(), Fl_Clock_Output::draw(), Fl_Choice::draw(), Fl_Chart::draw(), Fl_Button::draw(), Fl_Browser_::draw(), Fl_Box::draw(), Fl_Adjuster::draw(), Shortcut_Button::draw(), draw_box(), and Fl_Input_::drawtext().
| void Fl_Widget::draw_box | ( | Fl_Boxtype | t, |
| int | X, | ||
| int | Y, | ||
| int | W, | ||
| int | H, | ||
| Fl_Color | c | ||
| ) | const [protected] |
Draws a box of type t, of color c at the position X,Y and size W,H.
Definition at line 421 of file fl_boxtype.cxx.
References active_r().
| void Fl_Widget::draw_focus | ( | ) | [inline, protected] |
draws a focus rectangle around the widget
Definition at line 192 of file Fl_Widget.H.
References box(), draw_focus(), h, w, x, and y.
Referenced by Fl_Slider::draw(), Fl_Roller::draw(), Fl_Return_Button::draw(), Fl_Menu_Button::draw(), Fl_Light_Button::draw(), Fl_Counter::draw(), Fl_Choice::draw(), Fl_Button::draw(), Fl_Browser_::draw(), Fl_Adjuster::draw(), and draw_focus().
| void Fl_Widget::draw_focus | ( | Fl_Boxtype | B, |
| int | X, | ||
| int | Y, | ||
| int | W, | ||
| int | H | ||
| ) | const [protected] |
Draws a focus box for the widget at the given position and size
Definition at line 187 of file Fl_Widget.cxx.
References Fl::box_dh(), Fl::box_dw(), Fl::box_dx(), Fl::box_dy(), color(), FL_BLACK, fl_color(), fl_contrast(), FL_DOT, FL_DOWN_BOX, FL_DOWN_FRAME, fl_line_style(), fl_point(), fl_rect(), FL_SOLID, FL_THIN_DOWN_BOX, FL_THIN_DOWN_FRAME, H, i, and Fl::visible_focus().
| void Fl_Widget::draw_label | ( | int | X, |
| int | Y, | ||
| int | W, | ||
| int | H, | ||
| Fl_Align | a | ||
| ) | const |
Draws the label in an arbitrary bounding box with an arbitrary alignment. Anybody can call this to force the label to draw anywhere.
Definition at line 127 of file fl_labeltype.cxx.
References active_r(), Fl_Label::color, Fl_Label::deimage, Fl_Label::draw(), fl_draw_shortcut, fl_inactive(), flags(), Fl_Label::image, and SHORTCUT_LABEL.
| void Fl_Widget::draw_label | ( | int | X, |
| int | Y, | ||
| int | W, | ||
| int | H | ||
| ) | const [protected] |
Draws the label in an arbitrary bounding box. draw() can use this instead of draw_label(void) to change the bounding box
Definition at line 118 of file fl_labeltype.cxx.
References align(), draw_label(), and FL_ALIGN_INSIDE.
| void Fl_Widget::draw_label | ( | void | ) | const [protected] |
Draws the widget's label at the defined label position. This is the normal call for a widget's draw() method.
Definition at line 108 of file fl_labeltype.cxx.
References align(), box(), Fl::box_dh(), Fl::box_dw(), Fl::box_dx(), Fl::box_dy(), FL_ALIGN_LEFT, and FL_ALIGN_RIGHT.
Referenced by Fl_Timer::draw(), Fl_FormsPixmap::draw(), Fl_FormsBitmap::draw(), Fl_Tree::draw(), Fl_Slider::draw(), Fl_Return_Button::draw(), Fl_Progress::draw(), Fl_Positioner::draw(), Fl_Pack::draw(), Fl_Menu_Button::draw(), Fl_Light_Button::draw(), Fl_Group::draw(), Fl_Dial::draw(), Fl_Clock_Output::draw(), Fl_Choice::draw(), Fl_Chart::draw(), Fl_Button::draw(), Fl_Box::draw(), draw_label(), and Fl_Group::draw_outside_label().
| unsigned int Fl_Widget::flags | ( | ) | const [inline, protected] |
Gets the widget flags mask
Definition at line 155 of file Fl_Widget.H.
Referenced by Fl_Window::border(), Fl_Menu_::clear_submenu(), Fl_Group::clip_children(), Fl_Window::copy_label(), copy_label(), copy_tooltip(), draw_label(), Fl_Window::force_position(), Fl_Browser::item_select(), label(), Fl_X::make(), Fl_X::make_xid(), Fl_Window::menu_window(), Fl_Window::modal(), Fl_Window::non_modal(), Fl_Window::override(), Fl_X::sendxjunk(), test_shortcut(), tooltip(), Fl_Window::tooltip_window(), and ~Fl_Widget().
| void Fl_Widget::h | ( | int | v | ) | [inline, protected] |
Internal use only. Use position(int,int), size(int,int) or resize(int,int,int,int) instead.
Definition at line 153 of file Fl_Widget.H.
Referenced by Fl_File_Chooser::add_extra(), align_widget_cb(), Fl_Scroll::bbox(), Fl_Tabs::client_area(), damage(), Fl_Text_Display::draw(), Fl_Table::draw(), Fl_Scroll::draw(), Fl_Pack::draw(), Fl_Group::draw_child(), Fl_Group::draw_outside_label(), Fl_Window_Type::draw_overlay(), Fl_Window_Type::enter_live_mode(), Fl_Widget_Type::enter_live_mode(), Fl_Scroll_Type::enter_live_mode(), Fl_Table_Type::enter_live_mode(), Fl_Tabs_Type::enter_live_mode(), Fl_Group_Type::enter_live_mode(), Fl_X::fake_X_wm(), fix_group_size(), Fl_File_Chooser::Fl_File_Chooser(), fl_get_object_geometry(), Fl_Native_File_Chooser::Fl_Native_File_Chooser(), fl_scale_form(), fl_show_form(), Fl_Group::forms_end(), group_cb(), Fl_Help_Dialog::h(), Fl_Tile::handle(), Fl::handle(), Fl_Window_Type::handle(), Fl_Window::hotspot(), Fl_Choice_Type::ideal_size(), Fl_Return_Button_Type::ideal_size(), live_mode_cb(), Fl_X::make(), Fl_Widget_Type::make(), make_codeblock_panel(), Fl_Window::make_current(), make_declblock_panel(), make_widget_panel(), Fl_X::make_xid(), menuwindow::menuwindow(), Fl_Window_Type::newposition(), Fl_Tile::position(), Fl_File_Chooser::preview(), Fl_Paged_Device::print_widget(), Fl_Menu_Item::pulldown(), Fl_Window_Type::read_fdesign(), Fl_Widget_Type::read_fdesign(), Fl_File_Chooser::rescan_keep_filename(), Fl_Tile::resize(), Fl_Scroll::resize(), Fl_Group::resize(), save_position(), Fl_X::sendxjunk(), set_max_size_cb(), set_min_size_cb(), Fl_Group::sizes(), Fl_Group::update_child(), w_cb(), Fl_Widget_Class_Type::write_code1(), Fl_Widget_Type::write_code1(), Fl_Widget_Type::write_properties(), x_cb(), and y_cb().
| int Fl_Widget::h | ( | ) | const [inline] |
Gets the widget height.
Definition at line 295 of file Fl_Widget.H.
Referenced by Fl_Scroll::bbox(), Fl_Browser_::bbox(), Fl_Text_Display::buffer(), Fl_Tabs::client_area(), damage(), damage_resize(), Fl_Tree::displayed(), Fl_Timer::draw(), Fl_FormsPixmap::draw(), Fl_FormsBitmap::draw(), Fl_Window::draw(), Fl_Value_Slider::draw(), Fl_Value_Output::draw(), Fl_Tree::draw(), Fl_TooltipBox::draw(), Fl_Text_Display::draw(), Fl_Tabs::draw(), Fl_Table::draw(), Fl_Slider::draw(), Fl_Scrollbar::draw(), Fl_Scroll::draw(), Fl_Roller::draw(), Fl_Return_Button::draw(), Fl_Progress::draw(), Fl_Positioner::draw(), Fl_Pack::draw(), Fl_Menu_Button::draw(), Fl_Menu_Bar::draw(), Fl_Light_Button::draw(), Fl_Input::draw(), Fl_File_Input::draw(), Fl_Dial::draw(), Fl_Counter::draw(), Flcc_ValueBox::draw(), Flcc_HueBox::draw(), Fl_Clock_Output::draw(), Fl_Choice::draw(), Fl_Chart::draw(), Fl_Browser_::draw(), Fl_Adjuster::draw(), Shortcut_Button::draw(), Fl_Group::draw_children(), Fl_Group::draw_outside_label(), menuwindow::find_selected(), Fl_Table::Fl_Table(), Fl_Double_Window::flush(), Fl_Group::forms_end(), Fl_Window::fullscreen(), Fl_Value_Slider::handle(), Fl_Tree::handle(), Fl_Tabs::handle(), Fl_Table::handle(), Fl_Slider::handle(), Fl_Scrollbar::handle(), Fl_Positioner::handle(), Fl_Menu_Bar::handle(), Fl_Input::handle(), Fl_Dial::handle(), Flcc_ValueBox::handle(), Flcc_HueBox::handle(), Fl_Choice::handle(), Fl_Button::handle(), Fl_Adjuster::handle(), Flcc_ValueBox::handle_key(), Flcc_HueBox::handle_key(), Fl_Input_::handletext(), Fl_Window::hotspot(), menuwindow::is_inside(), Fl_Input_::linesPerPage(), Fl_Window::make_current(), menuwindow::menuwindow(), Fl_Menu_Button::popup(), Overlay_Window::read_image(), Fl_Table::recalc_dimensions(), redraw_label(), Fl_Tabs::redraw_tabs(), Fl_Tile::resize(), Fl_Scroll::resize(), Fl_Overlay_Window::resize(), Fl_Window::resize(), Fl_Input_::resize(), Fl_Help_View::resize(), Fl_Group::resize(), Fl_Double_Window::resize(), Overlay_Window::resize(), Fl_Text_Display::scroll(), Fl_Tree::scrollbar_size(), Fl_Window::show(), Fl_Text_Display::show_insert_position(), Fl_Tree::show_item_bottom(), Fl_Tree::show_item_middle(), Fl_Group::sizes(), Fl_Help_View::topline(), Fl_Tabs::which(), and Fl_Text_Display::wrap_mode().
| int Fl_Widget::handle | ( | int | event | ) | [virtual] |
Handles the specified event. You normally don't call this method directly, but instead let FLTK do it when the user interacts with the widget.
When implemented in a widget, this function must return 0 if the widget does not use the event or 1 otherwise.
Most of the time, you want to call the inherited handle() method in your overridden method so that you don't short-circuit events that you don't handle. In this last case you should return the callee retval.
| [in] | event | the kind of event received |
| 0 | if the event was not used or understood |
| 1 | if the event was used and can be deleted |
Reimplemented in Fl_Adjuster, Fl_Box, Fl_Browser_, Fl_Button, Fl_Check_Browser, Fl_Choice, Fl_Clock, Flcc_HueBox, Flcc_ValueBox, Fl_Counter, Fl_Dial, Fl_File_Input, Fl_Free, Fl_Gl_Window, Fl_Group, Fl_Input, Fl_Light_Button, Fl_Menu_Bar, Fl_Menu_Button, Fl_Positioner, Fl_Repeat_Button, Fl_Return_Button, Fl_Roller, Fl_Scroll, Fl_Scrollbar, Fl_Slider, Fl_Spinner, Fl_Table, Fl_Table_Row, Fl_Tabs, Fl_Text_Display, Fl_Text_Editor, Fl_Tile, Fl_Timer, Fl_Tree, Fl_Value_Input, Fl_Value_Output, Fl_Value_Slider, Fl_Window, Fl_Glut_Window, CodeViewer, Widget_Browser, Overlay_Window, Shortcut_Button, and menuwindow.
Definition at line 106 of file Fl_Widget.cxx.
Referenced by activate(), Fl::belowmouse(), Fl_Input_Choice_Type::click_test(), Fl_Menu_Type::click_test(), deactivate(), Fl::dnd(), FLDropTarget::Drop(), fl_fix_focus(), fl_handle(), Fl::focus(), Fl_Group::handle(), Fl_Input_::handletext(), hide(), Fl::paste(), show(), and take_focus().
| void Fl_Widget::hide | ( | ) | [virtual] |
Makes a widget invisible.
Reimplemented in Fl_Browser, Fl_Double_Window, Fl_Gl_Window, Fl_Menu_Window, Fl_Overlay_Window, and Fl_Window.
Definition at line 273 of file Fl_Widget.cxx.
References FL_HIDE, fl_throw_focus(), handle(), INVISIBLE, parent(), set_flag(), and visible_r().
Referenced by border_cb(), Fl_Widget_Type::copy_properties(), Fl_Tree::draw(), fl_hide_object(), Fl_Table::Fl_Table(), Fl_Tree::Fl_Tree(), Fl_Browser::hide(), Fl_Tree_Item::hide_widgets(), i18n_type_cb(), make_class_panel(), make_declblock_panel(), make_print_panel(), make_project_window(), make_sourceview(), make_template_panel(), make_widget_panel(), min_w_cb(), modal_cb(), name_cb(), name_public_cb(), name_public_member_cb(), new_cb(), non_modal_cb(), Fl_Data_Type::open(), Fl_Decl_Type::open(), Fl_Function_Type::open(), Fl_File_Chooser::preview(), print_cb(), Fl_Widget_Type::read_property(), Fl_Table::recalc_dimensions(), save_template_cb(), shortcut_in_cb(), show_project_cb(), slider_size_cb(), Fl_Wizard::value(), Fl_Tabs::value(), visible_cb(), wc_relative_cb(), xclass_cb(), and Fl_Widget_Type::~Fl_Widget_Type().
| void Fl_Widget::image | ( | Fl_Image * | img | ) | [inline] |
Sets the image to use as part of the widget label. This image is used when drawing the widget in the active state.
| [in] | img | the new image for the label |
Definition at line 517 of file Fl_Widget.H.
| void Fl_Widget::image | ( | Fl_Image & | img | ) | [inline] |
Sets the image to use as part of the widget label. This image is used when drawing the widget in the active state.
| [in] | img | the new image for the label |
Definition at line 523 of file Fl_Widget.H.
| const Fl_Image* Fl_Widget::image | ( | ) | const [inline] |
Definition at line 511 of file Fl_Widget.H.
| Fl_Image* Fl_Widget::image | ( | ) | [inline] |
Gets the image that is used as part of the widget label. This image is used when drawing the widget in the active state.
Definition at line 510 of file Fl_Widget.H.
Referenced by Fl_Menu_Type::build_menu(), Fl_Input_Choice_Type::build_menu(), draw_backdrop(), Fl_File_Chooser::Fl_File_Chooser(), Fl_Menu_Window::Fl_Menu_Window(), Fl_Overlay_Window::Fl_Overlay_Window(), Fluid_Image::image(), Fl_Pixmap::label(), Fl_RGB_Image::label(), Fl_Image::label(), Fl_Bitmap::label(), make_about_panel(), make_print_panel(), make_widgetbin(), Fl_Window_Type::open(), Overlay_Window::read_image(), Fl::reload_scheme(), Fl_File_Chooser::rescan_keep_filename(), Fl_Widget_Type::setimage(), and Fl_Window::show().
| int Fl_Widget::inside | ( | const Fl_Widget * | w | ) | const [inline] |
Checks if this widget is a child of w. Returns 1 if this widget is a child of w, or is equal to w. Returns 0 if w is NULL.
| [in] | w | the possible parent widget. |
Definition at line 868 of file Fl_Widget.H.
References contains().
Referenced by activate(), and show().
| const char* Fl_Widget::label | ( | ) | const [inline] |
Gets the current label text.
Reimplemented in Fl_Window.
Definition at line 417 of file Fl_Widget.H.
Referenced by Fl_Menu_Type::build_menu(), Fl_Input_Choice_Type::build_menu(), Fl_Widget_Type::copy_properties(), Fl_File_Chooser::Fl_File_Chooser(), fl_set_object_label(), Fl_Tabs::handle(), hotspot_cb(), Fl_Multi_Label::label(), Fl_File_Icon::label(), Fl_Window::label(), Fl_Widget_Type::make(), new_cb(), Fl_File_Chooser::ok_label(), Fl_Menu_Button::popup(), print_cb(), print_update_status(), Fl_File_Chooser::rescan_keep_filename(), resizeform(), save_template_cb(), test_shortcut(), and v_input_cb().
| void Fl_Widget::label | ( | const char * | text | ) |
Sets the current label pointer.
The label is shown somewhere on or next to the widget. The passed pointer is stored unchanged in the widget (the string is not copied), so if you need to set the label to a formatted value, make sure the buffer is static, global, or allocated. The copy_label() method can be used to make a copy of the label string automatically.
| [in] | text | pointer to new label text |
Reimplemented in Fl_Window.
Definition at line 300 of file Fl_Widget.cxx.
References clear_flag(), COPIED_LABEL, flags(), redraw_label(), and Fl_Label::value.
| void Fl_Widget::label | ( | Fl_Labeltype | a, |
| const char * | b | ||
| ) | [inline] |
Shortcut to set the label text and type in one call.
Definition at line 446 of file Fl_Widget.H.
References b.
| unsigned int Fl_Widget::label_shortcut | ( | const char * | t | ) | [static] |
Returns the Unicode value of the '&x' shortcut in a given text.
The given text t (usually a widget's label or a menu text) is searched for a '&x' shortcut label, and if found, the Unicode value of the '&x' shortcut is returned.
| t | text or label to search for '&x' shortcut. |
t or 0.Definition at line 309 of file fl_shortcut.cxx.
References fl_utf8decode().
Referenced by test_shortcut().
| Fl_Color Fl_Widget::labelcolor | ( | ) | const [inline] |
Gets the label color. The default color is FL_FOREGROUND_COLOR.
Definition at line 468 of file Fl_Widget.H.
Referenced by color2_cb(), color_cb(), Fl_Widget_Type::copy_properties(), Fl_Timer::draw(), Fl_Scrollbar::draw(), Fl_Progress::draw(), Fl_Counter::draw(), Fl_Choice::draw(), Fl_Button::draw(), Fl_Help_Dialog::Fl_Help_Dialog(), fl_set_object_lcol(), labelcolor_cb(), make_about_panel(), make_code_panel(), make_comment_panel(), make_data_panel(), make_sourceview(), make_widget_panel(), Fl_Widget_Type::read_fdesign(), Fl_Widget_Type::read_property(), textcolor_cb(), Fl_Menu_Item_Type::write_item(), Fl_Widget_Type::write_properties(), and Fl_Widget_Type::write_widget_code().
| void Fl_Widget::labelcolor | ( | Fl_Color | c | ) | [inline] |
Sets the label color. The default color is FL_FOREGROUND_COLOR.
| [in] | c | the new label color |
Definition at line 474 of file Fl_Widget.H.
| void Fl_Widget::labelfont | ( | Fl_Font | f | ) | [inline] |
Sets the font to use. Fonts are identified by indexes into a table. The default value uses a Helvetica typeface (Arial for Microsoft® Windows®). The function Fl::set_font() can define new typefaces.
| [in] | f | the new font for the label |
Reimplemented in Fl_Tree.
Definition at line 492 of file Fl_Widget.H.
References f.
| Fl_Font Fl_Widget::labelfont | ( | ) | const [inline] |
Gets the font to use. Fonts are identified by indexes into a table. The default value uses a Helvetica typeface (Arial for Microsoft® Windows®). The function Fl::set_font() can define new typefaces.
Reimplemented in Fl_Tree.
Definition at line 483 of file Fl_Widget.H.
Referenced by Fl_Tabs::client_area(), Fl_Widget_Type::copy_properties(), Fl_Timer::draw(), Fl_File_Chooser::Fl_File_Chooser(), Fl_Help_Dialog::Fl_Help_Dialog(), fl_set_object_lstyle(), Fl_Tabs_Type::ideal_spacing(), labelfont_cb(), make_about_panel(), make_class_panel(), make_code_panel(), make_comment_panel(), make_data_panel(), make_decl_panel(), make_function_panel(), make_global_settings_window(), make_layout_window(), make_print_panel(), make_project_window(), make_settings_window(), make_shell_window(), make_sourceview(), make_template_panel(), make_widget_panel(), Fl_Widget_Type::read_fdesign(), Fl_Widget_Type::read_property(), Fl_File_Chooser::rescan_keep_filename(), Fl_Menu_Item_Type::write_item(), Fl_Widget_Type::write_properties(), and Fl_Widget_Type::write_widget_code().
| void Fl_Widget::labelsize | ( | Fl_Fontsize | pix | ) | [inline] |
Sets the font size in pixels.
| [in] | pix | the new font size |
Reimplemented in Fl_Tree.
Definition at line 504 of file Fl_Widget.H.
| Fl_Fontsize Fl_Widget::labelsize | ( | ) | const [inline] |
Gets the font size in pixels. The default size is 14 pixels.
Reimplemented in Fl_Tree.
Definition at line 498 of file Fl_Widget.H.
Referenced by Fl_Tabs::client_area(), Fl_Widget_Type::copy_properties(), Fl_Timer::draw(), Fl_Menu_Button::draw(), Fl_Light_Button::draw(), Fl_Window_Type::draw_overlay(), Fl_File_Chooser::Fl_File_Chooser(), Fl_Help_Dialog::Fl_Help_Dialog(), fl_set_object_lsize(), fl_set_spot(), Fl_Widget_Type::ideal_size(), Fl_Menu_Bar_Type::ideal_size(), Fl_Choice_Type::ideal_size(), Fl_Menu_Button_Type::ideal_size(), Fl_Return_Button_Type::ideal_size(), Fl_Button_Type::ideal_size(), Fl_Widget_Type::ideal_spacing(), Fl_Tabs_Type::ideal_spacing(), labelsize_cb(), live_mode_cb(), Fl_Menu_Item_Type::make(), make_about_panel(), make_class_panel(), make_code_panel(), make_codeblock_panel(), make_comment_panel(), make_data_panel(), make_decl_panel(), make_declblock_panel(), make_function_panel(), make_layout_window(), make_print_panel(), make_sourceview(), make_widget_panel(), Fl_Widget_Type::read_fdesign(), Fl_Widget_Type::read_property(), Fl_File_Chooser::rescan_keep_filename(), resizeform(), widget_size_cb(), Fl_Menu_Item_Type::write_item(), Fl_Widget_Type::write_properties(), and Fl_Widget_Type::write_widget_code().
| Fl_Labeltype Fl_Widget::labeltype | ( | ) | const [inline] |
Gets the label type.
Definition at line 452 of file Fl_Widget.H.
Referenced by Fl_Menu_Type::build_menu(), Fl_Input_Choice_Type::build_menu(), Fl_Widget_Type::copy_properties(), Fl_Button::draw(), fl_set_object_lstyle(), labeltype_cb(), make_code_panel(), make_comment_panel(), make_sourceview(), make_widget_panel(), Fl_Widget_Type::read_fdesign(), Fl_Widget_Type::read_property(), Fl::reload_scheme(), Fl_Window::show(), Fl_Menu_Item_Type::write_item(), Fl_Widget_Type::write_properties(), and Fl_Widget_Type::write_widget_code().
| void Fl_Widget::labeltype | ( | Fl_Labeltype | a | ) | [inline] |
Sets the label type. The label type identifies the function that draws the label of the widget. This is generally used for special effects such as embossing or for using the label() pointer as another form of data such as an icon. The value FL_NORMAL_LABEL prints the label as plain text.
| [in] | a | new label type |
Definition at line 462 of file Fl_Widget.H.
| void Fl_Widget::measure_label | ( | int & | ww, |
| int & | hh | ||
| ) | const [inline] |
Sets width ww and height hh accordingly with the label size. Labels with images will return w() and h() of the image.
Definition at line 923 of file Fl_Widget.H.
Referenced by Fl_Window_Type::draw_overlay(), Fl_Widget_Type::ideal_size(), and Fl_File_Chooser::ok_label().
| unsigned int Fl_Widget::output | ( | ) | const [inline] |
Returns if a widget is used for output only. output() means the same as !active() except it does not change how the widget is drawn. The widget will not receive any events. This is useful for making scrollbars or buttons that work as displays rather than input devices.
| 0 | if the widget is used for input and output |
Definition at line 738 of file Fl_Widget.H.
References OUTPUT.
Referenced by takesevents().
| Fl_Group* Fl_Widget::parent | ( | ) | const [inline] |
Returns a pointer to the parent widget. Usually this is a Fl_Group or Fl_Window.
| NULL | if the widget has no parent |
Definition at line 250 of file Fl_Widget.H.
Referenced by active_r(), Fl::belowmouse(), carbonKeyboardHandler(), carbonTextHandler(), Fl_Group::clear(), color_cb(), Fl_Widget_Type::copy_properties(), Fl_Tooltip::current(), damage(), default_callback(), Fl_Window::draw(), Flcc_ValueBox::draw(), Flcc_HueBox::draw(), Fl_Browser_::draw(), FLDropTarget::Drop(), Fl_Group::end(), Fl_Table::end(), Fl_X::fake_X_wm(), fl_delete_object(), fl_fix_focus(), fl_handle(), fl_insert_object(), fl_set_spot(), Fl_Value_Input::Fl_Value_Input(), Fl::focus(), Flcc_Value_Input::format(), Flcc_ValueBox::handle(), Flcc_HueBox::handle(), Fl_Window::handle(), Fl::handle(), Fl_Window_Type::handle(), Flcc_ValueBox::handle_key(), Flcc_HueBox::handle_key(), hide(), Fl_Window::hide(), Fl_Group::insert(), MacDestroyWindow(), MacMapWindow(), MacUnmapWindow(), Fl_X::make(), Fl_X::make_xid(), min_w_cb(), Fl_File_Chooser::ok_label(), Fl_File_Chooser::preview(), Fl_Widget_Type::read_property(), Fl_Widget_Type::resizable(), Fl_Window::resize(), Fl_Scroll::scroll_to(), Fl_X::sendxjunk(), Fl_Button::setonly(), Fl_Window::show(), slider_size_cb(), visible_cb(), visible_r(), window(), Fl_Widget_Type::write_widget_code(), xclass_cb(), Fl_Value_Input::~Fl_Value_Input(), and Fl_Widget_Type::~Fl_Widget_Type().
| void Fl_Widget::parent | ( | Fl_Group * | p | ) | [inline] |
Internal use only - "for hacks only".
It is STRONGLY recommended not to use this method, because it short-circuits Fl_Group's normal widget adding and removing methods, if the widget is already a child widget of another Fl_Group.
Use Fl_Group::add(Fl_Widget*) and/or Fl_Group::remove(Fl_Widget*) instead.
Definition at line 260 of file Fl_Widget.H.
| void Fl_Widget::position | ( | int | X, |
| int | Y | ||
| ) | [inline] |
Repositions the window or widget.
position(X, Y) is a shortcut for resize(X, Y, w(), h()).
| [in] | X,Y | new position relative to the parent window |
Reimplemented in Fl_Input_, and menuwindow.
Definition at line 328 of file Fl_Widget.H.
References Fl_Group::resize().
Referenced by Fl_File_Chooser::add_extra(), Fl_Scroll_Type::copy_properties(), Fl_Input_::cut(), fl_handle(), fl_set_form_position(), fl_set_object_position(), fl_show_form(), glutPositionWindow(), Fl_Window::hotspot(), live_mode_cb(), Fl_Input_::mark(), menuwindow::position(), Fl_Help_Dialog::position(), position_window(), Fl_Scroll::resize(), ColorMenu::run(), and Fl_Scroll::scroll_to().
| void Fl_Widget::redraw | ( | ) |
Schedules the drawing of the widget. Marks the widget as needing its draw() routine called.
Definition at line 1408 of file Fl.cxx.
References damage(), and FL_DAMAGE_ALL.
Referenced by activate(), Fl_Chart::add(), Fl_Type::add(), Fl_Window_Type::add_child(), Fl_Table_Type::add_child(), Fl_Group_Type::add_child(), align_widget_cb(), Fl_Chart::bounds(), Fl_Menu_Type::build_menu(), Fl_Input_Choice_Type::build_menu(), Fl_Check_Browser::check_all(), Fl_Check_Browser::check_none(), Fl_Check_Browser::checked(), Fl_Chart::clear(), Fl_Tree::clear_children(), Fl_Tree::close(), Fl_Tree::closeicon(), Fl_Table::col_header(), Fl_Table::col_header_color(), Fl_Table::col_header_height(), Fl_Table::col_position(), Fl_Table::col_width(), color2_cb(), color_cb(), Fl_Table::cols(), Fl_Tree::connectorstyle(), Fl_Tree::connectorwidth(), damage_resize(), deactivate(), Fl_Tree::deselect(), fl_redraw_form(), fl_redraw_object(), fl_set_object_label(), Fl_Table::Fl_Table(), glutPostRedisplay(), h_cb(), Fl_Value_Slider::handle(), Fl_Tree::handle(), Fl_Text_Editor::handle(), Fl_Tabs::handle(), Fl_Table::handle(), Fl_Slider::handle(), Fl_Roller::handle(), Fl_Positioner::handle(), Fl_Menu_Button::handle(), Fl_Light_Button::handle(), Fl_Counter::handle(), Flcc_ValueBox::handle(), Flcc_HueBox::handle(), Fl_Choice::handle(), Fl_Button::handle(), Fl_Browser_::handle(), Fl_Adjuster::handle(), Widget_Browser::handle(), Shortcut_Button::handle(), Fl_Browser::hide(), Fl_Browser::icon(), Fl_File_Browser::iconsize(), Fl_Chart::insert(), Fl_Type::insert(), Fl_Button::key_release_timeout(), Fl_Type::label(), labelcolor_cb(), Fl_Help_View::leftline(), MacMapWindow(), Fl_X::make(), Fl_X::make_xid(), Fl_Tree::marginleft(), Fl_Tree::margintop(), max_cb(), Fl_Progress::maximum(), Fl_Chart::maxsize(), min_cb(), Fl_Progress::minimum(), Fl_Type::move_before(), Fl_Table_Type::move_child(), Fl_Group_Type::move_child(), Fl_Window_Type::moveallchildren(), Fl_Type::name(), Fl_Tree::open(), Fl_Tree::openchild_marginbottom(), Fl_Tree::openicon(), Fl_Menu_::picked(), Fl_Menu_Button::popup(), Fl_File_Chooser::preview(), Overlay_Window::read_image(), Fl_Widget_Type::redraw(), redraw_browser(), Fl::reload_scheme(), Fl_Type::remove(), Fl_Chart::replace(), Fl_File_Chooser::rescan_keep_filename(), Fl_Text_Display::resize(), Fl_Table::resize(), Fl_Scroll::resize(), Fl_Window::resize(), iwizard::resize(), itabs::resize(), igroup::resize(), Fl_Table::row_header(), Fl_Table::row_header_color(), Fl_Table::row_header_width(), Fl_Table::row_height(), Fl_Table::row_position(), Fl_Table::rows(), Fl_Table::scroll_cb(), Fl_Scroll::scrollbar_size(), Fl_Tree::select(), Fl_Table_Row::select_all_rows(), Fl_Tree::select_toggle(), Fl_Tree::selectbox(), Fl_Tree::set_item_focus(), shortcut_in_cb(), show(), Fl_Browser::show(), Fl_Tree::show_item(), Fl_Tree::showcollapse(), Fl_Tree::showroot(), Fl_Button::simulate_key_action(), slider_size_cb(), step_cb(), subtype_cb(), textcolor_cb(), textfont_cb(), textsize_cb(), Fl_Help_View::topline(), Fl_Table_Row::type(), Fl_Tree::usericon(), Fl_Timer::value(), Fl_Positioner::value(), Fl_File_Chooser::value(), Fl_Choice::value(), Fl_Button::value(), Fl_Progress::value(), Fl_Tree::vposition(), w_cb(), widget_size_cb(), x_cb(), Fl_Positioner::xbounds(), y_cb(), and Fl_Positioner::ybounds().
| void Fl_Widget::redraw_label | ( | ) |
Schedules the drawing of the label. Marks the widget or the parent as needing a redraw for the label area of a widget.
Definition at line 1412 of file Fl.cxx.
References align(), box(), damage(), FL_ALIGN_BOTTOM, FL_ALIGN_BOTTOM_LEFT, FL_ALIGN_BOTTOM_RIGHT, FL_ALIGN_INSIDE, FL_ALIGN_LEFT, FL_ALIGN_LEFT_BOTTOM, FL_ALIGN_LEFT_TOP, FL_ALIGN_RIGHT, FL_ALIGN_RIGHT_BOTTOM, FL_ALIGN_RIGHT_TOP, FL_ALIGN_TOP, FL_ALIGN_TOP_LEFT, FL_ALIGN_TOP_RIGHT, FL_DAMAGE_ALL, FL_DAMAGE_EXPOSE, FL_NO_BOX, H, h(), Fl_Label::measure(), w(), window(), x(), and y().
Referenced by activate(), copy_label(), deactivate(), label(), show(), and Fl_Button::value().
| void Fl_Widget::resize | ( | int | x, |
| int | y, | ||
| int | w, | ||
| int | h | ||
| ) | [virtual] |
Changes 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.
Some window managers under X11 call resize() a lot more often than needed. Please verify that the position or size of a widget did actually change before doing any extensive calculations.
position(X, Y) is a shortcut for resize(X, Y, w(), h()), and size(W, H) is a shortcut for resize(x(), y(), W, H).
| [in] | x,y | new position relative to the parent window |
| [in] | w,h | new size |
Reimplemented in Fl_Browser_, Fl_Double_Window, Fl_Gl_Window, Fl_Group, Fl_Help_View, Fl_Input_, Fl_Input_Choice, Fl_Overlay_Window, Fl_Scroll, Fl_Spinner, Fl_Table, Fl_Text_Display, Fl_Tile, Fl_Value_Input, Fl_Window, igroup, itabs, iwizard, and Overlay_Window.
Definition at line 140 of file Fl_Widget.cxx.
References H.
Referenced by align_widget_cb(), damage_resize(), Fl_Tree_Item::draw(), Fl_Tree::draw(), Fl_Scroll::draw(), Fl_Pack::draw(), fix_group_size(), fl_set_object_geometry(), group_cb(), h_cb(), Fl_Window_Type::moveallchildren(), Fl_File_Chooser::ok_label(), Fl_File_Chooser::preview(), Fl_Widget_Type::read_fdesign(), Fl_Widget_Type::read_property(), Fl_Tile::resize(), Fl_Text_Display::resize(), Fl_Help_View::resize(), Fl_Group::resize(), Fl_Browser_::resize(), resizeform(), Fl_Table::table_resized(), w_cb(), x_cb(), and y_cb().
| Fl_Color Fl_Widget::selection_color | ( | ) | const [inline] |
Gets the selection color.
Definition at line 392 of file Fl_Widget.H.
Referenced by Fl_Text_Display::clear_rect(), color2_cb(), Fl_Widget_Type::copy_properties(), Fl_Menu_::down_color(), Fl_Button::down_color(), Fl_Timer::draw(), Fl_FormsPixmap::draw(), Fl_FormsBitmap::draw(), Fl_Value_Input::draw(), Fl_Tabs::draw(), Fl_Slider::draw(), Fl_Scrollbar::draw(), Fl_Return_Button::draw(), Fl_Progress::draw(), Fl_Positioner::draw(), Fl_Menu_Item::draw(), Fl_Light_Button::draw(), Fl_Dial::draw(), Fl_Clock_Output::draw(), Fl_Button::draw(), Fl_Browser_::draw(), Fl_Adjuster::draw(), Fl_Text_Display::draw_string(), Fl_Input_::drawtext(), Fl_Adjuster::Fl_Adjuster(), Fl_Check_Button::Fl_Check_Button(), Fl_Clock_Output::Fl_Clock_Output(), Fl_Counter::Fl_Counter(), Fl_Dial::Fl_Dial(), Fl_Light_Button::Fl_Light_Button(), Fl_Menu_::Fl_Menu_(), Fl_Positioner::Fl_Positioner(), Fl_Round_Button::Fl_Round_Button(), Fl_Timer::Fl_Timer(), Fl_Value_Input::Fl_Value_Input(), Fl_Browser::item_draw(), make_about_panel(), make_code_panel(), make_comment_panel(), make_print_panel(), make_project_window(), make_sourceview(), make_widget_panel(), Fl_Widget_Type::read_property(), Fl_Widget_Type::write_properties(), and Fl_Widget_Type::write_widget_code().
| void Fl_Widget::selection_color | ( | Fl_Color | a | ) | [inline] |
Sets the selection color. The selection color is defined for Forms compatibility and is usually used to color the widget when it is selected, although some widgets use this color for other purposes. You can set both colors at once with color(Fl_Color bg, Fl_Color sel).
| [in] | a | the new selection color |
Definition at line 402 of file Fl_Widget.H.
| void Fl_Widget::set_changed | ( | ) | [inline] |
Marks the value of the widget as changed.
Reimplemented in Fl_Input_Choice.
Definition at line 779 of file Fl_Widget.H.
References CHANGED.
Referenced by Fl_Tree::deselect(), Fl_Tile::handle(), Fl_Text_Editor::handle(), Fl_Tabs::handle(), Fl_Scrollbar::handle(), Fl_Positioner::handle(), Fl_Button::handle(), Fl_Browser_::handle(), Shortcut_Button::handle(), Fl_Valuator::handle_drag(), Fl_Text_Editor::handle_key(), Fl_Color_Chooser::hsv(), Fl_Text_Editor::kf_backspace(), Fl_Text_Editor::kf_cut(), Fl_Text_Editor::kf_default(), Fl_Text_Editor::kf_delete(), Fl_Text_Editor::kf_enter(), Fl_Text_Editor::kf_paste(), Fl_Text_Editor::kf_undo(), Fl_Help_Dialog::load(), Fl_Menu_::picked(), Fl_Input_::replace(), Fl_Color_Chooser::rgb(), Fl_Browser_::select(), Fl_Tree::select(), Fl_Tree::select_toggle(), Fl_Input_::undo(), Fl_Help_View::value(), and Fl_Help_Dialog::value().
| void Fl_Widget::set_flag | ( | unsigned int | c | ) | [inline, protected] |
Sets a flag in the flags mask
Definition at line 157 of file Fl_Widget.H.
Referenced by Fl_Window::border(), Fl_Window::clear_border(), Fl_Group::clip_children(), Fl_Window::copy_label(), copy_label(), copy_tooltip(), deactivate(), Fl_Button::Fl_Button(), Fl_Free::Fl_Free(), Fl_Input_::Fl_Input_(), Fl_Menu_::Fl_Menu_(), Fl_Text_Display::Fl_Text_Display(), Fl_Value_Input::Fl_Value_Input(), Fl_Window::Fl_Window(), Fl_Window::force_position(), hide(), Fl_Window::resize(), Fl_Window::set_menu_window(), Fl_Window::set_modal(), Fl_Window::set_non_modal(), Fl_Window::set_override(), and Fl_Window::set_tooltip_window().
| void Fl_Widget::set_output | ( | ) | [inline] |
Sets a widget to output only.
Definition at line 743 of file Fl_Widget.H.
References OUTPUT.
| void Fl_Widget::set_visible | ( | ) | [inline] |
Makes the widget visible. You must still redraw the parent widget to see a change in the window. Normally you want to use the show() method instead.
Definition at line 687 of file Fl_Widget.H.
References INVISIBLE.
Referenced by Fl_Scroll::draw(), Fl_Browser_::draw(), Fl_Window::hide(), Fl_X::make(), Fl_X::make_xid(), and Fl_Text_Display::resize().
| void Fl_Widget::set_visible_focus | ( | ) | [inline] |
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.
Definition at line 801 of file Fl_Widget.H.
References VISIBLE_FOCUS.
Referenced by visible_focus().
| void Fl_Widget::show | ( | ) | [virtual] |
Makes a widget visible. 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.
Reimplemented in Fl_Browser, Fl_Double_Window, Fl_Gl_Window, Fl_Menu_Window, Fl_Overlay_Window, Fl_Single_Window, Fl_Window, and Fl_TooltipBox.
Definition at line 261 of file Fl_Widget.cxx.
References clear_flag(), FL_SHOW, Fl::focus(), handle(), inside(), INVISIBLE, redraw(), redraw_label(), take_focus(), visible(), and visible_r().
Referenced by border_cb(), Fl_Tree::draw(), Fl_Scroll_Type::enter_live_mode(), Fl_Help_View::Fl_Help_View(), fl_show_object(), i18n_type_cb(), min_w_cb(), modal_cb(), name_cb(), name_public_cb(), name_public_member_cb(), new_cb(), non_modal_cb(), Fl_Data_Type::open(), Fl_Decl_Type::open(), Fl_Function_Type::open(), Fl_File_Chooser::preview(), print_cb(), Fl_Table::recalc_dimensions(), save_template_cb(), shortcut_in_cb(), Fl_Browser::show(), show_project_cb(), Fl_Tree_Item::show_widgets(), slider_size_cb(), Fl_Wizard::value(), Fl_Tabs::value(), visible_cb(), wc_relative_cb(), and xclass_cb().
| void Fl_Widget::size | ( | int | W, |
| int | H | ||
| ) | [inline] |
Changes the size of the widget.
size(W, H) is a shortcut for resize(x(), y(), W, H).
| [in] | W,H | new size |
Reimplemented in Fl_Browser, Fl_Chart, Fl_Help_View, Fl_Input_, and Fl_Menu_.
Definition at line 337 of file Fl_Widget.H.
References Fl_Group::resize().
Referenced by Fl_File_Chooser::add_extra(), fl_scale_form(), fl_set_form_size(), fl_set_object_size(), glutReshapeWindow(), Fl_Window_Type::read_fdesign(), Fl_Text_Display::resize(), resizeform(), Fl_Tree::scrollbar_size(), Fl_Scroll::scrollbar_size(), Fl_Help_View::scrollbar_size(), and Fl_Window::show().
| int Fl_Widget::take_focus | ( | ) |
Gives the widget the keyboard focus. Tries to make this widget be the Fl::focus() widget, by first sending it an FL_FOCUS event, and if it returns non-zero, setting Fl::focus() to this widget. You should use this method to assign the focus to a widget.
Definition at line 152 of file Fl_Widget.cxx.
References contains(), FL_FOCUS, Fl::focus(), handle(), takesevents(), and visible_focus().
Referenced by activate(), fl_fix_focus(), Fl_Group::focus(), Fl_Value_Input::handle(), Fl_Table::handle(), Fl_Input::handle(), Fl_Group::handle(), Shortcut_Button::handle(), show(), and Fl_File_Chooser::show().
| unsigned int Fl_Widget::takesevents | ( | ) | const [inline] |
Returns if the widget is able to take events. This is the same as (active() && !output() && visible()) but is faster.
| 0 | if the widget takes no events |
Definition at line 755 of file Fl_Widget.H.
References active_r(), output(), and visible_r().
Referenced by Fl_Group::handle(), and take_focus().
| int Fl_Widget::test_shortcut | ( | ) |
Returns true if the widget's label contains the entered '&x' shortcut.
This method must only be called in handle() methods or callbacks after a keypress event (usually FL_KEYDOWN or FL_SHORTCUT). The widget's label is searched for a '&x' shortcut, and if found, this is compared with the entered key value.
Fl::event_text() is used to get the entered key value.
Reimplemented in Fl_Menu_.
Definition at line 368 of file fl_shortcut.cxx.
References flags(), label(), and SHORTCUT_LABEL.
Referenced by Fl_Text_Editor::handle(), Fl_Text_Display::handle(), Fl_Tabs::handle(), Fl_Menu_Button::handle(), Fl_Choice::handle(), Fl_Button::handle(), and Fl_Input_::handletext().
| int Fl_Widget::test_shortcut | ( | const char * | t, |
| const bool | require_alt = false |
||
| ) | [static] |
Returns true if the given text t contains the entered '&x' shortcut.
This method must only be called in handle() methods or callbacks after a keypress event (usually FL_KEYDOWN or FL_SHORTCUT). The given text t (usually a widget's label or menu text) is searched for a '&x' shortcut, and if found, this is compared with the entered key value.
Fl::event_text() is used to get the entered key value. Fl::event_state() is used to get the Alt modifier, if require_alt is true.
| t | text or label to search for '&x' shortcut. |
| require_alt | if true: match only if Alt key is pressed. |
t false (0) otherwise.Definition at line 342 of file fl_shortcut.cxx.
References Fl::event_length(), Fl::event_state(), Fl::event_text(), FL_ALT, fl_utf8decode(), and label_shortcut().
| void Fl_Widget::tooltip | ( | const char * | text | ) |
Sets the current tooltip text.
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. If you want a copy made and managed for you, use the copy_tooltip() method, which will manage the tooltip string automatically.
If no tooltip is set, the tooltip of the parent is inherited. Setting a tooltip for a group and setting no tooltip for a child will show the group's tooltip instead. To avoid this behavior, you can set the child's tooltip to an empty string ("").
| [in] | text | New tooltip text (no copy is made) |
Definition at line 304 of file Fl_Tooltip.cxx.
References clear_flag(), COPIED_TOOLTIP, and flags().
| const char* Fl_Widget::tooltip | ( | ) | const [inline] |
Gets the current tooltip text.
Definition at line 548 of file Fl_Widget.H.
Referenced by Fl_Widget_Type::copy_properties(), Fl_Tooltip::current(), Fl_File_Chooser::Fl_File_Chooser(), Fl_Help_Dialog::Fl_Help_Dialog(), make_class_panel(), make_codeblock_panel(), make_comment_panel(), make_data_panel(), make_decl_panel(), make_declblock_panel(), make_function_panel(), make_global_settings_window(), make_layout_window(), make_main_window(), make_project_window(), make_settings_window(), make_widget_panel(), make_widgetbin(), and Fl_Widget_Type::tooltip().
| void Fl_Widget::type | ( | uchar | t | ) | [inline] |
Sets the widget type. This is used for Forms compatibility.
Reimplemented in Fl_Spinner.
Definition at line 275 of file Fl_Widget.H.
| uchar Fl_Widget::type | ( | ) | const [inline] |
Gets the widget type. Returns the widget type value, which is used for Forms compatibility and to simulate RTTI.
Reimplemented in Fl_Spinner, and Fl_Table_Row.
Definition at line 270 of file Fl_Widget.H.
Referenced by Fl_Widget_Type::copy_properties(), Fl_Scroll_Type::copy_properties(), damage(), Fl_Browser_::deselect(), Fl_Timer::draw(), Fl_Slider::draw(), Fl_Return_Button::draw(), Fl_Menu_Button::draw(), Fl_Dial::draw(), Fl_Counter::draw(), Fl_Clock_Output::draw(), Fl_Chart::draw(), Fl_Button::draw(), Fl_Group::draw_child(), fl_add_button(), fl_add_new(), Fl_Browser_::Fl_Browser_(), Fl_Check_Browser::Fl_Check_Browser(), Fl_Clock::Fl_Clock(), Fl_Double_Window::Fl_Double_Window(), Fl_File_Chooser::Fl_File_Chooser(), Fl_Fill_Dial::Fl_Fill_Dial(), Fl_Fill_Slider::Fl_Fill_Slider(), Fl_Float_Input::Fl_Float_Input(), Fl_Free::Fl_Free(), Fl_Help_View::Fl_Help_View(), Fl_Hold_Browser::Fl_Hold_Browser(), Fl_Hor_Fill_Slider::Fl_Hor_Fill_Slider(), Fl_Hor_Nice_Slider::Fl_Hor_Nice_Slider(), Fl_Hor_Slider::Fl_Hor_Slider(), Fl_Hor_Value_Slider::Fl_Hor_Value_Slider(), Fl_Int_Input::Fl_Int_Input(), Fl_Light_Button::Fl_Light_Button(), Fl_Line_Dial::Fl_Line_Dial(), Fl_Multi_Browser::Fl_Multi_Browser(), Fl_Multiline_Input::Fl_Multiline_Input(), Fl_Multiline_Output::Fl_Multiline_Output(), Fl_Nice_Slider::Fl_Nice_Slider(), Fl_Output::Fl_Output(), Fl_Radio_Button::Fl_Radio_Button(), Fl_Radio_Light_Button::Fl_Radio_Light_Button(), Fl_Radio_Round_Button::Fl_Radio_Round_Button(), Fl_Round_Clock::Fl_Round_Clock(), Fl_Scroll::Fl_Scroll(), Fl_Secret_Input::Fl_Secret_Input(), Fl_Select_Browser::Fl_Select_Browser(), Fl_Simple_Counter::Fl_Simple_Counter(), Fl_Slider::Fl_Slider(), Fl_Table::Fl_Table(), Fl_Text_Display::Fl_Text_Display(), Fl_Timer::Fl_Timer(), Fl_Toggle_Button::Fl_Toggle_Button(), Fl_Tree::Fl_Tree(), Fl_Menu_Item_Type::flags(), Fl_Group::forms_end(), Fl_Free::handle(), Fl_Value_Input::handle(), Fl_Slider::handle(), Fl_Scrollbar::handle(), Fl_Menu_Button::handle(), Fl_Button::handle(), Fl_Browser_::handle(), Fl_Window::handle(), Shortcut_Button::handle(), Fl_Valuator::horizontal(), Fl_Pack::horizontal(), Fl_Input_::input_type(), make_layout_window(), make_print_panel(), make_project_window(), make_template_panel(), make_widget_panel(), Fl_Menu_Button::popup(), Fl_Widget_Type::read_fdesign(), Fl_Widget_Type::read_property(), Fl_Input_::readonly(), Fl_Group::resize(), Fl_Browser_::select(), Fl_Browser_::select_only(), Fl_Button::setonly(), Fl_Group::sizes(), subclassname(), subtype_cb(), Fl_File_Chooser::type(), Fl_Group::update_child(), Fl_Timer::value(), Widget_Browser::Widget_Browser(), Fl_Input_::wrap(), and Fl_Widget_Type::write_properties().
| void* Fl_Widget::user_data | ( | ) | const [inline] |
Gets the user data for this widget. Gets the current user data (void *) argument that is passed to the callback function.
Definition at line 589 of file Fl_Widget.H.
Referenced by align_cb(), Fl_Tabs_Type::click_test(), Fl_Tree::do_callback_for_item(), Fl_File_Chooser::Fl_File_Chooser(), Fl_Help_Dialog::Fl_Help_Dialog(), Fl_Widget_Type::make(), user_data_cb(), and v_input_cb().
| void Fl_Widget::user_data | ( | void * | v | ) | [inline] |
Sets the user data for this widget. Sets the new user data (void *) argument that is passed to the callback function.
| [in] | v | new user data |
Definition at line 595 of file Fl_Widget.H.
| unsigned int Fl_Widget::visible | ( | ) | const [inline] |
Returns whether a widget is visible.
| 0 | if the widget is not drawn and hence invisible. |
Definition at line 654 of file Fl_Widget.H.
References INVISIBLE.
Referenced by Fl_Scroll::bbox(), Fl_Browser_::bbox(), Fl_Widget_Type::copy_properties(), Fl_Tree::draw(), Fl_Text_Display::draw(), Fl_Table::draw(), Fl_Scroll::draw(), Fl_Pack::draw(), Fl_Browser_::draw(), Fl_Group::draw_child(), Fl_Group::draw_outside_label(), Fl_Tooltip::enter_area(), fl_form_is_visible(), Fl_Menu_Item_Type::flags(), Fl_Tree::handle(), Fl_Tabs::handle(), Fl_Group::handle(), Fl_Window::handle(), Fl_X::make_xid(), Fl_Paged_Device::print_widget(), Fl_Tabs::push(), Fl_Text_Display::resize(), Fl_Scroll::resize(), resizeform(), save_position(), selection_changed(), set_modflag(), show(), Fl_Table::table_resized(), toggle_sourceview_cb(), toggle_widgetbin_cb(), Fl_Group::update_child(), update_sourceview_cb(), update_sourceview_position(), Fl_Wizard::value(), Fl_Tabs::value(), Fl_Help_Dialog::visible(), Fl_File_Chooser::visible(), visible_cb(), visible_r(), Fl_Window_Type::write_properties(), Fl_Widget_Type::write_properties(), and Fl_Widget_Type::write_widget_code().
| void Fl_Widget::visible_focus | ( | int | v | ) | [inline] |
Modifies keyboard focus navigation.
| [in] | v | set or clear visible focus |
Definition at line 813 of file Fl_Widget.H.
References clear_visible_focus(), and set_visible_focus().
Referenced by Fl::focus().
| unsigned int Fl_Widget::visible_focus | ( | ) | [inline] |
Checks whether this widget has a visible focus.
| 0 | if this widget has no visible focus. |
Definition at line 819 of file Fl_Widget.H.
References VISIBLE_FOCUS.
Referenced by Fl_Tree::handle(), Fl_Tree::set_item_focus(), Fl_Window::show(), and take_focus().
| int Fl_Widget::visible_r | ( | ) | const |
Returns whether a widget and all its parents are visible.
| 0 | if the widget or any of its parents are invisible. |
Definition at line 285 of file Fl_Widget.cxx.
References parent(), and visible().
Referenced by Fl_Text_Display::buffer_modified_cb(), Fl_Text_Display::draw_line_numbers(), Fl_Window_Type::draw_overlay(), Fl::flush(), Fl_Menu_Bar::handle(), Fl_Gl_Window::handle(), hide(), Fl_Window::make_current(), show(), takesevents(), and update_sourceview_position().
| int Fl_Widget::w | ( | ) | const [inline] |
Gets the widget width.
Definition at line 290 of file Fl_Widget.H.
Referenced by Fl_Scroll::bbox(), Fl_Browser_::bbox(), Fl_Text_Display::buffer(), Fl_Group::clear(), Fl_Tabs::client_area(), damage(), damage_resize(), Fl_Timer::draw(), Fl_FormsPixmap::draw(), Fl_FormsBitmap::draw(), Fl_Window::draw(), Fl_Value_Slider::draw(), Fl_Value_Output::draw(), Fl_Tree::draw(), Fl_TooltipBox::draw(), Fl_Text_Display::draw(), Fl_Tabs::draw(), Fl_Table::draw(), Fl_Slider::draw(), Fl_Scrollbar::draw(), Fl_Scroll::draw(), Fl_Roller::draw(), Fl_Return_Button::draw(), Fl_Progress::draw(), Fl_Positioner::draw(), Fl_Pack::draw(), Fl_Menu_Button::draw(), Fl_Light_Button::draw(), Fl_Input::draw(), Fl_File_Input::draw(), Fl_Dial::draw(), Fl_Counter::draw(), Flcc_ValueBox::draw(), Flcc_HueBox::draw(), Fl_Clock_Output::draw(), Fl_Choice::draw(), Fl_Chart::draw(), Fl_Browser_::draw(), Fl_Adjuster::draw(), Shortcut_Button::draw(), Fl_Group::draw_children(), Fl_Group::draw_outside_label(), menuwindow::find_selected(), Fl_Text_Display::find_x(), Fl_Table::Fl_Table(), Fl_Double_Window::flush(), Fl_Group::forms_end(), Fl_Window::fullscreen(), Fl_Value_Slider::handle(), Fl_Table::handle(), Fl_Slider::handle(), Fl_Scrollbar::handle(), Fl_Positioner::handle(), Fl_Menu_Bar::handle(), Fl_Input::handle(), Fl_Dial::handle(), Flcc_HueBox::handle(), Fl_Choice::handle(), Fl_Button::handle(), Fl_Browser_::handle(), Fl_Adjuster::handle(), Flcc_HueBox::handle_key(), Fl_Text_Display::handle_vline(), Fl_Input_::handletext(), Fl_Window::hotspot(), menuwindow::is_inside(), Fl_Help_View::leftline(), Fl_Window::make_current(), menuwindow::menuwindow(), Fl_Menu_Button::popup(), Overlay_Window::read_image(), Fl_Table::recalc_dimensions(), redraw_label(), Fl_Tabs::redraw_tabs(), Fl_Tile::resize(), Fl_Text_Display::resize(), Fl_Scroll::resize(), Fl_Overlay_Window::resize(), Fl_Window::resize(), Fl_Input_::resize(), Fl_Help_View::resize(), Fl_Group::resize(), Fl_Double_Window::resize(), Overlay_Window::resize(), ColorMenu::run(), Fl_Text_Display::scroll(), Fl_Text_Display::scroll_timer_cb(), Fl_Tree::scrollbar_size(), Fl_Window::show(), Fl_Text_Display::show_insert_position(), Fl_Group::sizes(), and Fl_Text_Display::wrap_mode().
| void Fl_Widget::w | ( | int | v | ) | [inline, protected] |
Internal use only. Use position(int,int), size(int,int) or resize(int,int,int,int) instead.
Definition at line 151 of file Fl_Widget.H.
Referenced by Fl_File_Chooser::add_extra(), align_widget_cb(), Fl_Scroll::bbox(), Fl_Tabs::client_area(), damage(), Fl_Tree_Item::draw(), Fl_Text_Display::draw(), Fl_Table::draw(), Fl_Scroll::draw(), Fl_Pack::draw(), Fl_Group::draw_child(), Fl_Group::draw_outside_label(), Fl_Window_Type::draw_overlay(), Fl_Window_Type::enter_live_mode(), Fl_Widget_Type::enter_live_mode(), Fl_Scroll_Type::enter_live_mode(), Fl_Table_Type::enter_live_mode(), Fl_Tabs_Type::enter_live_mode(), Fl_Group_Type::enter_live_mode(), Fl_X::fake_X_wm(), fix_group_size(), Fl_File_Chooser::Fl_File_Chooser(), fl_get_object_geometry(), Fl_Native_File_Chooser::Fl_Native_File_Chooser(), fl_scale_form(), fl_show_form(), Fl_Group::forms_end(), group_cb(), h_cb(), Fl_Tile::handle(), Fl::handle(), Fl_Window_Type::handle(), Fl_Window::hide(), Fl_Window::hotspot(), Fl_Menu_Bar_Type::ideal_size(), Fl_Input_Choice_Type::ideal_size(), Fl_Value_Output_Type::ideal_size(), Fl_Return_Button_Type::ideal_size(), live_mode_cb(), Fl_X::make(), Fl_Widget_Type::make(), make_codeblock_panel(), Fl_Window::make_current(), make_declblock_panel(), make_print_panel(), make_widget_panel(), Fl_X::make_xid(), Fl_Window_Type::newposition(), Fl_Tile::position(), Fl_File_Chooser::preview(), Fl_Paged_Device::print_widget(), Fl_Menu_Item::pulldown(), Fl_Window_Type::read_fdesign(), Fl_File_Chooser::rescan_keep_filename(), Fl_Tile::resize(), Fl_Scroll::resize(), Fl_Group::resize(), save_position(), Fl_X::sendxjunk(), set_max_size_cb(), set_min_size_cb(), Fl_Group::sizes(), Fl_Group::update_child(), Fl_Help_Dialog::w(), Fl_Widget_Class_Type::write_code1(), Fl_Widget_Type::write_code1(), Fl_Widget_Type::write_properties(), x_cb(), and y_cb().
| Fl_When Fl_Widget::when | ( | ) | const [inline] |
Returns the conditions under which the callback is called.
You can set the flags with when(uchar), the default value is FL_WHEN_RELEASE.
Definition at line 615 of file Fl_Widget.H.
Referenced by Fl_Table::col_width(), fl_add_button(), Fl_Browser_::Fl_Browser_(), Fl_Check_Browser::Fl_Check_Browser(), Fl_Choice::Fl_Choice(), Fl_File_Chooser::Fl_File_Chooser(), Fl_Help_Dialog::Fl_Help_Dialog(), Fl_Menu_::Fl_Menu_(), Fl_Positioner::Fl_Positioner(), fl_set_object_return(), Fl_Tree::Fl_Tree(), Fl_Valuator::Fl_Valuator(), Fl_Value_Input::Fl_Value_Input(), Fl_Value_Input::handle(), Fl_Tree::handle(), Fl_Text_Editor::handle(), Fl_Table::handle(), Fl_Positioner::handle(), Fl_Button::handle(), Fl_Browser_::handle(), Shortcut_Button::handle(), Fl_Valuator::handle_drag(), Fl_Text_Editor::handle_key(), Fl_Valuator::handle_release(), Fl_Input_::handletext(), Fl_Text_Editor::kf_backspace(), Fl_Text_Editor::kf_cut(), Fl_Text_Editor::kf_default(), Fl_Text_Editor::kf_delete(), Fl_Text_Editor::kf_enter(), Fl_Text_Editor::kf_paste(), Fl_Text_Editor::kf_undo(), labeltype_cb(), make_class_panel(), make_code_panel(), make_codeblock_panel(), make_comment_panel(), make_data_panel(), make_decl_panel(), make_declblock_panel(), make_function_panel(), make_layout_window(), make_print_panel(), make_project_window(), make_settings_window(), make_sourceview(), make_template_panel(), make_widget_panel(), Fl_Text_Editor::maybe_do_callback(), Fl_Input_::maybe_do_callback(), Fl_Menu_::picked(), Fl_Widget_Type::read_fdesign(), Fl_Widget_Type::read_property(), Fl_Input_::replace(), Fl_Table::row_height(), Fl_Input_::undo(), when_button_cb(), when_cb(), Widget_Browser::Widget_Browser(), Fl_Widget_Type::write_properties(), and Fl_Widget_Type::write_widget_code().
| void Fl_Widget::when | ( | uchar | i | ) | [inline] |
Sets the flags used to decide when a callback is called.
This controls when callbacks are done. The following values are useful, the default value is FL_WHEN_RELEASE:
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.
| [in] | i | set of flags |
Definition at line 648 of file Fl_Widget.H.
References i.
| Fl_Window * Fl_Widget::window | ( | ) | const |
Returns a pointer to the primary Fl_Window widget.
| NULL | if no window is associated with this widget. |
Definition at line 86 of file Fl_Window.cxx.
References FL_WINDOW, and parent().
Referenced by align_widget_cb(), callback_cb(), carbonKeyboardHandler(), carbonTextHandler(), Fluid_Image::deimage(), Fl_Input_::drawtext(), FLDropTarget::Drop(), Fl_File_Chooser::Fl_File_Chooser(), fl_find(), fl_handle(), Fl_Native_File_Chooser::Fl_Native_File_Chooser(), FL_ObjWin(), fl_read_image(), fl_set_spot(), Fl::focus(), Fl_Group::forms_end(), h_cb(), Fl_Text_Editor::handle(), Fl_Text_Display::handle(), Fl_Input::handle(), Fl_File_Input::handle(), Fl_Button::handle(), Fl::handle(), Overlay_Window::handle(), Fl_Input_::handletext(), Fl_Window::hide(), Fl_Window::hotspot(), Fl_Menu_Bar_Type::ideal_size(), Fluid_Image::image(), Fl_TooltipBox::layout(), MacMapWindow(), Fl_X::make(), make_class_panel(), make_code_panel(), make_codeblock_panel(), make_comment_panel(), Fl_Window::make_current(), make_data_panel(), make_decl_panel(), make_declblock_panel(), make_function_panel(), Fl_X::make_xid(), Fl_Menu_Item::pulldown(), Fl_Widget_Type::read_property(), redraw_label(), Fl_Scroll::scroll_to(), Fl_Wizard::value(), w_cb(), widget_size_cb(), x_cb(), Fl_Window::x_root(), y_cb(), and Fl_Window::y_root().
| void Fl_Widget::x | ( | int | v | ) | [inline, protected] |
Internal use only. Use position(int,int), size(int,int) or resize(int,int,int,int) instead.
Definition at line 147 of file Fl_Widget.H.
Referenced by align_widget_cb(), Fl_Tabs::client_area(), FLDropTarget::DragEnter(), FLDropTarget::DragOver(), Fl_Text_Display::draw(), Fl_Table::draw(), Fl_Scroll::draw(), Fl_Pack::draw(), Fl_Browser_::draw(), Fl_Group::draw_child(), Fl_Group::draw_outside_label(), Fl_Window_Type::draw_overlay(), FLDropTarget::Drop(), Fl_Window_Type::enter_live_mode(), Fl_Widget_Type::enter_live_mode(), Fl_Scroll_Type::enter_live_mode(), Fl_Table_Type::enter_live_mode(), Fl_Tabs_Type::enter_live_mode(), Fl_Group_Type::enter_live_mode(), Fl::event_inside(), Fl_X::fake_X_wm(), fix_group_size(), fl_fix_focus(), fl_get_object_geometry(), fl_get_object_position(), fl_handle(), Fl_Native_File_Chooser::Fl_Native_File_Chooser(), fl_show_form(), Fl_Group::forms_end(), group_cb(), h_cb(), Fl_Tile::handle(), Fl::handle(), Fl_Window_Type::handle(), Fl_Window::hotspot(), Fl_X::make(), Fl_Widget_Type::make(), Fl_Window::make_current(), Fl_X::make_xid(), Fl_Window_Type::newposition(), Fl_File_Chooser::ok_label(), Fl_Tile::position(), Fl_File_Chooser::preview(), Fl_Paged_Device::print_widget(), Fl_Menu_Item::pulldown(), Fl_Widget_Type::read_property(), Fl_Tile::resize(), Fl_Scroll::resize(), Fl_Group::resize(), save_position(), Fl_Scroll::scroll_to(), Fl_X::sendxjunk(), Fl_Group::sizes(), sort(), Fl_Group::update_child(), w_cb(), Fl_Widget_Type::write_code1(), Fl_Widget_Type::write_properties(), Fl_Help_Dialog::x(), Fl_X::x(), and y_cb().
| int Fl_Widget::x | ( | ) | const [inline] |
Gets the widget position in its window.
Definition at line 280 of file Fl_Widget.H.
Referenced by menuwindow::autoscroll(), Fl_Scroll::bbox(), Fl_Browser_::bbox(), Fl_Text_Display::buffer(), Fl_Tabs::client_area(), damage(), damage_resize(), Fl_Timer::draw(), Fl_FormsPixmap::draw(), Fl_FormsBitmap::draw(), Fl_Value_Slider::draw(), Fl_Value_Output::draw(), Fl_Tree::draw(), Fl_Text_Display::draw(), Fl_Tabs::draw(), Fl_Table::draw(), Fl_Slider::draw(), Fl_Scrollbar::draw(), Fl_Scroll::draw(), Fl_Roller::draw(), Fl_Return_Button::draw(), Fl_Progress::draw(), Fl_Positioner::draw(), Fl_Pack::draw(), Fl_Menu_Button::draw(), Fl_Menu_Bar::draw(), Fl_Light_Button::draw(), Fl_Input::draw(), Fl_File_Input::draw(), Fl_Dial::draw(), Fl_Counter::draw(), Flcc_ValueBox::draw(), Flcc_HueBox::draw(), Fl_Clock_Output::draw(), Fl_Choice::draw(), Fl_Chart::draw(), Fl_Browser_::draw(), Fl_Adjuster::draw(), Shortcut_Button::draw(), Fl_Group::draw_children(), Fl_Group::draw_outside_label(), menuwindow::find_selected(), Fl_Table::Fl_Table(), Fl_Group::forms_end(), Fl_Window::fullscreen(), Fl_Value_Slider::handle(), Fl_Tile::handle(), Fl_Table::handle(), Fl_Slider::handle(), Fl_Scrollbar::handle(), Fl_Positioner::handle(), Fl_Menu_Bar::handle(), Fl_Input::handle(), Fl_Dial::handle(), Flcc_HueBox::handle(), Fl_Choice::handle(), Fl_Button::handle(), Fl_Browser_::handle(), Fl_Adjuster::handle(), Fl_Input_::handletext(), Fl_Window::hotspot(), menuwindow::menuwindow(), Fl_Menu_Button::popup(), Fl_Table::recalc_dimensions(), redraw_label(), Fl_Tabs::redraw_tabs(), Fl_Tile::resize(), Fl_Scroll::resize(), Fl_Window::resize(), Fl_Help_View::resize(), Fl_Group::resize(), Fl_Text_Display::scroll(), Fl_Tree::scrollbar_size(), Fl_Window::show(), Fl_Text_Display::show_insert_position(), Fl_Group::sizes(), Fl_Table::table_scrolled(), Fl_Tabs::which(), Fl_Text_Display::wrap_mode(), and Fl_Window::x_root().
| void Fl_Widget::y | ( | int | v | ) | [inline, protected] |
Internal use only. Use position(int,int), size(int,int) or resize(int,int,int,int) instead.
Definition at line 149 of file Fl_Widget.H.
Referenced by Fl_File_Chooser::add_extra(), align_widget_cb(), Fl_Tabs::client_area(), FLDropTarget::DragEnter(), FLDropTarget::DragOver(), Fl_Text_Display::draw(), Fl_Table::draw(), Fl_Scroll::draw(), Fl_Pack::draw(), Fl_Browser_::draw(), Fl_Group::draw_child(), Fl_Group::draw_outside_label(), Fl_Window_Type::draw_overlay(), FLDropTarget::Drop(), Fl_Window_Type::enter_live_mode(), Fl_Widget_Type::enter_live_mode(), Fl_Scroll_Type::enter_live_mode(), Fl_Table_Type::enter_live_mode(), Fl_Tabs_Type::enter_live_mode(), Fl_Group_Type::enter_live_mode(), Fl::event_inside(), Fl_X::fake_X_wm(), fix_group_size(), fl_fix_focus(), fl_get_object_geometry(), fl_get_object_position(), fl_handle(), Fl_Native_File_Chooser::Fl_Native_File_Chooser(), fl_show_form(), Fl_Group::forms_end(), group_cb(), h_cb(), Fl_Tile::handle(), Fl::handle(), Fl_Window_Type::handle(), Fl_Window::hotspot(), Fl_X::make(), Fl_Widget_Type::make(), Fl_Window::make_current(), Fl_X::make_xid(), Fl_Window_Type::newposition(), Fl_File_Chooser::ok_label(), Fl_Tile::position(), menuwindow::position(), Fl_File_Chooser::preview(), Fl_Paged_Device::print_widget(), Fl_Menu_Item::pulldown(), Fl_Widget_Type::read_property(), Fl_Tile::resize(), Fl_Scroll::resize(), Fl_Group::resize(), save_position(), Fl_Scroll::scroll_to(), Fl_X::sendxjunk(), Fl_Group::sizes(), sort(), Fl_Group::update_child(), w_cb(), Fl_Widget_Type::write_code1(), Fl_Widget_Type::write_properties(), x_cb(), Fl_Help_Dialog::y(), and Fl_X::y().
| int Fl_Widget::y | ( | ) | const [inline] |
Gets the widget position in its window.
Definition at line 285 of file Fl_Widget.H.
Referenced by menuwindow::autoscroll(), Fl_Scroll::bbox(), Fl_Browser_::bbox(), Fl_Text_Display::buffer(), Fl_Tabs::client_area(), damage(), damage_resize(), Fl_Tree::displayed(), Fl_Timer::draw(), Fl_FormsPixmap::draw(), Fl_FormsBitmap::draw(), Fl_Value_Slider::draw(), Fl_Value_Output::draw(), Fl_Tree::draw(), Fl_Text_Display::draw(), Fl_Tabs::draw(), Fl_Table::draw(), Fl_Slider::draw(), Fl_Scrollbar::draw(), Fl_Scroll::draw(), Fl_Roller::draw(), Fl_Return_Button::draw(), Fl_Progress::draw(), Fl_Positioner::draw(), Fl_Pack::draw(), Fl_Menu_Button::draw(), Fl_Menu_Bar::draw(), Fl_Light_Button::draw(), Fl_Input::draw(), Fl_File_Input::draw(), Fl_Dial::draw(), Fl_Counter::draw(), Flcc_ValueBox::draw(), Flcc_HueBox::draw(), Fl_Clock_Output::draw(), Fl_Choice::draw(), Fl_Chart::draw(), Fl_Browser_::draw(), Fl_Adjuster::draw(), Shortcut_Button::draw(), Fl_Group::draw_children(), Fl_Text_Display::draw_line_numbers(), Fl_Group::draw_outside_label(), menuwindow::find_selected(), Fl_Table::Fl_Table(), Fl_Group::forms_end(), Fl_Window::fullscreen(), Fl_Value_Slider::handle(), Fl_Tree::handle(), Fl_Tile::handle(), Fl_Tabs::handle(), Fl_Table::handle(), Fl_Slider::handle(), Fl_Scrollbar::handle(), Fl_Positioner::handle(), Fl_Menu_Bar::handle(), Fl_Input::handle(), Fl_File_Input::handle(), Fl_Dial::handle(), Flcc_ValueBox::handle(), Flcc_HueBox::handle(), Fl_Choice::handle(), Fl_Button::handle(), Fl_Adjuster::handle(), Fl_Input_::handletext(), menuwindow::menuwindow(), Fl_Menu_Button::popup(), menuwindow::position(), Fl_Table::recalc_dimensions(), redraw_label(), Fl_Tabs::redraw_tabs(), Fl_Tile::resize(), Fl_Scroll::resize(), Fl_Window::resize(), Fl_Help_View::resize(), Fl_Group::resize(), ColorMenu::run(), Fl_Text_Display::scroll(), Fl_Window::show(), Fl_Text_Display::show_insert_position(), Fl_Tree::show_item(), Fl_Group::sizes(), Fl_Table::table_scrolled(), Fl_Tabs::which(), Fl_Text_Display::wrap_mode(), Fl_Window::y_root(), and Fl_Input_::yscroll().
friend class Fl_Group [friend] |
Definition at line 110 of file Fl_Widget.H.