12 #ifndef __UNI_Node_h__
13 #define __UNI_Node_h__
79 return (
graph() &&
id() !=
graph()->rootNode())
121 const UNI_StickyNoteIDList ¬e_ids,
122 std::ostream &os)
const
141 const UNI_PortIDList &create_input_ports,
142 const UNI_PortIDList &create_output_ports )
const;
150 void updateDownstreamPortTypes(
bool update_node )
const;
154 void setColor(
const UT_Color &clr )
const;
164 UNI_StickyNoteID createStickyNote(
const UT_StringHolder &name )
const;
166 void destroy()
const;
178 bool pasteItems(UNI_NodeIDList &node_ids,
179 UNI_StickyNoteIDList ¬e_ids,
UT_StringArray tags() const
Returns the tags (a set of keywords) assigned to the node.
UNI_PortIDList inputPorts() const
Input ports of a node.
virtual UT_StringArray tags(UNI_NodeID node_id) const =0
The list of tags associated with a node.
UNI_PortIDList outputPorts() const
Output ports of a node.
bool isRootNode() const
Returns true if this is the graph root node.
UT_Vector2D containerConnectPosition(UNI_ContainerConnectType contype) const
UT_Vector2T< fpreal64 > UT_Vector2D
GLsizei const GLfloat * value
GLsizei const GLchar *const * path
UNI_NodeID id() const
Returns the ID of the node in the graph.
UT_StringHolder comment() const
Returns the comment for the node.
virtual UNI_NodeIDList childNodes(UNI_NodeID parent_id) const =0
Returns the children nodes that live inside the given parent node.
virtual UNI_StickyNoteID findStickyNote(UNI_NodeID from_id, const UT_StringRef &path) const =0
Find the sticky note at a path relative to a starting node.
virtual UT_Color color(UNI_NodeID node_id) const =0
The color tint of the node in the graph editor.
virtual bool hasDynamicPorts(UNI_NodeID node_id) const =0
virtual UNI_ParmValue parmValue(UNI_NodeID node_id, const UT_StringRef &parm_name) const =0
Get the value of a parm on this node.
virtual UNI_PortIDList inputPorts(UNI_NodeID node_id) const =0
Input ports of a node.
virtual UT_StringHolder comment(UNI_NodeID node_id) const =0
The user-authored comment for a node.
bool isEditable() const
Control whether this graph is editable.
UT_Color color() const
Returns the color tint of the node in the graph editor.
virtual bool isEditableSubnet(UNI_NodeID parent_id) const =0
UNI_NodeIDList childNodes() const
Returns array of ids of all direct children of this node.
virtual UT_StringHolder categoryName(UNI_NodeID node_id) const =0
The category name of the node.
virtual UNI_StickyNoteIDList childStickyNotes(UNI_NodeID parent_id) const =0
virtual UT_StringHolder iconName(UNI_NodeID node_id) const =0
Returns the icon name for the given node.
UT_StringHolder iconName() const
Returns the icon name for the given node.
virtual UT_Vector2D position(UNI_NodeID node_id) const =0
The position of the node in the graph editor.
virtual bool isSubnet(UNI_NodeID node_id) const =0
Returns true if the given node is a subnet (can have child nodes).
virtual UT_Vector2D containerConnectPosition(UNI_NodeID parent_id, UNI_ContainerConnectType contype) const =0
UNI_StickyNoteIDList childStickyNotes() const
Returns all sticky notes contained by this node.
UNI_ParmValue parmValue(const UT_StringRef &parm_name) const
Get the value of a parm on this node.
virtual UT_StringHolder name() const =0
UNI_NodeID findNode(const UT_StringRef &path) const
bool isEditableSubnet() const
Returns true if this subnet's contents can be modified.
virtual UT_StringHolder signatureName(UNI_NodeID node_id) const =0
The name of the current signature of the given node.
GLuint const GLchar * name
std::variant< UNI_InvalidParmValue, UNI_DefaultParmValue, bool, int64, fpreal64, UT_Vector2D, UT_Vector3D, UT_Vector4D, UT_Matrix3D, UT_Matrix4D, UT_StringHolder, UNI_RampParmValue > UNI_ParmValue
Variant data type that holds all the parm value types allowed in UNI parms.
virtual UNI_NodeID findNode(UNI_NodeID from_id, const UT_StringRef &path) const =0
UNI_StickyNoteID findStickyNote(const UT_StringRef &path) const
Find a sticky note using a path specified relative to this node.
UNI_NodeID parent() const
bool copyItems(const UNI_NodeIDList &node_ids, const UNI_StickyNoteIDList ¬e_ids, std::ostream &os) const
Copy items contained by this node.
UT_StringHolder name() const
Returns the name of the node.
virtual UNI_NodeID parentNode(UNI_NodeID node_id) const =0
virtual UNI_PortIDList outputPorts(UNI_NodeID node_id) const =0
Output ports of a node.
bool hasDynamicPorts(UNI_NodeID node_id) const
Does this node have dynamic input or output ports (not subports).
UT_StringHolder typeName() const
Returns the type name of the node.
virtual UT_Color containerConnectColor(UNI_NodeID parent_id, UNI_ContainerConnectType contype) const =0
UT_StringHolder path() const
Return the full path from the root of the graph to this node.
UNI_Item()=default
Constructor.
UT_StringHolder parmDialogScript() const
Returns a dialog script describing this node's parms.
UT_StringHolder categoryName() const
Returns the category name of the node.
virtual UT_StringHolder typeName(UNI_NodeID node_id) const =0
The type name of the node.
UT_Vector2D position() const
Returns the node position in the graph editor.
const UNI_Graph * graph() const
Returns the graph inside which the node lives.
virtual UNI_NodeID rootNode() const =0
virtual bool copyItems(UNI_NodeID parent_id, const UNI_NodeIDList &node_ids, const UNI_StickyNoteIDList ¬e_ids, std::ostream &os) const =0
UT_StringHolder signatureName() const
Returns the name of the current signature of this node.
bool isEditable() const
Returns true if this is the graph root node.
virtual UT_StringHolder parmDialogScript(UNI_NodeID node_id) const =0
virtual UT_StringHolder path(UNI_NodeID node_id) const =0
The full path of the node.
UNI_ConstItem()=default
Constructor.
UT_Color containerConnectColor(UNI_ContainerConnectType contype) const
bool isSubnet() const
Returns true if this node is a subnet (can contain other nodes).