Interface: IToolbox

Properties

clearSelection

Unhighlights any previously selected item.

Returns

void 

dispose

Disposes of this toolbox.

Returns

void 

getFlyout

Gets the toolbox flyout.

Returns

nullable Blockly.IFlyout The toolbox flyout.

getHeight

Gets the height of the toolbox.

Returns

number The width of the toolbox.

getSelectedItem

Gets the selected item.

Returns

nullable Blockly.IToolboxItem The selected item, or null if no item is currently selected.

getWidth

Gets the width of the toolbox.

Returns

number The width of the toolbox.

getWorkspace

Gets the workspace for the toolbox.

Returns

non-null Blockly.WorkspaceSvg The parent workspace for the toolbox.

handleToolboxItemResize

Handles resizing the toolbox when a toolbox item resizes.

Returns

void 

init

Initializes the toolbox.

Returns

void 

isHorizontal

Gets whether or not the toolbox is horizontal.

Returns

boolean True if the toolbox is horizontal, false if the toolbox is vertical.

position

Positions the toolbox based on whether it is a horizontal toolbox and whether the workspace is in rtl.

Returns

void 

refreshSelection

Updates the flyout's content without closing it. Should be used in response to a change in one of the dynamic categories, such as variables or procedures.

Returns

void 

refreshTheme

Updates the category colours and background colour of selected categories.

Returns

void 

render

Fills the toolbox with new toolbox items and removes any old contents.

Parameter

toolboxDef

Blockly.utils.toolbox.ToolboxInfo

Object holding information for creating a toolbox.

Value must not be null.

selectItemByPosition

Selects the toolbox item by it's position in the list of toolbox items.

Parameter

position

number

The position of the item to select.

Returns

void 

setVisible

Sets the visibility of the toolbox.

Parameter

isVisible

boolean

True if toolbox should be visible.