Class MenuItem

menu item properties

Inherits from

  • Object (base class)


Name Description


Name Type Description
menuItemAction Signal!( handle menu item click action (parameter is Action)
menuItemClick Signal!( handle menu item click (parameter is MenuItem)
onMenuItem Signal!(void, handle menu item click
openingSubmenu Signal!(bool, prepare for opening of submenu, return true if opening is allowed
_action Action
_checked bool
_enabled bool
_parent MenuItem
_subitems MenuItem[]
_type MenuItemType


Name Type Description
acceleratorText [get] dstring returns text description for first accelerator of action; null if no accelerators
action [get] const(Action) returns item action
action [set] MenuItem sets item action
checked [set] MenuItem set check for checkbox or radio button item
checked [get] bool get check for checkbox or radio button item
enabled [get, set] bool menu item Enabled flag
id [get] int item action id, 0 if no action
isSubmenu [get] bool returns true if item is submenu (contains subitems)
label [get] UIString returns item label
subitemCount [get] int returns count of submenu items
subitemIndex [set] int returns subitem index for item, -1 if item is not direct subitem of this
type [set] MenuItem set new MenuItemType
type [get] MenuItemType


Name Description
add adds submenu item(s) from one or more actions (will return item for last action)
add adds submenu item
addSeparator Add separator item
findKeyAction map key to action
findSubitemByHotkey find subitem by hotkey character, returns subitem index, -1 if not found
getHotkey get hotkey character from label (e.g. 'F' for item labeled "&File"), 0 if no hotkey
subitem returns submenu item by index
updateActionState call to update state for action (if action is assigned for widget)
checkRadioButton check radio button with specified index, uncheck other radio buttons in group (group consists of sequence of radio button items; other item type - end of group)


Vadim Lopatin,


Vadim Lopatin, 2014


Boost License 1.0