HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UN_BasicUniGraph Class Reference

#include <UN_UniGraph.h>

+ Inheritance diagram for UN_BasicUniGraph:

Protected Member Functions

 UN_BasicUniGraph (UN_GraphContext graph_context)
 
- Protected Member Functions inherited from UN_UniGraph
 UN_UniGraph ()
 Constructor. More...
 
void setGraphData (UN_GraphData *graph_data)
 
const UNI_ManageruniManager () const
 Returns the UNI manager this graph belongs to. More...
 
UNI_NodeID createNode (UNI_NodeID parent_id, const UT_StringHolder &node_name, const UT_StringHolder &node_type_name, const UT_StringHolder &signature_name=UT_StringHolder()) override
 Non-const methods are all protected. More...
 
UNI_NodeID createSubnet (UNI_NodeID parent_id, const UT_StringHolder &subnet_node_name, const UNI_PortIDList &create_input_ports, const UNI_PortIDList &create_output_ports) override
 Non-const methods are all protected. More...
 
void setName (UNI_NodeID node_id, const UT_StringHolder &name) override
 Non-const methods are all protected. More...
 
void setSignature (UNI_NodeID node_id, const UT_StringHolder &signature_name) override
 Non-const methods are all protected. More...
 
void updateDownstreamPortTypes (UNI_NodeID node_id, bool update_node) override
 Non-const methods are all protected. More...
 
void updateDownstreamPortTypes (UNI_PortID port_id, bool update_port) override
 Non-const methods are all protected. More...
 
void setPosition (UNI_NodeID node_id, const UT_Vector2D &pos) override
 Non-const methods are all protected. More...
 
void setColor (UNI_NodeID node_id, const UT_Color &clr) override
 Non-const methods are all protected. More...
 
void setComment (UNI_NodeID node_id, const UT_StringHolder &comment) override
 Non-const methods are all protected. More...
 
void setTags (UNI_NodeID node_id, const UT_StringArray &tags) override
 Non-const methods are all protected. More...
 
void setParmValue (UNI_NodeID node_id, const UT_StringRef &parm_name, const UNI_ParmValue &value) override
 Non-const methods are all protected. More...
 
void destroy (UNI_NodeID node_id) override
 Non-const methods are all protected. More...
 
void setContainerConnectPosition (UNI_NodeID parent_id, UNI_ContainerConnectType contype, const UT_Vector2D &pos) override
 Non-const methods are all protected. More...
 
void setContainerConnectColor (UNI_NodeID parent_id, UNI_ContainerConnectType contype, const UT_Color &clr) override
 Non-const methods are all protected. More...
 
void setName (UNI_PortID port_id, const UT_StringHolder &name) override
 Non-const methods are all protected. More...
 
UNI_WireID createWire (UNI_PortID src, UNI_PortID dst) override
 Non-const methods are all protected. More...
 
void destroy (UNI_WireID wire_id) override
 Non-const methods are all protected. More...
 
UNI_StickyNoteID createStickyNote (UNI_NodeID parent_id, const UT_StringHolder &name) override
 Non-const methods are all protected. More...
 
void setName (UNI_StickyNoteID note_id, const UT_StringHolder &name) override
 Non-const methods are all protected. More...
 
void setPosition (UNI_StickyNoteID note_id, const UT_Vector2D &pos) override
 Non-const methods are all protected. More...
 
void setSize (UNI_StickyNoteID note_id, const UT_Vector2D &size) override
 Non-const methods are all protected. More...
 
void setColor (UNI_StickyNoteID note_id, const UT_Color &clr) override
 Non-const methods are all protected. More...
 
void setText (UNI_StickyNoteID note_id, const UT_StringHolder &text) override
 Non-const methods are all protected. More...
 
void setTextColor (UNI_StickyNoteID note_id, const UT_Color &clr) override
 Non-const methods are all protected. More...
 
void setTextSize (UNI_StickyNoteID note_id, const float size) override
 Non-const methods are all protected. More...
 
void setCollapsed (UNI_StickyNoteID note_id, bool collapsed) override
 Non-const methods are all protected. More...
 
void setBackgroundHidden (UNI_StickyNoteID note_id, bool hidden) override
 Non-const methods are all protected. More...
 
void destroy (UNI_StickyNoteID note_id) override
 Non-const methods are all protected. More...
 
bool pasteItems (UNI_NodeID parent_id, UNI_NodeIDList &node_ids, UNI_StickyNoteIDList &note_ids, std::istream &is, UT_StringMap< UT_StringHolder > *rename_map) override
 Non-const methods are all protected. More...
 
const UNI_CategoryuniCategory (const UT_StringRef &category_name) const
 Returns the UNI manager this graph belongs to. More...
 
const UN_UniCategoryunCategory (const UT_StringRef &category_name) const
 Returns the UNI manager this graph belongs to. More...
 
const UN_GraphDataunGraphData () const
 Returns the underlying UN graph. More...
 
UN_GraphDataunGraphData ()
 Returns the underlying UN graph. More...
 
UN_Node unNode (UNI_NodeID id)
 Convenience methods to get a UN items from an UNI ID. More...
 
UN_ConstNode unNode (UNI_NodeID id) const
 Convenience methods to get a UN items from an UNI ID. More...
 
UN_Port unPort (UNI_PortID id)
 Convenience methods to get a UN items from an UNI ID. More...
 
UN_ConstPort unPort (UNI_PortID id) const
 Convenience methods to get a UN items from an UNI ID. More...
 
const UN_PortTypeunPortType (UNI_PortID id) const
 Convenience methods to get a UN items from an UNI ID. More...
 
UN_StickyNote unStickyNote (UNI_StickyNoteID id)
 Convenience methods to get a UN items from an UNI ID. More...
 
UN_ConstStickyNote unStickyNote (UNI_StickyNoteID id) const
 Convenience methods to get a UN items from an UNI ID. More...
 
- Protected Member Functions inherited from UNI_Graph
 UNI_Graph ()
 
void forceTriggerChangeCallbacks (const UNI_GraphChangeType &add_change_type=UNI_GraphChangeType())
 
- Protected Member Functions inherited from UT_IntrusiveRefCounter< UNI_Graph, UNI_GraphDeleter >
SYS_FORCE_INLINE ~UT_IntrusiveRefCounter ()
 Destructor: Only derived classes can destruct this. More...
 

Additional Inherited Members

- Public Types inherited from UNI_Graph
using ChangeCallback = UT_Function< void(UNI_Graph &, UNI_GraphChangeType, bool)>
 
using ChangeCallbackID = int
 
- Public Member Functions inherited from UN_UniGraph
UT_StringHolder name () const override
 Graph APIs: More...
 
bool isEmpty () const override
 Returns true if the graph has no nodes. More...
 
UNI_WireStyle wireStyle () const override
 The drawing style of the connection wires in the graph. More...
 
void setWireStyle (UNI_WireStyle wire_style) override
 The drawing style of the connection wires in the graph. More...
 
bool isValid (UNI_NodeID node_id) const override
 Returns true if the given ID refers to a valid item in this graph. More...
 
bool isValid (UNI_PortID port_id) const override
 Returns true if the given ID refers to a valid item in this graph. More...
 
bool isValid (UNI_WireID wire_id) const override
 Returns true if the given ID refers to a valid item in this graph. More...
 
bool isValid (UNI_StickyNoteID sticky_note_id) const override
 Returns true if the given ID refers to a valid item in this graph. More...
 
UNI_NodeID rootNode () const override
 Node APIs: More...
 
UT_StringHolder name (UNI_NodeID node_id) const override
 The name of a node. More...
 
UT_StringHolder path (UNI_NodeID node_id) const override
 The full path of the node. More...
 
UT_StringHolder categoryName (UNI_NodeID node_id) const override
 The category name of the node. More...
 
UT_StringHolder typeName (UNI_NodeID node_id) const override
 The type name of the node. More...
 
UT_StringHolder signatureName (UNI_NodeID node_id) const override
 The name of the current signature of the given node. More...
 
bool isMultiSignature (UNI_NodeID node_id) const override
 Returns true if the node has many signatures to choose from. More...
 
UT_Array< UNI_Signaturesignatures (UNI_NodeID node_id, bool compatible_only, bool force_include_current) const override
 
UT_StringHolder helpURL (UNI_NodeID node_id) const override
 
UNI_NodeID parentNode (UNI_NodeID node_id) const override
 
bool isSubnet (UNI_NodeID node_id) const override
 Returns true if the given node is a subnet (can have child nodes). More...
 
bool isEditable (UNI_NodeID node_id) const override
 
bool isEditableSubnet (UNI_NodeID parent_id) const override
 
UNI_NodeIDList childNodes (UNI_NodeID node_id) const override
 Returns the children nodes that live inside the given parent node. More...
 
UNI_NodeID findNode (UNI_NodeID from_id, const UT_StringRef &path) const override
 
bool isValidName (const UT_StringRef &name) const override
 Generic functions related to entity naming. More...
 
bool isNameInUse (UNI_NodeID parent_id, const UT_StringRef &name) const override
 Generic functions related to entity naming. More...
 
UT_StringHolder findUniqueName (UNI_NodeID parent_id, const UT_StringHolder &name) const override
 Generic functions related to entity naming. More...
 
UT_Vector2D position (UNI_NodeID node_id) const override
 The position of the node in the graph editor. More...
 
UT_Color color (UNI_NodeID node_id) const override
 The color tint of the node in the graph editor. More...
 
UT_StringHolder iconName (UNI_NodeID node_id) const override
 Returns the icon name for the given node. More...
 
UT_StringHolder comment (UNI_NodeID node_id) const override
 The user-authored comment for a node. More...
 
UT_StringArray tags (UNI_NodeID node_id) const override
 The list of tags associated with a node. More...
 
UT_StringHolder parmDialogScript (UNI_NodeID node_id) const override
 
UNI_ParmValue parmValue (UNI_NodeID node_id, const UT_StringRef &parm_name) const override
 Get the value of a parm on this node. More...
 
bool parmOverriddenByConnection (UNI_NodeID node_id, const UT_StringRef &parm_name) const override
 
int numberOfInputPorts (UNI_NodeID node_id) const override
 Input ports of a node. More...
 
UNI_PortIDList inputPorts (UNI_NodeID node_id) const override
 Input ports of a node. More...
 
UNI_PortID inputPort (UNI_NodeID node_id, int port_index) const override
 Input ports of a node. More...
 
int findInputPortIndex (UNI_NodeID node_id, UNI_PortID port_id) const override
 Input ports of a node. More...
 
int numberOfOutputPorts (UNI_NodeID node_id) const override
 Output ports of a node. More...
 
UNI_PortIDList outputPorts (UNI_NodeID node_id) const override
 Output ports of a node. More...
 
UNI_PortID outputPort (UNI_NodeID node_id, int port_index) const override
 Output ports of a node. More...
 
int findOutputPortIndex (UNI_NodeID node_id, UNI_PortID port_id) const override
 Output ports of a node. More...
 
bool hasDynamicPorts (UNI_NodeID node_id) const override
 
bool wireDirectlyToContainer () const override
 
UT_Vector2D containerConnectPosition (UNI_NodeID parent_id, UNI_ContainerConnectType contype) const override
 
UT_Color containerConnectColor (UNI_NodeID parent_id, UNI_ContainerConnectType contype) const override
 
UNI_NodeID ownerNode (UNI_PortID port_id) const override
 Port APIs: More...
 
UNI_PortKind portKind (UNI_PortID port_id) const override
 Returns what kind of a port this is: input or output. More...
 
bool portAcceptsSubPorts (UNI_PortID port_id) const override
 Returns whether the port accepts subports. More...
 
bool portIsSubPort (UNI_PortID port_id) const override
 Returns whether the port is a subport. More...
 
UNI_PortID outerPort (UNI_PortID port_id) const override
 Returns the "outer port" of a subport. More...
 
UNI_PortIDList subnetOutputPorts (UNI_PortID port_id) const override
 
UNI_PortIDList subnetInputPorts (UNI_PortID port_id) const override
 
UT_StringHolder name (UNI_PortID port_id) const override
 The name of the port. Some ports can be renamed. More...
 
bool canSetName (UNI_PortID port_id) const override
 Some graphs support setting port names. More...
 
UT_StringHolder label (UNI_PortID port_id) const override
 The label of the port. Some ports can be renamed. More...
 
UT_StringHolder typeName (UNI_PortID port_id) const override
 Returns the data type name for the given port. More...
 
UT_StringHolder colorName (UNI_PortID port_id) const override
 
UNI_PortShape shape (UNI_PortID port_id) const override
 Returns the visual shape of the port in the UI. More...
 
UNI_WireIDList childWires (UNI_NodeID node_id) const override
 Wire APIs: More...
 
UNI_PortID srcPort (UNI_WireID wire_id) const override
 
UNI_PortID dstPort (UNI_WireID wire_id) const override
 
UNI_WireIDList srcWires (UNI_PortID port_id) const override
 Return the wires that connect to a given port. More...
 
UNI_WireIDList dstWires (UNI_PortID port_id) const override
 Return the wires that connect to a given port. More...
 
UNI_StickyNoteIDList childStickyNotes (UNI_NodeID parent_id) const override
 Sticky note APIs: More...
 
UNI_StickyNoteID findStickyNote (UNI_NodeID from_id, const UT_StringRef &path) const override
 Find the sticky note at a path relative to a starting node. More...
 
UT_StringHolder name (UNI_StickyNoteID note_id) const override
 The name of a sticky note. More...
 
UT_StringHolder path (UNI_StickyNoteID note_id) const override
 The full path of the sticky note. More...
 
UNI_NodeID ownerNode (UNI_StickyNoteID note_id) const override
 Returns the id of the node that contains this sticky note. More...
 
UT_StringHolder text (UNI_StickyNoteID note_id) const override
 Returns the sticky note's contents. More...
 
UT_Color textColor (UNI_StickyNoteID note_id) const override
 Returns the sticky note's text (foreground) color. More...
 
float textSize (UNI_StickyNoteID note_id) const override
 Returns the sticky note's text size. More...
 
UT_Color color (UNI_StickyNoteID note_id) const override
 Returns the sticky note's (background) color. More...
 
UT_Vector2D position (UNI_StickyNoteID note_id) const override
 Returns the sticky note's position in the graph editor. More...
 
UT_Vector2D size (UNI_StickyNoteID note_id) const override
 Returns the sticky note's size (width & height). More...
 
bool isCollapsed (UNI_StickyNoteID note_id) const override
 Returns true if the sticky note is collapsed (minimized). More...
 
bool isBackgroundHidden (UNI_StickyNoteID note_id) const override
 
bool copyItems (UNI_NodeID parent_id, const UNI_NodeIDList &node_ids, const UNI_StickyNoteIDList &note_ids, std::ostream &os) const override
 
- Public Member Functions inherited from UNI_Graph
virtual ~UNI_Graph ()
 Destructor. More...
 
UNI_GraphID graphID () const
 
bool isEditable () const
 Control whether this graph is editable. More...
 
void setEditable (bool editable)
 Control whether this graph is editable. More...
 
UNI_NodeID currentChildNode (UNI_NodeID parent_id)
 Functions for tracking the current and selected nodes and wires. More...
 
const UT_Array
< UNI_SelectableItemID > & 
selectedItems () const
 Functions for tracking the current and selected nodes and wires. More...
 
template<typename T >
UT_Array< TselectedItemsOfType () const
 Functions for tracking the current and selected nodes and wires. More...
 
bool isItemSelected (UNI_SelectableItemID id)
 Functions for tracking the current and selected nodes and wires. More...
 
void addSelectedItem (UNI_SelectableItemID id)
 Functions for tracking the current and selected nodes and wires. More...
 
void removeSelectedItem (UNI_SelectableItemID id)
 Functions for tracking the current and selected nodes and wires. More...
 
void clearSelection ()
 Functions for tracking the current and selected nodes and wires. More...
 
ChangeCallbackID addChangeCallback (const UNI_Graph::ChangeCallback &cb)
 
void removeChangeCallback (ChangeCallbackID id)
 
- Public Member Functions inherited from UT_IntrusiveRefCounter< UNI_Graph, UNI_GraphDeleter >
SYS_FORCE_INLINE UT_IntrusiveRefCounter () noexcept
 Default constructor: Sets counter to 0. More...
 
SYS_FORCE_INLINE UT_IntrusiveRefCounter (const UT_IntrusiveRefCounter &) noexcept
 Copy constructor: Sets counter to 0. More...
 
UT_IntrusiveRefCounteroperator= (const UT_IntrusiveRefCounter &) noexcept
 Assignment operator: Does not modify counter. More...
 
SYS_FORCE_INLINE uint32 use_count () const noexcept
 Return current counter. More...
 
SYS_FORCE_INLINE bool conditionalAddRef () noexcept
 
- Static Public Member Functions inherited from UNI_Graph
static UNI_GraphfindGraph (UNI_GraphID id)
 Returns a UNI graph given its ID. Returns a null if not found. More...
 

Detailed Description

Definition at line 283 of file UN_UniGraph.h.

Constructor & Destructor Documentation

UN_BasicUniGraph::UN_BasicUniGraph ( UN_GraphContext  graph_context)
protected

Constructor. Intended to be called with the factory function createGraph();


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