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

XmDialogShell ๐Ÿ’…

okay bestie, welcome to the library call corner of the manual, where we're gonna talk about XmDialogShell โ€” aka The DialogShell widget class. she's iconic, she's a Shell, she's the whole vibe. let's get into it โœจ


โœจ SYNOPSIS โœจ

#include <Xm/DialogS.h>

that's it. that's the whole incantation. go off ๐ŸŽ€


๐ŸŒธ DESCRIPTION ๐ŸŒธ

so like, modal and modeless dialogs use DialogShell as the Shell parent. that's her job, that's her moment, she ate.

here's the tea tho: DialogShell widgets cannot be iconified. nope. not a thing. instead, all secondary DialogShell widgets that are associated with an ApplicationShell widget get iconified and de-iconified as a group together with the primary widget. squad goals fr fr ๐Ÿ‘‘

the client indirectly manipulates DialogShell through the convenience interfaces during creation, and it can directly manipulate its BulletinBoard-derived child. and here's the thing โ€” much of DialogShell's functionality assumes its child is a BulletinBoard subclass, though she can potentially stand alone. she's flexible like that. lowkey independent. main character energy ๐Ÿ’…

setting XmNheight, XmNwidth, or XmNborderWidth for either a DialogShell or its managed child usually sets that resource to the same value in both the parent and the child. cute, matching. ๐Ÿซถ

but โ€” when an off-the-spot input method exists, the height and width of the shell may be greater than those of the managed child, in order to accommodate the input method. in that case:

  • setting XmNheight or XmNwidth for the shell does not necessarily set that resource to the same value in the managed child, and
  • setting XmNheight or XmNwidth for the child does not necessarily set that resource to the same value in the shell.

so yeah, they stop twinning. it's giving "we're not the same person anymore" ๐Ÿ˜ญ

now for the managed child of a DialogShell โ€” regardless of the value of the shell's XmNallowShellResize resource, setting XmNx or XmNy sets the corresponding resource of the parent but does not change the child's position relative to the parent. and the XtGetValues resource for the child's XmNx or XmNy yields the value of the corresponding resource in the parent. the x and y-coordinates of the child's upper left outside corner relative to the parent's upper left inside corner are both 0 (zero) minus the value of XmNborderWidth. math is mathing, don't question it ๐Ÿงฎ

โš ๏ธ heads up bestie: note that the Inter-Client Communication Conventions Manual (ICCCM) allows a window manager to change or control the border width of a reparented top-level window. so your border width is not entirely your own. the WM has opinions. let her cook. ๐Ÿ’€

DialogShell uses the XmQTdialogShellSavvy trait. slay, trait acquired โœจ


๐Ÿฆ‹ Classes ๐Ÿฆ‹

DialogShell inherits behavior, resources, and traits from the Core, Composite, Shell, WMShell, VendorShell, and TransientShell classes. whole family tree, all of them showing up to the function. ๐ŸŒˆ

  • the class pointer is xmDialogShellWidgetClass
  • the class name is XmDialogShell

write those down, you'll need 'em. no cap ๐Ÿ“


๐ŸŽ€ New Resources ๐ŸŽ€

plot twist: DialogShell defines no new resources but she does override the XmNdeleteResponse resource in the VendorShell class. so not new-new, just... improved. a glow up, if you will. ๐Ÿ’…


๐Ÿ’– Inherited Resources ๐Ÿ’–

DialogShell inherits behavior and resources from the superclasses described in the following tables, which define sets of widget resources used by the programmer to specify data. (yes, tables. plural. she's thorough.)

for a complete description of each resource, go read the reference page for that superclass. the programmer can also set the resource values for the inherited classes to set attributes for this widget.

now, the .Xdefaults naming rules, listen up because this part is important:

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

and the codes in the access column? they 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

โญ TransientShell Resource Set โญ

one resource. one. but she's important:

  • XmNtransientFor โ€” class: XmCTransientFor, type: Widget, default: NULL, access: CSG ๐ŸŒŸ

and that's the first chunk bestie, but we are not done โ€” there's more of this page coming, so stay tuned ๐Ÿ’œ

๐Ÿ’ซ VendorShell Resource Set ๐Ÿ’ซ

okay bestie, here's the full resource menu for VendorShell โ€” every XmN name, its class, its type, its default, and its access code, all of it, zero skips, no cap ๐Ÿซถ. Think of it like the group chat roster: name first, then the whole vibe of who they are.

  • XmNaudibleWarning โ€” class XmCAudibleWarning, type unsigned char, default XmBELL, access CSG. it's the "should this thing make noise at me" switch, and yeah, the default is literally to beep at you ๐Ÿ”Š
  • XmNbuttonFontList โ€” class XmCButtonFontList, type XmFontList, default dynamic, access CSG. the fonts for your buttons, and the default is dynamic because it flexes based on your setup ๐Ÿ’…
  • XmNbuttonRenderTable โ€” class XmCButtonRenderTable, type XmRenderTable, default dynamic, access CSG. same energy as above but for the render table, which is the fancier, more main-character version of a font list โœจ
  • XmNdefaultFontList โ€” class XmCDefaultFontList, type XmFontList, default dynamic, access CG. the fallback font list, the one that shows up when nobody else got assigned a job ๐ŸŽ€
  • XmNdeleteResponse โ€” class XmCDeleteResponse, type unsigned char, default XmUNMAP, access CSG. what happens when you try to close the thing, and by default it just unmaps, it does not yeet itself out of existence ๐Ÿ˜ญ
  • XmNinputMethod โ€” class XmCInputMethod, type String, default NULL, access CSG. the input method string, and it defaults to NULL, so no input method assigned unless you say so ๐Ÿ™ˆ
  • XmNinputPolicy โ€” class XmCInputPolicy, type XmInputPolicy, default XmPER_SHELL, access CSG. how input gets routed, and the default is per-shell, one policy per shell, periodt ๐Ÿ‘‘
  • XmNkeyboardFocusPolicy โ€” class XmCKeyboardFocusPolicy, type unsigned char, default XmEXPLICIT, access CSG. who gets the keyboard spotlight, and by default it's XmEXPLICIT, meaning you point at it, it doesn't just assume โญ
  • XmNlabelFontList โ€” class XmCLabelFontList, type XmFontList, default dynamic, access CSG. fonts for your labels, dynamic by default, obviously ๐Ÿ’œ
  • XmNlabelRenderTable โ€” class XmCLabelRenderTabel, type XmRenderTable, default dynamic, access CSG. and yes bestie, the class is written XmCLabelRenderTabel, that's genuinely how it is, we don't question it, we just copy it exactly ๐Ÿ‘€
  • XmNlayoutDirection โ€” class XmCLayoutDirection, type XmDirection, default XmLEFT_TO_RIGHT, access CG. which way the layout flows, and the default is left to right, the classic ๐ŸŒธ
  • XmNmwmDecorations โ€” class XmCMwmDecorations, type int, default -1, access CG. window manager decorations, default -1, which is the "I'm not telling you anything, let the WM handle it" value ๐ŸชŸ
  • XmNmwmFunctions โ€” class XmCMwmFunctions, type int, default -1, access CG. the MWM functions, also -1 by default, same hands-off energy ๐Ÿ”ฅ
  • XmNmwmInputMode โ€” class XmCMwmInputMode, type int, default -1, access CG. the MWM input mode, and you already know: default -1 ๐Ÿ’€
  • XmNmwmMenu โ€” class XmCMwmMenu, type String, default NULL, access CG. a string for the MWM menu, defaulting to NULL, i.e. no menu, nothing to see here ๐Ÿ“
  • XmNpreeditType โ€” class XmCPreeditType, type String, default dynamic, access CSG. the preedit type for input, dynamic by default because of course it is ๐Ÿงš
  • XmNshellUnitType โ€” class XmCShellUnitType, type unsigned char, default XmPIXELS, access CSG. the units for the shell, defaulting to XmPIXELS, so we're measuring in pixels, iconic ๐Ÿ“
  • XmNtextFontList โ€” class XmCTextFontList, type XmFontList, default dynamic, access CSG. fonts for your text widgets, dynamic as always bestie ๐Ÿ’–
  • XmNtextRenderTable โ€” class XmCTextRenderTable, type XmRenderTable, default dynamic, access CSG. the render table for text, and yep, default dynamic โœจ
  • XmNunitType โ€” class XmCUnitType, type unsigned char, default XmPIXELS, access CSG. the general unit type, XmPIXELS by default, keeping it consistent with the shell one ๐ŸŒˆ
  • XmNuseAsyncGeometry โ€” class XmCUseAsyncGeometry, type Boolean, default False, access CSG. whether to use async geometry, and the default is False, so no async shenanigans unless you ask for them ๐Ÿ™…โ€โ™€๏ธ

and that's the whole roster, every single one, nobody left out ๐Ÿซถ

okay so this next bit is the WMShell resource set, and it's a whole grid in the original โ€” columns for Name, Class, Type, Default and Access. We're gonna walk every single row, no skipping, because bestie you know I don't skip rows. ๐Ÿ’…

Every one of these has an access of CSG, so if you see it at the end of each line, that's the access column doing its thing. โœจ

  • XmNbaseHeight โ€” class XmCBaseHeight, type int, default XtUnspecifiedShellInt, access CSG ๐Ÿฆ‹
  • XmNbaseWidth โ€” class XmCBaseWidth, type int, default XtUnspecifiedShellInt, access CSG ๐Ÿฆ‹
  • XmNheightInc โ€” class XmCHeightInc, type int, default XtUnspecifiedShellInt, access CSG ๐Ÿ“
  • XmNiconMask โ€” class XmCIconMask, type Pixmap, default NULL, access CSG ๐ŸŽ€
  • XmNiconPixmap โ€” class XmCIconPixmap, type Pixmap, default NULL, access CSG ๐ŸŽ€
  • XmNiconWindow โ€” class XmCIconWindow, type Window, default NULL, access CSG ๐ŸชŸ
  • XmNiconX โ€” class XmCIconX, type int, default XtUnspecifiedShellInt, access CSG ๐Ÿ“
  • XmNiconY โ€” class XmCIconY, type int, default XtUnspecifiedShellInt, access CSG ๐Ÿ“
  • XmNinitialState โ€” class XmCInitialState, type int, default NormalState, access CSG ๐ŸŒˆ
  • XmNinput โ€” class XmCInput, type Boolean, default True, access CSG ๐Ÿซถ
  • XmNmaxAspectX โ€” class XmCMaxAspectX, type int, default XtUnspecifiedShellInt, access CSG โœจ
  • XmNmaxAspectY โ€” class XmCMaxAspectY, type int, default XtUnspecifiedShellInt, access CSG โœจ
  • XmNmaxHeight โ€” class XmCMaxHeight, type int, default XtUnspecifiedShellInt, access CSG ๐Ÿ“
  • XmNmaxWidth โ€” class XmCMaxWidth, type int, default XtUnspecifiedShellInt, access CSG ๐Ÿ“
  • XmNminAspectX โ€” class XmCMinAspectX, type int, default XtUnspecifiedShellInt, access CSG โœจ
  • XmNminAspectY โ€” class XmCMinAspectY, type int, default XtUnspecifiedShellInt, access CSG โœจ
  • XmNminHeight โ€” class XmCMinHeight, type int, default XtUnspecifiedShellInt, access CSG ๐Ÿ“
  • XmNminWidth โ€” class XmCMinWidth, type int, default XtUnspecifiedShellInt, access CSG ๐Ÿ“
  • XmNtitle โ€” class XmCTitle, type String, default dynamic, access CSG ๐Ÿ‘‘
  • XmNtitleEncoding โ€” class XmCTitleEncoding, type Atom, default dynamic, access CSG ๐Ÿ‘‘
  • XmNtransient โ€” class XmCTransient, type Boolean, default True, access CSG ๐Ÿงš
  • XmNwaitForWm โ€” class XmCWaitForWm, type Boolean, default True, access CSG โณ
  • XmNwidthInc โ€” class XmCWidthInc, type int, default XtUnspecifiedShellInt, access CSG ๐Ÿ“
  • XmNwindowGroup โ€” class XmCWindowGroup, type Window, default dynamic, access CSG ๐Ÿซ‚
  • XmNwinGravity โ€” class XmCWinGravity, type int, default dynamic, access CSG ๐ŸŒŒ
  • XmNwmTimeout โ€” class XmCWmTimeout, type int, default 5000 ms, access CSG โฐ

and now the part that actually matters, the one you'd lowkey get burned by if you skimmed, so eyes on me bestie:

Note: ๐Ÿšจ If values for XmNminWidth and XmNminHeight are present, and values for XmNbaseWidth and XmNbaseHeight are absent, XmNminWidth and XmNminHeight will be used as default values for XmNbaseWidth and XmNbaseHeight, and these values will be added to the shell size specified by the user. To work around this, add arguments during widget creation to explicitly set XmNbaseWidth and XmNbaseHeight to zero.

like, okay, that's a sneaky one. not me being dramatic, it's literally in the docs. ๐Ÿ“ข

and we're not done yet, there's more coming so stay with me ๐Ÿ’œ


๐ŸŒธ Shell Resource Set ๐ŸŒธ

okay bestie, these are the resources the Shell widget brings to the table โ€” every single one, no skips ๐Ÿ’–

  • XmNallowShellResize โ€” class XmCAllowShellResize, type Boolean, default False, access CG
  • XmNcreatePopupChildProc โ€” class XmCCreatePopupChildProc, type XtCreatePopupChildProc, default NULL, access CSG
  • XmNgeometry โ€” class XmCGeometry, type String, default NULL, access CSG
  • XmNoverrideRedirect โ€” class XmCOverrideRedirect, type Boolean, default False, access CSG
  • XmNpopdownCallback โ€” class XmCCallback, type XtCallbackList, default NULL, access C
  • XmNpopupCallback โ€” class XmCCallback, type XtCallbackList, default NULL, access C
  • XmNsaveUnder โ€” class XmCSaveUnder, type Boolean, default True, access CSG
  • XmNvisual โ€” class XmCVisual, type Visual *, default CopyFromParent, access CSG

๐Ÿฆ‹ Composite Resource Set ๐Ÿฆ‹

and these are the ones the Composite widget is serving โ€” the whole roster, periodt โœจ

  • XmNchildren โ€” class XmCReadOnly, type WidgetList, default NULL, access G
  • XmNinsertPosition โ€” class XmCInsertPosition, type XtOrderProc, default NULL, access CSG
  • XmNnumChildren โ€” class XmCReadOnly, type Cardinal, default 0, access G

Okay bestie, here's the Core Resource Set โ€” every single one, no skips, no shortcuts. ๐Ÿ’–

  • 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

That's the whole roster, bestie, all nineteen of them, untouched and unbothered. ๐Ÿ‘‘


โœจ Translations โœจ

Okay so here's the gag: there are no translations for XmDialogShell. Like, none. Zero. The vibes are purely structural. ๐Ÿ’€


The friend group, assembled:


And that's the whole page, bestie โ€” we made it to the end. ๐Ÿซถ This one's filed under XmDialogShell(library call), so if you ever need to cite it in your ~sources~ that's the name to drop. Now go forth and dialog-shell responsibly. Mwah. ๐Ÿ’…โœจ