diff options
Diffstat (limited to 'FL/Fl_Menu_Item.H')
| -rw-r--r-- | FL/Fl_Menu_Item.H | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/FL/Fl_Menu_Item.H b/FL/Fl_Menu_Item.H index 0f1083a9a..4bca0e1ce 100644 --- a/FL/Fl_Menu_Item.H +++ b/FL/Fl_Menu_Item.H @@ -317,6 +317,10 @@ struct FL_EXPORT Fl_Menu_Item { before FLTK 1.4.0. */ int value() const {return (flags & FL_MENU_VALUE) ? 1 : 0;} + + /** Sets the current value of the check or radio item. */ + void value(int v) { v ? set() : clear(); } + /** Turns the check or radio item "on" for the menu item. Note that this does not turn off any adjacent radio items like setonly() does. @@ -326,7 +330,7 @@ struct FL_EXPORT Fl_Menu_Item { /** Turns the check or radio item "off" for the menu item. */ void clear() {flags &= ~FL_MENU_VALUE;} - void setonly(); + void setonly(Fl_Menu_Item const* first = NULL); /** Gets the visibility of an item. */ int visible() const {return !(flags&FL_MENU_INVISIBLE);} |
