XMBULLETINBOARD(3)
XmBulletinBoard β The BulletinBoard widget class π
okay bestie, this is the library call page for XmBulletinBoard, and ngl it's kind of the blueprint for likeβ¦ every dialog you've ever clicked on. let's go. π
β¨ SYNOPSIS β¨
#include <Xm/BulletinB.h>
π DESCRIPTION π
so BulletinBoard is a composite widget β meaning it's a parent, it has kids β and what it does is provide simple geometry management for those child widgets. it is not a control freak tho: it does not force positioning on its children. but! you can set it to reject geometry requests that result in overlapping children. your call, bestie. π
BulletinBoard is the base widget for most dialog widgets, and it's also used as a general container widget. so it's giving both main character and supportive-bestie energy. π«Ά
now. modal and modeless dialogs? those are implemented as collections of widgets that include:
- a
DialogShell - a
BulletinBoard(or a subclass of it) that's a child of the shell - and various dialog components (buttons, labels, and so on) that are children of the
BulletinBoard
BulletinBoard defines callbacks that are useful for dialogs β focus, map, unmap β and those are available for application use. no gatekeeping here. β¨
and here's a lil detail that lowkey matters: if its parent is a DialogShell, BulletinBoard passes title and input mode (based on dialog style) information up to the parent, and the parent is the one responsible for appropriate communication with the window manager. so BulletinBoard handles the vibes, DialogShell talks to the WM. iykyk. π§
the default value for XmNinitialFocus is the value of XmNdefaultButton. cute, right? π
BulletinBoard uses the XmQTtakesDefault trait, and it holds the XmQTdialogShellSavvy and XmQTspecifyRenderTable traits. π
π¦ Classes π¦
BulletinBoard inherits behavior, resources, and traits from the Core, Composite, Constraint, and XmManager classes.
- the class pointer is
xmBulletinBoardWidgetClass - the class name is
XmBulletinBoard
πΈ New Resources πΈ
so here's the tea: what follows is a set of widget resources that you the programmer use to specify data. you can also set the resource values for the inherited classes, if you wanna set attributes for this widget that way. β¨
pro tip for your .Xdefaults era: to reference a resource by name or by class in a .Xdefaults file, remove the XmN or XmC prefix and just use the remaining letters. and to specify one of the defined values for a resource in a .Xdefaults file, remove the Xm prefix and use the remaining letters β either lowercase or uppercase, doesn't matter, but include any underscores between words. β
and about that access column? here's the decoder ring:
- C β can be set at creation time
- S β can be set by using
XtSetValues - G β can be retrieved by using
XtGetValues - N/A β not applicable
XmBulletinBoard Resource Set π
here's every single one, zero skips, zero cuts. π
XmNallowOverlapβ classXmCAllowOverlap, typeBoolean, defaultTrue, accessCSGXmNautoUnmanageβ classXmCAutoUnmanage, typeBoolean, defaultTrue, accessCGXmNbuttonFontListβ classXmCButtonFontList, typeXmFontList, defaultdynamic, accessCSGXmNbuttonRenderTableβ classXmCButtonRenderTable, typeXmRenderTable, defaultdynamic, accessCSGXmNcancelButtonβ classXmCWidget, typeWidget, defaultNULL, accessSGXmNdefaultButtonβ classXmCWidget, typeWidget, defaultNULL, accessSGXmNdefaultPositionβ classXmCDefaultPosition, typeBoolean, defaultTrue, accessCSGXmNdialogStyleβ classXmCDialogStyle, typeunsigned char, defaultdynamic, accessCSGXmNdialogTitleβ classXmCDialogTitle, typeXmString, defaultNULL, accessCSGXmNfocusCallbackβ classXmCCallback, typeXtCallbackList, defaultNULL, accessCXmNlabelFontListβ classXmCLabelFontList, typeXmFontList, defaultdynamic, accessCSGXmNlabelRenderTableβ classXmCLabelRenderTable, typeXmRenderTable, defaultdynamic, accessCSGXmNmapCallbackβ classXmCCallback, typeXtCallbackList, defaultNULL, accessCXmNmarginHeightβ classXmCMarginHeight, typeDimension, default10, accessCSGXmNmarginWidthβ classXmCMarginWidth, typeDimension, default10, accessCSGXmNnoResizeβ classXmCNoResize, typeBoolean, defaultFalse, accessCSGXmNresizePolicyβ classXmCResizePolicy, typeunsigned char, defaultXmRESIZE_ANY, accessCSGXmNshadowTypeβ classXmCShadowType, typeunsigned char, defaultXmSHADOW_OUT, accessCSGXmNtextFontListβ classXmCTextFontList, typeXmFontList, defaultdynamic, accessCSGXmNtextRenderTableβ classXmCTextRenderTable, typeXmRenderTable, defaultdynamic, accessCSGXmNtextTranslationsβ classXmCTranslations, typeXtTranslations, defaultNULL, accessCXmNunmapCallbackβ classXmCCallback, typeXtCallbackList, defaultNULL, accessC
and bestie, that's only the resource table β we are so not done, there's more coming. π₯
π XmNallowOverlap
Okay so this one is the vibes police for overlapping children. If this resource is True, BulletinBoard is like "sure bestie, go off" and allows geometry requests that result in overlapping children. That's it. That's the whole personality.
β¨ XmNautoUnmanage
The "does this dialog close itself after you click something" resource, and honestly it's giving main-character-exits-the-room energy.
- If this resource is
Trueon initialization and the BulletinBoard's parent is aDialogShell, then BulletinBoard adds a callback to its button children (PushButtons,PushButtonGadgets, andDrawnButtons) that unmanages the BulletinBoard when a button is activated. Boom, poof, gone. π¨ - If this resource is
Falseon initialization, or if the BulletinBoard's parent is not aDialogShell, the BulletinBoard is not automatically unmanaged. - Little caveat for the subclasses out there: for BulletinBoard subclasses with Apply or Help buttons, activating those buttons does not automatically unmanage the BulletinBoard. Those buttons are built different, iykyk.
π¦ XmNbuttonFontList
Specifies the font list used for button descendants. Go peek at the XmNbuttonRenderTable resource for the whole story, bestie.
πΈ XmNbuttonRenderTable
Specifies the render table used for BulletinBoard's button descendants. Here's the lil scavenger hunt that happens if this value is NULL at initialization:
- The parent hierarchy of the widget gets searched for an ancestor that holds the
XmQTspecifyRenderTabletrait. - If such an ancestor is found, the render table is initialized to the
XmBUTTON_RENDER_TABLEvalue of that ancestor widget. - If no such ancestor is found, the default is implementation dependent.
Refer to XmRenderTable(3) for more info on creating and structuring a render table. π
π XmNcancelButton
Specifies the widget ID of the Cancel button. BulletinBoard's subclasses that define a Cancel button are the ones who set this resource. And here's the tea: BulletinBoard does not directly provide any behavior for that button. It's just holding the ID, not doing the work. Not me expecting the base class to do everything π
π₯ XmNdefaultButton
Specifies the widget ID of the default button. Some BulletinBoard subclasses that define a default button set this resource.
BulletinBoard itself does the cool part: it defines translations and installs accelerators that activate that button when KActivate is pressed and the keyboard focus is not in another button. So like, hit the key, get the button. Periodt.
π XmNdefaultPosition
Controls the positioning of a DialogShell managing a BulletinBoard. Lowkey important context: if the BulletinBoard is not being managed by a DialogShell, this resource has no effect. Nothing. Nada.
- If
XmNdefaultPositionisTrue, theDialogShellwill center itself at the center of its own parent. For example, if the parent of theDialogShellis anApplicationShell, then the center of theDialogShellwill be at the same coordinates as the center of theApplicationShell. Math girlies rise π«Ά - If the
DialogShellbecomes unmapped (but stays managed) and then remapped, this resource has no influence on theDialogShell's position. Sorry babe, that ship has sailed. - If this resource is
False, theDialogShelldoes not automatically center itself.
π XmNdialogStyle
Indicates the dialog style associated with the BulletinBoard.
- If the parent of the BulletinBoard is a
DialogShell, the parent'sXmNmwmInputModeis set according to the value of this resource. - This resource can be set only if the BulletinBoard is unmanaged. Read that again. π’
Possible values for this resource include the following:
XmDIALOG_SYSTEM_MODALβ Used for dialogs that must be responded to before any other interaction in any application.XmDIALOG_PRIMARY_APPLICATION_MODALβ Used for dialogs that must be responded to before some other interactions in ancestors of the widget.XmDIALOG_APPLICATION_MODALβ Used for dialogs that must be responded to before some other interactions in ancestors of the widget. This value is the same asXmDIALOG_PRIMARY_APPLICATION_MODAL, and remains for compatibility. (Legacy icon behavior, we respect it π )XmDIALOG_FULL_APPLICATION_MODALβ Used for dialogs that must be responded to before some other interactions in the same application.XmDIALOG_MODELESSβ Used for dialogs that do not interrupt interaction of any application. This is the default when the parent of the BulletinBoard is aDialogShell.XmDIALOG_WORK_AREAβ Used for BulletinBoard widgets whose parents are notDialogShells.XmNdialogStyleis forced to have this value when the parent of the BulletinBoard is not aDialogShell.
β οΈ Okay serious moment, no cap: posting a modal dialog in response to a button down or key down event (via translation actions or callbacks) can cause the corresponding button up or key up event to be lost. For example, posting a modal dialog from anXmNincrementCallbackofXmScrollBarwill cause the loss of the button up event, causing theXmScrollBarto auto-increment indefinitely. It's giving runaway scrollbar. Do not do this. π
π XmNdialogTitle
Specifies the dialog title. If this resource is not NULL, and the parent of the BulletinBoard is a subclass of WMShell, BulletinBoard sets the XmNtitle and XmNtitleEncoding of its parent.
Now the encoding detective work:
- If the only character set in
XmNdialogTitleisISO8859-1,XmNtitleis set to the string of the title, andXmNtitleEncodingis set toSTRING. - If
XmNdialogTitlecontains character sets other thanISO8859-1,XmNtitleis set to the string of the title converted to a compound text string, andXmNtitleEncodingis set toCOMPOUND_TEXT.
The direction of the title is based on the XmNlayoutDirection resource of the widget. Global girly behavior β¨
π§ XmNfocusCallback
Specifies the list of callbacks that is called when the BulletinBoard widget or one of its descendants accepts the input focus. The callback reason is XmCR_FOCUS. So not just the main character β the whole friend group counts.
π XmNlabelFontList
Specifies the font list used for label descendants. See the XmNlabelRenderTable resource, bestie.
π XmNlabelRenderTable
Specifies the render table used for BulletinBoard's label descendants. Same lil scavenger hunt as the button one:
- If this value is
NULLat initialization, the parent hierarchy of the widget is searched for an ancestor that holds theXmQTspecifyRenderTabletrait. - If such an ancestor is found, the render table is initialized to the
XmLABEL_RENDER_TABLEvalue of that ancestor widget. - If no such ancestor is found, the default is implementation dependent.
Refer to XmRenderTable(3) for more info on the creation and structure of a render table. π
π XmNmapCallback
Specifies the list of callbacks that is called only when the parent of the BulletinBoard is a DialogShell. In this case, this callback list is invoked when the BulletinBoard widget is mapped. The callback reason is XmCR_MAP.
Fun fact for the lore: DialogShells are usually mapped when the DialogShell is managed. The way that's a whole dependency chain π
π XmNmarginHeight
Specifies the minimum spacing in pixels between the top or bottom edge of BulletinBoard and any child widget. Personal space, but for widgets. Respected. π«Ά
π XmNmarginWidth
Specifies the minimum spacing in pixels between the left or right edge of BulletinBoard and any child widget. The horizontal twin of XmNmarginHeight. Matching set, iconic.
π¦ XmNnoResize
Controls whether or not resize controls are included in the window manager frame around the BulletinBoard's parent.
- If this resource is set to
True,mwmdoes not include resize controls in the window manager frame containing the parent of the BulletinBoard, if the parent is a subclass ofVendorShell. - If this resource is set to
False, the window manager frame does include resize controls.
Other controls provided by mwm can be included or excluded through the mwm resources provided by VendorShell. So like, this one's just about resize specifically, don't come for the others π
β¨ XmNresizePolicy
Controls the policy for resizing BulletinBoard widgets. Possible values include:
XmRESIZE_NONEβ Fixed size. Immovable. Unbothered. Locked in.XmRESIZE_ANYβ Shrink or grow as needed. Flexible queen.XmRESIZE_GROWβ Grow only. Never shrink. Boundaries are healthy.
π₯ XmNshadowType
Describes the shadow drawing style for BulletinBoard. This resource can have the following values:
XmSHADOW_INβ Draws the BulletinBoard shadow so that it appears inset. This means that the bottom shadow visuals and top shadow visuals are reversed. Sneaky lil flip.XmSHADOW_OUTβ Draws the BulletinBoard shadow so that it appears outset.XmSHADOW_ETCHED_INβ Draws the BulletinBoard shadow using a double line, giving the effect of a line etched into the window, similar to theSeparatorwidget.XmSHADOW_ETCHED_OUTβ Draws the BulletinBoard shadow using a double line, giving the effect of a line coming out of the window, similar to theSeparatorwidget.
π XmNtextFontList
Specifies the font list used for text descendants. See the XmNtextRenderTable resource. You know the drill by now, bestie.
πΈ XmNtextRenderTable
Specifies the render table used for BulletinBoard's text descendants. One more time for the people in the back:
- If this value is
NULLat initialization, the parent hierarchy of the widget is searched for an ancestor that holds theXmQTspecifyRenderTabletrait. - If such an ancestor is found, the render table is initialized to the
XmTEXT_RENDER_TABLEvalue of that ancestor widget. - If no such ancestor is found, the default is implementation dependent.
Refer to XmRenderTable(3) for more info on the creation and structure of a render table. π
π§ XmNtextTranslations
It adds translations to any Text widget or Text widget subclass that is added as a child of BulletinBoard. Tiny resource, huge glow-up for your text children. β¨
XmNunmapCallbackβ okay so this one is so specific bestie. It's the list of callbacks that only fires when the parent of the BulletinBoard is aDialogShell. Like, only then. When that's the case, this callback list gets invoked the moment the BulletinBoard widget is unmapped. The callback reason isXmCR_UNMAP. And lowkey a fun fact: DialogShells are usually unmapped when the DialogShell is unmanaged. iykyk π
β¨ Inherited Resources β¨
BulletinBoard is literally that girl who inherited everything from her superclasses π«Ά β it picks up behavior and resources from the superclasses listed in the tables below. And if you want the full tea on any single resource, go read the reference page for that superclass, bestie.
π XmManager Resource Set π
XmNbottomShadowColorβ classXmCBottomShadowColor, typePixel, defaultdynamic, accessCSGXmNbottomShadowPixmapβ classXmCBottomShadowPixmap, typePixmap, defaultXmUNSPECIFIED_PIXMAP, accessCSGXmNforegroundβ classXmCForeground, typePixel, defaultdynamic, accessCSGXmNhelpCallbackβ classXmCCallback, typeXtCallbackList, defaultNULL, accessCXmNhighlightColorβ classXmCHighlightColor, typePixel, defaultdynamic, accessCSGXmNhighlightPixmapβ classXmCHighlightPixmap, typePixmap, defaultdynamic, accessCSGXmNinitialFocusβ classXmCInitialFocus, typeWidget, defaultdynamic, accessCSGXmNlayoutDirectionβ classXmCLayoutDirection, typeXmDirection, defaultdynamic, accessCGXmNnavigationTypeβ classXmCNavigationType, typeXmNavigationType, defaultXmTAB_GROUP, accessCSGXmNpopupHandlerCallbackβ classXmCCallback, typeXtCallbackList, defaultNULL, accessCXmNshadowThicknessβ classXmCShadowThickness, typeDimension, defaultdynamic, accessCSGXmNstringDirectionβ classXmCStringDirection, typeXmStringDirection, defaultdynamic, accessCGXmNtopShadowColorβ classXmCTopShadowColor, typePixel, defaultdynamic, accessCSGXmNtopShadowPixmapβ classXmCTopShadowPixmap, typePixmap, defaultdynamic, accessCSGXmNtraversalOnβ classXmCTraversalOn, typeBoolean, defaultTrue, accessCSGXmNunitTypeβ classXmCUnitType, typeunsigned char, defaultdynamic, accessCSGXmNuserDataβ classXmCUserData, typeXtPointer, defaultNULL, accessCSG
π¦ Composite Resource Set π¦
XmNchildrenβ classXmCReadOnly, typeWidgetList, defaultNULL, accessGXmNinsertPositionβ classXmCInsertPosition, typeXtOrderProc, defaultNULL, accessCSGXmNnumChildrenβ classXmCReadOnly, typeCardinal, default0, accessG
ngl bestie, notice the access codes do NOT all match β some areCSG, some areCG, some are justCorG. That's not a typo, that's canon. π
π¦ Core Resource Set π¦
okay bestie, here's the whole glow-up menu of resources this widget inherits-slash-rocks. Every single one, no skipping, we don't do that here π
XmNacceleratorsβ classXmCAccelerators, typeXtAccelerators, defaultdynamic, accessN/AXmNancestorSensitiveβ classXmCSensitive, typeBoolean, defaultdynamic, accessGXmNbackgroundβ classXmCBackground, typePixel, defaultdynamic, accessCSGXmNbackgroundPixmapβ classXmCPixmap, typePixmap, defaultXmUNSPECIFIED_PIXMAP, accessCSGXmNborderColorβ classXmCBorderColor, typePixel, defaultXtDefaultForeground, accessCSGXmNborderPixmapβ classXmCPixmap, typePixmap, defaultXmUNSPECIFIED_PIXMAP, accessCSGXmNborderWidthβ classXmCBorderWidth, typeDimension, default0, accessCSGXmNcolormapβ classXmCColormap, typeColormap, defaultdynamic, accessCGXmNdepthβ classXmCDepth, typeint, defaultdynamic, accessCGXmNdestroyCallbackβ classXmCCallback, typeXtCallbackList, defaultNULL, accessCXmNheightβ classXmCHeight, typeDimension, defaultdynamic, accessCSGXmNinitialResourcesPersistentβ classXmCInitialResourcesPersistent, typeBoolean, defaultTrue, accessCXmNmappedWhenManagedβ classXmCMappedWhenManaged, typeBoolean, defaultTrue, accessCSGXmNscreenβ classXmCScreen, typeScreen *, defaultdynamic, accessCGXmNsensitiveβ classXmCSensitive, typeBoolean, defaultTrue, accessCSGXmNtranslationsβ classXmCTranslations, typeXtTranslations, defaultdynamic, accessCSGXmNwidthβ classXmCWidth, typeDimension, defaultdynamic, accessCSGXmNxβ classXmCPosition, typePosition, default0, accessCSGXmNyβ classXmCPosition, typePosition, default0, accessCSG
that's nineteen resources, count them, they're all there, we're so thorough it's giving studious πβ¨
π Callback Information π
so when a callback fires, this lil pointer gets handed to it. it's the same struct every time, no cap:
typedef struct
{
int reason;
XEvent * event;
} XmAnyCallbackStruct;
reasonβ spills the tea on why the callback got invoked in the first place π«eventβ points at theXEventthat triggered the callback, the whole origin story
πΈ Translations πΈ
XmBulletinBoard includes the translations from XmManager. that's it, that's the sentence, it's a hand-me-down situation and honestly? iconic. inheritance slay
π₯ Additional Behavior π₯
the XmBulletinBoard widget has some extra moves of its own, and here's the full list bestie:
<Key><osfCancel>: Calls the activate callbacks for the cancel button if it is sensitive. And if there's literally no cancel button and the parent of the BulletinBoard is a manager? Then it passes the event up to the parent. passing the buck, respectfully<Key><osfActivate>: Calls the activate callbacks for the button with the keyboard focus. But if no button has the keyboard focus, it calls the activate callbacks for the default button if it is sensitive. And here's the sneaky detail β in a List widget or a single-line Text widget, the List or Text action associated with<Key><osfActivate>gets called before the BulletinBoard actions associated with<Key><osfActivate>. order matters, no cutting the line π«
ngl the List/Text precedence thing is exactly the kind of fine print that'll have you staring at a stack trace at 2am wondering why your default button did nothing. it's not a bug, it's documented behavior, bestie π
<Key><osfActivate>(inside a multilineTextwidget) β okay so any<Key><osfActivate>event except<Key><Enter>does a whole little relay race: it calls theTextaction associated with<Key><osfActivate>, and then it calls the BulletinBoard actions associated with<Key><osfActivate>. And if no button has the focus, and there's no default button, and the parent of the BulletinBoard is a manager? It hands the event off to the parent. Passing the aux cord, respectfully. π§<FocusIn>β calls the callbacks forXmNfocusCallback. When the focus policy isXmPOINTER, those callbacks fire when the pointer enters the window. When the focus policy isXmEXPLICIT, they fire when the user traverses to the widget. Two doors, same glow-up. β¨<Map>β calls the callbacks forXmNmapCallback. π<Unmap>β calls the callbacks forXmNunmapCallback. π
π¦ Virtual Bindings π¦
Bestie, listen β the bindings for virtual keys are vendor specific. No universal lore, it's giving "every platform wrote its own fanfic." π
For the info on bindings for virtual buttons and keys, go see VirtualBindings(3). That's the source of truth, iykyk. π
π RELATED π
The whole friend group, in alphabetical-ish order:
Composite(3)Constraint(3)Core(3)XmCreateBulletinBoard(3)XmCreateBulletinBoardDialog(3)XmDialogShell(3)XmManager(3)XmVaCreateBulletinBoard(3)- and
XmVaCreateManagedBulletinBoard(3)
and that's the whole page, bestie!! π«Ά you made it to the end of XmBulletinBoard(library call) β yes it's a library call, that's the source/version tea, and this is where the page signs off. no date on this one, just the vibe. go build something iconic with it, mwah π
ππΈ
π¦ where this page comes from
- alpine 3.24: motif-doc 2.5.2-r0 Β· LGPL-2.1-or-later
- arch rolling: openmotif 2.3.8-4 Β· LGPL-2.1-or-later
- centos-stream 9: motif-devel 2.3.4-32.el9 Β· LGPLv2+
- centos-stream 9: motif-devel 2.3.4-32.el9 Β· LGPLv2+
- epel 10: motif-devel 2.3.8-2.el10_2 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-1.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-1.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-2.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-2.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 44: motif-devel 2.3.8-3.fc44 Β· LicenseRef-Callaway-LGPLv2+
- fedora 44: motif-devel 2.3.8-3.fc44 Β· LicenseRef-Callaway-LGPLv2+
- nixos 26.05: motif 2.3.8
- nixpkgs unstable: motif 2.3.8
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms