Class of menu bar.
UIMenu() --> UIMenu object
ADD | Add menu item. |
CLEAR | Clear menu. |
DISABLE | Disable menu item. |
ENABLE | Make menu item active. |
GETELEMENT | Get object of menu item by its index. |
ISENABLED | Get flag of activity of menu item. |
REMOVE | Delete item from menu. |
SETKEY | Set menu item activation by shortcut. |
UIMENU | Constructor. Create horizontal menubar. |
UNSETKEY | Unset menu item activation from shortcut. |
menu := UIMenu() window_menu := UIPopupMenu() menu:add(,"&Window", window_menu) window_menu:add(,"&Close", {|| win:childClose() } ) window_menu:add(,"Close &all", {|| win:childCloseAll() } )
Andrey Cherepanov <<skull@eas.lrn.ru>>
No dependies of platform.
Add menu item.
add([<pic>],<name>,<action>,[<isEnabled>]) --> <nItem>
<pic> | - Object UIImage. Icon of menu item. |
<name> | - String. Menu item label. You can define accel key for widget activation. Just place symbol "&" before accel letter. This letter will be underlined and widget will be activated with key Alt-letter. |
<action> | - Code block or UIPopupMenu object. Executed code block or sub-menu. |
<isEnabled> | - Boolean. Flag of activity menu item. |
Index of added object UIMenuItem in array <elem>.
In this method the object UIMenuItem is placed in the <elem> array. Method returns index of added object in this array.
Clear menu.
clear()
No arguments
Returns NIL.
Disable menu item.
disable(<pos>)
Returns NIL.
Make menu item active.
enable(<pos>)
Returns NIL.
Get object of menu item by its index.
getElement(<pos>) --> <oItem>
UIMenuItem or UIPopupMenu object. Menu item object.
Get flag of activity of menu item.
isEnabled(<pos>) --> <bEnabled>
Flag of activity of menu item.
Delete item from menu.
remove(<pos>)
Returns NIL.
Set menu item activation by shortcut.
setKeyEvent(<pos>,<cKey>)
Returns NIL.
Constructor. Create horizontal menubar.
UIMenu() --> UIMenu object
No arguments
Returns NIL.
Unset menu item activation from shortcut.
unSetKey(<pos>,<cKey>)
Returns NIL.