Class ToolController

Implements

  • InputEventListener

Methods

  • Adds a new InputMapper to this' input pipeline.

    A mapper is really a relation that maps each event to no, one, or many other events.

    Parameters

    Returns void

  • Add a tool that acts like one of the primary tools (only one primary tool can be enabled at a time).

    If the tool is already added to this, the tool is converted to a primary tool.

    This should be called before creating the app's toolbar.

    Parameters

    Returns void

  • Add a tool to the end of this' tool list (the added tool receives events after tools already added to this). This should be called before creating the app's toolbar.

    If options.addToFront, the tool is added to the beginning of this' tool list.

    Does nothing if the tool is already present.

    Parameters

    • tool: BaseTool
    • Optionaloptions: {
          addToFront: boolean;
      }
      • addToFront: boolean

    Returns void

  • Removes a tool from this' tool list and replaces it with replaceWith.

    If any of toolsToInsert have already been added to this, the tools are moved.

    This should be called before creating the editor's toolbar.

    Parameters

    Returns void

  • Replaces the current set of tools with tools. This should only be done before the creation of the app's toolbar (if using AbstractToolbar).

    If no primaryToolGroup is given, an empty one will be created.

    Parameters

    Returns void

OpenSource licenses