XMLABEL(3)

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

XmLabel β€” the Label widget class πŸ’–

library call ✨ XmLabel(library call)

okay bestie, gather round, we're doing the Label widget and it's genuinely a whole vibe. this is a library call, so it lives in the Motif/Lesstif corner of the universe πŸ¦‹


✨ NAME ✨

XmLabel β€” The Label widget class πŸ‘‘


🌸 SYNOPSIS 🌸

#include <Xm/Label.h>

that's it. one include. she's low maintenance like that πŸ’…


πŸŽ€ DESCRIPTION πŸŽ€

okay so Label is an instantiable widget (meaning you can literally just make one, she's not abstract, she's ready πŸ’–) and she ALSO serves as the superclass for other button widgets, like PushButton and ToggleButton. so she's giving both main character energy AND generous mother energy. we love a versatile icon.

here's the thing though: the Label widget does not accept any button or key input. none. zero. she does not want your clicks, she does not want your keyboard, she is simply there, looking cute. the help callback is the only callback defined. Label also receives enter and leave events, so she does notice when you hover, she's just not gonna do anything about it πŸ™ˆ

Label can contain either text or a pixmap. Label text is a compound string. (go read the Motif Programmer's Guide for the full tea on compound strings, fr fr.) the text can be multilingual, multiline, and/or multifont β€” she's cultured, she's stacked, she's multidimensional. when a Label is insensitive, its text is stippled, or the user-supplied insensitive pixmap is displayed instead. sad girl era, rendered in pixels 😭

Label supports both accelerators and mnemonics, primarily for use in Label subclass widgets that are contained in menus. here's the distinction, bestie, and it matters:

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

the Label widget displays the mnemonic by underlining the first matching character in the text string. and the accelerator is displayed as a text string adjacent to the label text or pixmap, depending on the layout direction. slay.

Label consists of many margin fields surrounding the text or pixmap. these margin fields are resources that may be set by the user β€” BUT Label subclasses and Manager parents also modify some of these fields. the way that they tend to modify the XmNmarginLeft, XmNmarginRight, XmNmarginTop, and XmNmarginBottom resources and leave the XmNmarginWidth and XmNmarginHeight resources as set by the application. rude? maybe. canon? absolutely.

Label takes into account XmNshadowThickness in determining its layout but does not draw the shadow. that is, if XmNshadowThickness is greater than 0 (zero), Label leaves space for the shadow, but the shadow does not appear. she's reserving the parking spot and never pulling up πŸ’€ iconic honestly.

In a Label, XmNtraversalOn and XmNhighlightOnEnter are forced to False inside Popup menu panes, Pulldown menu panes, and OptionMenus. Otherwise, these resources default to False.

and for the trait girlies: Label uses the XmQTmenuSystem and XmQTspecifyRenderTable traits, and holds the XmQTaccessTextual, XmQTmenuSavvy, and XmQTtransfer traits. she's connected, she knows people ✨

πŸ’« Data Transfer Behavior πŸ’«

Label and its subclasses β€” except when used in a menu system β€” support dragging of the label contents from the Label. however! the label contents are draggable only if the XmNenableUnselectableDrag resource of XmDisplay is set to True. so flip that switch or nothing's moving, no cap.

as a source of data, Label and its subclasses support the following targets and associated conversions of data to these targets:

  • locale β€” if the locale target matches the widget's locale, the widget transfers XmNlabelString in the encoding of the locale. this target is supported when XmNlabelType is XmSTRING or XmPIXMAP_AND_STRING.
  • COMPOUND_TEXT β€” the widget transfers XmNlabelString as type COMPOUND_TEXT. supported when XmNlabelType is XmSTRING or XmPIXMAP_AND_STRING.
  • UTF8_STRING β€” the widget transfers XmNlabelString as type UTF8_STRING. 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. this target is supported only 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, Label also supports the following standard Motif targets:

  • BACKGROUND β€” the widget transfers 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 XmNcolormap as type COLORMAP.
  • FOREGROUND β€” the widget transfers 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 🧚

Label inherits behavior, resources, and traits from Core and XmPrimitive. the family tree is giving old money 🫢

  • the class pointer is xmLabelWidgetClass.
  • the class name is XmLabel.

πŸ‘‘ 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).

keep those four codes memorized, bestie β€” C, S, G, N/A β€” because they're about to show up on literally every single row 🌈

okay so before we get into the actual resource tea, here's the whole XmLabel resource set laid out like a little menu of vibes 🫢 every single one of these is class CSG (that's the access column bestie, it means you can set 'em at creation, set 'em with XtSetValues, and get 'em with XtGetValues β€” the full trifecta ✨). here's every resource with its class, type and default, no skips, no skips ever:

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

XmNaccelerator 🎹

okay bestie, this one is giving keyboard shortcuts that actually slap. it sets the accelerator on a button widget in a menu β€” and what that means is: it lets you activate a button from the keyboard. the button can be visible, it can be invisible, but it has to be managed, no exceptions. if it's not managed, don't even try it πŸ’€

this resource is a String, and that string is a whole little description of a set of modifiers plus the key you can use to select that button.

and here's the part where you gotta pay attention, because the format is identical to the one the translations manager uses β€” with two lil' twists:

  • only a single event may be specified, just one, one singular event, that's it
  • only KeyPress events are allowed. that's the only flavor on the menu ✨
also, real talk: accelerators for buttons are supported only for PushButtons and ToggleButtons in Pulldown and Popup menu panes. that's the whole guest list. periodt πŸ’…
  • XmNacceleratorText β€” the text that gets shown for the accelerator ✨ It shows up right next to the label string or pixmap, and the direction it lays itself out depends on the widget's XmNlayoutDirection resource. Heads up tho: for buttons, accelerator text only displays for PushButtons and ToggleButtons inside Pulldown and Popup Menus.
  • XmNalignment β€” where the label (text or pixmap) lines up 🎯
    • XmALIGNMENT_BEGINNING (left alignment) β€” lines up the left sides of the text lines vertically with the left edge of the widget window. For a pixmap, its left side is vertically aligned with the left edge of the widget window.
    • XmALIGNMENT_CENTER (center alignment) β€” lines up the centers of the text lines vertically in the center of the widget window. For a pixmap, its center is vertically aligned with the center of the widget window.
    • XmALIGNMENT_END (right alignment) β€” lines up the right sides of the text lines vertically with the right edge of the widget window. For a pixmap, its right side is vertically aligned with the right edge of the widget window.

okay bestie, plot twist: all those text descriptions above are true when XmNlayoutDirection is XmLEFT_TO_RIGHT. When that resource is XmRIGHT_TO_LEFT, the descriptions for XmALIGNMENT_BEGINNING and XmALIGNMENT_END get switched. iykyk πŸ™ˆ

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 the widget is a subclass of XmLabel. Otherwise, the default is XmALIGNMENT_CENTER. periodt πŸ’…

  • XmNfontList β€” the font used for the widget's text πŸ–‹οΈ

ngl this one is obsolete β€” it only exists for compatibility with previous releases. You should be using XmNrenderTable instead of XmNfontList now. If both are specified, the render table takes precedence, no contest.

If XmNfontList is NULL at initialization, Label goes on a little quest up its parent hierarchy looking for an ancestor that is a subclass of the XmBulletinBoard, VendorShell, or XmMenuShell widget class. If it finds one, Label initializes XmNfontList to the XmNlabelFontList of that ancestor widget. Same energy for button subclasses of Label: they initialize XmNfontList to the XmNbuttonFontList of the ancestor widget. (Currently, all subclasses of Label are button subclasses, just so u know.) If no such ancestor is found, the default is implementation dependent. Peep XmFontList(3) for more on creating and structuring a font list πŸ’–

  • XmNlabelInsensitivePixmap β€” the pixmap used as the button face when XmNlabelType is XmPIXMAP and the button is insensitive. The default value, XmUNSPECIFIED_PIXMAP, shows an empty label. ghost mode πŸ‘»
  • XmNlabelPixmap β€” the pixmap when XmNlabelType is XmPIXMAP or XmPIXMAP_AND_STRING. The default value, XmUNSPECIFIED_PIXMAP, shows an empty label πŸ–ΌοΈ
  • XmNlabelString β€” the compound string when XmNlabelType is XmSTRING or XmPIXMAP_AND_STRING. If this value is NULL, it gets initialized by converting the name of the widget to a compound string. Peep XmString(3) for more on creating and structuring compound strings ✨
  • XmNlabelType β€” the label type, bestie:
    • XmSTRING β€” displays text using XmNlabelString.
    • XmPIXMAP β€” displays pixmap using XmNlabelPixmap or
    • XmPIXMAP_AND_STRING β€” displays text and pixmap using XmNlabelPixmap or XmNlabelInsensitivePixmap and XmNlabelString.
  • XmNmarginBottom β€” the amount of spacing between the bottom of the label text and the top of the bottom margin specified by XmNmarginHeight. Label's subclasses may modify this. For example, CascadeButton 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. It specifies the amount of spacing between the top edge of the margin set by XmNmarginTop and the bottom edge of the top shadow, plus the amount of spacing between the bottom edge of the margin specified by XmNmarginBottom and the top edge of the bottom shadow 🌸
  • XmNmarginLeft β€” the amount of spacing between the left edge of the label text and the right side of the left margin (specified by XmNmarginWidth). Label's subclasses may modify this. For example, ToggleButton may increase this field to make room for the toggle indicator and for spacing between the indicator and label. Whether this actually applies to the left or right side of the label depends on the value of the XmNlayoutDirection resource πŸ‘€
  • XmNmarginRight β€” the amount of spacing between the right edge of the label text and the left side of the right margin (specified by XmNmarginWidth). Label's subclasses may modify this. For example, CascadeButton 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 the XmNlayoutDirection resource πŸ‘€
  • XmNmarginTop β€” the amount of spacing between the top of the label text and the bottom of the top margin specified by XmNmarginHeight. Label's subclasses may modify this. For example, CascadeButton 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. It specifies the amount of spacing between the left edge of the margin set by XmNmarginLeft and the right edge of the left shadow, plus the amount of spacing between the right edge of the margin specified by XmNmarginRight and the left edge of the right shadow 🌈
  • XmNmnemonic β€” gives the user an alternate means of activating a button πŸ”‘ 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.

When a mnemonic has been specified, the user activates the button by pressing the mnemonic key while the button is visible. If the button is a CascadeButton in a MenuBar and the MenuBar does not have the focus, the user has to use the MAlt modifier while pressing the mnemonic. 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. The default is XmFONTLIST_DEFAULT_TAG πŸ’œ
  • XmNpixmapPlacement β€” where the pixmap sits with respect to the text label πŸ“ This resource can take one of these values: XmPIXMAP_TOP, XmPIXMAP_BOTTOM, XmPIXMAP_LEFT, and XmPIXMAP_RIGHT. A type converter has been registered that converts the following strings: "top", "bottom", "left", and "right".
  • XmNpixmapTextPadding β€” the amount of space to be left between the pixmap and the label string 🫢
  • XmNrecomputeSize β€” a Boolean value that says whether the widget shrinks or expands to accommodate its contents (label string or pixmap) as a result of an XtSetValues resource value that would change the size of the widget. If True, the widget shrinks or expands to exactly fit the label string or pixmap. If False, the widget never attempts to change size on its own. main character 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. If such an ancestor is found, 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. (Note that all current subclasses of Label are button subclasses.) 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 will take precedence. Peep XmRenderTable(3) for more on creating and structuring a render table ✨
  • XmNstringDirection β€” a synthetic resource for setting XmNlayoutDirection. The values for this resource are XmSTRING_DIRECTION_L_TO_R and XmSTRING_DIRECTION_R_TO_L. Refer to the XmNlayoutDirection resource description. The XmNstringDirection resource is obsoleted by XmNlayoutDirection, but it's kept here for backward compatibility πŸ™ˆ

πŸ¦‹ Inherited Resources πŸ¦‹

Label inherits behavior and resources from the following superclasses. For a complete description of each resource, refer to the reference page for that superclass. no cap, go read them πŸ’–

okay bestie, now we're getting into the XmPrimitive resource set β€” this is the whole glow-up list, every single one of them, no skipping, no cap πŸ’…βœ¨

Each one's got its Name, its Class, its Type, its Default, and its Access code, and I'm giving you all five for every single one because we do not gatekeep here 🫢


  • XmNbottomShadowColor β€” class XmCBottomShadowColor, type Pixel, default is dynamic, access CSG. that bottom shadow color? she's dynamic, she moves with the vibe 🌈
  • XmNbottomShadowPixmap β€” class XmCBottomShadowPixmap, type Pixmap, default XmUNSPECIFIED_PIXMAP, access CSG. literally unspecified until you say otherwise πŸ’€
  • XmNconvertCallback β€” class XmCCallback, type XtCallbackList, default NULL, access C. a whole callback list, and by default it's just sitting there empty, NULL, iconic πŸ™ˆ
  • XmNforeground β€” class XmCForeground, type Pixel, default dynamic, access CSG. the main character of colors, fr fr πŸ‘‘
  • XmNhelpCallback β€” class XmCCallback, type XtCallbackList, default NULL, access C. help me help you, but only if you set it β€” default is NULL bestie 😭
  • XmNhighlightColor β€” class XmCHighlightColor, type Pixel, default dynamic, access CSG. highlight moment, dynamic by default, obsessed ⭐
  • XmNhighlightOnEnter β€” class XmCHighlightOnEnter, type Boolean, default False, access CSG. does it highlight when you enter? default says False, so no, not unless you ask nicely πŸ’…
  • XmNhighlightPixmap β€” class XmCHighlightPixmap, type Pixmap, default dynamic, access CSG. the pixmap version of the highlight, also dynamic, she's flexible like that πŸ¦‹
  • XmNhighlightThickness β€” class XmCHighlightThickness, type Dimension, default 0, access CSG. zero thickness by default, so like... no highlight thickness at all. we love a minimalist 🌸
  • XmNlayoutDirection β€” class XmCLayoutDirection, type XmDirection, default dynamic, access CG. note the access here is CG, not CSG β€” you can't set this one at create time, only get it. important detail, don't sleep on it ✨
  • XmNnavigationType β€” class XmCNavigationType, type XmNavigationType, default XmNONE, access CSG. default is XmNONE, so no navigation type until you pick one 🧚
  • XmNpopupHandlerCallback β€” class XmCCallback, type XtCallbackList, default NULL, access C. another callback list, another NULL default, we stay consistent πŸ’œ
  • XmNshadowThickness β€” class XmCShadowThickness, type Dimension, default 0, access CSG. zero shadow thickness, flat era by default πŸ”₯
  • XmNtopShadowColor β€” class XmCTopShadowColor, type Pixel, default dynamic, access CSG. top shadow color, dynamic, matching her bottom-shadow sister πŸŽ€
  • XmNtopShadowPixmap β€” class XmCTopShadowPixmap, type Pixmap, default dynamic, access CSG. and here she's dynamic β€” unlike the bottom one which was XmUNSPECIFIED_PIXMAP. yes bestie, they're different, read it again πŸ‘€
  • XmNtraversalOn β€” class XmCTraversalOn, type Boolean, default False, access CSG. traversal? off by default. False. periodt πŸ’…
  • XmNunitType β€” class XmCUnitType, type unsigned char, default dynamic, access CSG. yes, the type really is unsigned char, that's not a typo, that's the lore 😭
  • XmNuserData β€” class XmCUserData, type XtPointer, default NULL, access CSG. your little pocket of user data, NULL until you claim it πŸ“

so that's the full XmPrimitive lineup β€” eighteen of them, every field intact, nothing dropped, nothing invented πŸ’– and bestie, notice how many of these default to dynamic versus how many are just sitting at 0, False, or NULL? that's the whole personality of the widget right there 🌈

more coming, don't go anywhere 🫢

πŸŽ€ Core Resource Set πŸŽ€

okay bestie, here's the whole core resource lineup β€” every name, class, type, default and access code, all of it, no skips πŸ’…

  • XmNaccelerators β€” class XmCAccelerators, type XtAccelerators, default dynamic, access CSG
  • 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

🌸 Translations 🌸

so XmLabel lowkey inherits translations from Primitive β€” it's giving nepo baby but make it useful πŸ’– Here's the list:

the key names below are written in the X standard key event translation table syntax, which is the format Motif uses to say which widget actions fire for a given key. There's a quick lil overview of the format over in VirtualBindings(3) β€” and if you want the full deep dive, bestie, go read the X Toolkit Instrinsics Documentation. πŸ‘‘

<Btn2Down>:
          ProcessDrag()
:<Key><osfHelp>:
          Help()

and the translations that subclasses of XmLabel use for menu traversal? yeah, those are here too 🧚

:<Key><osfCancel>:
          MenuEscape()
:<Key><osfLeft>:
          MenuTraverseLeft()
:<Key><osfRight>:
          MenuTraverseRight()
:<Key><osfUp>:
          MenuTraverseUp()
:<Key><osfDown>:
          MenuTraverseDown()

✨ Action Routines ✨

The XmLabel action routines are

Help()</p> πŸ†˜

So if you're chillin' in a Popup or a Pulldown MenuPane, this one unposts every menu in the whole menu hierarchy β€” like, all of them, gone πŸ’¨ β€” 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 even entered. It also calls the callbacks for XmNhelpCallback if any exist. And bestie, if this widget has no help callbacks? It goes and calls the help callbacks for the nearest ancestor that has them. Passing the vibe up the family tree πŸ’…


  • 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 top-level 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: unposts the menu and moves the focus to its CascadeButton.
  • 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.

If the current menu item has a submenu and it's in a MenuBar, this action posts the submenu, disarms the current menu item, and arms the submenu's first traversable menu item. Opening a whole new world ✨

If the current menu item is in a MenuPane, this action disarms the current menu item and arms the item below it. It wraps within the MenuPane, and the direction of the wrapping depends on the XmNlayoutDirection resource. iykyk 🌈


Okay this one is a whole saga, buckle up πŸŽ€

When the current menu item is in a MenuBar, this action disarms the current item and arms the MenuBar item to the left. It 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, 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. And if the current menu item is at the left edge of a submenu not directly attached to a MenuBar item, 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.

The preceding description applies when the XmNlayoutDirection horizontal direction is XmLEFT_TO_RIGHT. If the XmNlayoutDirection horizontal direction is XmRIGHT_TO_LEFT, then the following applies. πŸ‘‡

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.


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.

The preceding description applies when the XmNlayoutDirection horizontal direction is XmLEFT_TO_RIGHT. If the XmNlayoutDirection horizontal direction 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 left. 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. And 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.


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. Simple, clean, iconic πŸ’œ


ProcessDrag()</p> πŸ–οΈ

Drags the contents of a Label, identified when BTransfer is pressed. This action sets the XmNconvertProc of the DragContext to a function that calls the XmNconvertCallback procedures β€” possibly multiple times β€” for the _MOTIF_DROP selection.

Heads up bestie: this action is undefined for Labels used in a menu system. 🚫 Do not try it. It will not slay, it will just be undefined.

πŸ¦‹ Virtual Bindings πŸ¦‹

The bindings for virtual keys are vendor specific. For information about bindings for virtual buttons and keys, see VirtualBindings(3). (Yes queen, go read that one, it's the plug πŸ”Œ)


Core(3), XmCreateLabel(3), XmFontListAppendEntry(3), XmStringCreate(3), XmStringCreateLtoR(3), XmPrimitive(3), XmVaCreateLabel(3), and XmVaCreateManagedLabel(3). The whole friend group 🫢 go say hi.


And that's a wrap on the XmLabel(library call) page β€” this is the library-call flavour of the man page, straight from the XmLabel source, no cap. Thanks for reading all six parts, bestie, you ate that πŸ’…βœ¨