Class ToolbarWidgetRegistry

Concrete implementation of IToolbarWidgetRegistry interface

Hierarchy

  • ToolbarWidgetRegistry

Implements

Constructors

Properties

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

Type declaration

    • (widgetFactory, widget, toolbarItem): Widget
    • Parameters

      Returns Widget

_factoryAdded: Signal<ToolbarWidgetRegistry, string>
_widgets: Map<string, Map<string, ((main) => Widget)>>

Accessors

  • get defaultFactory(): ((widgetFactory, widget, toolbarItem) => Widget)
  • Default toolbar item factory

    Returns ((widgetFactory, widget, toolbarItem) => Widget)

      • (widgetFactory, widget, toolbarItem): Widget
      • Default toolbar item factory

        Parameters

        Returns Widget

  • set defaultFactory(factory): void
  • Parameters

    • factory: ((widgetFactory, widget, toolbarItem) => Widget)
        • (widgetFactory, widget, toolbarItem): Widget
        • Parameters

          Returns Widget

    Returns void

  • get factoryAdded(): ISignal<this, string>
  • A signal emitted when a factory widget has been added.

    Returns ISignal<this, string>

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

    The previously defined factory

  • Create a toolbar item widget

    Parameters

    • widgetFactory: string

      The widget factory name that creates the toolbar

    • widget: Widget

      The newly widget containing the toolbar

    • toolbarItem: IWidget

      The toolbar item definition

    Returns Widget

    The widget to be inserted in the toolbar.

  • Register a new toolbar item factory

    Deprecated

    since v4 use addFactory instead

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

    The previously defined factory

Generated using TypeDoc