Inherited by FileItem, fltk::RadioItem, and fltk::ToggleItem.
Public Member Functions | |
void | draw () |
int | handle (int) |
Item (const char *label, int shortcut, Callback *callback=0, void *user_data_=0, int flags=0) | |
Item (const char *label, const Symbol *) | |
Item (const char *label=0) | |
void | layout () |
Static Public Member Functions | |
static void | clear_style () |
static void | set_style (const Widget *w, bool f) |
static void | set_style (const Style *, bool menubar) |
Static Public Attributes | |
static NamedStyle * | default_style |
|
Unlike other widgets the constructor does not take any dimensions, since it is assummed the container widget will size this correctly. |
|
This constructor also sets the image(), useful for a browser item. |
|
This constructor is provided to match the Menu::add() function arguments. See Menu::add() for more details. |
|
The SELECTED flag will cause it to draw using the selected colors. The current version can also draw check or radio buttons but this functionality may be removed. Reimplemented from fltk::Widget. |
|
Measure the space the draw() will take and set w() and h(). Maybe this should be the default layout() function for Widget? Reimplemented from fltk::Widget. |
|
Returns 0 always. Items do not accept any events. Any results of clicking on them is handled by the parent Menu or Browser. Reimplemented from fltk::Widget. |
|
Modify the parent of the Item::default_style to this style. If no style settings have been done to an Item, it will use the textfont, textsize, textcolor, and possibly other settings inherited from this style to draw itself. This is used by menus and browsers to cause all the elements inside them to draw using their settings. The menubar flag causes it to mangle the style so that the buttonbox of style is used as the box, and the highlight_color is used as the selection_color. This is done to replicate the rather inconsistent appearance on Windows of menubars. Use Item::clear_style() to put this back so that style can be deleted. This is the same as setting it to Widget::default_style. |
|
The default style sets FLAT_BOX. Changing this will mess up the appearance of both menus and browsers. All the rest of the style is blank, and normally it inherits from the current browser or menu, which should call set_style() before drawing any items. Reimplemented from fltk::Widget. |