ToolMacro
Extends:
Static Method Summary
Static Public Methods | ||
public static |
|
|
public static |
|
Constructor Summary
Public Constructor | ||
public |
|
Member Summary
Public Members | ||
public |
connectLinks: *[] |
|
public |
connects: *[] |
|
public |
|
|
public |
|
|
public |
|
|
public |
tools: *[] |
Private Members | ||
private |
_accept: * |
|
private |
_macro_class: * |
|
private |
_promise: * |
|
private |
_reject: * |
Method Summary
Public Methods | ||
public |
add(tool: *): * |
|
public |
calcMemSize(ctx: *): * |
|
public |
calcUndoMem(ctx: *): * |
|
public |
|
|
public |
connectCB(srctool: *, dsttool: *, callback: *, thisvar: *): * |
|
public |
exec(ctx: *) |
|
public |
getDefault(toolprop: *, key: *): * |
|
public |
hasDefault(toolprop: *, key: *): * |
|
public |
loadDefaults(force: boolean): * |
|
public |
modalStart(ctx: *): * |
|
public |
saveDefaultInputs(): * |
|
public |
undo(ctx: *) |
|
public |
undoPre() |
Private Methods | ||
private |
_do_connections(tool: *) |
|
private |
_getTypeClass(): * |
Inherited Summary
From class ToolOp | ||
public static |
Equals(a: *, b: *): * |
|
public static |
|
|
public static |
inherit(slots: {}): * |
|
public static |
invoke(ctx: *, args: *): * Creates a new instance of this toolop from args and a context. |
|
public static |
isRegistered(cls: *): * |
|
public static |
onTick() |
|
public static |
register(cls: *) |
|
public static |
searchBoxOk(ctx: *): * |
|
public static |
tooldef(): {} ToolOp definition. |
|
public static |
unregister(cls: *) |
|
private static |
_getFinalToolDef(): * |
|
private static |
_regWithNstructjs(cls: *, structName: *) |
|
public |
[k]: * |
|
public |
drawlines: *[] |
|
public |
flag: * |
|
public |
inputs: {} |
|
public |
|
|
public |
|
|
public |
modal_ctx: * |
|
public |
outputs: {} |
|
public |
undoflag: * |
|
private |
__memsize: * |
|
private |
_accept: * |
|
private |
_overdraw: * |
|
private |
_promise: * |
|
private |
_reject: * |
|
private |
|
|
public |
calcMemSize(ctx: *): * Used by undo system to limit memory |
|
public |
calcUndoMem(ctx: *): number |
|
public |
error(msg: *) |
|
public |
exec(ctx: *) |
|
public |
execPost(ctx: *) |
|
public |
execPre(ctx: *) |
|
public |
exec_pre(ctx: *) |
|
public |
genToolString(): * |
|
public |
getDefault(toolprop: *, key: *): * |
|
public |
getOverdraw(): * |
|
public |
hasDefault(toolprop: *, key: *): * |
|
public |
loadDefaults(force: boolean): * |
|
public |
loadSTRUCT(reader: *) |
|
public |
makeTempLine(v1: *, v2: *, style: *): * for use in modal mode only |
|
public |
modalEnd(was_cancelled: *) |
|
public |
modalStart(ctx: *): * returns promise to be executed on modalEnd |
|
public |
Called when the undo system needs to destroy this toolop to save memory |
|
public |
on_keydown(e: *) default on_keydown implementation for modal tools, no need to call super() to execute this if you don't want to |
|
public |
on_tick() |
|
public |
popModal() |
|
public |
pushModal(node: *) |
|
public |
redo(ctx: *) |
|
public |
for use in modal mode only |
|
public |
saveDefaultInputs(): * |
|
public |
|
|
public |
undo(ctx: *) |
|
public |
undoPre(ctx: *) |
|
private |
_save_inputs(): * |
|
private |
_save_outputs(): * |
Static Public Methods
public static canRun(ctx: *, toolop: *): boolean source
Override:
ToolOp#canRunParams:
Name | Type | Attribute | Description |
ctx | * | ||
toolop | * |
|
public static tooldef(): {"uiname": string} source
ToolOp definition.
An example:
static tooldef() { return { uiname : "Tool Name", toolpath : "logical_module.tool", //logical_module need not match up to a real module icon : -1, //tool's icon, or -1 if there is none description : "tooltip", is_modal : false, //tool is interactive and takes control of events hotkey : undefined, undoflag : 0, //see UndoFlags flag : 0, inputs : ToolOp.inherit({ f32val : new Float32Property(1.0), path : new StringProperty("./path"); }), outputs : {} } }
Override:
ToolOp#tooldefPublic Constructors
public constructor() source
Main ToolOp constructor. It reads the inputs/outputs properteis from this.constructor.tooldef() and copies them to build this.inputs and this.outputs. If inputs or outputs are wrapped in ToolOp.inherit(), it will walk up the class chain to fetch parent class properties.
Default input values are loaded from SavedToolDefaults. If initialized (buildToolSysAPI has been called) SavedToolDefaults will have a copy of all the default property values of all registered ToolOps.
Override:
ToolOp#constructorPublic Members
public connectLinks: *[] source
public connects: *[] source
public tools: *[] source
Private Members
private _macro_class: * source
Public Methods
public calcMemSize(ctx: *): * source
Used by undo system to limit memory
Override:
ToolOp#calcMemSizeParams:
Name | Type | Attribute | Description |
ctx | * |
Return:
* |
public calcUndoMem(ctx: *): * source
Override:
ToolOp#calcUndoMemParams:
Name | Type | Attribute | Description |
ctx | * |
Return:
* |
public connect(srctool: *, srcoutput: *, dsttool: *, dstinput: *, srcprops: string, dstprops: string): * source
Return:
* |
public connectCB(srctool: *, dsttool: *, callback: *, thisvar: *): * source
Params:
Name | Type | Attribute | Description |
srctool | * | ||
dsttool | * | ||
callback | * | ||
thisvar | * |
Return:
* |
public getDefault(toolprop: *, key: *): * source
Override:
ToolOp#getDefaultParams:
Name | Type | Attribute | Description |
toolprop | * | ||
key | * |
|
Return:
* |
public hasDefault(toolprop: *, key: *): * source
Override:
ToolOp#hasDefaultParams:
Name | Type | Attribute | Description |
toolprop | * | ||
key | * |
|
Return:
* |
public loadDefaults(force: boolean): * source
Override:
ToolOp#loadDefaultsParams:
Name | Type | Attribute | Description |
force | boolean |
|
Return:
* |
public modalStart(ctx: *): * source
returns promise to be executed on modalEnd
Override:
ToolOp#modalStartParams:
Name | Type | Attribute | Description |
ctx | * |
Return:
* |
Private Methods
private _do_connections(tool: *) source
Params:
Name | Type | Attribute | Description |
tool | * |