DTMENUBUTTON(3)
π NAME π
okay so this is DtMenuButton(3) β the DtMenuButton(library call) page, and the official name is DtMenuButton β the MenuButton widget class. Sheβs giving main character widget energy, fr fr π.
β¨ SYNOPSIS β¨
Include this and youβre seated, bestie:
#include &<Dt/MenuButton.h>
π¦ DESCRIPTION π¦
okay so picture this: DtMenuButton is a command widget that complements the menu cascading functionality of an XmCascadeButton widget. As a complement to the XmCascadeButton widget, DtMenuButton can only be instantiated outside a MenuPane; the application must use XmCascadeButton widget inside a MenuPane. Thatβs the rule, no cap π«Ά.
The DtMenuButton widget belongs to a subclass of the XmLabel class. Visually, the DtMenuButton widget consists of a label string and a menu glyph. The menu glyph always appears on the right end of the widget and, by default, is a downward pointing arrow. Cute, consistent, iconic β¨.
The DtMenuButton widget has an implicitly created submenu attached to it. The submenu Caretis a popup MenuPane and has this DtMenuButton widget as its parent. The name of the implicitly created submenu is obtained by adding submenu_ as a prefix to the name of this DtMenuButton widget. The widget ID of the submenu can be obtained by doing an XtGetValues on the DtNsubMenuId resource of this DtMenuButton widget. The implicitly created submenu must not be destroyed by the user of this widget. Do not do it. Put the destroy down π.
The submenu can be popped up by pressing the menu post Button (see the XmNmenuPost resource of the XmRowColumn(3) widget) anywhere on the DtMenuButton widget.
Widget subclassing is not supported for the DtMenuButton widget class. Periodt.
Classes π«Ά
The DtMenuButton widget inherits behavior and resources from the Core, Composite, XmPrimitive and XmLabel classes.
- The class pointer is
dtMenuButtonWidgetClass. - The class name is
DtMenuButtonWidget.
New Resources π
The following table defines a set of widget resources used by the application to specify data. The application 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, the application must remove the DtN or DtC prefix and use the remaining letters. To specify one of the defined values for a resource in a .Xdefaults file, the application must remove the Dt prefix and use the remaining letters (in either lower case or upper case, but including 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). Access-code vibe check: keep it exact, bestie π
.
DtMenuButton Resource Set π
DtNcascadingCallbackβ classDtCCallback, typeXtCallbackList, defaultNULL, accessC. Specifies the list of callbacks that is called before the popping up of the attached submenu. The reason for the callback isDtCR_CASCADING.DtNcascadePixmapβ classDtCPixmap, typePixmap, defaultXmUNSPECIFIED_PIXMAP, accessCSG. Specifies the pixmap displayed as the menu glyph. If no pixmap is specified, a downward pointing arrow is displayed.DtNsubMenuIdβ classDtCMenuWidget, typeWidget, defaultNULL, accessSG. Specifies the widget ID of the popupMenuPaneto be associated with thisDtMenuButtonwidget. The popupMenuPanemust be created with thisDtMenuButtonas its parent. This resource cannot be specified at the time of widget creation. The implicit submenu is automatically destroyed byDtMenuButtonwhen this resource is set.
Source-table layout crumb, for the detail gremlins: tgroup dispwid="7.78in" β not a resource, just formatting glitter.
Inherited Resources πΈ
The DtMenuButton widget inherits behavior and resources from the following named superclasses. For a complete description of each resource, see the man page for that superclass.
XmLabel Resource Set π
XmNacceleratorβ classXmCAccelerator, typeString, defaultNULL, accessCSG.XmNacceleratorTextβ classXmCAcceleratorText, typeXmString, defaultNULL, accessCSG.XmNalignmentβ classXmCAlignment, typeunsigned char, defaultdynamic, accessCSG.XmNfontListβ classXmCFontList, typeXmFontList, defaultdynamic, accessCSG.XmNlabelInsensitivePixmapβ classXmCLabelInsensitivePixmap, typePixmap, defaultXmUNSPECIFIED_PIXMAP, accessCSG.XmNlabelPixmapβ classXmCLabelPixmap, typePixmap, defaultXmUNSPECIFIED_PIXMAP, accessCSG.XmNlabelStringβ classXmCXmString, typeXmString, defaultdynamic, accessCSG.XmNlabelTypeβ classXmCLabelType, typeunsigned char, defaultXmSTRING, accessCSG.XmNmarginBottomβ classXmCMarginBottom, typeDimension, default0, accessCSG.XmNmarginHeightβ classXmCMarginHeight, typeDimension, default2, accessCSG.XmNmarginLeftβ classXmCMarginLeft, typeDimension, default0, accessCSG.XmNmarginRightβ classXmCMarginRight, typeDimension, default0, accessCSG.XmNmarginTopβ classXmCMarginTop, typeDimension, default0, accessCSG.XmNmarginWidthβ classXmCMarginWidth, typeDimension, default2, accessCSG.XmNmnemonicβ classXmCMnemonic, typeKeySym, defaultNULL, accessCSG.XmNmnemonicCharSetβ classXmCMnemonicCharSet, typeString, defaultXmFONTLIST-_DEFAULT_TAG, accessCSG.XmNrecomputeSizeβ classXmCRecomputeSize, typeBoolean, defaultTrue, accessCSG.XmNstringDirectionβ classXmCStringDirection, typeXmStringDirection, defaultdynamic, accessCSG.
Source-table layout crumb: tgroup dispwid="7.84in" β still just formatting, not a resource.
XmPrimitive Resource Set π¦
XmNbottomShadowColorβ classXmCBottomShadowColor, typePixel, defaultdynamic, accessCSG.XmNbottomShadowPixmapβ classXmCBottomShadowPixmap, typePixmap, defaultXmUNSPECIFIED_PIXMAP, accessCSG.XmNforegroundβ classXmCForeground, typePixel, defaultdynamic, accessCSG.XmNhelpCallbackβ classXmCCallback, typeXtCallbackList, defaultNULL, accessC.XmNhighlightColorβ classXmCHighlightColor, typePixel, defaultdynamic, accessCSG.XmNhighlightOnEnterβ classXmCHighlightOnEnter, typeBoolean, defaultFalse, accessCSG.XmNhighlightPixmapβ classXmCHighlightPixmap, typePixmap, defaultdynamic, accessCSG.XmNhighlightThicknessβ classXmCHighlightThickness, typeDimension, default0, accessCSG.XmNnavigationTypeβ classXmCNavigationType, typeXmNavigationType, defaultXmNONE, accessCSG.XmNshadowThicknessβ classXmCShadowThickness, typeDimension, default0, accessCSG.XmNtopShadowColorβ classXmCTopShadowColor, typePixel, defaultdynamic, accessCSG.XmNtopShadowPixmapβ classXmCTopShadowPixmap, typePixmap, defaultdynamic, accessCSG.XmNtraversalOnβ classXmCTraversalOn, typeBoolean, defaultFalse, accessCSG.XmNunitTypeβ classXmCUnitType, typeunsigned char, defaultdynamic, accessCSG.XmNuserDataβ classXmCUserData, typeXtPointer, defaultNULL, accessCSG.
Source-table layout crumb: tgroup dispwid="7.93in" β table glue, not widget behavior.
Core Resource Set π
XmNacceleratorsβ classXmCAccelerators, typeXtAccelerators, defaultdynamic, accessCSG.XmNancestorSensitiveβ classXmCSensitive, typeBoolean, defaultdynamic, accessG.XmNbackgroundβ classXmCBackground, typePixel, defaultdynamic, accessCSG.XmNbackgroundPixmapβ classXmCPixmap, typePixmap, defaultXmUNSPECIFIED_PIXMAP, accessCSG.XmNborderColorβ classXmCBorderColor, typePixel, defaultXtDefaultForeground, accessCSG.XmNborderPixmapβ classXmCPixmap, typePixmap, defaultXmUNSPECIFIED_PIXMAP, accessCSG.XmNborderWidthβ classXmCBorderWidth, typeDimension, default0, accessCSG.XmNcolormapβ classXmCColormap, typeColormap, defaultdynamic, accessCG.XmNdepthβ classXmCDepth, typeint, defaultdynamic, accessCG.XmNdestroyCallbackβ classXmCCallback, typeXtCallbackList, defaultNULL, accessC.XmNheightβ classXmCHeight, typeDimension, defaultdynamic, accessCSG.XmNinitialResourcesPersistentβ classXmCInitialResourcesPersistent, typeBoolean, defaultTrue, accessC.XmNmappedWhenManagedβ classXmCMappedWhenManaged, typeBoolean, defaultTrue, accessCSG.XmNscreenβ classXmCScreen, typeScreen *, defaultdynamic, accessCG.XmNsensitiveβ classXmCSensitive, typeBoolean, defaultTrue, accessCSG.XmNtranslationsβ classXmCTranslations, typeXtTranslations, defaultdynamic, accessCSG.XmNwidthβ classXmCWidth, typeDimension, defaultdynamic, accessCSG.XmNxβ classXmCPosition, typePosition, default0, accessCSG.XmNyβ classXmCPosition, typePosition, default0, accessCSG.
Source-table layout crumb: tgroup dispwid="7.85in" β just the tableβs little outfit, not a resource.
Callback Information π
A pointer to the following structure is passed to each DtMenuButton callback:
typedef struct {
int reason;
XEvent *event;
} XmAnyCallbackStruct;
The reason argument indicates why the callback was invoked; it is always DtCR_CASCADING when the DtNcascadingCallback is issued.
The event argument points to the XEvent that triggered the callback or NULL if the callback was not triggered by an XEvent.
π SEE ALSO π
Go read these next, bestie β the whole friend group:
DtCreateMenuButton(3)Core(3)XmLabel(3)XmPrimitive(3)XmRowColumn(3)XtGetValues(3)XtSetValues(3)
Cute sign-off: this page is the DtMenuButton(library call) source/version line, and the footer did not print a date, so Iβm not inventing one β no cap, periodt π
π«Άβ¨
π¦ where this page comes from
- nixos 26.05: cde 2.5.3
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms