Class UIPOPUPMENU

Name

UIPOPUPMENU  --  Class of popup menu.

Synopsis

 UIPopupMenu()	--> UIPopupMenu object
 
 
 
 
 
 
 
 

Description

Class UIPopupMenu

Attributes

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

Methods

ADD Add menu item.
ADDCHECKED Add checked menu item.
ADDSEPARATOR Add separator to popup menu.
CLEAR Clear menu.
DISABLE Disable menu item.
ENABLE Make menu item active.
GETELEMENT Get object of menu item by its index.
ISCHECKED Get checked status of checked menu item.
ISENABLED Get flag of activity of menu item.
REMOVE Delete item from menu.
SETKEY Set menu item activation by shortcut.
UIPOPUPMENU Constructor. Create popup menu.
UNSETKEY Unset menu item activation from shortcut.

Method UIPOPUPMENU: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 UIPOPUPMENU:ADDCHECKED()

 addChecked([<def_status>],<name>,<action>,[<isEnabled>])	--> <nItem>

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

Method UIPOPUPMENU:ADDSEPARATOR()

 addSeparator()

Method UIPOPUPMENU:CLEAR()

 clear()

Method UIPOPUPMENU:DISABLE()

 disable(<pos>)

Method UIPOPUPMENU:ENABLE()

 enable(<pos>)

Method UIPOPUPMENU:GETELEMENT()

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

Method UIPOPUPMENU:ISCHECKED()

 isChecked(<pos>)	--> <bChecked>

Method UIPOPUPMENU:ISENABLED()

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

Method UIPOPUPMENU:REMOVE()

 remove(<pos>)

Method UIPOPUPMENU:SETKEY()

 setKeyEvent(<pos>,<cKey>)

Method UIPOPUPMENU:UIPOPUPMENU()

 UIPopupMenu() --> UIPopupMenu object

Method UIPOPUPMENU:UNSETKEY()

 unSetKey(<pos>,<cKey>)

Example:

 menu := UIPopupMenu()
 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.