wMenuItem

A menu item represents an item in a menu.

Seealso:wMenu wMenuBar

Procs

proc getMenu(self: wMenuItem): wMenu {...}{.validate, property, inline, raises: [], tags: [].}
Returns the menu this item is in, or NULL if this item is not attached.
proc getKind(self: wMenuItem): wMenuItemKind {...}{.validate, property, inline, raises: [],
    tags: [].}
Returns the item kind, one of wMenuItemNormal, wMenuItemCheck, wMenuItemRadio, wMenuItemSeparator, or wMenuItemSubMenu.
proc getSubMenu(self: wMenuItem): wMenu {...}{.validate, property, inline, raises: [],
                                      tags: [].}
Returns the submenu for the menu item, or nil if there isn't one.
proc getText(self: wMenuItem): string {...}{.validate, property, inline, raises: [], tags: [].}
Returns the text for the menu item.
proc getLabel(self: wMenuItem): string {...}{.validate, property, inline, raises: [], tags: [].}
Returns the text for the menu item.
proc setText(self: wMenuItem; text: string) {...}{.validate, property, raises: [], tags: [].}
Sets the text for the menu item.
proc setLabel(self: wMenuItem; text: string) {...}{.validate, property, raises: [], tags: [].}
Sets the text for the menu item.
proc getLabelText(self: wMenuItem): string {...}{.validate, property, inline, raises: [],
    tags: [].}
Returns the text for the menu item, not include any accelerator characters.
proc getHelp(self: wMenuItem): string {...}{.validate, property, inline, raises: [], tags: [].}
Returns the help string.
proc setHelp(self: wMenuItem; help: string) {...}{.validate, property, inline, raises: [],
    tags: [].}
Sets the help string.
proc getBitmap(self: wMenuItem): wBitmap {...}{.validate, property, inline, raises: [],
                                       tags: [].}
Returns the bitmap.
proc setBitmap(self: wMenuItem; bitmap: wBitmap = nil) {...}{.validate, property, raises: [],
    tags: [].}
Sets the bitmap for the menu item, nil for clear the bitmap.
proc getId(self: wMenuItem): wCommandID {...}{.validate, property, inline, raises: [],
                                      tags: [].}
Returns the menu item identifier.
proc setId(self: wMenuItem; id: wCommandID) {...}{.validate, property, raises: [], tags: [].}
Sets the id for the menu item.
proc getData(self: wMenuItem): int {...}{.validate, property, inline, raises: [], tags: [].}
Returns the data associated with the item.
proc setData(self: wMenuItem; data: int) {...}{.validate, property, raises: [], tags: [].}
Sets the item associated data.
proc isCheck(self: wMenuItem): bool {...}{.validate, raises: [], tags: [].}
Determines whether a menu item is a kind of check item.
proc isRadio(self: wMenuItem): bool {...}{.validate, raises: [], tags: [].}
Determines whether a menu item is a kind of radio item.
proc isSeparator(self: wMenuItem): bool {...}{.validate, raises: [], tags: [].}
Determines whether a menu item is a kind of separator.
proc isSubMenu(self: wMenuItem): bool {...}{.validate, raises: [], tags: [].}
Determines whether a menu item is a kind of submenu.
proc enable(self: wMenuItem; flag = true) {...}{.validate, raises: [], tags: [].}
Enables or disables (greys out) a menu item.
proc disable(self: wMenuItem) {...}{.validate, inline, raises: [], tags: [].}
Disables (greys out) a menu item.
proc isEnabled(self: wMenuItem): bool {...}{.validate, raises: [], tags: [].}
Determines whether a menu item is enabled.
proc check(self: wMenuItem; flag = true) {...}{.validate, raises: [], tags: [].}
Checks or unchecks the menu item.
proc isChecked(self: wMenuItem): bool {...}{.validate, raises: [], tags: [].}
Determines whether a menu item is checked.
proc toggle(self: wMenuItem) {...}{.validate, raises: [], tags: [].}
Toggle the menu item.
proc detach(self: wMenuItem) {...}{.validate, raises: [], tags: [].}
Detach a menu item from all menu.
proc final(self: wMenuItem) {...}{.raises: [], tags: [].}
Default finalizer for wMenuItem.
proc init(self: wMenuItem; id: wCommandID = 0; text = ""; help = ""; kind = wMenuItemNormal;
         bitmap: wBitmap = nil; submenu: wMenu = nil) {...}{.validate, raises: [], tags: [].}
Initializer.
proc MenuItem(id: wCommandID = 0; text = ""; help = ""; kind = wMenuItemNormal;
             bitmap: wBitmap = nil; submenu: wMenu = nil): wMenuItem {...}{.inline, raises: [],
    tags: [].}
Constructor.