XMLABELGADGET(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

πŸ’– XmLabelGadget β€” The LabelGadget widget class πŸ’–

okay bestie so this one is straight out of the library call manual section, and it's a whole moment. grab a snack. πŸ“


🌸 NAME 🌸

XmLabelGadget β€” the LabelGadget widget class ✨


πŸŽ€ SYNOPSIS πŸŽ€

#include <Xm/LabelG.h>

πŸ’… DESCRIPTION πŸ’…

so LabelGadget is an instantiable widget, meaning you can literally just... make one. but it's also the superclass for other button gadgets β€” like PushButtonGadget and ToggleButtonGadget. it's giving proud parent energy. πŸ‘‘

LabelGadget can hold either text or a pixmap. its text is a compound string, and if you want the whole lore on compound strings, go read the Motif Programmer's Guide. the text can be multilingual, multiline, and/or multifont β€” no limits, we love a versatile icon. πŸ¦‹

and when a LabelGadget is insensitive? its text gets stippled, OR the user-supplied insensitive pixmap gets displayed. either way, she's still showing up, just muted. πŸ’€

LabelGadget supports both accelerators and mnemonics, mostly so that LabelGadget subclass widgets hanging out inside menus can do their thing. here's the tea:

  • Mnemonics are available in a menu system when the button is visible.
  • Accelerators in a menu system are accessible even when the button is not visible. main character behavior, honestly.

the LabelGadget shows the mnemonic by underlining the first matching character in the text string. the accelerator gets displayed as a text string sitting right next to the label text or pixmap β€” which side depends on the layout direction.

now, LabelGadget is basically made of a bunch of margin fields surrounding the text or pixmap. these margin fields are resources the user can set, BUT LabelGadget subclasses and Manager parents also mess with some of them. they tend to touch:

  • XmNmarginLeft
  • XmNmarginRight
  • XmNmarginTop
  • XmNmarginBottom

...and they leave XmNmarginWidth and XmNmarginHeight exactly as the application set them. boundaries, respected. 🫢

LabelGadget also takes XmNshadowThickness into account when it's figuring out its layout β€” but it does not draw the shadow. so if XmNshadowThickness is greater than 0 (zero), LabelGadget leaves space for the shadow, but the shadow does not appear. it's reserving the seat but not showing up to the party. πŸ™ˆ

inside Popup menu panes, Pulldown menu panes, and OptionMenus, LabelGadget forces XmNtraversalOn and XmNhighlightOnEnter to False. otherwise, these resources just default to False anyway.

LabelGadget uses the XmQTmenuSystem and XmQTspecifyRenderTable traits, and holds the XmQTaccessTextual, XmQTcareParentVisual, XmQTmenuSavvy, and XmQTtransfer traits. collecting traits like Pokémon cards fr fr. ⭐


πŸ¦‹ Data Transfer Behavior πŸ¦‹

LabelGadget and its subclasses β€” except when used in a menu system β€” support dragging the label contents off of the LabelGadget. BUT (and this is the catch) the label contents are only draggable if the XmNenableUnselectableDrag resource of XmDisplay is set to True. so set it. πŸ‘‘

as a source of data, LabelGadget and its subclasses support the following targets, plus the associated conversions of data into those targets:

  • locale β€” if the locale target matches the widget's locale, the widget transfers XmNlabelString in the encoding of the locale. this target is only supported when XmNlabelType is XmSTRING or XmPIXMAP_AND_STRING.
  • COMPOUND_TEXT β€” the widget transfers XmNlabelString as type COMPOUND_TEXT. only supported when XmNlabelType is XmSTRING or XmPIXMAP_AND_STRING.
  • UTF8_STRING β€” the widget transfers XmNlabelString as type UTF8_STRING. only supported when XmNlabelType is XmSTRING or XmPIXMAP_AND_STRING.
  • PIXMAP β€” the widget transfers XmNlabelPixmap as type DRAWABLE. supported when XmNlabelType is XmPIXMAP or XmPIXMAP_AND_STRING.
  • STRING β€” the widget transfers XmNlabelString as type STRING. supported when XmNlabelType is XmSTRING or XmPIXMAP_AND_STRING.
  • TEXT β€” if XmNlabelString is fully convertible to the encoding of the locale, the widget transfers XmNlabelString in the encoding of the locale. otherwise, the widget transfers XmNlabelString as type COMPOUND_TEXT. supported when XmNlabelType is XmSTRING or XmPIXMAP_AND_STRING.
  • _MOTIF_CLIPBOARD_TARGETS β€” the widget transfers, as type ATOM, a list of the targets it supports for the CLIPBOARD selection. when XmNlabelType is XmSTRING or XmPIXMAP_AND_STRING, these include the following targets:
    • _MOTIF_COMPOUND_STRING
    • COMPOUND_TEXT
    • UTF8_STRING
    • the encoding of the locale, if XmNlabelString is fully convertible to the encoding of the locale
    • STRING, if XmNlabelString is fully convertible to STRING

when XmNlabelType is XmPIXMAP or XmPIXMAP_AND_STRING, the targets include PIXMAP.

  • _MOTIF_COMPOUND_STRING β€” the widget transfers XmNlabelString as a compound string in Byte Stream format. supported when XmNlabelType is XmSTRING or XmPIXMAP_AND_STRING.
  • _MOTIF_EXPORT_TARGETS β€” the widget transfers, as type ATOM, a list of the targets to be used as the value of the DragContext's XmNexportTargets in a drag-and-drop transfer. when XmNlabelType is XmSTRING or XmPIXMAP_AND_STRING, these include _MOTIF_COMPOUND_STRING, COMPOUND_TEXT, UTF8_STRING, the encoding of the locale, STRING, TEXT, BACKGROUND, and FOREGROUND. when XmNlabelType is XmPIXMAP or XmPIXMAP_AND_STRING, these include PIXMAP, BACKGROUND, and FOREGROUND.

as a source of data, LabelGadget also supports the following standard Motif targets:

  • BACKGROUND β€” the widget transfers the parent's XmNbackground as type PIXEL.
  • CLASS β€” the widget finds the first shell in the widget hierarchy that has a WM_CLASS property and transfers the contents as text in the current locale.
  • CLIENT_WINDOW β€” the widget finds the first shell in the widget hierarchy and transfers its window as type WINDOW.
  • COLORMAP β€” the widget transfers the parent's XmNcolormap as type COLORMAP.
  • FOREGROUND β€” the widget transfers the parent's XmNforeground as type PIXEL.
  • NAME β€” the widget finds the first shell in the widget hierarchy that has a WM_NAME property and transfers the contents as text in the current locale.
  • TARGETS β€” the widget transfers, as type ATOM, a list of the targets it supports. these include the standard targets in this list. when XmNlabelType is XmSTRING or XmPIXMAP_AND_STRING, these also include _MOTIF_COMPOUND_STRING, COMPOUND_TEXT, UTF8_STRING, the encoding of the locale, STRING, and TEXT. when XmNlabelType is XmPIXMAP or XmPIXMAP_AND_STRING, these also include PIXMAP.
  • TIMESTAMP β€” the widget transfers the timestamp used to acquire the selection as type INTEGER.
  • _MOTIF_RENDER_TABLE β€” the widget transfers XmNrenderTable if it exists, or else the default text render table, as type STRING.
  • _MOTIF_ENCODING_REGISTRY β€” the widget transfers its encoding registry as type STRING. the value is a list of NULL separated items in the form of tag encoding pairs. this target symbolizes the transfer target for the Motif Segment Encoding Registry. widgets and applications can use this Registry to register text encoding formats for specified render table tags. applications access this Registry by calling XmRegisterSegmentEncoding and XmMapSegmentEncoding.

πŸ‘‘ Classes πŸ‘‘

LabelGadget inherits behavior, resources, and traits from Object, RectObj, and XmGadget. the family tree is real. 🌈

  • the class pointer is xmLabelGadgetClass.
  • the class name is XmLabelGadget.

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

so, 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 tell you if the given resource can be:

  • set at creation time β€” C
  • set by using XtSetValues β€” S
  • retrieved by using XtGetValues β€” G
  • not applicable β€” N/A

and that's where we're pausing, bestie β€” more coming right up. 🫢

✨ XmLabelGadget Resource Set ✨

okay bestie, here's the whole menu of things you can set on a LabelGadget πŸ’– each one comes in a little squad of four: its Class, its Type, its Default, and its Access. no skipping, we're doing all of them πŸ’…

  • XmNaccelerator β€” class XmCAccelerator, type String, default NULL, access CSG
  • XmNacceleratorText β€” class XmCAcceleratorText, type XmString, default NULL, access CSG
  • XmNalignment β€” class XmCAlignment, type unsigned char, default dynamic, access CSG
  • XmNfontList β€” class XmCFontList, type XmFontList, default dynamic, access CSG
  • XmNlabelInsensitivePixmap β€” class XmCLabelInsensitivePixmap, type Pixmap, default XmUNSPECIFIED_PIXMAP, access CSG
  • XmNlabelPixmap β€” class XmCLabelPixmap, type Pixmap, default XmUNSPECIFIED_PIXMAP, access CSG
  • XmNlabelString β€” class XmCXmString, type XmString, default dynamic, access CSG
  • XmNlabelType β€” class XmCLabelType, type unsigned char, default XmSTRING, access CSG
  • XmNmarginBottom β€” class XmCMarginBottom, type Dimension, default 0, access CSG
  • XmNmarginHeight β€” class XmCMarginHeight, type Dimension, default 2, access CSG
  • XmNmarginLeft β€” class XmCMarginLeft, type Dimension, default 0, access CSG
  • XmNmarginRight β€” class XmCMarginRight, type Dimension, default 0, access CSG
  • XmNmarginTop β€” class XmCMarginTop, type Dimension, default 0, access CSG
  • XmNmarginWidth β€” class XmCMarginWidth, type Dimension, default 2, access CSG
  • XmNmnemonic β€” class XmCMnemonic, type KeySym, default NULL, access CSG
  • XmNmnemonicCharSet β€” class XmCMnemonicCharSet, type String, default dynamic, access CSG
  • XmNpixmapPlacement β€” class XmCPixmapPlacement, type unsigned int, default XmPIXMAP_LEFT, access CSG
  • XmNpixmapTextPadding β€” class XmCSpace, type Dimension, default 2, access CSG
  • XmNrecomputeSize β€” class XmCRecomputeSize, type Boolean, default True, access CSG
  • XmNrenderTable β€” class XmCRenderTable, type XmRenderTable, default dynamic, access CSG
  • XmNstringDirection β€” class XmCStringDirection, type XmStringDirection, default dynamic, access CSG

πŸ’… XmNaccelerator

okay so picture this: you got a button widget chillin' inside a menu, right? XmNaccelerator is the resource that gives that button a keyboard shortcut, so it can activate a button that's visible or invisible, but managed β€” from the keyboard, no mouse required, iconic behavior fr fr ⌨️✨

It's a String, and that string is basically a lil recipe describing a set of modifiers plus the key that you'd use to select the button. πŸŽ€

The format of this string is identical to the format the translations manager uses β€” same vibe, same syntax, no cap β€” with two exceptions though, and you NEED to know them:

  • only a single event may be specified πŸ™ˆ
  • only KeyPress events are allowed πŸ’€
🫢 real talk bestie: accelerators for buttons are supported only for PushButtonGadgets and ToggleButtonGadgets inside Pulldown and Popup menus. that's the whole guest list, no plus-ones 🌸
  • XmNacceleratorText β€” the literal text that shows up for the accelerator, bestie πŸ’«. It gets displayed right next to the label string or pixmap, and which way it lays out depends on the widget's XmNlayoutDirection resource. Also, plot twist: accelerator text on buttons only shows up for PushButtonGadgets and ToggleButtonGadgets inside Pulldown and Popup Menus. That's it, that's the rule.
  • XmNalignment β€” where the label (text or pixmap) sits. It's giving alignment era ✨
    • XmALIGNMENT_BEGINNING (left alignment) β€” lines of text get their left sides vertically aligned with the left edge of the gadget. For a pixmap, its left side is vertically aligned with the left edge of the gadget.
    • XmALIGNMENT_CENTER (center alignment) β€” centers of the lines of text get vertically aligned in the center of the gadget. For a pixmap, its center is vertically aligned with the center of the gadget.
    • XmALIGNMENT_END (right alignment) β€” right sides of the lines of text get vertically aligned with the right edge of the gadget. For a pixmap, its right side is vertically aligned with the right edge of the gadget.

Okay so those text descriptions above? They're only correct when XmNlayoutDirection is XmLEFT_TO_RIGHT. When that resource is XmRIGHT_TO_LEFT, the descriptions for XmALIGNMENT_BEGINNING and XmALIGNMENT_END get swapped. Yes really, they trade places, no cap 🫠

And if the parent is a RowColumn whose XmNisAligned resource is True, then XmNalignment gets forced to the same value as the RowColumn's XmNentryAlignment β€” but only if the RowColumn's XmNrowColumnType is XmWORK_AREA, or if the gadget is a subclass of XmLabelGadget. Otherwise? The default is XmALIGNMENT_CENTER.

  • XmNfontList β€” the font for the text in the gadget. > Heads up bestie: XmNfontList is obsolete πŸ’€ it only hangs around for compatibility with previous releases. You should be using XmNrenderTable instead of XmNfontList now. If you specify both, the render table takes precedence, periodt. If XmNfontList is NULL at initialization, the widget's parent hierarchy gets searched for an ancestor that's a subclass of the XmBulletinBoard, VendorShell, or XmMenuShell widget class. Find one? Then the font list is initialized to the XmNbuttonFontList (for button gadget subclasses) or XmNlabelFontList of that ancestor widget. Don't find one? The default is implementation dependent, rip 😭 Refer to XmFontList(3) for more info on creating and structuring a font list.
  • XmNlabelInsensitivePixmap β€” the pixmap used as the button face when XmNlabelType is XmPIXMAP or XmPIXMAP_AND_STRING and the button is insensitive. Default value is XmUNSPECIFIED_PIXMAP, which just shows an empty label. Empty. Void. Nothing πŸ•³οΈ
  • XmNlabelPixmap β€” the pixmap when XmNlabelType is XmPIXMAP or XmPIXMAP_AND_STRING. Default value is XmUNSPECIFIED_PIXMAP, which again = empty label πŸŽ€
  • XmNlabelString β€” the compound string when XmNlabelType is XmSTRING or XmPIXMAP_AND_STRING. If the value of this resource is NULL, it gets initialized to the name of the gadget converted to a compound string. Refer to XmString(3) for more info on the creation and structure of compound strings πŸ’œ
  • XmNlabelType β€” what kind of label we're doing today, bestie:
    • XmSTRING β€” text displays XmNlabelString
    • XmPIXMAP β€” icon data in pixmap displays XmNlabelPixmap or XmNlabelInsensitivePixmap
    • XmPIXMAP_AND_STRING β€” icon data in pixmap displays XmNlabelPixmap or XmNlabelInsensitivePixmap and text displays XmNlabelString
  • XmNmarginBottom β€” how much spacing sits between the bottom of the label text and the top of the bottom margin specified by XmNmarginHeight. This can get modified by LabelGadget's subclasses β€” for example, CascadeButtonGadget may increase this field to make room for the cascade pixmap πŸ¦‹
  • XmNmarginHeight β€” an equal amount of spacing above the margin defined by XmNmarginTop and below the margin defined by XmNmarginBottom. So: XmNmarginHeight specifies the spacing between the top edge of the margin set by XmNmarginTop and the bottom edge of the top shadow, and the spacing between the bottom edge of the margin specified by XmNmarginBottom and the top edge of the bottom shadow. Symmetry, we love to see it πŸ’…
  • XmNmarginLeft β€” spacing between the left edge of the label text and the right side of the left margin (specified by XmNmarginWidth). This can get modified by LabelGadget's subclasses β€” for example, ToggleButtonGadget may increase this field to make room for the toggle indicator and for spacing between the indicator and the label. Whether this actually applies to the left or right side of the label depends on the value of XmNlayoutDirection πŸ‘€
  • XmNmarginRight β€” spacing between the right edge of the label text and the left side of the right margin (specified by XmNmarginWidth). This can get modified by LabelGadget's subclasses β€” for example, CascadeButtonGadget may increase this field to make room for the cascade pixmap. Whether this actually applies to the left or right side of the label depends on the value of XmNlayoutDirection πŸ‘€
  • XmNmarginTop β€” spacing between the top of the label text and the bottom of the top margin specified by XmNmarginHeight. This can get modified by LabelGadget's subclasses β€” for example, CascadeButtonGadget may increase this field to make room for the cascade pixmap 🌸
  • XmNmarginWidth β€” an equal amount of spacing to the left of the margin defined by XmNmarginLeft and to the right of the margin defined by XmNmarginRight. So: XmNmarginWidth specifies the spacing between the left edge of the margin set by XmNmarginLeft and the right edge of the left shadow, and the spacing between the right edge of the margin specified by XmNmarginRight and the left edge of the right shadow. Balance ✨
  • XmNmnemonic β€” gives the user an alternate way to activate a button, iykyk. A button in a MenuBar, a Popup menu pane, or a Pulldown menu pane can have a mnemonic.

This resource holds a keysym as listed in the X11 keysym table. The first character in the label string that exactly matches the mnemonic in the character set specified in XmNmnemonicCharSet gets underlined when the button is displayed. Underline reveal, iconic ✍️

Once a mnemonic is specified, the user activates the button by pressing the mnemonic key while the button is visible. If the button is a CascadeButtonGadget in a MenuBar and the MenuBar doesn't have the focus, the user has to use the MAlt modifier while pressing the mnemonic. And good news: the user can activate the button by pressing either the shifted or the unshifted mnemonic key 🫢

  • XmNmnemonicCharSet β€” the character set of the mnemonic for the label. Default is XmFONTLIST_DEFAULT_TAG.
  • XmNpixmapPlacement β€” where the pixmap lives relative to the text label. Can take one of these values: XmPIXMAP_TOP, XmPIXMAP_BOTTOM, XmPIXMAP_LEFT, and XmPIXMAP_RIGHT. A type converter has been registered that converts these strings: "top", "bottom", "left", and "right" 🌈
  • XmNpixmapTextPadding β€” how much space gets left between the pixmap and the label string. Personal space matters πŸŽ€
  • XmNrecomputeSize β€” a Boolean that says whether the gadget shrinks or expands to fit its contents (label string or pixmap) as a result of an XtSetValues resource value that would change the gadget's size. If True, the gadget shrinks or expands to exactly fit the label string or pixmap. If False, the gadget never attempts to change size on its own. Independent queen, she stays her size πŸ’…
  • XmNrenderTable β€” the render table associated with the labelString. If this value is NULL at initialization, Label searches its parent hierarchy for an ancestor that holds the XmQTspecifyRenderTable trait. Find one? Then Label initializes XmNrenderTable to the XmLABEL_RENDER_TABLE value of the ancestor widget. Similarly, button subclasses of Label initialize XmNrenderTable to the XmBUTTON_RENDER_TABLE value of the ancestor widget. (And note: all current subclasses of Label are button subclasses, so yeah, that's all of them 😌) If no such ancestor is found, the default is implementation dependent. If a font list and a render table are both specified, the render table takes precedence. Refer to XmRenderTable(3) for more info on creating and structuring a render table.
  • XmNstringDirection β€” a synthetic resource for setting XmNlayoutDirection. Its values are XmSTRING_DIRECTION_L_TO_R and XmSTRING_DIRECTION_R_TO_L. Refer to the XmNlayoutDirection resource description. > Lowkey important: XmNstringDirection is obsoleted by XmNlayoutDirection, but it's kept here for backward compatibility πŸ’€

🧬 Inherited Resources 🧬

LabelGadget 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. Go read the source, bestie, it's all there πŸ“š

XmGadget Resource Set πŸ’–

okay bestie, here's the whole glow-up kit every XmGadget comes pre-loaded with ✨ β€” name, class, type, default, and how you're allowed to touch it (that last column is the access vibe: CSG, C, CG, etc.). Every single one, no skipping, we don't do that here πŸ’…

  • XmNbackground β€” class XmCBackground, type Pixel, default is dynamic, access CSG
  • XmNbackgroundPixmap β€” class XmCPixmap, type Pixmap, default is XmUNSPECIFIED_PIXMAP, access CSG
  • XmNbottomShadowColor β€” class XmCBottomShadowColor, type Pixel, default is dynamic, access CSG
  • XmNbottomShadowPixmap β€” class XmCBottomShadowPixmap, type Pixmap, default is dynamic, access CSG
  • XmNhelpCallback β€” class XmCCallback, type XtCallbackList, default is NULL, access C
  • XmNforeground β€” class XmCForeground, type Pixel, default is dynamic, access CSG
  • XmNhighlightColor β€” class XmCHighlightColor, type Pixel, default is dynamic, access CSG
  • XmNhighlightOnEnter β€” class XmCHighlightOnEnter, type Boolean, default is False, access CSG
  • XmNhighlightPixmap β€” class XmCHighlightPixmap, type Pixmap, default is dynamic, access CSG
  • XmNhighlightThickness β€” class XmCHighlightThickness, type Dimension, default is 0, access CSG
  • XmNlayoutDirection β€” class XmNCLayoutDirection, type XmDirection, default is dynamic, access CG
  • XmNnavigationType β€” class XmCNavigationType, type XmNavigationType, default is XmNONE, access CSG
  • XmNshadowThickness β€” class XmCShadowThickness, type Dimension, default is 0, access CSG
  • XmNtopShadowColor β€” class XmCTopShadowColor, type Pixel, default is dynamic, access CSG
  • XmNtopShadowPixmap β€” class XmCTopShadowPixmap, type Pixmap, default is dynamic, access CSG
  • XmNtraversalOn β€” class XmCTraversalOn, type Boolean, default is False, access CSG
  • XmNunitType β€” class XmCUnitType, type unsigned char, default is dynamic, access CSG
  • XmNuserData β€” class XmCUserData, type XtPointer, default is NULL, access CSG

RectObj Resource Set πŸ¦‹

and because every gadget is also secretly a RectObj underneath (main character energy fr), it inherits this whole second set too 🫢

  • XmNancestorSensitive β€” class XmCSensitive, type Boolean, default is dynamic, access G
  • XmNborderWidth β€” class XmCBorderWidth, type Dimension, default is 0, access N/A
  • XmNheight β€” class XmCHeight, type Dimension, default is dynamic, access CSG
  • XmNsensitive β€” class XmCSensitive, type Boolean, default is True, access CSG
  • XmNwidth β€” class XmCWidth, type Dimension, default is dynamic, access CSG
  • XmNx β€” class XmCPosition, type Position, default is 0, access CSG
  • XmNy β€” class XmCPosition, type Position, default is 0, access CSG
ngl bestie, that N/A on XmNborderWidth is not a typo β€” it literally means you can't set it through the access modes listed here, so don't come for me when it doesn't budge 😭

Last row of the table, and then we're out of resources, bestie β€” one single entry, but she's important:

  • XmNdestroyCallback β€” Class XmCCallback, Type XtCallbackList, Default NULL, Access C

πŸŽ€ Behavior πŸŽ€

XmLabelGadget straight up inherits behavior from XmGadget β€” that's the base, the blueprint, the foundation. Everything extra that XmLabelGadget brings to the group chat is in this list right here:

  • <Btn2Down> β€” drags the contents of a LabelGadget, the one it identified when BTransfer got pressed. 🫳
Not me warning you: this action is undefined for LabelGadgets used in a menu system. Undefined. Don't do it. πŸ™ˆ
  • <Key><osfHelp> β€” in a Popup or Pulldown MenuPane, this unposts all menus in the menu hierarchy and, when the shell's keyboard focus policy is XmEXPLICIT, it restores keyboard focus to the widget that had the focus before the menu system was entered. It calls the callbacks for XmNhelpCallback if any exist. And if this widget has no help callbacks at all? Then this action calls the help callbacks for the nearest ancestor that has them. Found family energy, fr fr. πŸ’–
  • <key><osfCancel> β€” depends on where you're standing, so pay attention:
    • In a MenuBar: disarms the CascadeButton and the menu and, when the shell's keyboard focus policy is XmEXPLICIT, restores keyboard focus to the widget that had the focus before the menu was entered.
    • In a toplevel Pulldown MenuPane from a MenuBar: unposts the menu, disarms the MenuBar CascadeButton and the MenuBar, and, when the shell's keyboard focus policy is XmEXPLICIT, restores keyboard focus to the widget that had the focus before the MenuBar was entered. In other Pulldown MenuPanes, it unposts the menu.
    • In a Popup MenuPane: unposts the menu and, when the shell's keyboard focus policy is XmEXPLICIT, restores keyboard focus to the widget from which the menu was posted. 🫢
  • <Key><osfDown> β€”
    • If the current menu item has a submenu and is in a MenuBar, then this action posts the submenu, disarms the current menu item, and arms the submenu's first traversable menu item.
    • If the current menu item is in a MenuPane, then this action disarms the current menu item and arms the item below it. This action wraps within the MenuPane. The direction of the wrapping depends on the XmNlayoutDirection resource. πŸŒ€
  • <Key><osfLeft> β€” okay this one is a whole saga, so buckle up:
    • When the horizontal direction of XmNlayoutDirection is XmLEFT_TO_RIGHT, everything below applies:
      • When the current menu item is in a MenuBar, then this action disarms the current item and arms the MenuBar item to the left. This action wraps within the MenuBar.
      • In MenuPanes, if the current menu item is not at the left edge of a MenuPane, this action disarms the current item and arms the item to its left. If the current menu item is at the left edge of a submenu attached to a MenuBar item, then this action unposts the submenu and traverses to the MenuBar item to the left, wrapping if necessary. If that MenuBar item has a submenu, it posts the submenu and arms the first traversable item in the submenu. If the current menu item is at the left edge of a submenu not directly attached to a MenuBar item, then this action unposts the current submenu only.
      • In Popup or Torn-off MenuPanes, when the current menu item is at the left edge, this action wraps within the MenuPane. If the current menu item is at the left edge of the MenuPane and not in the top row, this action wraps to the rightmost menu item in the row above. If the current menu item is in the upper, leftmost corner, this action wraps to the tear-off control, if present, or else it wraps to the bottom, rightmost menu item in the MenuPane.
    • When the horizontal direction of XmNlayoutDirection is XmRIGHT_TO_LEFT, then this instead:
      • If the current menu item is in a MenuBar, then this action disarms the current item and arms the MenuBar item to the left. This action wraps within the MenuBar.
      • In MenuPanes, if the current menu item is a CascadeButton, then this action posts its associated submenu. If the current menu item is not a CascadeButton and is not at the left edge of a MenuPane, this action disarms the current item and arms the item to its left, wrapping if necessary. If the current menu item is not a CascadeButton and is at the left edge of a submenu that is a descendent of a MenuBar, then this action unposts all submenus and traverses to the MenuBar item to the left. If that MenuBar item has a submenu, it posts the submenu and arms the submenu's first traversable item.
      • In Popup or Torn-off menus, if the current menu item is not a CascadeButton and is at the left edge of a row (except the bottom row), this action wraps to the rightmost menu item in the row below. If the current menu item is not a CascadeButton and is in the bottom, leftmost corner of a Popup or Pulldown MenuPane, this action wraps to the tear-off control, if present, or else it wraps to the top, rightmost menu item of the MenuPane.
  • <Key><osfRight> β€” the mirror twin, and yes she's also a saga:
    • When the horizontal direction of XmNlayoutDirection is XmLEFT_TO_RIGHT, this is the tea:
      • If the current menu item is in a MenuBar, then this action disarms the current item and arms the MenuBar item to the right. This action wraps within the MenuBar.
      • In MenuPanes, if the current menu item is a CascadeButton, then this action posts its associated submenu. If the current menu item is not a CascadeButton and is not at the right edge of a MenuPane, this action disarms the current item and arms the item to its right, wrapping if necessary. If the current menu item is not a CascadeButton and is at the right edge of a submenu that is a descendent of a MenuBar, then this action unposts all submenus and traverses to the MenuBar item to the right. If that MenuBar item has a submenu, it posts the submenu and arms the submenu's first traversable item.
      • In Popup or Torn-off menus, if the current menu item is not a CascadeButton and is at the right edge of a row (except the bottom row), this action wraps to the leftmost menu item in the row below. If the current menu item is not a CascadeButton and is in the bottom, rightmost corner of a Popup or Pulldown MenuPane, this action wraps to the tear-off control, if present, or else it wraps to the top, leftmost menu item of the MenuPane.
    • When the horizontal direction of XmNlayoutDirection is XmRIGHT_TO_LEFT, then the following applies:
      • When the current menu item is in a MenuBar, then this action disarms the current item and arms the MenuBar item to the right. This action wraps within the MenuBar.
      • In MenuPanes, if the current menu item is not at the right edge of a MenuPane, this action disarms the current item and arms the item to its right. If the current menu item is at the right edge of a submenu attached to a MenuBar item, then this action unposts the submenu and traverses to the MenuBar item to the right, wrapping if necessary. If that MenuBar item has a submenu, it posts the submenu and arms the first traversable item in the submenu. If the current menu item is at the right edge of a submenu not directly attached to a MenuBar item, then this action unposts the current submenu only.
      • In Popup or Torn-off MenuPanes, when the current menu item is at the right edge, this action wraps within the MenuPane. If the current menu item is at the right edge of the MenuPane and not in the top row, this action wraps to the leftmost menu item in the row above. If the current menu item is in the upper, rightmost corner, this action wraps to the tear-off control, if present, or else it wraps to the bottom, leftmost menu item in the MenuPane.
  • <Key><osfUp> β€” when the current menu item is in a MenuPane, then this action disarms the current menu item and arms the item above it. This action wraps within the MenuPane. The direction of the wrapping depends on the XmNlayoutDirection resource. ✨

🌈 Virtual Bindings 🌈

The bindings for virtual keys are vendor specific β€” like, your vendor decides, it's their house their rules, iykyk. For the actual info about bindings for virtual buttons and keys, go read VirtualBindings(3). Go on, she's right there. πŸ’…


The whole friend group, and every one of them is iconic in her own right:


And that's a wrap on the whole page, bestie!! πŸŽ€βœ¨ The footer stamps the whole thing as XmLabelGadget(library call) β€” that's the source and the version tag, filed under the library call corner of the manual β€” and you made it all the way to the end, which is main character energy honestly. Go forth and label your gadgets. πŸ‘‘πŸ’–