VkOlNode(3x)VkOlNode(3x)NAMEVkOlNode - A utility class used by VkOutline
HEADER FILE
#include <Vk/VkOutline.h>
PUBLIC PROTOCOL SUMMARY
Constructor/Destructor
VkOlNode (char *name);
VkOlNode (char *name, void* data);
VkOlNode (char *name, char* key, void* data);
virtual void ~VkOlNode(void);
Public Member Functions
void addChild (VkOlNode* child);
void removeChild (VkOlNode* child);
VkOlNode* pathToNode (char** path);
XmString name ();
char* key ();
void* getHook ();
int nchild ();
VkOlNode* child (int);
void setParent (VkOlNode*);
VkOlNode* getParent ();
int isOpen ();
void Open ();
void Close ();
CLASS DESCRIPTION
The VkOlNode is an utility class for VkOutline, VkOutlineASB components.
In addition to being helpful as a node in the outline tree, it provides
ways for outline components to manage opening, closing, display attribute
setting and searching. Some public methods documented here can be used by
derived class implementors for VkOutline, VkOutlineASB. They can also be
helpful to users of VkOutline::walkAllKeywords. A VkOlNode has a display
string (name), a key used in searching and a hook - user defined opaque
data pointer. It also maintains display status and attributes.
FUNCTION DESCRIPTIONSVkOlNode()
VkOlNode(char* name);
Instantiate a VkOlNode object given its name. The key is same as
name. Data pointer is initialized to NULL.
VkOlNode()
Page 1
VkOlNode(3x)VkOlNode(3x)
VkOlNode(char* name, char* key);
Instantiate a VkOlNode object given its name and key. Data pointer
is initialized to NULL.
VkOlNode()
VkOlNode(char* name, char* key, void* data);
Instantiate a VkOlNode object given its name, key and data pointer.
~VkOlNode()
virtual void ~VkOlNode(void);
Destroy a VkOlNode object after deleting all its children.
addChild()
void addChild (VkOlNode* child);
Add the given child to list of children in the node.
removeChild()
void removeChild (VkOlNode* child);
Remove the given child to list of children in the node.
pathToNode()
VkOlNode* pathToNode (char** path);
Parameter path is an array of strings with the last one NULL.
Returns a node corresponding to the path relative to the node, by
traversing the node's child hierarchy.
name()
XmString name ();
Returns the name given while instantiating the node.
key()
char* key ();
Returns the key corresponding to the node.
Page 2
VkOlNode(3x)VkOlNode(3x)getHook()
void* getHook ();
Returns the data pointer corresponding to the node.
nchild()
int nchild ();
Returns the number of children in the node.
child()
VkOlNode* child (int i);
Returns the i'th child node.
setParent()
void setParent (VkOlNode* parent);
Sets a given node as its parent.
getParent()
VkOlNode* getParent ();
Returns the parent of the node.
isOpen()
int isOpen ();
Returns whether the node is open, i.e., whether its children are
displayed.
Open()
void Open ();
Takes the node to open state, i.e., its children will be
displayable.
Close()
void Close ();
Takes the node to closed state, i.e., its children will not be
displayable.
Page 3
VkOlNode(3x)VkOlNode(3x)SEE ALSO
VkOutline, VkOutlineASB
ViewKit Programmer's Guide
The X Window System, DEC Press, Bob Sheifler and Jim Gettys
The X Window System Toolkit, DEC Press, Paul Asente and Ralph Swick
The OSF/Motif Programmers Reference, Prentice Hall, OSF
Page 4