Hierarchy

  • MenuController

Implements

Constructors

Properties

_enableRedo: boolean = false
_enableUndo: boolean = false
_undoRedoDisabled: boolean = false
actionMap: Map<string, MenuAction> = ...

For mapping ToolBeltActions to MenuActions

cssClassActive: string = '-active'
cssClassDisabled: string = 'mxt-btn-disabled'
cssClassHidden: string = 'mxt-hidden'
desktopTopBar: DesktopTopBar
menuBars: IMenuUIElement[] = []
menuDelegate: IMenusDelegate
menuRouter: MenuRouter = ...
mobileBottomBar: MobileBottomBar
mobileTopBar: MobileTopBar
productSelectBar: ProductSelectBar
rootMenu: Menu

Accessors

Methods

  • Activate/Deactivate a button with matching menu action

    Parameters

    • action: MenuAction

      menu data entry

    • active: boolean

      true=active, false=inactive

    Returns void

  • Activate/Deactivate a button with matching menu type

    Parameters

    • type: MenuType

      menu data entry

    • active: boolean

      true=active, false=inactive

    Returns void

  • Disable a button with matching menu action, while the defined async function is pending, and enable it once settled

    Returns

    the result of the async func

    Type Parameters

    • T

    Parameters

    • menu: Menu

      menu data entry

    • asyncFunc: (() => Promise<T>)

      the asynchronous method to perform

        • (): Promise<T>
        • Returns Promise<T>

    Returns Promise<T>

  • Disable a button with matching menu type, while the defined async function is pending, and enable it once settled

    Returns

    the result of the async func

    Type Parameters

    • T

    Parameters

    • menu: Menu

      menu data entry

    • asyncFunc: (() => Promise<T>)

      the asynchronous method to perform

        • (): Promise<T>
        • Returns Promise<T>

    Returns Promise<T>

  • Enable/Disable a button with matching menu action

    Parameters

    • action: MenuAction
    • enable: boolean

      true=enable, false=disable

    Returns void

  • This method consumes the Toolbelt's Renderer_UpdateActions event and tries to map the toolbelt action to a menu action Going forward, Toolbelt action plugins should be registered with the MenuAction they are associated with, but we have to support legacy, and manually map their ComposToolBeltActions to MenuActions

    Returns

    new array of ToolbeltActionItem[] with the action replaced with a mapped match to MenuAction

    Parameters

    • actionsToShow: ToolbeltActionItem[]

      array of ToolbeltActionItem that specify action type buttons to show and their enabled state

    Returns void

Generated using TypeDoc