#include <c4d_graphview.h>
GV node GUI helper class. Cannot be instantiated.
Private Member Functions | |
| GvNodeGUI () | |
| ~GvNodeGUI () | |
Attach/Detach | |
| Bool | Attach (GeDialog *dialog, GvNodeMaster *master) |
| void | Detach () |
User Area Events | |
| void | MouseDown (Int32 x, Int32 y, Int32 chn, Int32 qa, const BaseContainer &msg) |
| Int32 | Message (const BaseContainer &msg, BaseContainer &result) |
| Int32 | Command (Int32 id) |
Draw/Redraw | |
| void | Draw () |
| void | Redraw () |
Get User Area/Node Master/Dialog | |
| GeUserArea * | GetUserArea () |
| GvNodeMaster * | GetMaster () |
| GeDialog * | GetDialog () |
Select/Focus | |
| void | SelectAllNodes (GvNode *node, Bool select_state, Bool add_to_selection=false) |
| void | RemoveAllSelectedNodes (GvNode *node) |
| void | SelectNode (GvNode *node, Bool select_state, Bool add_to_selection=false, Bool send_message=true) |
| void | DisableSelected (GvNode *node, Bool disable_state) |
| void | SetFocus (GvNode *node, Bool activate) |
Get Node at Position | |
| GvNode * | GetNodeGlobal (Int32 x, Int32 y) |
| GvNode * | GetNodeLocal (GvNode *node, Int32 x, Int32 y) |
Check in Node Position | |
| Bool | IsInNodeBody (GvNode *node, Int32 x, Int32 y) |
| Bool | IsInNodeHead (GvNode *node, Int32 x, Int32 y) |
Preferences | |
| void | SetPrefs (const BaseContainer &bc) |
| void | GetPrefs (BaseContainer &bc) |
Set Node Position/Size | |
| void | SetNodePosGlobal (GvNode *node, Int32 x, Int32 y, Bool center=false) |
| void | SetNodePos (GvNode *node, Int32 x, Int32 y) |
| void | SetNodeSize (GvNode *node, Int32 width, Int32 height) |
| void | OptimizeNode (GvNode *node) |
Node Utilities | |
| void | ShowAllNodes (GvNode *node) |
| void | CenterNodes (GvNode *node) |
| void | AlignNodesToUpperLeft (GvNode *node) |
Miscellaneous | |
| void | GetZoom (GvNode *node, Float &zoom) |
| Bool | InitShapes () |
| Bool | NodeContextMenu (GvNode *node) |
|
private |
|
private |
| Bool Attach | ( | GeDialog * | dialog, |
| GvNodeMaster * | master | ||
| ) |
Attaches the node GUI to dialog and master.
| [in] | dialog | A dialog. The caller owns the pointed dialog. |
| [in] | master | A node master. The caller owns the pointed node master. |
| void Detach | ( | ) |
Detaches the node GUI.
| void MouseDown | ( | Int32 | x, |
| Int32 | y, | ||
| Int32 | chn, | ||
| Int32 | qa, | ||
| const BaseContainer & | msg | ||
| ) |
Handles mouse down messages routed from the user area.
| [in] | x | The X coordinate. |
| [in] | y | The Y coordinate. |
| [in] | chn | The channel. |
| [in] | qa | The qualifiers. |
| [in] | msg | The message container. |
| Int32 Message | ( | const BaseContainer & | msg, |
| BaseContainer & | result | ||
| ) |
Handles messages routed from the user area.
| [in] | msg | The message container. |
| [in] | result | A container to place results in. |
Handles commands routed from the user area.
| [in] | id | The command ID. |
| void Draw | ( | ) |
Draws the window content. Called by GeUserArea::DrawMsg().
| void Redraw | ( | ) |
Redraws the node GUI and calls all draw hooks attached to the node master. Called by GvNodeMaster.
| GeUserArea* GetUserArea | ( | ) |
Gets the user area for the node GUI.
| GvNodeMaster* GetMaster | ( | ) |
Gets the node master for the node GUI.
| GeDialog* GetDialog | ( | ) |
Gets the dialog for the node GUI.
Selects all nodes.
| [in] | node | The node. The caller owns the pointed node. |
| [in] | select_state | The selection state. |
| [in] | add_to_selection | If true the node is added to the selection. |
| void RemoveAllSelectedNodes | ( | GvNode * | node | ) |
Removes all selected nodes.
| [in] | node | The node. The caller owns the pointed node. |
| void SelectNode | ( | GvNode * | node, |
| Bool | select_state, | ||
| Bool | add_to_selection = false, |
||
| Bool | send_message = true |
||
| ) |
Selects a node.
| [in] | node | The node to select. The caller owns the pointed node. |
| [in] | select_state | The selection state. |
| [in] | add_to_selection | If true the node is added to the selection. |
| [in] | send_message | If true a message is sent about the selection. |
Disables or enables a node.
| [in] | node | The node to disable or enable. The caller owns the pointed node. |
| [in] | disable_state | true means disabled, false means enabled. |
Sets the focus to node.
| [in] | node | The node to focus. The caller owns the pointed node. |
| [in] | activate | true to activate the node, false to deactivate. |
Gets the node at the global position (x, y).
| [in] | x | The X coordinate. |
| [in] | y | The Y coordinate. |
Gets the node at the local position (x, y).
| [in] | node | The node for the local coordinates. The caller owns the pointed node. |
| [in] | x | The X coordinate. |
| [in] | y | The Y coordinate. |
Checks if the position (x, y) is inside the body of node.
| [in] | node | The node. The caller owns the pointed node. |
| [in] | x | The X coordinate. |
| [in] | y | The Y coordinate. |
Checks if the position (x, y) is inside the head of node.
| [in] | node | The node. The caller owns the pointed node. |
| [in] | x | The X coordinate. |
| [in] | y | The Y coordinate. |
| void SetPrefs | ( | const BaseContainer & | bc | ) |
Sets the preferences for the node GUI.
| [in] | bc | The new preferences. Use these container IDs: GvGuiConfigIDs |
| void GetPrefs | ( | BaseContainer & | bc | ) |
Gets the preferences for the node GUI.
| [out] | bc | Filled with the current preferences. Use these container IDs: GvGuiConfigIDs |
Sets the global position of node to (x, y).
| [in] | node | The node. The caller owns the pointed node. |
| [in] | x | The X coordinate. |
| [in] | y | The Y coordinate. |
| [in] | center | If true the node is centered. |
Sets the position of node to (x, y).
| [in] | node | The node. The caller owns the pointed node. |
| [in] | x | The X coordinate. |
| [in] | y | The Y coordinate. |
Sets the size of node.
| [in] | node | The node. The caller owns the pointed node. |
| [in] | width | The width. |
| [in] | height | The height. |
| void OptimizeNode | ( | GvNode * | node | ) |
Optimizes the size of node.
| [in] | node | The node. The caller owns the pointed node. |
| void ShowAllNodes | ( | GvNode * | node | ) |
Shows all nodes.
| [in] | node | The node. The caller owns the pointed node. |
| void CenterNodes | ( | GvNode * | node | ) |
Centers nodes.
| [in] | node | The node. The caller owns the pointed node. |
| void AlignNodesToUpperLeft | ( | GvNode * | node | ) |
Aligns all nodes to the upper left.
| [in] | node | The node. The caller owns the pointed node. |
Gets the zoom of node.
| [in] | node | The node. The caller owns the pointed node. |
| [out] | zoom | This value is multiplied by the zoom factor. |
| Bool InitShapes | ( | ) |
Initializes the node GUI shapes.