Abstract Class: ProcedureBase
Defined in: plugins/block-shareable-procedures/src/events_procedure_base.ts:12
The base event for an event associated with a procedure.
Extends
Abstract
Extended by
Properties index
| Property | Description |
|---|---|
| group | An ID for the group of events this block is associated with. |
| isBlank | Whether or not the event was constructed without necessary parameters (to be populated by fromJson). |
| isUiEvent | Whether or not the event is a UI event. |
| procedure | The procedure model associated with this event. |
| recordUndo | Whether this event is undoable or not. |
| type | A string used to check the type of the event. |
| workspaceId | The workspace identifier for this event. |
| TYPE | - |
Methods index
| Method | Description |
|---|---|
| getEventWorkspace_ | Get workspace the event belongs to. |
| isNull | Does this event record any change of state? |
| run | Run an event. |
| toJson | Encode the event as JSON. |
Constructors
Constructor
new ProcedureBase(workspace, procedure): ProcedureBase;
Defined in: plugins/block-shareable-procedures/src/events_procedure_base.ts:26
Constructs the base procedure event.
Parameters
| Parameter | Type | Description |
|---|---|---|
workspace | Workspace | The workspace the procedure model exists in. |
procedure | IProcedureModel | The procedure model associated with this event. |
Returns
ProcedureBase
Overrides
Blockly.Events.Abstract.constructor
Properties
group
group: string;
An ID for the group of events this block is associated with.
Groups define events that should be treated as an single action from the user's perspective, and should be undone together.
Inherited from
Blockly.Events.Abstract.group
isBlank
isBlank: boolean = false;
Defined in: plugins/block-shareable-procedures/src/events_procedure_base.ts:18
Whether or not the event was constructed without necessary parameters (to be populated by fromJson).
Overrides
Blockly.Events.Abstract.isBlank
isUiEvent
isUiEvent: boolean;
Whether or not the event is a UI event.
Inherited from
Blockly.Events.Abstract.isUiEvent
procedure
readonly procedure: IProcedureModel;
Defined in: plugins/block-shareable-procedures/src/events_procedure_base.ts:28
The procedure model associated with this event.
recordUndo
recordUndo: boolean;
Whether this event is undoable or not.
Inherited from
Blockly.Events.Abstract.recordUndo
type
type: string = ProcedureBase.TYPE;
Defined in: plugins/block-shareable-procedures/src/events_procedure_base.ts:16
A string used to check the type of the event.
Overrides
Blockly.Events.Abstract.type
workspaceId?
workspaceId?: string;
The workspace identifier for this event.
Inherited from
Blockly.Events.Abstract.workspaceId
TYPE
readonly static TYPE: string = 'procedure_base';
Defined in: plugins/block-shareable-procedures/src/events_procedure_base.ts:13
Methods
getEventWorkspace_()
getEventWorkspace_(): Workspace;
Get workspace the event belongs to.
Returns
Workspace
The workspace the event belongs to.
Throws
if workspace is null.
Inherited from
Blockly.Events.Abstract.getEventWorkspace_
isNull()
isNull(): boolean;
Does this event record any change of state?
Returns
boolean
True if null, false if something changed.
Inherited from
Blockly.Events.Abstract.isNull
run()
run(_forward): void;
Run an event.
Parameters
| Parameter | Type | Description |
|---|---|---|
_forward | boolean | True if run forward, false if run backward (undo). |
Returns
void
Inherited from
Blockly.Events.Abstract.run
toJson()
toJson(): ProcedureBaseJson;
Defined in: plugins/block-shareable-procedures/src/events_procedure_base.ts:39
Encode the event as JSON.
Returns
JSON representation.
Overrides
Blockly.Events.Abstract.toJson