Class: ButtonFlyoutInflater
Defined in: packages/blockly/core/button_flyout_inflater.ts:19
Class responsible for creating buttons for flyouts.
Implements
Methods index
| Method | Description |
|---|---|
| load | Inflates a flyout button from the given state and adds it to the flyout. |
| gapForItem | Returns the amount of space that should follow this button. |
| disposeItem | Disposes of the given button. |
| getType | Returns the type of items this inflater is responsible for creating. |
Constructors
Constructor
new ButtonFlyoutInflater(): ButtonFlyoutInflater;
Returns
ButtonFlyoutInflater
Methods
load()
load(state, flyout): FlyoutItem;
Defined in: packages/blockly/core/button_flyout_inflater.ts:27
Inflates a flyout button from the given state and adds it to the flyout.
Parameters
| Parameter | Type | Description |
|---|---|---|
state | object | A JSON representation of a flyout button. |
flyout | IFlyout | The flyout to create the button on. |
Returns
A newly created FlyoutButton.
Implementation of
gapForItem()
gapForItem(state, defaultGap): number;
Defined in: packages/blockly/core/button_flyout_inflater.ts:46
Returns the amount of space that should follow this button.
Parameters
| Parameter | Type | Description |
|---|---|---|
state | object | A JSON representation of a flyout button. |
defaultGap | number | The default spacing for flyout items. |
Returns
number
The amount of space that should follow this button.
Implementation of
disposeItem()
disposeItem(item): void;
Defined in: packages/blockly/core/button_flyout_inflater.ts:55
Disposes of the given button.
Parameters
| Parameter | Type | Description |
|---|---|---|
item | FlyoutItem | The flyout button to dispose of. |
Returns
void
Implementation of
getType()
getType(): string;
Defined in: packages/blockly/core/button_flyout_inflater.ts:67
Returns the type of items this inflater is responsible for creating.
Returns
string
An identifier for the type of items this inflater creates.