XMSCALE(3)
π XmScale β The Scale widget class π
okay bestie, so this is XmScale, from the library call section of the manual (section 3, iykyk). it's a whole widget class and she is serving elongated-rectangle realness. let's get into it π«Ά
β¨ SYNOPSIS β¨
#include <Xm/Scale.h>
that's it. that's the whole vibe. one include and you're in π
πΈ DESCRIPTION πΈ
so what is a Scale, like, for? basically an application uses Scale to indicate a value from within a range of values, and it also lets the user input or modify a value from that same range. it's giving two-way communication, no cap.
A Scale has an elongated rectangular region β lowkey similar to a ScrollBar. inside that region there's a slider, and the slider's position indicates the current value along the Scale. the user can also modify the Scale's value by moving the slider around inside the rectangular region. so it's interactive, it's tactile, it's the moment. β¨
A Scale can also include a label set that lives outside the Scale region. these labels can indicate the relative value at various positions along the scale. and where does this label get placed? that depends on the XmNlayoutDirection resource of the widget. so, you know, respect the layout direction, she's the boss of placement. π
now here's a key distinction, bestie β a Scale can be either input/output or output only:
- An input/output Scale's value can be set by the application and also modified by the user with the slider.
- An output-only Scale is used strictly as an indicator of the current value of something, and it cannot be modified interactively by the user. she's just there to look pretty and report facts.
the resource that controls this is the Scale resource XmNeditable β it specifies whether the user can interactively modify the Scale's value.
okay and one more thing: the user can specify resources in a resource file for the automatically created gadget that contains the title of the Scale widget. the name of that gadget is Title. and β plot twist β the placement of the title also depends on the XmNlayoutDirection resource of the widget. and the direction of the title is based on the widget's layout direction. so yeah, layout direction is doing a lot of heavy lifting here. she ate. π
also for the record:
- Scale uses the
XmQTspecifyRenderTabletrait - Scale holds the
XmQTtransfertrait
π¦ Data Transfer Behavior π¦
Scale supports dragging of the representation of the Scale value from the Scale β but only when the value is displayed and when the value of the XmNenableUnselectableDrag resource of XmDisplay is set to True. both conditions, bestie. it's giving conditional.
so as a source of data, Scale supports these targets and the associated conversions of data to these targets:
COMPOUND_TEXTβ the widget transfers a string representation ofXmNvalueas typeCOMPOUND_TEXT.UTF8_STRINGβ the widget transfers a string representation ofXmNvalueas typeUTF8_STRING.STRINGβ the widget transfers a string representation ofXmNvalueas typeSTRING._MOTIF_CLIPBOARD_TARGETSβ the widget transfers, as typeATOM, a list of the targets it supports for theCLIPBOARDselection. these includeSTRING,COMPOUND_TEXTandUTF8_STRING._MOTIF_EXPORT_TARGETSβ the widget transfers, as typeATOM, a list of the targets to be used as the value of the DragContext'sXmNexportTargetsin a drag-and-drop transfer. these includeSTRING,COMPOUND_TEXTandUTF8_STRING.
and as a source of data, Scale also supports these standard Motif targets:
BACKGROUNDβ the widget transfersXmNbackgroundas typePIXEL.CLASSβ the widget finds the first shell in the widget hierarchy that has aWM_CLASSproperty and transfers the contents as text in the current locale.CLIENT_WINDOWβ the widget finds the first shell in the widget hierarchy and transfers its window as typeWINDOW.COLORMAPβ the widget transfersXmNcolormapas typeCOLORMAP.FOREGROUNDβ the widget transfersXmNforegroundas typePIXEL.NAMEβ the widget finds the first shell in the widget hierarchy that has aWM_NAMEproperty and transfers the contents as text in the current locale.TARGETSβ the widget transfers, as typeATOM, a list of the targets it supports. these include the standard targets in this list. these also includeSTRING,COMPOUND_TEXTandUTF8_STRING.TIMESTAMPβ the widget transfers the timestamp used to acquire the selection as typeINTEGER._MOTIF_RENDER_TABLEβ the widget transfersXmNrenderTableif it exists, or else the default text render table, as typeSTRING._MOTIF_ENCODING_REGISTRYβ the widget transfers its encoding registry as typeSTRING. the value is a list ofNULLseparated items in the form of tag encoding pairs. this target symbolizes the transfer target for the Motif Segment Encoding Registry. Widgets and applications can use this Registry to register text encoding formats for specified render table tags. Applications access this Registry by callingXmRegisterSegmentEncodingandXmMapSegmentEncoding.
π Descendants π
Scale automatically creates the descendants shown below. an application can use XtNameToWidget to gain access to the named descendant. and bonus β a user or an application can use the named descendant when specifying resource values. π
Scrollbarβ classXmScrollBar, identity: scroll barTitleβ classXmLabelGadget, identity: title of scale
(yes those are the whole contents of that table, bestie, and no we are not skipping a single cell π)
π Classes π
Scale inherits behavior, resources, and traits from Core, Composite, Constraint, and XmManager classes. lineage? impeccable. π§
- the class pointer is
xmScaleWidgetClass - the class name is
XmScale
β New Resources β
the following table defines a set of widget resources used by the programmer to specify data. 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). ok that part matters, don't skip it π
and the codes in the access column? they tell you what you're allowed to do with a given resource:
Cβ can be set at creation timeSβ can be set by usingXtSetValuesGβ can be retrieved by usingXtGetValuesN/Aβ not applicable
the actual resource table comes next, bestie β part 2 is where it's at, so don't go anywhere π
okay bestie, here's the full resource menu for XmScale β every knob, dial and little vibe it ships with π
it's giving very customizable, no cap:
XmNconvertCallbackβ classXmCCallback, typeXtCallbackList, defaultNULL, accessCXmNdecimalPointsβ classXmCDecimalPoints, typeshort, default0, accessCSGXmNdragCallbackβ classXmCCallback, typeXtCallbackList, defaultNULL, accessCXmNeditableβ classXmCEditable, typeBoolean, defaultTrue, accessCSGXmNfontListβ classXmCFontList, typeXmFontList, defaultdynamic, accessCSGXmNhighlightOnEnterβ classXmCHighlightOnEnter, typeBoolean, defaultFalse, accessCSGXmNhighlightThicknessβ classXmCHighlightThickness, typeDimension, default2, accessCSGXmNmaximumβ classXmCMaximum, typeint, default100, accessCSGXmNminimumβ classXmCMinimum, typeint, default0, accessCSGXmNorientationβ classXmCOrientation, typeunsigned char, defaultXmVERTICAL, accessCSGXmNprocessingDirectionβ classXmCProcessingDirection, typeunsigned char, defaultdynamic, accessCSGXmNscaleHeightβ classXmCScaleHeight, typeDimension, default0, accessCSGXmNscaleMultipleβ classXmCScaleMultiple, typeint, defaultdynamic, accessCSGXmNscaleWidthβ classXmCScaleWidth, typeDimension, default0, accessCSGXmNrenderTableβ classXmCRenderTable, typeXmRenderTable, defaultdynamic, accessCSGXmNshowArrowsβ classXmCShowArrows, typeXtEnum, defaultXmNONE, accessCSGXmNshowValueβ classXmCShowValue, typeXtEnum, defaultXmNONE, accessCSGXmNsliderMarkβ classXmCSliderMark, typeXtEnum, defaultdynamic, accessCSGXmNsliderVisualβ classXmCSliderVisual, typeXtEnum, defaultdynamic, accessCSGXmNslidingModeβ classXmCSlidingMode, typeXtEnum, defaultXmSLIDER, accessCSGXmNtitleStringβ classXmCTitleString, typeXmString, defaultNULL, accessCSGXmNvalueβ classXmCValue, typeint, defaultdynamic, accessCSGXmNvalueChangedCallbackβ classXmCCallback, typeXtCallbackList, defaultNULL, accessC
β¨ XmNconvertCallback β¨
the lil list of callbacks that fire when the Scale gets asked to convert a selection π«Ά the struct whose address gets yeeted into these callbacks is an XmConvertCallbackStruct. and the reason? XmCR_OK, obviously π
π XmNdecimalPoints π
how many decimal points to shift the slider value by when it's showing off on screen π like, say your slider value is 2,350 and your XmdecimalPoints value is 2 β boom, you get a display value of 23.50. slay. but bestie listen: the value must not be negative π
π₯ XmNdragCallback π₯
the callback list that goes off when the slider position changes while the slider is actively being dragged π reason sent by the callback is XmCR_DRAG. it's giving live updates, it's giving main character energy.
π
XmNeditable π
tells you how the Scale scrollbar reacts to user input. it can be True or False, like this:
Trueβ lets the scrollbar be sensitive to user input. this is the default value πFalseβ makes the Scale scrollbar insensitive to user input. important: the visual is not greyed out. this value would mostly be used inXmTHERMOMETERmode π‘οΈ
also, when XmNeditable is used on a widget it sets the dropsite to XmDROP_SITE_ACTIVE β¨
π¦ XmNfontList π¦
the font list used for the title text string that XmNtitleString specifies, plus the label shown when XmNshowValue is True πΈ
heads up bestie: this font list is an obsolete structure. it's only still here for compatibility with earlier releases of Motif π§ see the XmNrenderTable resource instead β that's the new it-girl π
XmNhighlightOnEnterβ decides whether that lil highlighting rectangle gets drawn the moment your cursor slides into the widget. π¦
real talk: if the shell's focus policy is XmEXPLICIT, this resource is straight up ignored β the widget just highlights whenever it has the focus, and that's that. π
- shell's focus policy is
XmPOINTERand this resource isTrueβ the highlighting rectangle is drawn when the cursor moves into the widget β¨ - shell's focus policy is
XmPOINTERand this resource isFalseβ the highlighting rectangle is not drawn when the cursor moves into the widget π
The default is False.
XmNhighlightThicknessβ sets the size of the slider's border drawing rectangle, the one used for enter window and traversal highlight drawing. πXmNmaximumβ the slider's maximum value. Heads up bestie,XmNmaximummust be greater thanXmNminimum. No cap. π₯XmNminimumβ the slider's minimum value. And yeah,XmNmaximummust be greater thanXmNminimumβ that rule goes both ways. πΈXmNorientationβ displays the Scale vertically or horizontally. This resource can have the valuesXmVERTICALandXmHORIZONTAL. πXmNprocessingDirectionβ tells you whether the value forXmNmaximumsits on the right or the left side ofXmNminimumfor horizontal Scales, or above or belowXmNminimumfor vertical Scales. The values it takes areXmMAX_ON_TOP,XmMAX_ON_BOTTOM,XmMAX_ON_LEFT, andXmMAX_ON_RIGHT.- if the Scale is oriented vertically, the default is
XmMAX_ON_TOPβ¬οΈ - if the
XmScaleis oriented horizontally, the default depends on theXmNlayoutDirectionresource of the widget π
- if the Scale is oriented vertically, the default is
XmNrenderTableβ the render table to use for the title text string specified byXmNtitleString, and for the label displayed whenXmNshowValueisTrue. π- if this value is
NULLat initialization, the parent hierarchy gets searched for an ancestor that holds theXmQTspecifyRenderTabletrait π§ - if such an ancestor is found, the render table is initialized to the
XmLABEL_RENDER_TABLEvalue of the ancestor widget β¨ - if no such ancestor is found, the default is implementation dependent π€·
- if a font list (
XmNfontList) and a render table are both specified, the render table takes precedence β it wins, periodt π
- if this value is
Refer to XmRenderTable(3) for more info on the creation and structure of a render table.
XmNscaleHeightβ the height of the slider area. The value should be in the specified unit type (the default is pixels). If no value is specified, a default height is computed. πXmNscaleMultipleβ how far to move the slider when the user takes an action that moves the slider by a multiple increment. The default is(XmNmaximum - XmNminimum)divided by 10, with a minimum of 1. π’XmNscaleWidthβ the width of the slider area. Value goes in the specified unit type (default is pixels). If no value is specified, a default width is computed. πXmNshowArrowsβ whether the arrows get displayed, and how. This resource can take these values:XmEACH_SIDEβ one arrow is displayed on each end of the ScrollBar slider β¬ οΈβ‘οΈXmMAX_SIDEβ one arrow is displayed on theXmNmaximumside of the ScrollBar slider π₯XmMIN_SIDEβ one arrow is displayed on theXmNminimumside of the ScrollBar slider π±XmNONEβ no arrows are displayed at all π
XmNONE is the default value.
XmNshowValueβ whether a label for the current slider value should be displayed next to the slider. π- value is
XmNEAR_SLIDERβ the current slider value is displayed β¨ - value is
XmNONEβ no slider value is displayed π - value is
XmNEAR_BORDERβ the current slider value is displayed near the border π
- value is
XmNsliderMarkβ the shape the slider is displayed in. This resource can take these values:XmETCHED_LINEβ the slider as an etched line. This is the default whenXmNslidingModeisXmSLIDER. βοΈXmNONEβ the slider as a foregrounded rectangle. This is the default whenXmNslidingModeisXmTHERMOMETERand the Scale scrollbar is insensitive to user input (XmNeditableisFalse). πXmROUND_MARKβ the slider as a shadowed circle. This is the default whenXmNslidingModeisXmTHERMOMETERand the Scale scrollbar is sensitive to user input (XmNeditableisTrue). βXmTHUMB_MARKβ the slider as a series of three etched lines centered in the middle of the slider. π«Ά
XmNslidingModeβ the mode the slider works in. There are two possible modes:XmSLIDERβ lets the slider move freely between the minimum and maximum ends of the scale. This is the default value. πXmTHERMOMETERβ forces the slider to be anchored to one side of the trough area. π‘οΈ
XmNsliderVisualβ the color of the slider visual. This resource can take these values:XmBACKGROUND_COLORβ the slider visual is in the background color π¨XmFOREGROUND_COLORβ the slider visual is in the foreground color ποΈXmSHADOWED_BACKGROUNDβ the slider visual is in the background color, with a shadow. This is the default when theXmNslidingModelresource isXmSLIDER. πXmTROUGH_COLORβ the slider visual is in the trough color. This is the default when theXmNslidingModelresource isXmTHERMOMETER. π
XmNtitleStringβ the title text string that appears in the Scale widget window. πXmNvalueβ the slider's current position along the scale, somewhere betweenXmNminimumandXmNmaximum. The value is constrained to stay within those inclusive bounds. The initial value of this resource is the larger of0(zero) andXmNminimum. βXmNvalueChangedCallbackβ the list of callbacks that gets called when the value of the slider has changed. The reason sent by the callback isXmCR_VALUE_CHANGED. π
𧬠Inherited Resources π§¬
Scale 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. π
XmManager Resource Set π
okay bestie, this is the whole XmManager resource set β every row, every value, no skips. Columns are name, class, type, default, and access. Let's go π
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π₯XmNhighlightPixmapβ classXmCHighlightPixmap, typePixmap, defaultdynamic, accessCSGπXmNinitialFocusβ classXmCInitialFocus, typeWidget, defaultNULL, accessCSGπXmNlayoutDirectionβ classXmCLayoutDirection, typeXmDirection, defaultdynamic, accessCGπXmNnavigationTypeβ classXmCNavigationType, typeXmNavigationType, defaultXmTAB_GROUP, accessCSGβXmNpopupHandlerCallbackβ classXmCCallback, typeXtCallbackList, defaultNULL, accessCπXmNshadowThicknessβ classXmCShadowThickness, typeDimension, default2, accessCSGπXmNstringDirectionβ classXmCStringDirection, typeXmStringDirection, defaultdynamic, accessCGπ§XmNtopShadowColorβ classXmCTopShadowColor, typePixel, defaultdynamic, accessCSGπXmNtopShadowPixmapβ classXmCTopShadowPixmap, typePixmap, defaultdynamic, accessCSGπ¦XmNtraversalOnβ classXmCTraversalOn, typeBoolean, defaultTrue, accessCSGπXmNunitTypeβ classXmCUnitType, typeunsigned char, defaultdynamic, accessCSGπΈXmNuserDataβ classXmCUserData, typeXtPointer, defaultNULL, accessCSGπ
Composite Resource Set π¦
and here's the Composite set, bestie β only three rows but they're iconic. same columns, same energy π
XmNchildrenβ classXmCReadOnly, typeWidgetList, defaultNULL, accessGβ¨XmNinsertPositionβ classXmCInsertPosition, typeXtOrderProc, defaultNULL, accessCSGπXmNnumChildrenβ classXmCReadOnly, typeCardinal, default0, accessGπ
all three, no cap π
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 π
Bestie, when a callback fires, it hands you a pointer to a struct, and the struct is not the same for every callback, so pay attention π
A pointer to the following structure is passed to the XmNdragCallback and XmNvalueChangedCallback procedures:
typedef struct
{
int reason;
XEvent * event;
int value;
} XmScaleCallbackStruct;
reasonβ tells you why the callback got invoked πeventβ points to theXEventthat triggered the callbackvalueβ is the new slider value β¨
A pointer to the following structure is passed to the XmNconvertCallback procedures:
typedef struct
{
int reason;
XEvent *event;
Atom selection;
Atom target;
XtPointer source_data;
XtPointer location_data;
int flags;
XtPointer parm;
int parm_format;
unsigned long parm_length;
int status;
XtPointer value;
Atom type;
int format;
unsigned long length;
} XmConvertCallbackStruct;
reasonβ indicates why the callback was invoked.eventβ points to theXEventthat triggered the callback. It can beNULL.selectionβ indicates the selection for which conversion is being requested. Possible values areCLIPBOARD,PRIMARY,SECONDARY, and_MOTIF_DROP.targetβ says what we're converting to, bestie. The conversion target. β¨source_dataβ the tea on where the selection came from. When the selection is_MOTIF_DROP,source_datais theDragContext. Any other time? It'sNULL. πlocation_dataβ the tea on where the data-to-be-converted lives. If this isNULL, then the data being transferred is just the widget's current selection, no cap. π¦flagsβ the status of the conversion, and here's the whole roster of possible values:XmCONVERTING_NONEβ this flag is currently unused. Just sitting there. Iconic but unemployed. πXmCONVERTING_PARTIALβ the target widget was able to be converted, but some data got lost along the way. πXmCONVERTING_SAMEβ the conversion target is literally the source of the data being transferred. It's giving mirror. πͺXmCONVERTING_TRANSACTβ also currently unused. Two for two on the unused flags, we love a chill flag. π
parmβ holds parameter data for this target. If there's no parameter data, the value isNULL.
When the selection is CLIPBOARD and the target is _MOTIF_CLIPBOARD_TARGETS or _MOTIF_DEFERRED_CLIPBOARD_TARGETS, the value is the requested operation β and that's XmCOPY, XmMOVE, or XmLINK. Pick your fighter. π
parm_formatβ tells you whether the data inparmshould be viewed as a list ofchar,short, orlongquantities. The possible values are0(whenparmisNULL),8(when the data inparmshould be viewed as a list ofchars),16(when it should be viewed as a list ofshorts), or32(when it should be viewed as a list oflongs).
Heads up bestie, this one's a vibe check trap:parm_formatsymbolizes a data type, not the number of bits in each list element. For example, on some machines, aparm_formatof32means the data inparmshould be viewed as a list of 64-bit quantities, not 32-bit quantities. So do not assume, fr fr. π
parm_lengthβ the number of elements of data inparm, where each element has the size specified byparm_format. WhenparmisNULL, the value is0.statusβ an IN/OUT member that says how the conversion is going. The initial value isXmCONVERT_DEFAULT, and the callback procedure can set this member to one of these:XmCONVERT_DEFAULTβ means the widget class conversion procedure, if any, gets called after the callback procedures return. And if that widget class conversion procedure produces any data, it overwrites the data the callback procedures put in thevaluemember. Rude but okay. πXmCONVERT_MERGEβ means the widget class conversion procedure, if any, is called after the callback procedures return. If it produces any data, it appends its data to whatever the callback procedures provided in thevaluemember. This value is intended for use with targets that result in lists of data, such asTARGETS. Slay, teamwork. π«ΆXmCONVERT_DONEβ means the callback procedure has successfully finished the conversion. The widget class conversion procedure, if any, does not get called after the callback procedures return. She's done, she's leaving. β¨XmCONVERT_REFUSEβ means the callback procedure has terminated the conversion process without completing the requested conversion. The widget class conversion procedure, if any, is not called after the callback procedures return. Not me refusing. π
valueβ an IN/OUT parameter holding whatever data the callback procedure produces as a result of the conversion. The initial value isNULL. If the callback procedure sets this member, it must make sure thetype,format, andlengthmembers correspond to the data invalue. And listen: the callback procedure is responsible for allocating, but not for freeing, memory when it sets this member. Allocate, don't deallocate. Noted. πtypeβ an IN/OUT parameter indicating the type of the data in thevaluemember. The initial value isINTEGER.formatβ an IN/OUT parameter specifying whether the data invalueshould be viewed as a list ofchar,short, orlongquantities. The initial value is8. The callback procedure can set this member to8(for a list ofchar),16(for a list ofshort), or32(for a list oflong). πlengthβ an IN/OUT member specifying the number of elements of data invalue, where each element has the size symbolized byformat. The initial value is0.
β¨ Behavior β¨
XmScale has the following behavior, and honestly? It's a lot. Buckle up bestie. π’
<Btn1Down>or<Btn2Down>:- In the region between an end of the Scale and the slider: moves the slider by one multiple increment in the direction of the end of the Scale, and calls the
XmNvalueChangedCallbackcallbacks. IfXmNprocessingDirectionisXmMAX_ON_RIGHTorXmMAX_ON_BOTTOM, movement toward the right or bottom increments the Scale value, and movement toward the left or top decrements the Scale value. IfXmNprocessingDirectionisXmMAX_ON_LEFTorXmMAX_ON_TOP, movement toward the right or bottom decrements the Scale value, and movement toward the left or top increments the Scale value. And if the button is held down longer than a delay period, the slider is moved again by the same increment and the same callbacks are called. Hold to repeat, periodt. π - In slider: activates the interactive dragging of the slider. Grab and go. π
- In the region between an end of the Scale and the slider: moves the slider by one multiple increment in the direction of the end of the Scale, and calls the
<Btn2Down>in value label: drags the contents of the label showing the current slider value. This action sets theXmNconvertProcof theDragContextto a function that calls theXmNconvertCallbackprocedures β possibly multiple times β for the_MOTIF_DROPselection. π¦<Btn1Motion>or<Btn2Motion>: if the button press occurs within the slider, the subsequent motion events move the slider to the position of the pointer and call the callbacks forXmNdragCallback. π«Ά<Btn1Up>or<Btn2Up>: if the button press occurs within the slider and the slider position is changed, the callbacks forXmNvalueChangedCallbackare called. Mission accomplished. β¨<Ctrl><Btn1Down>:- In the region between an end of the Scale and the slider: moves the slider to that end of the Scale and calls the
XmNvalueChangedCallbackcallbacks. IfXmNprocessingDirectionisXmMAX_ON_RIGHTorXmMAX_ON_BOTTOM, movement toward the right or bottom increments the Scale value, and movement toward the left or top decrements the Scale value. IfXmNprocessingDirectionisXmMAX_ON_LEFTorXmMAX_ON_TOP, movement toward the right or bottom decrements the Scale value, and movement toward the left or top increments the Scale value. Straight to the end, no in-between. π
- In the region between an end of the Scale and the slider: moves the slider to that end of the Scale and calls the
<Key><osfUp>: for vertical Scales, moves the slider up one increment and calls theXmNvalueChangedCallbackcallbacks. IfXmNprocessingDirectionisXmMAX_ON_TOP, movement toward the top increments the Scale value. IfXmNprocessingDirectionisXmMAX_ON_BOTTOM, movement toward the top decrements the Scale value. β¬οΈ<Key><osfDown>: for vertical Scales, moves the slider down one increment and calls theXmNvalueChangedCallbackcallbacks. IfXmNprocessingDirectionisXmMAX_ON_BOTTOM, movement toward the bottom increments the Scale value. IfXmNprocessingDirectionisXmMAX_ON_TOP, movement toward the bottom decrements the Scale value. β¬οΈ<Key><osfLeft>: for horizontal Scales, moves the slider one increment to the left and calls theXmNvalueChangedCallbackcallbacks. IfXmNprocessingDirectionisXmMAX_ON_LEFT, movement toward the left increments the Scale value. IfXmNprocessingDirectionisXmMAX_ON_RIGHT, movement toward the left decrements the Scale value. β¬ οΈ<Key><osfRight>: for horizontal Scales, moves the slider one increment to the right and calls theXmNvalueChangedCallbackcallbacks. IfXmNprocessingDirectionisXmMAX_ON_RIGHT, movement toward the right increments the Scale value. IfXmNprocessingDirectionisXmMAX_ON_LEFT, movement toward the right decrements the Scale value. β‘οΈ<Ctrl><Key><osfUp>or<Key><osfPageUp>: for vertical Scales, moves the slider up one multiple increment and calls theXmNvalueChangedCallbackcallbacks. IfXmNprocessingDirectionisXmMAX_ON_TOP, movement toward the top increments the Scale value. IfXmNprocessingDirectionisXmMAX_ON_BOTTOM, movement toward the top decrements the Scale value. π₯<Ctrl><Key><osfDown>or<Key><osfPageDown>: for vertical Scales, moves the slider down one multiple increment and calls theXmNvalueChangedCallbackcallbacks. IfXmNprocessingDirectionisXmMAX_ON_BOTTOM, movement toward the bottom increments the Scale value. IfXmNprocessingDirectionisXmMAX_ON_TOP, movement toward the bottom decrements the Scale value. π₯<Ctrl><Key><osfLeft>or<Key><osfPageLeft>: for horizontal Scales, moves the slider one multiple increment to the left and calls theXmNvalueChangedCallbackcallbacks. IfXmNprocessingDirectionisXmMAX_ON_LEFT, movement toward the left increments the Scale value. IfXmNprocessingDirectionisXmMAX_ON_RIGHT, movement toward the left decrements the Scale value. π<Ctrl><Key><osfRight>or<Key><osfPageRight>: for horizontal Scales, moves the slider one multiple increment to the right and calls theXmNvalueChangedCallbackcallbacks. IfXmNprocessingDirectionisXmMAX_ON_RIGHT, movement toward the right increments the Scale value. IfXmNprocessingDirectionisXmMAX_ON_LEFT, movement toward the right decrements the Scale value. π<Key><osfBeginLine>or<Key><osfBeginData>β yeets the slider alllll the way down to the minimum value and fires off theXmNvalueChangedCallbackcallbacks. β¨<Key><osfEndLine>or<Key><osfEndData>β opposite energy, bestie: slides it to the maximum value and calls thoseXmNvalueChangedCallbackcallbacks. π<Key><osfNextField>β hops over to the first item in the next tab group. And if you're already chilling at the last entry in the tab group list? It wraps all the way back to the beginning of the tab group list. no cap, it just loops π<Key><osfPrevField>β same thing but backwards, moving to the first item in the previous tab group. Hit the beginning of the tab group list and it wraps to the end of the tab group list instead. it's giving carousel π<Key><osfHelp>β calls the callbacks forXmNhelpCallback, but only if any actually exist. If this widget has no help callbacks, this action goes looking up the family tree and calls the help callbacks for the nearest ancestor that has them. it asks the parent, fr fr π«Ά
π Virtual Bindings π
The bindings for virtual keys are vendor specific. That's it, that's the whole vibe β every vendor does their own thing. For the deets on bindings for virtual buttons and keys, go read VirtualBindings(3). π
π«Ά RELATED π«Ά
The whole friend group, in alphabetical order because we're classy like that:
Composite(3)Constraint(3)Core(3)XmCreateScale(3)XmManager(3)XmScaleGetValue(3)XmScaleSetValue(3)XmVaCreateScale(3)XmVaCreateManagedScale(3)
and that's a wrap on the XmScale library call page bestie!! π go forth and scale responsibly, you absolute icon, 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