Class UIMENU

Name

UIMENU  --  Class of menu bar.

Synopsis

 UIMenu()	--> UIMenu object
 
 
 
 
 
 
 

Description

Class UIMenu

Attributes

<className> - Class name. Value should be "UIMenu".
<elem> - Array of menu items.

Methods

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.

Method UIMENU:ADD()

 add([<pic>],<name>,<action>,[<isEnabled>])	--> <nItem>

In this method the object UIMenuItem is placed in the <elem> array. Method returns index of added object in this array.

Method UIMENU:CLEAR()

 clear()

Method UIMENU:DISABLE()

 disable(<pos>)

Method UIMENU:ENABLE()

 enable(<pos>)

Method UIMENU:GETELEMENT()

 getElement(<pos>)	--> <oItem>

Method UIMENU:ISENABLED()

 isEnabled(<pos>)	--> <bEnabled>

Method UIMENU:REMOVE()

 remove(<pos>)

Method UIMENU:SETKEY()

 setKeyEvent(<pos>,<cKey>)

Method UIMENU:UIMENU()

 UIMenu() --> UIMenu object

Method UIMENU:UNSETKEY()

 unSetKey(<pos>,<cKey>)

Example:

 menu := UIMenu()
 window_menu := UIPopupMenu()
 
 menu:add(,"&Window", window_menu)
 window_menu:add(,"&Close", {|| win:childClose() } )
 window_menu:add(,"Close &all", {|| win:childCloseAll() } )
 

Platforms

No dependies of platform.