.TH "XmHierarchy" 3 .SH "NAME" \fBXmHierarchy\fR \(em The Hierarchy widget class "XmHierarchy" "Hierarchy" "hierarchy" .SH "SYNOPSIS" .PP .nf #include .fi .SH "DESCRIPTION" .PP The Hierarchy widget is not intended to be instantiated itself, but rather should be used as the base class for any widget that would like to present a hierarchy of information to the user that is different for the actual widget instance hierarchy of the application. This base class is currently used for two widgets in the Motif widget set, Tree and Outline, giving those two widgets a very similar API. .PP Note: The Hierarchy widget assumes that it will be totally responsible for mapping and unmapping its children. Therefore no child of this widget should ever modify its mappedWhenManaged resource. If a child does modify this resource the behavior is undefined. .SS "Classes" .PP Hierarchy inherits behaviour, resources, and traits from \fBCore\fP, \fBComposite\fP, \fBComposite\fP, \fBConstraint\fP, and \fBXmManager\fP classes\&. .PP The class pointer is \fBxmHierarchyWidgetClass\fP\&. .PP The class name is \fBXmHierarchy\fR\&. .SS "New Resources" .PP .TS tab() box; c s s s s l| l| l| l| l. \fBXmHierarchy Resource Set\fP \fBName\fP\fBClass\fP\fBType\fP\fBDefault\fP\fBAccess\fP _____ XmNautoCloseXmCAutoCloseBooleanTrueCSG _____ XmNcloseFolderPixmapXmCPixmapPixmapXmUNSPECIFIED_PIXMAPCSG _____ XmNhorizontalMarginXmCDimensionDimension2CSG _____ XmNnodeStateCallbackXmCNodeStateCallbackXtCallbackListNULLC _____ XmNopenFolderPixmapXmCPixmapPixmapXmUNSPECIFIED_PIXMAPCSG _____ XmNrefigureModeXmCBooleanBooleanTrueCSG _____ XmNverticalMarginXmCDimensionDimension2CSG _____ .TE .IP "\fBXmNautoClose\fP" 10 This resource determines if the hierarchy should automatically restore a parent node's children when the parent node is reopened. If autoClose is False, and the hierarchy is fully expanded when the root node is closed, then the entire hierarchy will be displayed as expanded when the root node is reopened. If autoClose is True, then the root node's children are closed when the root node is reopened\&. .IP "\fBXmNcloseFolderPixmap\fP" 10 This resource defines a pixmap for the closed representation of the folder pixmap to be used throughout the tree\&. It can be a color pixmap or bitmap. If the user does not specify a pixmap the default bitmap will be used\&. .IP "\fBXmNhorizontalMargin\fP" 10 .IP "\fBXmNverticalMargin\fP" 10 The exact definition of these resources are left to the subclass of the hierarchy widget that does the geometry layout\&. They are intended to be used as the amount of space between the object and the edges of the window it is displayed in\&. They are included here for consistency\&. .IP "\fBXmNopenFolderPixmap\fP" 10 This resource defines a pixmap for the open representation of the folder pixmap to be used throughout the tree . It can be a color pixmap or bitmap. If the user does not specify a pixmap the default opened folder bitmap\&. .IP "\fBXmNnodeStateCallback\fP" 10 The list of callback routines called when a folder button is clicked. See "Callback Routine" for more details. .IP "\fBXmNrefigureMode\fP" 10 This resource determines whether the Hierarchy should adjust the sizes of the children after a geometry or resize request, or simply ignore the request. This resource is very useful in improving the performance of an application that is making a large number of geometry changes all at once. .TS tab() box; c s s s s l| l| l| l| l. \fBXmHierarchy Constraint Resource Set\fP \fBName\fP\fBClass\fP\fBType\fP\fBDefault\fP\fBAccess\fP _____ XmNinsertBeforeXmCInsertbeforeWidgetNULLCSG _____ XmNnodeStateXmCNodeStateXMHierarchyNodeStateXmOpenCSG _____ XmNparentNodeXmCParentNodeWidgetNULLCSG _____ .TE .IP "\fBXmNinsertBefore\fP" 10 Specifies another node that has the same parentNode. This node will then be placed immediately before that node in the hierarchy. If this value is NULL then the node will be inserted at the end of the list. This resource allows the hierarchy's children to be reordered. .IP "\fBXmNnodeState\fP" 10 The state of this node. Acceptable values are: XmOpen, XmClosed, XmAlwaysOpen, and XmHidden. A type converter has been registered that can convert the following strings: "open", "close", "alwaysOpen", and "hidden". .IP "\fBXmNparentNode\fP" 10 The hierarchy parent of this node. The parent node MUST be a widget sibling of the current node. .SS "Inherited Resources" .PP Hierarchy inherits behavior and resources from the superclasses described in the following tables\&. For a complete description of each resource, refer to the reference page for that superclass\&. .PP .TS tab() box; c s s s s l| l| l| l| l. \fBXmManager Resource Set\fP \fBName\fP\fBClass\fP\fBType\fP\fBDefault\fP\fBAccess\fP _____ XmNbottomShadowColorXmCBottomShadowColorPixeldynamicCSG _____ XmNbottomShadowPixmapXmCBottomShadowPixmapPixmapXmUNSPECIFIED_PIXMAPCSG _____ XmNforegroundXmCForegroundPixeldynamicCSG _____ XmNhelpCallbackXmCCallbackXtCallbackListNULLC _____ XmNhighlightColorXmCHighlightColorPixeldynamicCSG _____ XmNhighlightPixmapXmCHighlightPixmapPixmapdynamicCSG _____ XmNinitialFocusXmCInitialFocusWidgetdynamicCSG _____ XmNlayoutDirectionXmCLayoutDirectionXmDirectiondynamicCG _____ XmNnavigationTypeXmCNavigationTypeXmNavigationTypeXmTAB_GROUPCSG _____ XmNpopupHandlerCallbackXmCCallbackXtCallbackListNULLC _____ XmNshadowThicknessXmCShadowThicknessDimensiondynamicCSG _____ XmNstringDirectionXmCStringDirectionXmStringDirectiondynamicCG _____ XmNtopShadowColorXmCTopShadowColorPixeldynamicCSG _____ XmNtopShadowPixmapXmCTopShadowPixmapPixmapdynamicCSG _____ XmNtraversalOnXmCTraversalOnBooleanTrueCSG _____ XmNunitTypeXmCUnitTypeunsigned chardynamicCSG _____ XmNuserDataXmCUserDataXtPointerNULLCSG _____ .TE .PP .TS tab() box; c s s s s l| l| l| l| l. \fBComposite Resource Set\fP \fBName\fP\fBClass\fP\fBType\fP\fBDefault\fP\fBAccess\fP _____ XmNchildrenXmCReadOnlyWidgetListNULLG _____ XmNinsertPositionXmCInsertPositionXtOrderProcNULLCSG _____ XmNnumChildrenXmCReadOnlyCardinal0G _____ .TE .PP .TS tab() box; c s s s s l| l| l| l| l. \fBCore Resource Set\fP \fBName\fP\fBClass\fP\fBType\fP\fBDefault\fP\fBAccess\fP _____ XmNacceleratorsXmCAcceleratorsXtAcceleratorsdynamicN/A _____ XmNancestorSensitiveXmCSensitiveBooleandynamicG _____ XmNbackgroundXmCBackgroundPixeldynamicCSG _____ XmNbackgroundPixmapXmCPixmapPixmapXmUNSPECIFIED_PIXMAPCSG _____ XmNborderColorXmCBorderColorPixelXtDefaultForegroundCSG _____ XmNborderPixmapXmCPixmapPixmapXmUNSPECIFIED_PIXMAPCSG _____ XmNborderWidthXmCBorderWidthDimension0CSG _____ XmNcolormapXmCColormapColormapdynamicCG _____ XmNdepthXmCDepthintdynamicCG _____ XmNdestroyCallbackXmCCallbackXtCallbackListNULLC _____ XmNheightXmCHeightDimensiondynamicCSG _____ XmNinitialResourcesPersistentXmCInitialResourcesPersistentBooleanTrueC _____ XmNmappedWhenManagedXmCMappedWhenManagedBooleanTrueCSG _____ XmNscreenXmCScreenScreen *dynamicCG _____ XmNsensitiveXmCSensitiveBooleanTrueCSG _____ XmNtranslationsXmCTranslationsXtTranslationsdynamicCSG _____ XmNwidthXmCWidthDimensiondynamicCSG _____ XmNxXmCPositionPosition0CSG _____ XmNyXmCPositionPosition0CSG _____ .TE .PP .SS "Callback Information" .PP When a folder is clicked, the routines registered on the XmNnodeStateCallback list are passed a pointer to the following structure as client data: .nf typedef struct _XmHierarchyNodeStateData { Widget \fIwidget\fP; XmHierarchyNodeState \fIstate\fP; } XmHierarchyNodeStateData; .nf .IP "\fIwidget\fP" 10 the child node of Hierarchy being opened or closed. .IP "\fIstate\fP" 10 the current XmNnodeState (after the click) of the node. Legal values are XmOpen, XmClosed, XmAlwaysOpen, and XmHidden. .PP .SS Children The hierarchy maintains IconButtons for each node in the hierarchy. Setting openFolderPixmap or closeFolderPixmap is done through XtSetValues. IconButtons may only be manipulated by the Hierarchy. .SH RELATED .PP \fBComposite\fP(3), \fBConstraint\fP(3), \fBCore\fP(3), \fBXmCreateHierarchy\fP(3), \fBXmHierarchyGetChildNodes\fP(3), \fBXmHierarchyOpenAllAncestors\fP(3), \fBXmManager\fP(3)\&.