class UIMenu

extends Component implements UIRenderable

Represents a menu that can be displayed on screen. The menu itself is built up dynamically using a platform dependent builder class.


For an example of how UIMenu can be used, refer to UIModalController.


(): UIMenu



Menu builder, can be used to build up the menu before it is displayed.


(callback: RenderCallback<Output<UIRenderable, any>>): void

Build the current menu and render it using UIMenu.builder.



The last menu that was built, as a child object.


"start" | "end" | "stretch"

Menu gravity in relation to reference component (start/stretch/end).


{ key: string; text: Stringable; }[]

List of initial menu options; for advanced menus use onBuild to build the menu dynamically.



The key of the menu item that was last selected, if any.

.isPresetComponent() protected

(): boolean

Inherited from Component.isPresetComponent.


[1]. (): Component
[2]. <TParent extends Component>(ParentClass: ComponentConstructor<TParent>): TParent

Inherited from Component.getParentComponent.


<TParent extends Component>(ParentClass?: ComponentConstructor<TParent>): TParent

Inherited from Component.getCompositeParent.


(name: string, inner?: ManagedEvent): void

Inherited from Component.propagateComponentEvent.



Inherited from ManagedObject.managedId.



Inherited from ManagedObject.managedState.

.getReferenceCount() protected

(): number

Inherited from ManagedObject.getReferenceCount.

.getManagedReferrers() protected

(): ManagedObject[]

Inherited from ManagedObject.getManagedReferrers.

.getManagedParent() protected

[1]. (): ManagedObject
[2]. <TParent extends ManagedObject>(ParentClass: ManagedObjectConstructor<TParent>): TParent

Inherited from ManagedObject.getManagedParent.


<TEvent extends ManagedEvent = ManagedEvent, TConstructorArgs extends any[] = any[]>(e: string | TEvent | (new (...args: TConstructorArgs) => TEvent), ...constructorArgs: TConstructorArgs): this

Inherited from ManagedObject.emit.

.propagateChildEvents() protected

[1]. (f?: (this: this, e: ManagedEvent, propertyName: string) => void | ManagedEvent | ManagedEvent[]): this
[2]. (...types: (ManagedEvent | (new (...args: any[]) => ManagedEvent))[]): this

Inherited from ManagedObject.propagateChildEvents.

.activateManagedAsync() protected

(): Promise<any>

Inherited from ManagedObject.activateManagedAsync.

.deactivateManagedAsync() protected

(): Promise<void>

Inherited from ManagedObject.deactivateManagedAsync.

.destroyManagedAsync() protected

(): Promise<void>

Inherited from ManagedObject.destroyManagedAsync.

.onManagedStateActivatingAsync() protected

(): Promise<void>

Inherited from ManagedObject.onManagedStateActivatingAsync.

.onManagedStateActiveAsync() protected

(): Promise<void>

Inherited from ManagedObject.onManagedStateActiveAsync.

.onManagedStateDeactivatingAsync() protected

(): Promise<void>

Inherited from ManagedObject.onManagedStateDeactivatingAsync.

.onManagedStateInactiveAsync() protected

(): Promise<void>

Inherited from ManagedObject.onManagedStateInactiveAsync.

.onManagedStateDestroyingAsync() protected

(): Promise<void>

Inherited from ManagedObject.onManagedStateDestroyingAsync.


UIMenu presets type, for use with Component.with.


{ key: string; text: string; }[]

List of menu options; for advanced menus use onBuild to build the menu dynamically.


"start" | "end" | "stretch"

Menu gravity in relation to reference component (start/stretch/end).


ComponentEventHandler<UIMenu, ComponentEvent>

Event handler that is invoked every time just before the menu is rendered.


ComponentEventHandler<UIMenu, UIMenuItemSelectedEvent>

Event handler that is invoked after a menu item has been picked.