summaryrefslogtreecommitdiff
path: root/FL/Fl_Menu_Item.H
diff options
context:
space:
mode:
authorMatthias Melcher <github@matthiasm.com>2023-03-18 17:33:27 +0100
committerGitHub <noreply@github.com>2023-03-18 17:33:27 +0100
commit5c482f9d9b357e098f955351f425bc985254ff28 (patch)
treec410588ac915886aea4bef3478a12d682bb5ad9f /FL/Fl_Menu_Item.H
parenta9fb6a979fbcf31c2405d61ea720879bd5507d02 (diff)
Fix and update alignment #346 (#701)
* interactive layout alignment rewritten * interface for new alignment rules * new alignment dialog box * user defined layout rules added * layout rules can be stored in projects, settings, and external files * Valgrind verification
Diffstat (limited to 'FL/Fl_Menu_Item.H')
-rw-r--r--FL/Fl_Menu_Item.H6
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);}