Class ToolbarWidgetRegistry

Concrete implementation of IToolbarWidgetRegistry interface

Implements

Constructors

Properties

_defaultFactory: ((widgetFactory, widget, toolbarItem) => Widget)

Type declaration

_factoryAdded: Signal<ToolbarWidgetRegistry, string> = ...
_widgets: Map<string, Map<string, ((main) => 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) => Widget)

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

    Returns undefined | ((main) => 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) => Widget)

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

    Returns undefined | ((main) => Widget)

    The previously defined factory

    Deprecated

    since v4 use addFactory instead