Protected_StaticDefaultOptionaloptions: { args: any[] }only last needs to be set, rest are optional. lastValue can be set if known (but it should be exactly equal to the value in the binding and not cloned). config, configPath are for parentOnChange, no need to set that.
use GetBaseProps
use GetBinding
use GetBounds
use GetChildren
use GetRawValue
Performs an action with undo/redo support, with the undo manager of the renderer. See PerformAction.
OptionalonUndoRedo: (c: ActionCommand) => voidOptionalonPending: () => voidOptionalforceOnChange: booleanStaticAddAdds a function that config.uiRefresh(deep, mode, delay) calls. Each renderer that draws a config adds its own
(UiConfigRendererBase.addRefreshListener does it for a renderer), so a config drawn by more than one renderer
refreshes in all of them. Callers keep calling config.uiRefresh?.(deep, mode, delay).
A function assigned with config.uiRefresh = fn is called too; assigning undefined removes only that function.
The listeners are not enumerable: JSON, a spread and Object.assign leave them out.
the config
called with the arguments of config.uiRefresh; adding the same function again does nothing
a function that removes the listener
StaticDispatchStaticGetStaticGetStaticGetStaticGetStaticGetStaticGetStaticGetGet the value from config
existing value, new value can be copied to this if not equal.
whether the value should be copied to val if equal. Default is true.
The value from the binding, cloned or copied if possible. If the value is equal and copyOnEqual is false, then undefined is returned. this can be used to check if the value is changed
StaticInitStaticPerformPerforms an action with undo/redo support.
The action can return:
undo and optional redo and action: action (if any) runs now. Undo calls undo and redo
calls redo (else action, else it runs the action again, as in 1). They are read from the object when the
step is undone or redone, not when it is recorded, so an action can replace them (for example an undo that
sets the redo that brings back the same object).With an undo manager, the action is one undo step (when it returns an undo).
the target object to call the action on
a function that returns - 1. an undo function, 2. an object with undo and redo functions (and optional action)
the arguments to pass to the action function
ui config
OptionalonUndoRedo: (c: ActionCommand) => void
optional callback function to be called on undo/redo of the command. Not called on first action execution, only on undo/redo.
Optionalum: JSUndoManager
the undo manager that records the step
OptionalundoEditingWaitTime: number
see RecordUndo
OptionalonPending: () => void
called once, synchronously, when the action (or the action of the object that it returns)
returns a promise, before it settles: for example to show that a button runs. Not called for a synchronous action,
or for a redo.
StaticRecordOptionalum: JSUndoManagerOptionalundoEditingWaitTime: numberStaticRemoveRemoves a function added with AddRefreshListener. The assigned config.uiRefresh function and the other
listeners stay.
StaticRunOptionaldispatcher: UiConfigRendererBaseStaticSetupBinds a child config to the binding of its parent (a folder with property or value) when the child has no
binding of its own (no property, value, getValue or setValue) and is not a button: the child gets the
parent's property (or [parent, 'value']), and its path then selects a value inside it. Renderers call it for
each child before drawing it (uiconfig-tweakpane, uiconfig.js/dom).
the child config
the folder (or other parent config) that holds it
StaticSetonly the prop last need to be set, rest are optional. lastValue can be set if known (but it should be exactly equal to the value in the binding and not cloned).
OptionalforceOnChange: booleanOptionaldispatcher: UiConfigRendererBaseOptionalum: JSUndoManagerOptionalundoEditingWaitTime: number
Args is generally the event like the mouse event -
clickButton(config, {args: [event]})