The ISwitch graph node interface. More...
#include "murl_graph_i_switch.h"
Public Member Functions | |
virtual INode * | GetNodeInterface ()=0 |
Get the mutable Graph::INode interface. More... | |
virtual const INode * | GetNodeInterface () const =0 |
Get the constant Graph::INode interface. More... | |
virtual Bool | SetSelectedChild (const String &id)=0 |
Set the currently active child node. More... | |
virtual INode * | GetSelectedChild () const =0 |
Get the currently active child node. More... | |
virtual Bool | IsChildSelected (const Char *id) const =0 |
Check if a child with a given node ID is currently active. More... | |
virtual Bool | IsChildSelected (const String &id) const =0 |
Check if a child with a given node ID is currently active. More... | |
Public Member Functions inherited from Murl::Graph::IIndexed | |
virtual Bool | SetIndex (SInt32 index)=0 |
Set the current index. More... | |
virtual SInt32 | GetIndex () const =0 |
Get the current index. More... | |
virtual SInt32 | GetFirstIndex () const =0 |
Get the lowest valid index. More... | |
virtual UInt32 | GetNumberOfIndices () const =0 |
Get the total number of valid indices. More... | |
Detailed Description
The ISwitch graph node interface.
Graph::ISwitch nodes provide an easy and efficient way to select at most one child among a given number of children to be active and visible at the same time.
The currently active child can be either selected via the Graph::IIndexed base interface by specifying that child's index, or by calling SetSelectedChild() with a given child node ID. When doing so, any previously active other child gets deactivated.
Member Function Documentation
◆ GetNodeInterface() [1/2]
|
pure virtual |
Get the mutable Graph::INode interface.
This method returns a mutable pointer to the node's Graph::INode interface, to be able to query or modify common node properties such as active state, visibility or ID.
- Returns
- The mutable Graph::INode interface, or null if not available
◆ GetNodeInterface() [2/2]
|
pure virtual |
Get the constant Graph::INode interface.
This method returns a constant pointer to the node's Graph::INode interface, to be able to query common node properties such as active state, visibility or ID.
- Returns
- The constant Graph::INode interface, or null if not available
◆ SetSelectedChild()
Set the currently active child node.
- Parameters
-
id The node ID of the child to activate.
- Returns
- true if successful.
◆ GetSelectedChild()
|
pure virtual |
Get the currently active child node.
- Returns
- The currently active node, or a null pointer if none is active.
◆ IsChildSelected() [1/2]
Check if a child with a given node ID is currently active.
- Parameters
-
id The child node ID to check.
- Returns
- true if the child with the given ID is active.
◆ IsChildSelected() [2/2]
Check if a child with a given node ID is currently active.
- Parameters
-
id The child node ID to check.
- Returns
- true if the child with the given ID is active.
The documentation for this interface was generated from the following file:
- murl_graph_i_switch.h