Vuo  0.4.2
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Static Public Member Functions | Static Public Attributes | List of all members
VuoCommandCommon Class Reference

Description

Helper functions for undoable actions.

Static Public Member Functions

static void addCable (VuoRendererCable *rc, map< VuoRendererCable *, VuoPort * > &fromPortForCable, map< VuoRendererCable *, VuoPort * > &toPortForCable, 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, map< VuoRendererCable *, VuoPort * > &fromPortForCable, map< VuoRendererCable *, VuoPort * > &toPortForCable, VuoEditorComposition *composition)
 Helper function for VuoCommandConnect::redo(), VuoCommandConnect::undo(), VuoCommandRemove::redo(), and VuoCommandRemove::undo().
 
static VuoPublishedPortpublishInternalPort (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.
 

Member Function Documentation

void VuoCommandCommon::addCable ( VuoRendererCable rc,
map< VuoRendererCable *, VuoPort * > &  fromPortForCable,
map< VuoRendererCable *, VuoPort * > &  toPortForCable,
VuoEditorComposition composition 
)
static

Helper function for VuoCommandAdd::redo() and VuoCommandRemove::undo().

Adds a cable to the canvas.

VuoPublishedPort * VuoCommandCommon::publishInternalPort ( VuoPort internalPort,
string  publishedPortName,
bool  merge,
VuoEditorComposition composition 
)
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.

Returns
A pointer to the resulting externally visible VuoPublishedPort object.
void VuoCommandCommon::removeCable ( VuoRendererCable rc,
VuoEditorComposition composition 
)
static

Helper function for VuoCommandRemove::redo() and VuoCommandAdd::undo().

Removes a cable from the canvas.

void VuoCommandCommon::updateCable ( VuoRendererCable rc,
map< VuoRendererCable *, VuoPort * > &  fromPortForCable,
map< VuoRendererCable *, VuoPort * > &  toPortForCable,
VuoEditorComposition composition 
)
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.


The documentation for this class was generated from the following files: