XMOUTLINE(3)

πŸ“¦
version 2.5.2 Β· 2 versions
, in alpine 3.24, arch rolling, centos-stream 9, epel 10, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0

✨ 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 β€” class XmCAutoClose, type Boolean, default True, access CSG. Auto-close? yes pls, she's self-sufficient ✨
  • XmNcloseFolderPixmap β€” class XmCPixmap, type Pixmap, default XmUNSPECIFIED_PIXMAP, access CSG. No pixmap specified? iconic, we love a blank canvas πŸŽ€
  • XmNhorizontalMargin β€” class XmCDimension, type Dimension, default 2, access CSG. Two pixels of breathing room, periodt πŸ’…
  • XmNnodeStateCallback β€” class XmCNodeStateCallback, type XtCallbackList, default NULL, access C. Callbacks? she's ready to spill the tea when node state changes β˜•
  • XmNopenFolderPixmap β€” class XmCPixmap, type Pixmap, default XmUNSPECIFIED_PIXMAP, access CSG. Again, unspecified, but make it fashion 🌟
  • XmNrefigureMode β€” class XmCBoolean, type Boolean, default True, access CSG. Refigure mode ON, no cap 🧚
  • XmNverticalMargin β€” class XmCDimension, type Dimension, default 2, access CSG. Vertical margin, also 2, because symmetry slays 🌈

XmManager Resource Set is next, and she's the blueprint, the moment, the blueprint moment:

  • XmNbottomShadowColor β€” class XmCBottomShadowColor, type Pixel, default dynamic, access CSG. Dynamic default? she's flexible, we stan πŸ’–
  • XmNbottomShadowPixmap β€” class XmCBottomShadowPixmap, type Pixmap, default XmUNSPECIFIED_PIXMAP, access CSG. Unspecified pixmap, but the vibe is immaculate πŸ¦‹
  • XmNforeground β€” class XmCForeground, type Pixel, default dynamic, access CSG. Foreground, dynamic, main character energy πŸ‘‘
  • XmNhelpCallback β€” class XmCCallback, type XtCallbackList, default NULL, access C. Help callback, for when you need a bestie to explain things 😭
  • XmNhighlightColor β€” class XmCHighlightColor, type Pixel, default dynamic, access CSG. Highlight color, dynamic, she pops off ✨
  • XmNhighlightPixmap β€” class XmCHighlightPixmap, type Pixmap, default dynamic, access CSG. Highlight pixmap, also dynamic, versatile queen πŸ’…
  • XmNinitialFocus β€” class XmCInitialFocus, type Widget, default dynamic, access CSG. Initial focus, dynamic, she knows where to look first πŸ‘€
  • XmNlayoutDirection β€” class XmCLayoutDirection, type XmDirection, default dynamic, access CG. Layout direction, dynamic, CG access, we love a directional diva 🌈
  • XmNnavigationType β€” class XmCNavigationType, type XmNavigationType, default XmTAB_GROUP, access CSG. Navigation type, default XmTAB_GROUP, tab group supremacy πŸ’–
  • XmNpopupHandlerCallback β€” class XmCCallback, type XtCallbackList, default NULL, access C. Popup handler callback, NULL by default, but ready to handle popups like a boss πŸ’ͺ
  • XmNshadowThickness β€” class XmCShadowThickness, type Dimension, default dynamic, access CSG. Shadow thickness, dynamic, giving depth and drama πŸ’€
  • XmNstringDirection β€” class XmCStringDirection, type XmStringDirection, default dynamic, access CG. String direction, dynamic, CG access, she's got direction 🧭
  • XmNtopShadowColor β€” class XmCTopShadowColor, type Pixel, default dynamic, access CSG. Top shadow color, dynamic, top-tier energy πŸ‘‘
  • XmNtopShadowPixmap β€” class XmCTopShadowPixmap, type Pixmap, default dynamic, access CSG. Top shadow pixmap, dynamic, also top-tier 🌟
  • XmNtraversalOn β€” class XmCTraversalOn, type Boolean, default True, access CSG. Traversal on, True, keyboard navigation said yes βœ…
  • XmNunitType β€” class XmCUnitType, type unsigned char, default dynamic, access CSG. 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 β€” class XmCUserData, type XtPointer, default NULL, access CSG. πŸ’œ

πŸ¦‹ 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 β€” class XmCReadOnly, type WidgetList, default NULL, access G. 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 β€” class XmCInsertPosition, type XtOrderProc, default NULL, access CSG. it's giving "where do new children slot in" energy β€” the procedure that decides the ordering 🌸
  • XmNnumChildren β€” class XmCReadOnly, type Cardinal, default 0, access G. 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: those G access codes on XmNchildren and XmNnumChildren mean 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 β€” class XmCAccelerators, type XtAccelerators, default dynamic, access N/A πŸš€
  • XmNancestorSensitive β€” class XmCSensitive, type Boolean, default dynamic, access G
  • XmNbackground β€” class XmCBackground, type Pixel, default dynamic, access CSG
  • XmNbackgroundPixmap β€” class XmCPixmap, type Pixmap, default XmUNSPECIFIED_PIXMAP, access CSG
  • XmNborderColor β€” class XmCBorderColor, type Pixel, default XtDefaultForeground, access CSG
  • XmNborderPixmap β€” class XmCPixmap, type Pixmap, default XmUNSPECIFIED_PIXMAP, access CSG
  • XmNborderWidth β€” class XmCBorderWidth, type Dimension, default 0, access CSG
  • XmNcolormap β€” class XmCColormap, type Colormap, default dynamic, access CG 🌈
  • XmNdepth β€” class XmCDepth, type int, default dynamic, access CG
  • XmNdestroyCallback β€” class XmCCallback, type XtCallbackList, default NULL, access C πŸ’€
  • XmNheight β€” class XmCHeight, type Dimension, default dynamic, access CSG
  • XmNinitialResourcesPersistent β€” class XmCInitialResourcesPersistent, type Boolean, default True, access C
  • XmNmappedWhenManaged β€” class XmCMappedWhenManaged, type Boolean, default True, access CSG
  • XmNscreen β€” class XmCScreen, type Screen *, default dynamic, access CG
  • XmNsensitive β€” class XmCSensitive, type Boolean, default True, access CSG
  • XmNtranslations β€” class XmCTranslations, type XtTranslations, default dynamic, access CSG
  • XmNwidth β€” class XmCWidth, type Dimension, default dynamic, access CSG
  • XmNx β€” class XmCPosition, type Position, default 0, access CSG
  • XmNy β€” class XmCPosition, type Position, default 0, access CSG

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 😭

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 βœ¨πŸŽ€