GvNodeGUI Class Reference Graph View

#include <c4d_graphview.h>

详细描述

GV node GUI helper class. Cannot be instantiated.

私有成员函数

  GvNodeGUI ()
  ~GvNodeGUI ()

Attach/Detach

Bool   Attach ( GeDialog *dialog, GvNodeMaster *master)
void  Detach (void)

User Area Events

void  MouseDown ( Int32 x, Int32 y, Int32 chn, Int32 qa, const BaseContainer &msg)
Int32   消息 (const BaseContainer &msg, BaseContainer &result)
Int32   命令 ( Int32 id)

Draw/Redraw

void  Draw (void)
void  Redraw (void)

Get User Area/Node Master/Dialog

GeUserArea GetUserArea (void)
GvNodeMaster GetMaster (void)
GeDialog GetDialog (void)

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)

首选项

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)

杂项

void  GetZoom ( GvNode *node, Float &zoom)
Bool   InitShapes (void)
Bool   NodeContextMenu ( GvNode *node)

构造函数 & 析构函数文档编制

◆  GvNodeGUI()

GvNodeGUI () private

◆  ~GvNodeGUI()

~ GvNodeGUI () private

成员函数文档编制

◆  Attach()

Bool Attach ( GeDialog dialog ,
GvNodeMaster master  
)

Attaches the node GUI to dialog and master .

注意
Normally you do not need to call this function.
参数
[in] dialog A dialog. The caller owns the pointed dialog.
[in] master A node master. The caller owns the pointed node master.
返回
true if successful, otherwise false .

◆  Detach()

void Detach ( void  )

Detaches the node GUI.

注意
Normally you do not need to call this function.

◆  MouseDown()

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.

◆  Message()

Int32 消息 ( 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.
返回
true if the message was handled, otherwise false .

◆  Command()

Int32 命令 ( Int32   id )

Handles commands routed from the user area.

参数
[in] id The command ID.
返回
The command result.

◆  Draw()

void Draw ( void  )

Draws the window content. Called by GeUserArea::DrawMsg() .

◆  Redraw()

void Redraw ( void  )

Redraws the node GUI and calls all draw hooks attached to the node master. Called by GvNodeMaster .

◆  GetUserArea()

GeUserArea * GetUserArea ( void  )

Gets the user area for the node GUI.

返回
The user area. The node GUI owns the pointed user area.

◆  GetMaster()

GvNodeMaster * GetMaster ( void  )

Gets the node master for the node GUI.

返回
The node master. The node GUI owns the pointed node master.

◆  GetDialog()

GeDialog * GetDialog ( void  )

Gets the dialog for the node GUI.

返回
The dialog. The node GUI owns the pointed dialog.

◆  SelectAllNodes()

void SelectAllNodes ( GvNode node ,
Bool   select_state ,
Bool   add_to_selection = false  
)

Selects all nodes.

参数
[in] node The node. The caller owns the pointed node.
[in] select_state The selection state.
[in] add_to_selection true the node is added to the selection.

◆  RemoveAllSelectedNodes()

void RemoveAllSelectedNodes ( GvNode node )

Removes all selected nodes.

参数
[in] node The node. The caller owns the pointed node.

◆  SelectNode()

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 true the node is added to the selection.
[in] send_message true a message is sent about the selection.

◆  DisableSelected()

void DisableSelected ( GvNode node ,
Bool   disable_state  
)

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.

◆  SetFocus()

void SetFocus ( GvNode node ,
Bool   activate  
)

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.

◆  GetNodeGlobal()

GvNode * GetNodeGlobal ( Int32   x ,
Int32   y  
)

Gets the node at the global position ( x , y ).

参数
[in] x The X coordinate.
[in] y The Y coordinate.
返回
The found node, or nullptr if there was no match. The node GUI owns the pointed node.

◆  GetNodeLocal()

GvNode * GetNodeLocal ( GvNode node ,
Int32   x ,
Int32   y  
)

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.
返回
The found node, or nullptr if there was no match. The node GUI owns the pointed node.

◆  IsInNodeBody()

Bool IsInNodeBody ( GvNode node ,
Int32   x ,
Int32   y  
)

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.
返回
true if the position is in the body, otherwise false .

◆  IsInNodeHead()

Bool IsInNodeHead ( GvNode node ,
Int32   x ,
Int32   y  
)

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.
返回
true if the position is in the head, otherwise false .

◆  SetPrefs()

void SetPrefs ( const BaseContainer bc )

Sets the preferences for the node GUI.

参数
[in] bc The new preferences. Use these container IDs: GvGuiConfigIDs

◆  GetPrefs()

void GetPrefs ( BaseContainer bc )

Gets the preferences for the node GUI.

参数
[out] bc Filled with the current preferences. Use these container IDs: GvGuiConfigIDs

◆  SetNodePosGlobal()

void SetNodePosGlobal ( GvNode node ,
Int32   x ,
Int32   y ,
Bool   center = false  
)

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 true the node is centered.

◆  SetNodePos()

void SetNodePos ( GvNode node ,
Int32   x ,
Int32   y  
)

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.

◆  SetNodeSize()

void SetNodeSize ( GvNode node ,
Int32   width ,
Int32   height  
)

Sets the size of node .

参数
[in] node The node. The caller owns the pointed node.
[in] width The width.
[in] height The height.

◆  OptimizeNode()

void OptimizeNode ( GvNode node )

Optimizes the size of node .

参数
[in] node The node. The caller owns the pointed node.

◆  ShowAllNodes()

void ShowAllNodes ( GvNode node )

Shows all nodes.

参数
[in] node The node. The caller owns the pointed node.

◆  CenterNodes()

void CenterNodes ( GvNode node )

Centers nodes.

参数
[in] node The node. The caller owns the pointed node.

◆  AlignNodesToUpperLeft()

void AlignNodesToUpperLeft ( GvNode node )

Aligns all nodes to the upper left.

参数
[in] node The node. The caller owns the pointed node.

◆  GetZoom()

void GetZoom ( GvNode node ,
Float zoom  
)

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.

◆  InitShapes()

Bool InitShapes ( void  )

Initializes the node GUI shapes.

返回
true if successful, otherwise false .

◆  NodeContextMenu()

Bool NodeContextMenu ( GvNode node )

Opens the context menu of node.

参数
[in] node The node. The caller owns the pointed node.
返回
true if successful, otherwise false .