The functions defined in this section are for building a description of the structure of and resources associated with a hierarchy of widget classes. This package is typically used by applications that wish to manipulate the widget set itself.
The definitions needed to use these interfaces are in the header file
<X11/Xmu/WidgetNode.h
>
.
To call these functions, you need to link against the libXmu library.
The following function must be called before any of the others described
below:
void XmuWnInitializeNodes(XmuWidgetNode *node_array, int num_nodes);
void XmuWnInitializeNodes(XmuWidgetNode *node_array, int num_nodes);
| specifies a list of widget classes, in alphabetical order |
| specifies the number of widget classes in the node array |
To determine the resources provided by a widget class or classes, use
void XmuWnFetchResources(XmuWidgetNode *node, Widget toplevel, XmuWidgetNode *top_node);
void XmuWnFetchResources(XmuWidgetNode *node, Widget toplevel, XmuWidgetNode *top_node);
| specifies the widget class for which resources should be obtained. |
|
specifies the widget that should be used for creating an instance of
|
|
specifies the ancestor of |
Each widget class inherits the resources of its parent. To count the number of resources contributed by a particular widget class, use:
int XmuWnCountOwnedResources(XmuWidgetNode *node, XmuWidgetNode *owner_node, Bool constraints);
int XmuWnCountOwnedResources(XmuWidgetNode *node, XmuWidgetNode *owner_node, Bool constraints);
| specifies the widget class whose resources are being examined. |
|
specifies the widget class of the ancestor of |
| specifies whether or not to count constraint resources or normal resources. |
This routine returns the number of resources contributed (or “owned”) by the specified widget class.
XmuWidgetNode *XmuWnNameToNode(XmuWidgetNode *node_list, int num_nodes, char *name);
XmuWidgetNode *XmuWnNameToNode(XmuWidgetNode *node_list, int num_nodes, char *name);
| specifies a list of widget nodes |
| specifies the number of nodes in the list |
| specifies the name of the widget class in the node list to search for |
This function returns the WidgetNode in the list that matches the given widget name or widget class name. If no match is found, it returns NULL.