Class ToolbarWidgetRegistry

Concrete implementation of IToolbarWidgetRegistry interface

Implements

Constructors

Properties

_defaultFactory: (
    widgetFactory: string,
    widget: Widget,
    toolbarItem: IWidget,
) => Widget
_factoryAdded: Signal<ToolbarWidgetRegistry, string> = ...
_widgets: Map<string, Map<string, (main: Widget) => Widget>> = ...

Accessors

Methods

  • Add a new toolbar item factory

    Type Parameters

    Parameters

    • widgetFactory: string

      The widget factory name that creates the toolbar

    • toolbarItemName: string

      The unique toolbar item

    • factory: (main: T) => Widget

      The factory function that receives the widget containing the toolbar and returns the toolbar widget.

    Returns undefined | (main: T) => Widget

    The previously defined factory

  • Register a new toolbar item factory

    Type Parameters

    Parameters

    • widgetFactory: string

      The widget factory name that creates the toolbar

    • toolbarItemName: string

      The unique toolbar item

    • factory: (main: T) => Widget

      The factory function that receives the widget containing the toolbar and returns the toolbar widget.

    Returns undefined | (main: T) => Widget

    The previously defined factory

    since v4 use addFactory instead