Interface IToolbarWidgetRegistry

Toolbar widget registry interface

interface IToolbarWidgetRegistry {
    defaultFactory: ((widgetFactory, widget, toolbarItem) => Widget);
    factoryAdded: ISignal<IToolbarWidgetRegistry, string>;
    addFactory<T>(widgetFactory, toolbarItemName, factory): undefined | ((main) => Widget);
    createWidget(widgetFactory, widget, toolbarItem): Widget;
    registerFactory<T>(widgetFactory, toolbarItemName, factory): undefined | ((main) => Widget);
}

Implemented by

Properties

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

Default toolbar item factory

Type declaration

factoryAdded: ISignal<IToolbarWidgetRegistry, string>

A signal emitted when a factory widget has been added.

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

  • 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

    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