XMDATAFIELD(3)
XmDataField β the DataField widget class π
okay bestie, welcome to the library call page for XmDataField. grab your emotional support terminal, because we're about to make data entry widgets make sense. no cap. π
β¨ NAME β¨
XmDataField β the DataField widget class π
πΈ SYNOPSIS πΈ
#include <Xm/DataF.h>
π DESCRIPTION π
okay so the DataField widget is a Data Presentation widget that handles display and entry of data as text. it's a subclass of the XmTextField widget, and it's intended for data entry applications. on top of all the normal XmTextField functionality, it supports regular expression-based parsing and acceptance/rejection of its input through the XmNpicture resource, plus right justification through the XmNalignment resource. slay. π
the DataField widget provides added capability by supporting several types of validation: a DataField widget containing an invalid value will not give-up focus. the user must enter a correct value before proceeding to another field. periodt. π₯
π Classes π
DataField inherits behavior, resources, and traits from Core, XmPrimitive, and XmTextField.
the class pointer is xmDataFieldWidgetClass.
the class name is XmDataField.
β¨ 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). 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).
XmNalignmentβ Class:XmCAlignmentΒ· Type:unsigned charΒ· Default:XmALIGNMENT_BEGINNINGΒ· Access:CSG. when set toXmALIGNMENT_END, the widget aligns all its text with the right hand side of the input area. π«ΆXmNautoFillβ Class:XmCAutoFillΒ· Type:BooleanΒ· Default:TrueΒ· Access:CSG. when set toTrue, the widget "auto-fills" its contents when it can determine that the next character in the string must be a particular literal. for instance, the picture"###-####"automatically inserts a'-'character after receiving three numeric digits as input. πXmNpictureβ Class:XmCPictureΒ· Type:StringΒ· Default:NULLΒ· Access:CSG. specifies a picture for data entry in the widget. a picture acts as a template that formats the value you enter in a field. an example would be the US Phone Number picture:(###)###-####. the picture is used to convert characters entered into the field to a formatted value. πΈ
π Character interpretations π
the following lists and defines the characters you can use in a picture, and how the DataField widget interprets them.
#β Any numeric digit?β Case insensitive letter&β Uppercase letter (forces lowercase to uppercase)@β Case insensitive character!β Uppercase character;β Interpret the following character literally*β Repeat the following character some number of times[]β Characters within brackets are optional{}β Characters within braces are grouped,β Alternative values- Other characters are interpreted literally.
set XmNpicture to NULL to disable regular expression processing. the DataField widget is cleared whenever the XmNpicture resource is changed. π¦
XmNpictureErrorCallbackβ Class:XmCCallbackΒ· Type:XtCallbackListΒ· Default:NULLΒ· Access:C. specifies a list of callbacks to be called when theXmDataFieldwidget determines that data is being entered that does not match the format specified by theXmNpictureresource. π¨XmNvalidateCallbackβ Class:XmCCallbackΒ· Type:XtCallbackListΒ· Default:NULLΒ· Access:C. specifies a list of callbacks to be called when data has been entered in theXmDataFieldwidget and the user has moved out of theXmDataFieldwidget (usually by pressing theTabkey). the callbacks can reject the movement of focus. π
π Inherited Resources π
DataField 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. π
π XmTextFieldResource Set π
okay bestie, this is the full resource set for XmTextField β every single one, no skips, no cap. each line gives you the resource name, its class, type, default, and access. let's get into it π
XmNactivateCallbackβ classXmCCallback, typeXtCallbackList, defaultNULL, accessCβ¨XmNblinkRateβ classXmCBlinkRate, typeint, default500, accessCSGπXmNcolumnsβ classXmCColumns, typeshort, defaultdynamic, accessCSGπXmNcursorPositionβ classXmCCursorPosition, typeXmTextPosition, default0, accessCSGπ¦XmNcursorPositionVisibleβ classXmCCursorPositionVisible, typeBoolean, defaultdynamic, accessCSGπΈXmNdestinationCallbackβ classXmCCallback, typeXtCallbackList, defaultNULL, accessCπXmNeditableβ classXmCEditable, typeBoolean, defaultTrue, accessCSGπ«ΆXmNfocusCallbackβ classXmCCallback, typeXtCallbackList, defaultNULL, accessCπXmNfontListβ classXmCFontList, typeXmFontList, defaultdynamic, accessCSGπ₯XmNgainPrimaryCallbackβ classXmCCallback, typeXtCallbackList, defaultNULL, accessCπXmNlosePrimaryCallbackβ classXmCCallback, typeXtCallbackList, defaultNULL, accessCπXmNlosingFocusCallbackβ classXmCCallback, typeXtCallbackList, defaultNULL, accessCβXmNmarginHeightβ classXmCMarginHeight, typeDimension, default5, accessCSGπXmNmarginWidthβ classXmCMarginWidth, typeDimension, default5, accessCSGπXmNmaxLengthβ classXmCMaxLength, typeint, defaultlargest integer, accessCSGπXmNmodifyVerifyCallbackβ classXmCCallback, typeXtCallbackList, defaultNULL, accessCπ§XmNmodifyVerifyCallbackWcsβ classXmCCallback, typeXtCallbackList, defaultNULL, accessCπXmNmotionVerifyCallbackβ classXmCCallback, typeXtCallbackList, defaultNULL, accessCβ¨XmNpendingDeleteβ classXmCPendingDelete, typeBoolean, defaultTrue, accessCSGπXmNrenderTableβ classXmCRenderTable, typeXmRenderTable, defaultdynamic, accessCSGπXmNresizeWidthβ classXmCResizeWidth, typeBoolean, defaultFalse, accessCSGπ¦XmNselectionArrayβ classXmCSelectionArray, typeXtPointer, defaultdefault array, accessCSGπΈXmNselectionArrayCountβ classXmCSelectionArrayCount, typeint, default3, accessCSGπXmNselectThresholdβ classXmCSelectThreshold, typeint, default5, accessCSGπ«ΆXmNvalueβ classXmCValue, typeString, default"", accessCSGπXmNvalueChangedCallbackβ classXmCCallback, typeXtCallbackList, defaultNULL, accessCπ₯
and that's the whole resource set, bestie. keep scrolling, there's more coming π
XmNvalueWcsβ classXmCValueWcs, typewchar_t *, default(wchar_t *)"", accessCSG. the wide-char twin of the value, slaying inwchar_tform πXmNverifyBellβ classXmCVerifyBell, typeBoolean, defaultdynamic, accessCSG. bell go brrr when verification says no π
π XmPrimitive Resource Set π
okay bestie, this is the whole glow-up kit that every XmPrimitive walks in with. shadows, highlights, traversal, the works. read it like a menu at your fave cafΓ© π
XmNbottomShadowColorβ classXmCBottomShadowColor, typePixel, defaultdynamic, accessCSG. the lil shadow glow underneath, giving depth β¨XmNbottomShadowPixmapβ classXmCBottomShadowPixmap, typePixmap, defaultXmUNSPECIFIED_PIXMAP, accessCSG. pixmap version of the bottom shadow, or literallyXmUNSPECIFIED_PIXMAPif you're not feeling it πXmNconvertCallbackβ classXmCCallback, typeXtCallbackList, defaultNULL, accessC. callback list for conversions, no cap π¦XmNforegroundβ classXmCForeground, typePixel, defaultdynamic, accessCSG. the main character colour, fr fr πXmNhelpCallbackβ classXmCCallback, typeXtCallbackList, defaultNULL, accessC. help meeee callback, iconic π«ΆXmNhighlightColorβ classXmCHighlightColor, typePixel, defaultdynamic, accessCSG. highlight colour when it's the moment β¨XmNhighlightOnEnterβ classXmCHighlightOnEnter, typeBoolean, defaultFalse, accessCSG. highlight when the pointer enters? default says no babe πXmNhighlightPixmapβ classXmCHighlightPixmap, typePixmap, defaultdynamic, accessCSG. pixmap for that highlight, dynamic default β¨XmNhighlightThicknessβ classXmCHighlightThickness, typeDimension, default2, accessCSG. how thicc the highlight is, default2πXmNlayoutDirectionβ classXmCLayoutDirection, typeXmDirection, defaultdynamic, accessCG. which way the layout faces, dynamic default πXmNnavigationTypeβ classXmCNavigationType, typeXmNavigationType, defaultXmTAB_GROUP, accessCSG. keyboard navigation vibes, defaultXmTAB_GROUPβ¨οΈXmNpopupHandlerCallbackβ classXmCCallback, typeXtCallbackList, defaultNULL, accessC. popup handler callback,NULLby default πXmNshadowThicknessβ classXmCShadowThickness, typeDimension, default2, accessCSG. thiccness of the shadow, default2πXmNtopShadowColorβ classXmCTopShadowColor, typePixel, defaultdynamic, accessCSG. top shadow colour, dynamic and glowy β¨XmNtopShadowPixmapβ classXmCTopShadowPixmap, typePixmap, defaultdynamic, accessCSG. top shadow pixmap, dynamic default πXmNtraversalOnβ classXmCTraversalOn, typeBoolean, defaultTrue, accessCSG. traversal enabled? yes bestie, defaultTrueβXmNunitTypeβ classXmCUnitType, typeunsigned char, defaultdynamic, accessCSG. the unit type, anunsigned char, dynamic default π¦XmNuserDataβ classXmCUserData, typeXtPointer, defaultNULL, accessCSG. your personal lil data pocket,NULLby default π
Core Resource Set πβ¨
okay so here's the whole core resource set for XmDataField, bestie β every single name, class, type, default, and access code, no skips, no cap. π
XmNacceleratorsβ Class:XmCAccelerators; Type:XtAccelerators; Default:dynamic; Access:CSGβ¨XmNancestorSensitiveβ Class:XmCSensitive; Type:Boolean; Default:dynamic; Access:GXmNbackgroundβ Class:XmCBackground; Type:Pixel; Default:dynamic; Access:CSGXmNbackgroundPixmapβ Class:XmCPixmap; Type:Pixmap; Default:XmUNSPECIFIED_PIXMAP; Access:CSGXmNborderColorβ Class:XmCBorderColor; Type:Pixel; Default:XtDefaultForeground; Access:CSGXmNborderPixmapβ Class:XmCPixmap; Type:Pixmap; Default:XmUNSPECIFIED_PIXMAP; Access:CSGXmNborderWidthβ Class:XmCBorderWidth; Type:Dimension; Default:0; Access:CSGXmNcolormapβ Class:XmCColormap; Type:Colormap; Default:dynamic; Access:CGXmNdepthβ Class:XmCDepth; Type:int; Default:dynamic; Access:CGXmNdestroyCallbackβ Class:XmCCallback; Type:XtCallbackList; Default:NULL; Access:CXmNheightβ Class:XmCHeight; Type:Dimension; Default:dynamic; Access:CSGXmNinitialResourcesPersistentβ Class:XmCInitialResourcesPersistent; Type:Boolean; Default:True; Access:CXmNmappedWhenManagedβ Class:XmCMappedWhenManaged; Type:Boolean; Default:True; Access:CSGXmNscreenβ Class:XmCScreen; Type:Screen *; Default:dynamic; Access:CGXmNsensitiveβ Class:XmCSensitive; Type:Boolean; Default:True; Access:CSGXmNtranslationsβ Class:XmCTranslations; Type:XtTranslations; Default:dynamic; Access:CSGXmNwidthβ Class:XmCWidth; Type:Dimension; Default:dynamic; Access:CSGXmNxβ Class:XmCPosition; Type:Position; Default:0; Access:CSGXmNyβ Class:XmCPosition; Type:Position; Default:0; Access:CSG
Translations π¦
XmDataField inherits translations from XmTextField. that's the whole vibe, lowkey iconic. π
Callback Routines π
A pointer to the following structure is passed to the list of routines for the XmNvalidateCallback:
typedef struct _XmDataFieldCallbackStruct {
Widget w; /* The XmDataField */
String text; /* Proposed string */
Boolean accept; /* Accept return value, for validation */
} XmDataFieldCallbackStruct;
RELATED π
Core(3), XmCreateDataField(3), XmPrimitive(3), XmTextFieldSetString(3), XmTextFieldSetStringWcs(3), XmVaCreateDataField(3), and XmVaCreateManagedDataField(3).
VERSION π
This manual page documents the XmDataField widget shipped in Motif version 2.2. periodt. β¨
AUTHOR βοΈ
(c) 2002 by Integrated Computer Solutions, Inc.
Edited by Kevin Cook.
and that's a wrap on this XmDataField library-call manual β Motif 2.2, 2002 copyright, source realness. bye bestie! πππ¦
π¦ 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