UIMenuBuilder

class UIMenuBuilder abstract

Dynamic menu builder, platform dependent (abstract).

Constructor

(): UIMenuBuilder

.clear() abstract

(): this

Remove all current menu items.

.addOption() abstract

(key: string, text: string, icon?: string, hint?: string, hintIcon?: string, textStyle?: Partial<TextStyle>, hintStyle?: Partial<TextStyle>): this

Add a menu option with given key, text, icon, and hint.

.addSelectionGroup() abstract

(options: { key: string; text: string; }[], selectedKey?: string, textStyle?: Partial<TextStyle>): this

Add a list of selectable menu options.

.addSeparator() abstract

(): this

Add a menu separator.

.setGravity() abstract

(gravity: "start" | "end" | "stretch"): this

Set the alignment of the menu to its related component (start, stretch, or end), if applicable.

.setRevealTransition() abstract

(transition: UITransitionType): this

Set the animation that plays when the menu is displayed, if applicable.

.setExitTransition() abstract

(transition: UITransitionType): this

Set the animation that plays when the menu is removed, if applicable.

.build() abstract

(): UIRenderableConstructor

Build a constructor for a menu with the current options, which should emit a SelectMenuItem event (of type UIMenuItemSelectedEvent) when an item is selected, and a CloseModal event to close the menu.