XMOUTLINE(3)
β¨ XmOutline β the Outline widget class β¨
soooo bestie, welcome to XmOutline(3) from the library call section π this is the manual page for the Outline widget and it is long, so we're doing this in parts. Part 1, let's go π«Ά
πΈ NAME πΈ
XmOutline β the Outline widget class π
π 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. Every single child of the Outline widget is a node in the Outline. And here's the plot twist: the parent-child relationships between these nodes are completely distinct from the widget hierarchy. Like, two totally different trees, no cap π³
The hierarchy of nodes gets created by specifying the tree "parent" of each node as a constraint resource. If a node's parent is NULL then it's assumed to be a root of the tree. And even though each widget can only have one parent, the Outline widget supports adding more than one "root" node to a single Outline. Slay, multiple roots, we love to see it β¨
Note: The Outline widget assumes that it will be totally responsible for mapping and unmapping its children. So no child of this widget should ever modify its mappedWhenManaged resource. If a child does modify this resource, the behavior is undefined π like, do not. just don't.
π 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. Vibe check on each one:
- 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 β so like, don't do that, it's giving chaos π
π§ Classes π§
Outline inherits behavior and resources from the Core, Composite, Constraint, XmManager, and XmHierarchy classes. Generational wealth, honestly π
- 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 π
XmNconnectNodesβ Class:Boolean, Type:Boolean, Default:False, Access:CSG- Specifies whether to draw lines connecting a parent to each of its children nodes. βοΈ
XmNindentSpaceβ Class:Dimension, Type:Dimension, Default:30, Access:CSG- 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.
okay that's part 1 bestie, more comingβ¦ π«Ά
okay so like, the resource sets are literally the moment, bestie π XmHierarchy Resource Set is first and she's giving organized chaos:
XmNautoCloseβ classXmCAutoClose, typeBoolean, defaultTrue, accessCSG. Auto-close? yes pls, she's self-sufficient β¨XmNcloseFolderPixmapβ classXmCPixmap, typePixmap, defaultXmUNSPECIFIED_PIXMAP, accessCSG. No pixmap specified? iconic, we love a blank canvas πXmNhorizontalMarginβ classXmCDimension, typeDimension, default2, accessCSG. Two pixels of breathing room, periodt πXmNnodeStateCallbackβ classXmCNodeStateCallback, typeXtCallbackList, defaultNULL, accessC. Callbacks? she's ready to spill the tea when node state changes βXmNopenFolderPixmapβ classXmCPixmap, typePixmap, defaultXmUNSPECIFIED_PIXMAP, accessCSG. Again, unspecified, but make it fashion πXmNrefigureModeβ classXmCBoolean, typeBoolean, defaultTrue, accessCSG. Refigure mode ON, no cap π§XmNverticalMarginβ classXmCDimension, typeDimension, default2, accessCSG. Vertical margin, also 2, because symmetry slays π
XmManager Resource Set is next, and she's the blueprint, the moment, the blueprint moment:
XmNbottomShadowColorβ classXmCBottomShadowColor, typePixel, defaultdynamic, accessCSG. Dynamic default? she's flexible, we stan πXmNbottomShadowPixmapβ classXmCBottomShadowPixmap, typePixmap, defaultXmUNSPECIFIED_PIXMAP, accessCSG. Unspecified pixmap, but the vibe is immaculate π¦XmNforegroundβ classXmCForeground, typePixel, defaultdynamic, accessCSG. Foreground, dynamic, main character energy πXmNhelpCallbackβ classXmCCallback, typeXtCallbackList, defaultNULL, accessC. Help callback, for when you need a bestie to explain things πXmNhighlightColorβ classXmCHighlightColor, typePixel, defaultdynamic, accessCSG. Highlight color, dynamic, she pops off β¨XmNhighlightPixmapβ classXmCHighlightPixmap, typePixmap, defaultdynamic, accessCSG. Highlight pixmap, also dynamic, versatile queen πXmNinitialFocusβ classXmCInitialFocus, typeWidget, defaultdynamic, accessCSG. Initial focus, dynamic, she knows where to look first πXmNlayoutDirectionβ classXmCLayoutDirection, typeXmDirection, defaultdynamic, accessCG. Layout direction, dynamic, CG access, we love a directional diva πXmNnavigationTypeβ classXmCNavigationType, typeXmNavigationType, defaultXmTAB_GROUP, accessCSG. Navigation type, defaultXmTAB_GROUP, tab group supremacy πXmNpopupHandlerCallbackβ classXmCCallback, typeXtCallbackList, defaultNULL, accessC. Popup handler callback, NULL by default, but ready to handle popups like a boss πͺXmNshadowThicknessβ classXmCShadowThickness, typeDimension, defaultdynamic, accessCSG. Shadow thickness, dynamic, giving depth and drama πXmNstringDirectionβ classXmCStringDirection, typeXmStringDirection, defaultdynamic, accessCG. String direction, dynamic, CG access, she's got direction π§XmNtopShadowColorβ classXmCTopShadowColor, typePixel, defaultdynamic, accessCSG. Top shadow color, dynamic, top-tier energy πXmNtopShadowPixmapβ classXmCTopShadowPixmap, typePixmap, defaultdynamic, accessCSG. Top shadow pixmap, dynamic, also top-tier πXmNtraversalOnβ classXmCTraversalOn, typeBoolean, defaultTrue, accessCSG. Traversal on, True, keyboard navigation said yes βXmNunitTypeβ classXmCUnitType, typeunsigned char, defaultdynamic, accessCSG. Unit type, unsigned char, dynamic, because units matter π
and the table's like "wait, there's more" so part 3 has the rest, no cap π«Ά
XmNuserDataβ classXmCUserData, typeXtPointer, defaultNULL, accessCSG. π
π¦ Composite Resource Set π¦
okay so this next batch is what a Composite widget brings to the table β the whole point of it, fr fr. it manages its own lil children and it is so not sorry about it. β¨
XmNchildrenβ classXmCReadOnly, typeWidgetList, defaultNULL, accessG. this is the read-only list of all the kiddos hanging out inside this widget, and bestie you can look but you absolutely cannot touch πXmNinsertPositionβ classXmCInsertPosition, typeXtOrderProc, defaultNULL, accessCSG. it's giving "where do new children slot in" energy β the procedure that decides the ordering πΈXmNnumChildrenβ classXmCReadOnly, typeCardinal, default0, accessG. literally just the count of how many children are in there. read-only, so don't even try it π
and yes, that's the whole Composite set β three resources, no filler, we love a concise icon π
heads up bestie: thoseGaccess codes onXmNchildrenandXmNnumChildrenmean get-only β they're the widget's receipts, not your settings menu π«Ά
Core Resource Set π
okay bestie, deep breath, because this is the whole resource table and it is long π
every single one of these is fair game on an XmOutline, and each bullet gives you the name, its class, its type, the default it ships with, and the access it takes. nineteen of them, no skips, we are doing all of them, periodt β¨
XmNacceleratorsβ classXmCAccelerators, typeXtAccelerators, defaultdynamic, accessN/AπXmNancestorSensitiveβ classXmCSensitive, typeBoolean, defaultdynamic, accessGXmNbackgroundβ classXmCBackground, typePixel, defaultdynamic, accessCSGXmNbackgroundPixmapβ classXmCPixmap, typePixmap, defaultXmUNSPECIFIED_PIXMAP, accessCSGXmNborderColorβ classXmCBorderColor, typePixel, defaultXtDefaultForeground, accessCSGXmNborderPixmapβ classXmCPixmap, typePixmap, defaultXmUNSPECIFIED_PIXMAP, accessCSGXmNborderWidthβ classXmCBorderWidth, typeDimension, default0, accessCSGXmNcolormapβ classXmCColormap, typeColormap, defaultdynamic, accessCGπXmNdepthβ classXmCDepth, typeint, defaultdynamic, accessCGXmNdestroyCallbackβ classXmCCallback, typeXtCallbackList, defaultNULL, accessCπXmNheightβ classXmCHeight, typeDimension, defaultdynamic, accessCSGXmNinitialResourcesPersistentβ classXmCInitialResourcesPersistent, typeBoolean, defaultTrue, accessCXmNmappedWhenManagedβ classXmCMappedWhenManaged, typeBoolean, defaultTrue, accessCSGXmNscreenβ classXmCScreen, typeScreen *, defaultdynamic, accessCGXmNsensitiveβ classXmCSensitive, typeBoolean, defaultTrue, accessCSGXmNtranslationsβ classXmCTranslations, typeXtTranslations, defaultdynamic, accessCSGXmNwidthβ classXmCWidth, typeDimension, defaultdynamic, accessCSGXmNxβ classXmCPosition, typePosition, default0, accessCSGXmNyβ classXmCPosition, typePosition, default0, accessCSG
that's the whole set, bestie, you ate π«Ά
Geometry Management π
okay so here's the vibe check on sizing π¦ the preferred size of the entire outline is just large enough to contain all the nodes in the hierarchy. as the node state changes, the outline will attempt to resize itself so it just contains its currently visible children β it's literally doing main character energy, always trying to fit the fit π
now the messy part π if the outline gets forced away from its desired size, the children will not be moved. they'll either be clipped, or they'll show up in the upper left hand corner of the window. not cute, i know.
for this reason it's usually desirable to put the outline into a Scrolled Window widget. do that, bestie, save yourself the pain π
RELATED π
the girlies it hangs out with:
and that's the whole page, no cap π go forth and build your hierarchy, you're iconic for reading all of it. this was XmOutline(library call) β library call, one of ours, slay β¨π
π¦ where this page comes from
- alpine 3.24: motif-doc 2.5.2-r0 Β· LGPL-2.1-or-later
- arch rolling: openmotif 2.3.8-4 Β· LGPL-2.1-or-later
- centos-stream 9: motif-devel 2.3.4-32.el9 Β· LGPLv2+
- centos-stream 9: motif-devel 2.3.4-32.el9 Β· LGPLv2+
- epel 10: motif-devel 2.3.8-2.el10_2 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-1.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-1.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-2.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-2.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 44: motif-devel 2.3.8-3.fc44 Β· LicenseRef-Callaway-LGPLv2+
- fedora 44: motif-devel 2.3.8-3.fc44 Β· LicenseRef-Callaway-LGPLv2+
- nixos 26.05: motif 2.3.8
- nixpkgs unstable: motif 2.3.8
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms