XMSIMPLESPINBOX(3)
hey bestie β welcome to the manual page for XmSimpleSpinBox, aka XmSimpleSpinBox(library call). This is part 1 of 2, so buckle up. π
β¨ NAME β¨
XmSimpleSpinBox β a simple SpinBox widget class
π¦ SYNOPSIS π¦
#include <Xm/SSpinB.h>
π DESCRIPTION π
The XmSimpleSpinBox widget is a user interface control that increments and decrements an arbitrary TextField. Like, imagine cycling through the months of the year or days of the month. It's giving "spin me right round" energy. β¨
Widget subclassing is not supported for the XmSimpleSpinBox widget class. No cap, bestie.
π Classes π
The XmSimpleSpinBox widget inherits behavior and resources from the Core, Composite and XmManager classes.
The class pointer is XmSimpleSpinBoxWidgetClass.
The class name is XmSimpleSpinBoxWidget.
π New Resources π
The following resource set 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 XmN or XmC 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 Xm 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).
π XmSimpleSpinBox Resource Set π
XmNarrowLayoutβ Class:XmCArrowLayoutΒ· Type:unsigned charΒ· Default:XmARROWS_ENDΒ· Access:CSGXmNarrowSensitivityβ Class:XmCArrowSensitivityΒ· Type:unsigned charΒ· Default:XmARROWS-_SENSITIVEΒ· Access:CSGXmNcolumnsβ Class:XmCColumnΒ· Type:shortΒ· Default:20Β· Access:CSGXmNdecimalPointsβ Class:XmCDecimalPointsΒ· Type:shortΒ· Default:0Β· Access:CSGXmNeditableβ Class:XmCEditableΒ· Type:BooleanΒ· Default:TrueΒ· Access:CSGXmNincrementValueβ Class:XmCIncrementValueΒ· Type:intΒ· Default:1Β· Access:CSGXmNinitialDelayβ Class:XmCInitialDelayΒ· Type:unsigned intΒ· Default:250Β· Access:CSGXmNmaximumValueβ Class:XmCMaximumValueΒ· Type:intΒ· Default:10Β· Access:CSGXmNminimumValueβ Class:XmCMinimumValueΒ· Type:intΒ· Default:0Β· Access:CSGXmNmodifyVerifyCallbackβ Class:XmCCallbackΒ· Type:XtCallbackListΒ· Default:NULLΒ· Access:CXmNnumValuesβ Class:XmCNumValuesΒ· Type:intΒ· Default:0Β· Access:CSGXmNpositionβ Class:XmCPositionΒ· Type:intΒ· Default:0Β· Access:CSGXmNrepeatDelayβ Class:XmCRepeatDelayΒ· Type:unsigned intΒ· Default:200Β· Access:CSGXmNspinBoxChildTypeβ Class:XmCSpinBoxChildTypeΒ· Type:unsigned charΒ· Default:XmSTRINGΒ· Access:CGXmNtextFieldβ Class:XmCTextFieldΒ· Type:WidgetΒ· Default:dynamicΒ· Access:GXmNvalueChangedCallbackβ Class:XmCCallbackΒ· Type:XtCallbackListΒ· Default:NULLΒ· Access:CXmNvaluesβ Class:XmCValuesΒ· Type:XmStringTableΒ· Default:NULLΒ· Access:CSG
π Resource Deets π
XmNarrowLayoutβ Specifies the style and position of the SpinBox arrows. The following values are supported:XmARROWS_FLAT_BEGINNINGβ The arrows are placed side by side to the right of the TextField.XmARROWS_FLAT_ENDβ The arrows are placed side by side to the left of the TextField.XmARROWS_SPLITβ The down arrow is on the left and the up arrow is on the right of the TextField.XmARROWS_BEGINNINGβ The arrows are stacked and placed on the left of the TextField.XmARROWS_ENDβ The arrows are stacked and placed on the right of the TextField.
XmNarrowSensitivityβ Specifies the sensitivity of the arrows in theXmSimpleSpinBox. The following values are supported:XmARROWS_SENSITIVEβ Both arrows are active to user selection.XmARROWS_DECREMENT_SENSITIVEβ The down arrow is active and the up arrow is inactive to user selection.XmARROWS_INCREMENT_SENSITIVEβ The up arrow is active and the down arrow is inactive to user selection.XmARROWS_INSENSITIVEβ Both arrows are inactive to user selection.
XmNcolumnsβ Specifies the number of columns of the text field.XmNdecimalPointsβ Specifies the position of the radix character within the numeric value whenXmNspinBoxChildTypeisXmNUMERIC. This resource is used to allow for floating point values in theXmSimpleSpinBoxwidget.XmNeditableβ Specifies whether the text field can take input.
When XmNeditable is used on a widget it sets the dropsite to XmDROP_SITE_ACTIVE.
XmNincrementValueβ Specifies the amount to increment or decrement theXmNpositionwhen theXmNspinBoxChildTypeisXmNUMERIC. When the Up action is activated, theXmNincrementValueis added to theXmNpositionvalue; when the Down action is activated, theXmNincrementValueis subtracted from theXmNpositionvalue. WhenXmNspinBoxChildTypeisXmSTRING, this resource is ignored.XmNinitialDelayβ Specifies the amount of time in milliseconds before the Arrow buttons will begin to spin continuously.XmNnumValuesβ Specifies the number of items in theXmNvalueslist when theXmNspinBoxChildTyperesource isXmSTRING. The value of this resource must be a positive integer. TheXmNnumValuesis maintained by theXmSimpleSpinBoxwidget when items are added or deleted from theXmNvalueslist. WhenXmNspinBoxChildTypeis notXmSTRING, this resource is ignored.XmNvaluesβ Supplies the list of strings to cycle through when theXmNspinButtonChildTyperesource isXmSTRING. WhenXmNspinBoxChildTypeis notXmSTRING, this resource is ignored.XmNmaximumValueβ Specifies the upper bound on theXmSimpleSpinBox's range whenXmNspinBoxChildTypeisXmNUMERIC.XmNminimumValueβ Specifies the lower bound on theXmSimpleSpinBox's range whenXmNspinBoxChildTypeisXmNUMERIC.XmNmodifyVerifyCallbackβ Specifies the callback to be invoked just before theXmSimpleSpinBoxposition changes. The application can use this callback to implement new application-related logic (including setting new position spinning to, or canceling the impending action). For example, this callback can be used to stop the spinning just before wrapping at the upper and lower position boundaries. If the application sets thedoitmember of theXmSimpleSpinBoxCallbackStructtoFalse, nothing happens. Otherwise, the position changes. Reasons sent by the callback areXmCR_SPIN_NEXT, orXmCR_SPIN_PRIOR.XmNpositionβ TheXmNpositionresource has a different value based on theXmNspinBoxChildTyperesource. WhenXmNspinBoxChildTypeisXmSTRING, theXmNpositionis the index into theXmNvalueslist for the current item. When theXmNspinBoxChildTyperesource isXmNUMERIC, theXmNpositionis the integer value of theXmSimpleSpinBoxthat falls within the range ofXmNmaximumValueandXmNminimumValue.XmNrepeatDelayβ Specifies the number of milliseconds between repeated calls to theXmNvalueChangedCallbackwhile the user is spinning theXmSimpleSpinBox.XmNspinBoxChildTypeβ Specifies the style of theXmSimpleSpinBox. The following values are supported:XmSTRINGβ The child is a string value that is specified through theXmNvaluesresource and incremented and decremented by changing theXmNpositionresource.XmNUMERICβ The child is a numeric value that is specified through theXmNpositionresource and incremented according to theXmNincrementValueresource.
XmtextFieldβ Specifies the textfield widget.XmNvalueChangedCallbackβ Specifies the callback to be invoked whenever the value of theXmNpositionresource is changed through the use of the spinner arrows. TheXmNvalueChangedCallbackpasses theXmSimpleSpinBoxCallbackStructcall_data structure.
π« Inherited Resources π«
okay so XmSimpleSpinBox doesn't just spawn out of nowhere β it inherits behavior and resources from these named superclasses. for the full tea on each resource, go read the man page for that superclass. periodt. π
πΈ 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, defaultNULL, accessCSGXmNnavigationTypeβ classXmCNavigationType, typeXmNavigationType, defaultdynamic, accessCSGXmNshadowThicknessβ classXmCShadowThickness, typeDimension, defaultdynamic, accessCSGXmNstringDirectionβ classXmCStringDirection, typeXmStringDirection, defaultdynamic, accessCGXmNtopShadowColorβ classXmCTopShadowColor, typePixel, defaultdynamic, accessCSGXmNtopShadowPixmapβ classXmCTopShadowPixmap, typePixmap, defaultdynamic, accessCSGXmNtraversalOnβ classXmCTraversalOn, typeBoolean, defaultdynamic, accessCSGXmNunitTypeβ classXmCUnitType, typeunsigned char, defaultdynamic, accessCSGXmNuserDataβ classXmCUserData, typeXtPointer, defaultNULL, accessCSG
π¦ Composite Resource Set π¦
XmNchildrenβ classXmCReadOnly, typeWidgetList, defaultNULL, accessGXmNinsertPositionβ classXmCInsertPosition, typeXtOrderProc, defaultdefault procedure, accessCSGXmNnumChildrenβ classXmCReadOnly, typeCardinal, default0, accessG
β Core Resource Set β
XmNacceleratorsβ classXmCAccelerators, typeXtAccelerators, defaultdynamic, accessCSGXmNancestorSensitiveβ 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
π Callback Information π
a pointer to this struct gets passed to every XmSimpleSpinBox callback. bestie, look at it:
typedef struct {
int reason;
XEvent *event;
Widget widget;
Boolean doit;
int position;
XmString value;
Boolean crossed_boundary;
} XmSimpleSpinBoxCallbackStruct;
the reason arg tells u why the callback got invoked. there are three possible reasons for this callback to be issued. the reason is XmCR_OK when this is the first call to the callback at the beginning of a spin, or if it's a single activation of the spin arrows. if the XmSimpleSpinBox is in the process of being continuously spun, then the reason will be XmCR_SPIN_NEXT or XmCR_SPIN_PRIOR, depending on which arrow is spinning. slay. β¨
the event arg points to the XEvent that triggered the callback. it can be NULL when the XmSimpleSpinBox is continuously spinning. no event, no drama.
the widget arg is the widget identifier for the simple spin box widget that has been affected by this callback. that's the main character right there. π
the doit arg is set only when the call_data comes from the XmNmodifyVerifyCallback. it indicates that the action that caused the callback to be called should be performed. the action is not performed if doit is set to False. so if u want it to happen, let doit cook. if not, shut it down. π
the position arg is the new value of the XmNposition resource as a result of the spin. it's giving coordinates, but make it spinbox.
the value arg is the new XmString value displayed in the Text widget as a result of the spin. the application must copy this string if it is used beyond the scope of the call_data structure. do not just hold onto it, bestie β copy it fr fr. π
the crossed_boundary arg is True when the spinbox cycles. this is the case when a XmNspinBoxChildType of XmSTRING wraps from the first item to the last, or the last item to the first. in the case of the XmNspinBoxChildType of XmNUMERIC, the boundary is crossed when the XmSimpleSpinBox cycles from the maximum value to the minimum or vice versa. it's giving full circle moment. π
π¨ ERRORS/WARNINGS π¨
the toolkit will display a warning if the application tries to set the value of the XmNtextField resource, which is read-only (marked G in the resource table). so likeβ¦ don't. it's not giving. π
π SEE ALSO π
XmSpinBox(3)XmCreateSimpleSpinBox(3)XmCreateSpinBox(3)XmSimpleSpinBoxAddItem(3)XmSimpleSpinBoxDeletePos(3)XmSimpleSpinBoxSetItem(3)Composite(3)Core(3)XmManager(3)XmText(3)XmTextField(3)XtGetValues(3)XtSetValues(3)XmVaCreateSimpleSpinBox(3)XmVaCreateManagedSimpleSpinBox(3)
and that's the whole page, bestie. this iconic manual is from the XmSimpleSpinBox(library call) source/version β no date shown in the original, but it's still timeless. catch u later, stay slay, and may ur spinboxes never cross a boundary unless u want them to. πβ¨ππ¦πΈπ
π¦ 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