This group lists macros for accessing data of the GlgGraphNode object.
◆ GlgNodeAnchor
| #define GlgNodeAnchor |
( |
|
node | ) |
|
Gets or sets a node's anchor flag (char).
Setting this flag to True anchors the node: the node will be not moving, while the rest of nodes will move around this node to perform the requested layout.
In the Graph Layout demo, anchoring is used to temporarily suspend the movement of the selected node when it is dragged with the mouse.
- Parameters
-
◆ GlgNodeData
| #define GlgNodeData |
( |
|
node | ) |
|
Returns data associated with the node.
- Parameters
-
- Returns
- Data attached to the node (void*).
◆ GlgNodeDisplayPosition
| #define GlgNodeDisplayPosition |
( |
|
node | ) |
|
Returns node display position in the GLG world coordinates within the graph's dimensions.
The default graph dimensions are [-800; +800].
- Parameters
-
- Returns
- Pointer to the GlgPoint that contains the node's display position. It points to the internal data structure and should not be modified.
◆ GlgNodeExternal
| #define GlgNodeExternal |
( |
|
node | ) |
|
Returns the node's external flag.
- Parameters
-
- Returns
- True if the node is external, False otherwise.
External nodes are created by passing node_type=-1 to the GlgGraphAddNode function, see GlgGraphAddNode.
◆ GlgNodeGraphics
| #define GlgNodeGraphics |
( |
|
node | ) |
|
Returns the graphic object used to render the node.
- Parameters
-
- Returns
- The graphic object used to render the node (GlgObject).
◆ GlgNodeLinkArray
| #define GlgNodeLinkArray |
( |
|
node | ) |
|
Returns an array of edges connected to this node.
- Parameters
-
- Returns
- An array containing all edges connected to the node (GlgObject).
◆ GlgNodeNumLinks
| #define GlgNodeNumLinks |
( |
|
node | ) |
|
Returns the number of edge links connected to the node.
- Parameters
-
- Returns
- Number of links (int).
◆ GlgNodePosition
| #define GlgNodePosition |
( |
|
node | ) |
|
Returns node position in the normalized range (0;1).
- Parameters
-
- Returns
- Pointer to the GlgPoint structure that contains the node's position in the normalized coordinates (in the [-1; +1] range).
◆ GlgNodeType
| #define GlgNodeType |
( |
|
node | ) |
|
Returns node type.
It is a palette index used for selecting different node icons from the palette.
- Parameters
-
- Returns
- Node type (int).