XMARROWBUTTONGADGET(3)
π XmArrowButtonGadget β the ArrowButtonGadget widget class π
okay so bestie, welcome to XmArrowButtonGadget(library call) β yes that's the manual page name, yes it's a mouthful, we're gonna get through it together π«Ά
β¨ NAME β¨
XmArrowButtonGadget β literally The ArrowButtonGadget widget class. that's it. that's the name. iconic behavior honestly π
π SYNOPSIS π
#include <Xm/ArrowBG.h>
π¦ DESCRIPTION π¦
so picture this: an ArrowButtonGadget is a directional arrow, right, and it's surrounded by a border shadow. that's the whole vibe. π
when it gets selected, the shadow changes so it looks like the ArrowButtonGadget has been pressed in. when it's unselected, the shadow reverts and it looks like the button is released, or out. the glow-up and the glow-down, basically. π
ArrowButtonGadget holds the XmQTactivatable trait. noted. important. don't forget it.
π― Classes
ArrowButtonGadget inherits behavior, resources, and traits from the Object, RectObj, and XmGadget classes. it's giving nepo baby but make it inheritance hierarchy, and honestly? slay.
- The class pointer is
xmArrowButtonGadgetClass. - The class name is
XmArrowButtonGadget.
β New Resources β
okay so the following table defines a set of widget resources used by the programmer to specify data. (yes i said table, we're doing it as a list because terminal, bear with me, all the info is here fr fr.)
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).
πΈ XmArrowButtonGadget Resource Set πΈ
XmNactivateCallbackβ Class:XmCCallbackΒ· Type:XtCallbackListΒ· Default:NULLΒ· Access:CXmNarmCallbackβ Class:XmCCallbackΒ· Type:XtCallbackListΒ· Default:NULLΒ· Access:CXmNarrowDirectionβ Class:XmCArrowDirectionΒ· Type:unsigned charΒ· Default:XmARROW_UPΒ· Access:CSGXmNdetailShadowThicknessβ Class:XmCDetailShadowThicknessΒ· Type:DimensionΒ· Default:2Β· Access:CSGXmNdisarmCallbackβ Class:XmCCallbackΒ· Type:XtCallbackListΒ· Default:NULLΒ· Access:CXmNmultiClickβ Class:XmCMultiClickΒ· Type:unsigned charΒ· Default:dynamicΒ· Access:CSG
π XmNactivateCallback
specifies a list of callbacks that is called when the ArrowButtonGadget is activated. to activate the button, press and release BSelect while the pointer is inside the ArrowButtonGadget. activating the ArrowButtonGadget also disarms it. the reason sent by this callback is XmCR_ACTIVATE. this callback uses the XmQTactivatable trait. π«
π XmNarmCallback
specifies a list of callbacks that is called when the ArrowButtonGadget is armed. to arm this widget, press BSelect while the pointer is inside the ArrowButtonGadget. the reason sent by this callback is XmCR_ARM.
π₯ XmNarrowDirection
sets the arrow direction. the values for this resource are
XmARROW_UPXmARROW_DOWNXmARROW_LEFTXmARROW_RIGHT
pick your fighter. π
π XmNdetailShadowThickness
specifies the thickness of the inside arrow shadows. the default thickness is 2 pixels. tiny but mighty.
π XmNdisarmCallback
specifies a list of callbacks that is called when the ArrowButtonGadget is disarmed. to disarm this widget, press and release BSelect while the pointer is inside the ArrowButtonGadget. the reason sent by this callback is XmCR_DISARM.
π XmNmultiClick
okay so if a button click is followed by another button click within the time span specified by the display's multiclick time and this resource is set to XmMULTICLICK_DISCARD, the second click is not processed. if this resource is set to XmMULTICLICK_KEEP, the event is processed and click_count is incremented in the callback structure. when the ArrowButtonGadget is not in a menu, the default value is XmMULTICLICK_KEEP.
no cap: XmMULTICLICK_DISCARD means that second click just gets ghosted π the event does not go through. choose wisely.
π§ Inherited Resources π§
XmArrowButtonGadget 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. (iykyk β the tables live on in the pages for those superclasses, go read those bestie, they're the whole lore) π
π XmGadget Resource Set π
okay bestie, before we even get to the arrow-button-specific stuff, every gadget inherits a whole mountain of resources from its ancestors. here's the XmGadget set β all of it, no skipping, no cap:
XmNbackgroundβ classXmCBackground, typePixel, defaultdynamic, accessCSG. the canvas behind everything π¨XmNbackgroundPixmapβ classXmCPixmap, typePixmap, defaultXmUNSPECIFIED_PIXMAP, accessCSG. wallpaper instead of a flat colour β¨XmNbottomShadowColorβ classXmCBottomShadowColor, typePixel, defaultdynamic, accessCSG. the bottom shadow's whole vibe πXmNbottomShadowPixmapβ classXmCBottomShadowPixmap, typePixmap, defaultdynamic, accessCSG. same energy, but as a pixmap π¦XmNhelpCallbackβ classXmCCallback, typeXtCallbackList, defaultNULL, accessC. your help-me callback π«ΆXmNforegroundβ classXmCForeground, typePixel, defaultdynamic, accessCSG. the ink, the front colour, the moment ποΈXmNhighlightColorβ classXmCHighlightColor, typePixel, defaultdynamic, accessCSGXmNhighlightOnEnterβ classXmCHighlightOnEnter, typeBoolean, defaultFalse, accessCSGXmNhighlightPixmapβ classXmCHighlightPixmap, typePixmap, defaultdynamic, accessCSGXmNhighlightThicknessβ classXmCHighlightThickness, typeDimension, default2, accessCSGXmNlayoutDirectionβ classXmNCLayoutDirection, typeXmDirection, defaultdynamic, accessCG. and yes, the class is spelled exactly like that, type it character for character, don't get creative πXmNnavigationTypeβ classXmCNavigationType, typeXmNavigationType, defaultXmNONE, accessCSGXmNshadowThicknessβ classXmCShadowThickness, typeDimension, default2, accessCSGXmNtopShadowColorβ classXmCTopShadowColor, typePixel, defaultdynamic, accessCSG. top shadow, but make it colour πXmNtopShadowPixmapβ classXmCTopShadowPixmap, typePixmap, defaultdynamic, accessCSG. top shadow, but make it a pixmap πΈXmNtraversalOnβ classXmCTraversalOn, typeBoolean, defaultTrue, accessCSGXmNunitTypeβ classXmCUnitType, typeunsigned char, defaultdynamic, accessCSGXmNuserDataβ classXmCUserData, typeXtPointer, defaultNULL, accessCSG. your personal lil stash, put whatever you want in there π
π RectObj Resource Set π
and underneath that there's the RectObj set β the geometry girlies. every one of these, coming right up π
XmNancestorSensitiveβ classXmCSensitive, typeBoolean, defaultdynamic, accessGXmNborderWidthβ classXmCBorderWidth, typeDimension, default0, accessN/AXmNheightβ classXmCHeight, typeDimension, defaultdynamic, accessCSGXmNsensitiveβ classXmCSensitive, typeBoolean, defaultTrue, accessCSGXmNwidthβ classXmCWidth, typeDimension, defaultdynamic, accessCSGXmNxβ classXmCPosition, typePosition, default0, accessCSGXmNyβ classXmCPosition, typePosition, default0, accessCSG
lowkey obsessed with how tidy that list is π and we are so not done yet β
okay so last chunk of the resource table, and it is tiny β literally one entry, we love a low-effort slay π
Object Resource Set
XmNdestroyCallbackβ classXmCCallback, typeXtCallbackList, defaultNULL, accessC. That's it, that's the whole set, bestie π
πΈ Callback Information πΈ
Every callback gets handed a pointer to this exact lil struct, no cap:
typedef struct
{
int reason;
XEvent * event;
int click_count;
} XmArrowButtonCallbackStruct;
reasonβ spills the tea on why the callback got invoked in the first place.eventβ points at theXEventthat triggered the whole thing.click_countβ heads up, this one only means anything whenreasonisXmCR_ACTIVATE. It holds the number of clicks in the last multiclick sequence ifXmNmultiClickis set toXmMULTICLICK_KEEPβ otherwise it's just1. And lowkey important: ifXmNmultiClickisXmMULTICLICK_KEEP, the activate callback fires for every single click, not just once.
π¦ Behavior π¦
XmArrowButtonGadget inherits its whole vibe from XmGadget, obviously. But here's the extra stuff it does on its own:
<Btn1Down>β draws the shadow in the selected state and calls the callbacks forXmNarmCallback. It's giving "I'm armed and ready" energy π€<Btn1Down>or<Btn1Up>β draws the shadow in the unselected state. If the pointer is within theArrowButtonGadget, it calls the callbacks forXmNactivateCallback. Also calls the callbacks forXmNdisarmCallback.<Btn1Down>(2+)β ifXmNmultiClickisXmMULTICLICK_DISCARD, this action does absolutely nothing, fr. IfXmNmultiClickisXmMULTICLICK_KEEP, it draws the shadow in the selected state and calls the callbacks forXmNarmCallback.<Btn1Up>(2+)β ifXmNmultiClickisXmMULTICLICK_DISCARD, again, this action does nothing. IfXmNmultiClickisXmMULTICLICK_KEEP, this action incrementsclick_countin the callback structure and draws the shadow in the unselected state. And if the pointer is within theArrowButtonGadget, it calls the callbacks forXmNactivateCallbackandXmNdisarmCallback.<Key><osfSelect>β draws the shadow in the selected state and calls the callbacks forXmNarmCallback. It also arranges for the shadow to be drawn in the unselected state, plus the callbacks forXmNactivateCallbackandXmNdisarmCallbackto get called β either immediately or at a later time. whenever it feels like it, iconic behavior β¨<Key><osfHelp>β calls the callbacks forXmNhelpCallbackif any exist. If there are no help callbacks for this widget, this action goes and calls the help callbacks for the nearest ancestor that has them. passing the aux cord up the family tree π«Ά<Enter>β draws theArrowButtonGadgetshadow in its selected state if the pointer leaves and re-enters the gadget while<Btn1>is pressed.<Leave>β draws theArrowButtonGadgetshadow in its unselected state if the pointer leaves the gadget while<Btn1>is pressed.
π§ Virtual Bindings π§
The bindings for virtual keys are vendor specific β so it's a "your mileage may vary, ask your vendor" situation, ngl. For information about bindings for virtual buttons and keys, see VirtualBindings(3).
β RELATED β
The squad, the crew, the whole friend group π
Object(3)RectObj(3)XmCreateArrowButtonGadget(3)XmGadget(3)XmVaCreateArrowButtonGadget(3)XmVaCreateManagedArrowButtonGadget(3)
and that's a wrap on XmArrowButtonGadget(library call) β straight out of the library-call corner of the Motif man pages, with its date and version living down at the bottom of the page. go forth and arrow-button, bestie, you ate π
πβ¨
π¦ 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