Scroll to navigation

XmOutline(3) Library Functions Manual XmOutline(3)

NAME

XmOutline — The Outline widget class "XmOutline" "widget class" "Outline"

SYNOPSIS

#include <Xm/Outline.h>

DESCRIPTION

The Outline widget is a container that shows the relationship of its children in a graphical tree-like format. Each child of the Outline widget is a node in the Outline. The parent-child relationships between these nodes are completely distinct from the widget hierarchy. The hierarchy of nodes is created by specifying the tree "parent" of each node as a constraint resource. If a node's parent is NULL then it is assumed to be a root of the tree. Although each widget can only have one parent, the Outline widget supports adding more than one "root" node to a single Outline.

Note: The Outline 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.

User Interaction

Each node in the outline can have one of four states: open, closed, always open, and hidden. The state of a node changes how it appears to the user and what actions are available to the user.

Open This node will have an open folder shown to its left that may be selected by the user to close this node. When a node is open all of its children will be visible to the user.

Closed This node will have a closed folder shown to its left that may be selected by the user to open this node. When a node is closed none of its children will be visible to the user.

Always Open This node will have no folder button associated with it. All of its children will be visible to the user.

Hidden This node will not be shown to the user and all of its children will appear and act exactly as if they were children of this node's parent. It will appear to the user as if this node does not exist.

To maintain consistency of the user interface we have found that it is best to use the node state "Always Open" for nodes with no children. This way the user will only see a folder button next to a node that has children to display. A folder button associated with a node that has no children has no defined semantics.

Classes

Outline inherits behavior and resources from the Core, Composite, Constraint, XmManager, and XmHierarchy classes.

The class pointer is xmOutlineWidgetClass.

The class name is XmOutline.

New Resources

The following table defines a set of widget resources used by the programmer to specify data. The programmer can also set the resource values for the inherited classes to set attributes for this widget. To reference a resource by name or by class in a .Xdefaults file, remove the XmN or XmC prefix and use the remaining letters. To specify one of the defined values for a resource in a .Xdefaults file, remove the Xm prefix and use the remaining letters (in either lowercase or uppercase, but include any underscores between words). The codes in the access column indicate if the given resource can be set at creation time (C), set by using XtSetValues (S), retrieved by using XtGetValues (G), or is not applicable (N/A).

XmOutline Resource Set
Name Class Type Default Access





XmNconnectNodes Boolean Boolean False CSG





XmNindentSpace Dimension Dimension 30 CSG





Specifies whether to draw lines connecting a parent to each of its children nodes.
This resource controls how many pixels divide the outline's levels

Inherited Resources

Outline 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.

XmHierarchy Resource Set
Name Class Type Default Access





XmNautoClose XmCAutoClose Boolean True CSG





XmNcloseFolderPixmap XmCPixmap Pixmap XmUNSPECIFIED_PIXMAP CSG





XmNhorizontalMargin XmCDimension Dimension 2 CSG





XmNnodeStateCallback XmCNodeStateCallback XtCallbackList NULL C





XmNopenFolderPixmap XmCPixmap Pixmap XmUNSPECIFIED_PIXMAP CSG





XmNrefigureMode XmCBoolean Boolean True CSG





XmNverticalMargin XmCDimension Dimension 2 CSG





XmManager Resource Set
Name Class Type Default Access





XmNbottomShadowColor XmCBottomShadowColor Pixel dynamic CSG





XmNbottomShadowPixmap XmCBottomShadowPixmap Pixmap XmUNSPECIFIED_PIXMAP CSG





XmNforeground XmCForeground Pixel dynamic CSG





XmNhelpCallback XmCCallback XtCallbackList NULL C





XmNhighlightColor XmCHighlightColor Pixel dynamic CSG





XmNhighlightPixmap XmCHighlightPixmap Pixmap dynamic CSG





XmNinitialFocus XmCInitialFocus Widget dynamic CSG





XmNlayoutDirection XmCLayoutDirection XmDirection dynamic CG





XmNnavigationType XmCNavigationType XmNavigationType XmTAB_GROUP CSG





XmNpopupHandlerCallback XmCCallback XtCallbackList NULL C





XmNshadowThickness XmCShadowThickness Dimension dynamic CSG





XmNstringDirection XmCStringDirection XmStringDirection dynamic CG





XmNtopShadowColor XmCTopShadowColor Pixel dynamic CSG





XmNtopShadowPixmap XmCTopShadowPixmap Pixmap dynamic CSG





XmNtraversalOn XmCTraversalOn Boolean True CSG





XmNunitType XmCUnitType unsigned char dynamic CSG





XmNuserData XmCUserData XtPointer NULL CSG





Composite Resource Set
Name Class Type Default Access





XmNchildren XmCReadOnly WidgetList NULL G





XmNinsertPosition XmCInsertPosition XtOrderProc NULL CSG





XmNnumChildren XmCReadOnly Cardinal 0 G





Core Resource Set
Name Class Type Default Access





XmNaccelerators XmCAccelerators XtAccelerators dynamic N/A





XmNancestorSensitive XmCSensitive Boolean dynamic G





XmNbackground XmCBackground Pixel dynamic CSG





XmNbackgroundPixmap XmCPixmap Pixmap XmUNSPECIFIED_PIXMAP CSG





XmNborderColor XmCBorderColor Pixel XtDefaultForeground CSG





XmNborderPixmap XmCPixmap Pixmap XmUNSPECIFIED_PIXMAP CSG





XmNborderWidth XmCBorderWidth Dimension 0 CSG





XmNcolormap XmCColormap Colormap dynamic CG





XmNdepth XmCDepth int dynamic CG





XmNdestroyCallback XmCCallback XtCallbackList NULL C





XmNheight XmCHeight Dimension dynamic CSG





XmNinitialResourcesPersistent XmCInitialResourcesPersistent Boolean True C





XmNmappedWhenManaged XmCMappedWhenManaged Boolean True CSG





XmNscreen XmCScreen Screen * dynamic CG





XmNsensitive XmCSensitive Boolean True CSG





XmNtranslations XmCTranslations XtTranslations dynamic CSG





XmNwidth XmCWidth Dimension dynamic CSG





XmNx XmCPosition Position 0 CSG





XmNy XmCPosition Position 0 CSG





Geometry Management

The preferred size of the entire outline will be just large enough to contain all nodes in the hierarchy. As the node state changes the outline will attempt to resize itself to just contain its currently visible children. If the outline is forced away from its desired size the children will not be moved and will either be clipped, or appear in the upper left hand corner of the window. For this reason it is usually desirable to put the outline into a Scrolled Window widget.

RELATED

Composite(3), Constraint(3), Core(3), XmCreateHierarchy(3), XmHierarchy(3), XmManager(3).