|
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_Input_Choice.H>


Classes | |
| class | InputMenuButton |
Public Member Functions | |
| Fl_Input_Choice (int x, int y, int w, int h, const char *l=0) | |
| void | add (const char *s) |
| int | changed () const |
| void | clear_changed () |
| void | set_changed () |
| void | clear () |
| Fl_Boxtype | down_box () const |
| void | down_box (Fl_Boxtype b) |
| const Fl_Menu_Item * | menu () |
| void | menu (const Fl_Menu_Item *m) |
| void | resize (int X, int Y, int W, int H) |
| Fl_Color | textcolor () const |
| void | textcolor (Fl_Color c) |
| Fl_Font | textfont () const |
| void | textfont (Fl_Font f) |
| Fl_Fontsize | textsize () const |
| void | textsize (Fl_Fontsize s) |
| const char * | value () const |
| void | value (const char *val) |
| void | value (int val) |
| Fl_Menu_Button * | menubutton () |
| Fl_Input * | input () |
A combination of the input widget and a menu button. The user can either type into the input area, or use the menu button chooser on the right, which loads the input area with predefined text. Normally it is drawn with an inset box and a white background.
The application can directly access both the input and menu widgets directly, using the menubutton() and input() accessor methods.
Definition at line 59 of file Fl_Input_Choice.H.
| Fl_Input_Choice::Fl_Input_Choice | ( | int | x, |
| int | y, | ||
| int | w, | ||
| int | h, | ||
| const char * | l = 0 |
||
| ) | [inline] |
Creates a new Fl_Input_Choice widget using the given position, size, and label string.
Inherited destructor Destroys the widget and any value associated with it.
Definition at line 142 of file Fl_Input_Choice.H.
References Fl_Widget::align(), Fl_Widget::box(), Fl_Menu_Item::callback(), Fl_Group::end(), FL_ALIGN_LEFT, FL_DOWN_BOX, FL_FLAT_BOX, FL_WHEN_CHANGED, FL_WHEN_NOT_CHANGED, and menu_.
| void Fl_Input_Choice::add | ( | const char * | s | ) | [inline] |
Adds an item to the menu.
Definition at line 158 of file Fl_Input_Choice.H.
References Fl_Menu_Item::add(), and menu_.
| int Fl_Input_Choice::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 from Fl_Widget.
Definition at line 159 of file Fl_Input_Choice.H.
References Fl_Widget::changed().
| void Fl_Input_Choice::clear | ( | ) | [inline] |
Removes all items from the menu.
Reimplemented from Fl_Group.
Definition at line 169 of file Fl_Input_Choice.H.
References Fl_Menu_Item::clear(), and menu_.
| void Fl_Input_Choice::clear_changed | ( | ) | [inline] |
Marks the value of the widget as unchanged.
Reimplemented from Fl_Widget.
Definition at line 160 of file Fl_Input_Choice.H.
References Fl_Widget::clear_changed().
| Fl_Boxtype Fl_Input_Choice::down_box | ( | ) | const [inline] |
Gets the box type of the menu button
Definition at line 171 of file Fl_Input_Choice.H.
References menu_.
Referenced by Fl_Input_Choice_Type::copy_properties(), Fl_Widget_Type::write_properties(), and Fl_Widget_Type::write_widget_code().
| void Fl_Input_Choice::down_box | ( | Fl_Boxtype | b | ) | [inline] |
Sets the box type of the menu button
Definition at line 173 of file Fl_Input_Choice.H.
References menu_.
| Fl_Input* Fl_Input_Choice::input | ( | ) | [inline] |
Returns a reference to the internal Fl_Input widget.
Definition at line 215 of file Fl_Input_Choice.H.
| const Fl_Menu_Item* Fl_Input_Choice::menu | ( | ) | [inline] |
Gets the Fl_Menu_Item array used for the menu.
Definition at line 175 of file Fl_Input_Choice.H.
References menu_.
Referenced by Fl_Input_Choice_Type::build_menu(), Fl_Input_Choice_Type::copy_properties(), and Fl_Input_Choice_Type::widget().
| void Fl_Input_Choice::menu | ( | const Fl_Menu_Item * | m | ) | [inline] |
Sets the Fl_Menu_Item array used for the menu.
Definition at line 177 of file Fl_Input_Choice.H.
References menu_.
| Fl_Menu_Button* Fl_Input_Choice::menubutton | ( | ) | [inline] |
Returns a reference to the internal Fl_Menu_Button widget.
Definition at line 211 of file Fl_Input_Choice.H.
References menu_.
| void Fl_Input_Choice::resize | ( | int | X, |
| int | Y, | ||
| int | W, | ||
| int | H | ||
| ) | [inline, virtual] |
Resizes the Fl_Group widget and all of its children.
The Fl_Group widget first resizes itself, and then it moves and resizes all its children according to the rules documented for Fl_Group::resizable(Fl_Widget*)
Reimplemented from Fl_Group.
Definition at line 178 of file Fl_Input_Choice.H.
References menu_, and Fl_Group::resize().
| void Fl_Input_Choice::set_changed | ( | ) | [inline] |
Marks the value of the widget as changed.
Reimplemented from Fl_Widget.
Definition at line 164 of file Fl_Input_Choice.H.
| Fl_Color Fl_Input_Choice::textcolor | ( | ) | const [inline] |
Gets the encapsulated input text color attributes
Definition at line 184 of file Fl_Input_Choice.H.
Referenced by Fl_Input_Choice_Type::copy_properties().
| void Fl_Input_Choice::textcolor | ( | Fl_Color | c | ) | [inline] |
Sets the encapsulated input text color attributes
Definition at line 186 of file Fl_Input_Choice.H.
| Fl_Font Fl_Input_Choice::textfont | ( | ) | const [inline] |
Gets the encapsulated input text font attributes
Definition at line 188 of file Fl_Input_Choice.H.
Referenced by Fl_Input_Choice_Type::copy_properties(), and Fl_Input_Choice_Type::ideal_size().
| void Fl_Input_Choice::textfont | ( | Fl_Font | f | ) | [inline] |
Sets the encapsulated input text font attributes
Definition at line 190 of file Fl_Input_Choice.H.
| Fl_Fontsize Fl_Input_Choice::textsize | ( | ) | const [inline] |
Gets the encapsulated input size attributes
Definition at line 192 of file Fl_Input_Choice.H.
Referenced by Fl_Input_Choice_Type::copy_properties(), and Fl_Input_Choice_Type::ideal_size().
| void Fl_Input_Choice::textsize | ( | Fl_Fontsize | s | ) | [inline] |
Sets the encapsulated input size attributes
Definition at line 194 of file Fl_Input_Choice.H.
| void Fl_Input_Choice::value | ( | const char * | val | ) | [inline] |
Sets or returns the input widget's current contents. The second form sets the contents using the index into the menu which you can set as an integer. Setting the value effectively 'chooses' this menu item, and sets it as the new input text, deleting the previous text.
Definition at line 204 of file Fl_Input_Choice.H.
| void Fl_Input_Choice::value | ( | int | val | ) | [inline] |
See void Fl_Input_Choice::value(const char *s)
Definition at line 206 of file Fl_Input_Choice.H.
References menu_, Fl_Menu_Item::text, and Fl_Menu_Item::value().
| const char* Fl_Input_Choice::value | ( | ) | const [inline] |
See void Fl_Input_Choice::value(const char *s)
Definition at line 196 of file Fl_Input_Choice.H.
Referenced by Fl_Input_Choice_Type::widget().