menu.js

Summary
menu.js
MenuMenu components.
Variables
ngCurrentPopupMenuReference to active popup ngMenu.
ngCurrentAppPopupMenuReference to active application popup ngMenu (ngApp.PopupMenu).
ng_SetControlMenuAssigns ngMenu to control.
ng_SetControlPopupAssigns popup ngMenu to control.
ngListItem (in context of ngMenu)This class implements ngList item.
Properties
SubMenuReferences to sub menu ngMenu control.
Events
OnMenuClick
OnGetText
ngMenuMenu control (based on ngList).
Properties
MenuHAlignHorizonal align of menu to popup position.
MenuVAlignVertical align of menu to popup position.
MaxHeightMeximal height of the menu.
MinWidthMinimal width of the menu.
SubMenuDefSpecifies definition which is used in case of submenu creation.
SubMenuOverlapXSpecifies how much submenu overlaps menu in horizontal in pixels.
SubMenuOverlapYSpecifies how much submenu overlaps menu in vertical in pixels.
ActiveSubMenuReference to active submenu.
AutoPopupIf true the menu handles its visibility by itself.
PopupXHorizontal popup position in pixels.
PopupYVertical popup position in pixels.
PopupElmElement to which menu was aligned during popup.
Methods
PopupPopups menu at specified position.
PopupCtrlPopups menu along specified control.
PopupSubMenuPopups menu as submenu along specified element.
ShowSubMenuShows item submenu.
GetMenuItemByIDGets menu item by given ID.
GetMenuGets (or creates) menu item.
MenuClickClicks the menu item.
CreateSubMenuCreates item submenu.
HideSubMenuHides item submenu.
HideMenuHides menu (and all superior or child menus with AutoPopup=true).
BeginUpdatePrevents the updating of the menu until the EndUpdate method is called.
EndUpdatePerforms the repaints deferred by a call to BeginUpdate.
GetScreenRectGets menu allowed screen rectangle (used for proper menu alignment).
Events
OnPopUp
OnDrawSeparator
OnHideSubMenu
OnMenuClick
OnClickOutside
OnSubMenuCreated
OnGetScreenRect
ngMenuBarMenu bar control (based on ngToolBar).
Methods
BeginUpdatePrevents the updating of the menu until the EndUpdate method is called.
EndUpdatePerforms the repaints deferred by a call to BeginUpdate.
Definition
ButtonDefDefinition of menubar buttons.
Properties
MenuReferences to assigned ngMenu controls.
ngMenuBarButtonButton for menu representation in menu bar control (based on ngButton).
Properties
AutoPopupIf TRUE the menu is automaticaly poped up when mouse enters the button.
ngSplitButtonButton with menu dropdown (based on ngButton).
Properties
SplitButtonDetermines that button is a split button (for detection).
Events
OnMenuClick
ngControlExtensions of ngControl definition.
Definition
MenuDefines ngMenu control which will be opened on control OnClick event.
PopupMenuDefines ngMenu control which opens on right mouse click on control.

Menu

Menu components.

Variables

ngCurrentPopupMenu

var ngCurrentPopupMenu

Reference to active popup ngMenu.

ngCurrentAppPopupMenu

var ngCurrentAppPopupMenu

Reference to active application popup ngMenu (ngApp.PopupMenu).

ng_SetControlMenu

function ng_SetControlMenu(c,
m)

Assigns ngMenu to control.

Syntax

void ng_SetControlMenu (object ctrl, object menu)

Parameters

ctrlcontrol to which is menu assigned
menungMenu control or null

Returns

-

Notes

Control must support OnClick event.  If menu is assigned, the reference is stored in Menu property in control.

ng_SetControlPopup

function ng_SetControlPopup(c,
m)

Assigns popup ngMenu to control.

Syntax

void ng_SetControlPopup (object ctrl, object menu)

Parameters

ctrlcontrol to which is popup menu assigned
menungMenu control or null

Returns

-

Notes

If menu is assigned, the reference is stored in PopupMenu property in control.

ngListItem (in context of ngMenu)

This class implements ngList item.

See also

ngMenu, ngList

Summary
Properties
SubMenuReferences to sub menu ngMenu control.
Events
OnMenuClick
OnGetText

Properties

SubMenu

References to sub menu ngMenu control.  Type: object Default value: undefined

Events

OnMenuClick

OnGetText

ngMenu

Menu control (based on ngList).

Summary
Properties
MenuHAlignHorizonal align of menu to popup position.
MenuVAlignVertical align of menu to popup position.
MaxHeightMeximal height of the menu.
MinWidthMinimal width of the menu.
SubMenuDefSpecifies definition which is used in case of submenu creation.
SubMenuOverlapXSpecifies how much submenu overlaps menu in horizontal in pixels.
SubMenuOverlapYSpecifies how much submenu overlaps menu in vertical in pixels.
ActiveSubMenuReference to active submenu.
AutoPopupIf true the menu handles its visibility by itself.
PopupXHorizontal popup position in pixels.
PopupYVertical popup position in pixels.
PopupElmElement to which menu was aligned during popup.
Methods
PopupPopups menu at specified position.
PopupCtrlPopups menu along specified control.
PopupSubMenuPopups menu as submenu along specified element.
ShowSubMenuShows item submenu.
GetMenuItemByIDGets menu item by given ID.
GetMenuGets (or creates) menu item.
MenuClickClicks the menu item.
CreateSubMenuCreates item submenu.
HideSubMenuHides item submenu.
HideMenuHides menu (and all superior or child menus with AutoPopup=true).
BeginUpdatePrevents the updating of the menu until the EndUpdate method is called.
EndUpdatePerforms the repaints deferred by a call to BeginUpdate.
GetScreenRectGets menu allowed screen rectangle (used for proper menu alignment).
Events
OnPopUp
OnDrawSeparator
OnHideSubMenu
OnMenuClick
OnClickOutside
OnSubMenuCreated
OnGetScreenRect

Properties

MenuHAlign

Horizonal align of menu to popup position.  Type: string Default value: ’left’

MenuVAlign

Vertical align of menu to popup position.  Type: string Default value: ’top’

MaxHeight

Meximal height of the menu.  Type: integer Default value: ScreenHeight-10

MinWidth

Minimal width of the menu.  Type: integer Default value: 100

SubMenuDef

Specifies definition which is used in case of submenu creation.  Type: object Default value: same as menu

SubMenuOverlapX

Specifies how much submenu overlaps menu in horizontal in pixels.  Type: integer Default value: 5

SubMenuOverlapY

Specifies how much submenu overlaps menu in vertical in pixels.  Type: integer Default value: 0

ActiveSubMenu

Reference to active submenu.  Type: object Default value: undefined

AutoPopup

If true the menu handles its visibility by itself.  Type: bool Default value: undefined

PopupX

Horizontal popup position in pixels.  Type: integer Default value: undefined

PopupY

Vertical popup position in pixels.  Type: integer Default value: undefined

PopupElm

Element to which menu was aligned during popup.  Type: integer Default value: undefined

Methods

Popup

Popups menu at specified position.

Syntax

void Popup (integer x, integer y [, string halign, string valign])

Returns

-

PopupCtrl

Popups menu along specified control.

Syntax

void PopupCtrl (object ctrl [, string halign, string valign])

Returns

-

PopupSubMenu

Popups menu as submenu along specified element.

Syntax

void PopupSubMenu (object elm [, string halign, string valign])

Returns

-

ShowSubMenu

Shows item submenu.

Syntax

void ShowSubMenu (object item)

Returns

-

GetMenuItemByID

Gets menu item by given ID.

Syntax

void GetMenuItemByID (string id [,bool recursive=true])

Returns

-

GetMenu

Gets (or creates) menu item.

Syntax

void GetMenu (string path[, bool create=false, object parent=null, function oncreatefnc, mixed userdata])

Returns

-

MenuClick

Clicks the menu item.

Syntax

void MenuClick (it [, event ev])

Parameters

Returns

-

CreateSubMenu

Creates item submenu.

Syntax

object CreateSubMenu (object item, object submenudata)

Returns

-

HideSubMenu

Hides item submenu.

Syntax

void HideSubMenu (object item)

Returns

-

HideMenu

Hides menu (and all superior or child menus with AutoPopup=true).

Syntax

void HideMenu (void)

Returns

-

BeginUpdate

Prevents the updating of the menu until the EndUpdate method is called.

Syntax

void BeginUpdate (bool recursive=true)

Returns

-

EndUpdate

Performs the repaints deferred by a call to BeginUpdate.

Syntax

void EndUpdate ()

Returns

-

GetScreenRect

Gets menu allowed screen rectangle (used for proper menu alignment).

Syntax

object GetScreenRect ()

Returns

The screen rectangle { Left:, Top:, Right:, Bottom: }

Events

OnPopUp

OnDrawSeparator

OnHideSubMenu

OnMenuClick

OnClickOutside

OnSubMenuCreated

OnGetScreenRect

ngMenuBar

Menu bar control (based on ngToolBar).

Summary
Methods
BeginUpdatePrevents the updating of the menu until the EndUpdate method is called.
EndUpdatePerforms the repaints deferred by a call to BeginUpdate.
Definition
ButtonDefDefinition of menubar buttons.
Properties
MenuReferences to assigned ngMenu controls.

Methods

BeginUpdate

Prevents the updating of the menu until the EndUpdate method is called.

Syntax

void BeginUpdate (bool recursive=true)

Returns

-

EndUpdate

Performs the repaints deferred by a call to BeginUpdate.

Syntax

void EndUpdate ()

Returns

-

Definition

ButtonDef

Definition of menubar buttons.  Type: object

Properties

Menu

if(typeof c.Menu = == 'undefined') c.Menu

References to assigned ngMenu controls.  Type: array

ngMenuBarButton

Button for menu representation in menu bar control (based on ngButton).

Summary
Properties
AutoPopupIf TRUE the menu is automaticaly poped up when mouse enters the button.

Properties

AutoPopup

c.AutoPopup

If TRUE the menu is automaticaly poped up when mouse enters the button.  Type: bool Default value: false

ngSplitButton

Button with menu dropdown (based on ngButton).

Summary
Properties
SplitButtonDetermines that button is a split button (for detection).
Events
OnMenuClick

Properties

SplitButton

Determines that button is a split button (for detection).  Type: bool Default value: true

Events

OnMenuClick

ngControl

Extensions of ngControl definition.

Summary
Definition
MenuDefines ngMenu control which will be opened on control OnClick event.
PopupMenuDefines ngMenu control which opens on right mouse click on control.

Definition

Menu

Defines ngMenu control which will be opened on control OnClick event.  Type: object

PopupMenu

Defines ngMenu control which opens on right mouse click on control.  Type: object

var ngCurrentPopupMenu
Reference to active popup ngMenu.
Menu control (based on ngList).
var ngCurrentAppPopupMenu
Reference to active application popup ngMenu (ngApp.PopupMenu).
function ng_SetControlMenu(c,
m)
Assigns ngMenu to control.
function ng_SetControlPopup(c,
m)
Assigns popup ngMenu to control.
This class implements a generic list control.
Performs the repaints deferred by a call to BeginUpdate.
Prevents the updating of the menu until the EndUpdate method is called.
This class implements a generic toolbar control.
Performs the repaints deferred by a call to BeginUpdate.
Prevents the updating of the menu until the EndUpdate method is called.
if(typeof c.Menu = == 'undefined') c.Menu
References to assigned ngMenu controls.
This class implements a generic button control.
c.AutoPopup
If TRUE the menu is automaticaly poped up when mouse enters the button.
Close