Home Reference Source Test Repository
public class | source

Toolbar

Class for controlling state of the toolbar.

Constructor Summary

Public Constructor
public

Constructs a Toolbar instance.

Member Summary

Public Members
public
public
public

toolbar: *

public

ui: *

Method Summary

Public Methods
public

Initialize event listeners.

public

reset()

Reset the toolbar state.

public

selectTool(toolElement: Element)

Select tool by passing the element associated with it.

public

Select a tool by name.

Public Constructors

public constructor(ui: UI) source

Constructs a Toolbar instance.

Params:

NameTypeAttributeDescription
ui UI

Reference to the UI instance.

Public Members

public currentTool: * source

public currentToolElement: * source

public toolbar: * source

public ui: * source

Public Methods

public initListeners() source

Initialize event listeners.

public reset() source

Reset the toolbar state.

public selectTool(toolElement: Element) source

Select tool by passing the element associated with it.

Params:

NameTypeAttributeDescription
toolElement Element

Button on the toolbar for the tool.

public selectToolByName(toolName: string) source

Select a tool by name.

Params:

NameTypeAttributeDescription
toolName string

Name of the tool.