Vuo
0.4.3
|
Helper functions for undoable actions.
Static Public Member Functions | |
static void | addCable (VuoRendererCable *rc, VuoPort *fromPortAfterAdding, VuoPort *toPortAfterAdding, VuoEditorComposition *composition) |
Helper function for VuoCommandAdd::redo() and VuoCommandRemove::undo(). | |
static void | removeCable (VuoRendererCable *rc, VuoEditorComposition *composition) |
Helper function for VuoCommandRemove::redo() and VuoCommandAdd::undo(). | |
static void | updateCable (VuoRendererCable *rc, VuoPort *updatedFromPort, VuoPort *updatedToPort, VuoEditorComposition *composition) |
Helper function for VuoCommandConnect::redo(), VuoCommandConnect::undo(), VuoCommandRemove::redo(), and VuoCommandRemove::undo(). | |
static VuoPublishedPort * | publishInternalPort (VuoPort *internalPort, string publishedPortName, bool merge, VuoEditorComposition *composition) |
Publishes the internalPort under externally visible name publishedPortName , or under a derived name if an externally visible published port with that name already exists and merge is set to false. | |
static void | publishInternalExternalPortCombination (VuoPort *internalPort, VuoPublishedPort *externalPort, VuoEditorComposition *composition) |
Publishes the internalPort in association with pre-existing externally visible published port externalPort . | |
static void | unpublishInternalPort (VuoPort *internalPort, VuoEditorComposition *composition) |
Unpublishes the given internalPort in association with any and all externally visible published ports acting as its alias. | |
static void | unpublishInternalExternalPortCombination (VuoPort *internalPort, VuoPublishedPort *externalPort, VuoEditorComposition *composition) |
Unpublishes the given internalPort in association with externally visible published port externalPort . | |
Static Public Attributes | |
static const int | moveCommandID = 1 |
ID for VuoCommandMove. | |
static const int | addCommandID = 2 |
ID for VuoCommandAdd. | |
static const int | removeCommandID = 3 |
ID for VuoCommandRemove. | |
static const int | connectCommandID = 4 |
ID for VuoCommandConnect. | |
static const int | setPortConstantCommandID = 5 |
ID for VuoCommandSetPortConstant. | |
static const int | setNodeTitleCommandID = 6 |
ID for VuoCommandSetNodeTitle. | |
static const int | setPublishedPortNameCommandID = 7 |
ID for VuoCommandSetPublishedPortName. | |
static const int | publishPortCommandID = 8 |
ID for VuoCommandPublishPort. | |
static const int | unpublishPortCommandID = 9 |
ID for VuoCommandUnpublishPort. | |
static const int | setNodeTintCommandID = 10 |
ID for VuoCommandSetNodeTint. | |
static const int | replaceNodeCommandID = 11 |
ID for VuoCommandReplaceNode. | |
|
static |
Helper function for VuoCommandAdd::redo() and VuoCommandRemove::undo().
Adds a cable to the canvas.
|
static |
Publishes the internalPort
under externally visible name publishedPortName
, or under a derived name if an externally visible published port with that name already exists and merge
is set to false.
|
static |
Helper function for VuoCommandRemove::redo() and VuoCommandAdd::undo().
Removes a cable from the canvas.
|
static |
Helper function for VuoCommandConnect::redo(), VuoCommandConnect::undo(), VuoCommandRemove::redo(), and VuoCommandRemove::undo().
Connects the input cable rc
to the 'From' and 'To' ports specified in the input maps fromPortForCable
and toPortForCable
, respectively.
Note: This function should be called after any calls to addNode() or removeNode() that might affect the cable's endpoints, to ensure that the cable is added to or removed from the composition as appropriate.