Editor:
Filter:
crucial-library/Classes (extension) | Libraries > crucial > Editors

Editor
ExtensionExtension

holds a value that can be edited with a GUI, saves as the value

Description

This is the parent class for all Editors and also has a repository of handlers that are used to find the appropriate editor for a given object.

In some cases not only is an Editor found for the object, but objects within the object are converted to Editors. For instance when editing a Patch it is actually the patch's inputs that are converted to Editors (NumberEditor, EnvEditor etc).

Note that an Editor has a separate GUI class, and does not in fact have to have an open GUI in order to use or interact with it.

Class Methods

.for

Find the appropriate Editor for the given object

Arguments:

object
... args

additional arguments are supplied to the purveyor function

.editorFor

private. this is the handler dictionary

Instance Methods

.action

Like a view, an editor has an action function which will fire when the value is set. Note that an Editor does not have to have an open GUI.

.value

Get the current value of the edited object

.patchOut

.storeOn

Editors always store the value. In other words, when saving they do not store an Editor, they store the edited object.

Arguments:

stream

.next

Returns:

current edited value

.poll

.dereference

Returns:

current edited value

.embedInStream

Arguments:

inval

.asStream

an Editor can be used as a stream. it would return the current edited value on each iteration

Returns:

FuncStream(this)

.setPatchOut

Arguments:

po

.makePatchOut

.stopToBundle

Arguments:

b

.freePatchOutToBundle

Arguments:

bundle

.synthArg

.instrArgFromControl

Arguments:

control

.editWithCallback

Arguments:

callback

.set

Arguments:

val

.activeValue

Arguments:

val

.valueAction

Arguments:

val

.spec

.copy

.guiClass

.addToDefName

Arguments:

stream

.state

Arguments:

val