XMDATAFIELD(3)

πŸ“¦
version 2.5.2 Β· 2 versions
, in alpine 3.24, arch rolling, centos-stream 9, epel 10, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0

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 to XmALIGNMENT_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 to True, 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 the XmDataField widget determines that data is being entered that does not match the format specified by the XmNpicture resource. 🚨
  • XmNvalidateCallback β€” Class: XmCCallback Β· Type: XtCallbackList Β· Default: NULL Β· Access: C. specifies a list of callbacks to be called when data has been entered in the XmDataField widget and the user has moved out of the XmDataField widget (usually by pressing the Tab key). 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 β€” class XmCCallback, type XtCallbackList, default NULL, access C ✨
  • XmNblinkRate β€” class XmCBlinkRate, type int, default 500, access CSG πŸ’–
  • XmNcolumns β€” class XmCColumns, type short, default dynamic, access CSG πŸŽ€
  • XmNcursorPosition β€” class XmCCursorPosition, type XmTextPosition, default 0, access CSG πŸ¦‹
  • XmNcursorPositionVisible β€” class XmCCursorPositionVisible, type Boolean, default dynamic, access CSG 🌸
  • XmNdestinationCallback β€” class XmCCallback, type XtCallbackList, default NULL, access C πŸ’…
  • XmNeditable β€” class XmCEditable, type Boolean, default True, access CSG 🫢
  • XmNfocusCallback β€” class XmCCallback, type XtCallbackList, default NULL, access C 😭
  • XmNfontList β€” class XmCFontList, type XmFontList, default dynamic, access CSG πŸ”₯
  • XmNgainPrimaryCallback β€” class XmCCallback, type XtCallbackList, default NULL, access C πŸ‘‘
  • XmNlosePrimaryCallback β€” class XmCCallback, type XtCallbackList, default NULL, access C 🌈
  • XmNlosingFocusCallback β€” class XmCCallback, type XtCallbackList, default NULL, access C ⭐
  • XmNmarginHeight β€” class XmCMarginHeight, type Dimension, default 5, access CSG πŸ’€
  • XmNmarginWidth β€” class XmCMarginWidth, type Dimension, default 5, access CSG πŸ™ˆ
  • XmNmaxLength β€” class XmCMaxLength, type int, default largest integer, access CSG πŸ“
  • XmNmodifyVerifyCallback β€” class XmCCallback, type XtCallbackList, default NULL, access C 🧚
  • XmNmodifyVerifyCallbackWcs β€” class XmCCallback, type XtCallbackList, default NULL, access C πŸ’œ
  • XmNmotionVerifyCallback β€” class XmCCallback, type XtCallbackList, default NULL, access C ✨
  • XmNpendingDelete β€” class XmCPendingDelete, type Boolean, default True, access CSG πŸ’–
  • XmNrenderTable β€” class XmCRenderTable, type XmRenderTable, default dynamic, access CSG πŸŽ€
  • XmNresizeWidth β€” class XmCResizeWidth, type Boolean, default False, access CSG πŸ¦‹
  • XmNselectionArray β€” class XmCSelectionArray, type XtPointer, default default array, access CSG 🌸
  • XmNselectionArrayCount β€” class XmCSelectionArrayCount, type int, default 3, access CSG πŸ’…
  • XmNselectThreshold β€” class XmCSelectThreshold, type int, default 5, access CSG 🫢
  • XmNvalue β€” class XmCValue, type String, default "", access CSG 😭
  • XmNvalueChangedCallback β€” class XmCCallback, type XtCallbackList, default NULL, access C πŸ”₯

and that's the whole resource set, bestie. keep scrolling, there's more coming πŸ‘€

  • XmNvalueWcs β€” class XmCValueWcs, type wchar_t *, default (wchar_t *)"", access CSG. the wide-char twin of the value, slaying in wchar_t form πŸ’œ
  • XmNverifyBell β€” class XmCVerifyBell, type Boolean, default dynamic, access CSG. 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 β€” class XmCBottomShadowColor, type Pixel, default dynamic, access CSG. the lil shadow glow underneath, giving depth ✨
  • XmNbottomShadowPixmap β€” class XmCBottomShadowPixmap, type Pixmap, default XmUNSPECIFIED_PIXMAP, access CSG. pixmap version of the bottom shadow, or literally XmUNSPECIFIED_PIXMAP if you're not feeling it πŸŽ€
  • XmNconvertCallback β€” class XmCCallback, type XtCallbackList, default NULL, access C. callback list for conversions, no cap πŸ¦‹
  • XmNforeground β€” class XmCForeground, type Pixel, default dynamic, access CSG. the main character colour, fr fr πŸ‘‘
  • XmNhelpCallback β€” class XmCCallback, type XtCallbackList, default NULL, access C. help meeee callback, iconic 🫢
  • XmNhighlightColor β€” class XmCHighlightColor, type Pixel, default dynamic, access CSG. highlight colour when it's the moment ✨
  • XmNhighlightOnEnter β€” class XmCHighlightOnEnter, type Boolean, default False, access CSG. highlight when the pointer enters? default says no babe πŸ’€
  • XmNhighlightPixmap β€” class XmCHighlightPixmap, type Pixmap, default dynamic, access CSG. pixmap for that highlight, dynamic default ✨
  • XmNhighlightThickness β€” class XmCHighlightThickness, type Dimension, default 2, access CSG. how thicc the highlight is, default 2 πŸŽ€
  • XmNlayoutDirection β€” class XmCLayoutDirection, type XmDirection, default dynamic, access CG. which way the layout faces, dynamic default 🌈
  • XmNnavigationType β€” class XmCNavigationType, type XmNavigationType, default XmTAB_GROUP, access CSG. keyboard navigation vibes, default XmTAB_GROUP ⌨️
  • XmNpopupHandlerCallback β€” class XmCCallback, type XtCallbackList, default NULL, access C. popup handler callback, NULL by default πŸ™ˆ
  • XmNshadowThickness β€” class XmCShadowThickness, type Dimension, default 2, access CSG. thiccness of the shadow, default 2 πŸ’…
  • XmNtopShadowColor β€” class XmCTopShadowColor, type Pixel, default dynamic, access CSG. top shadow colour, dynamic and glowy ✨
  • XmNtopShadowPixmap β€” class XmCTopShadowPixmap, type Pixmap, default dynamic, access CSG. top shadow pixmap, dynamic default πŸŽ€
  • XmNtraversalOn β€” class XmCTraversalOn, type Boolean, default True, access CSG. traversal enabled? yes bestie, default True ⭐
  • XmNunitType β€” class XmCUnitType, type unsigned char, default dynamic, access CSG. the unit type, an unsigned char, dynamic default πŸ¦‹
  • XmNuserData β€” class XmCUserData, type XtPointer, default NULL, access CSG. your personal lil data pocket, NULL by 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: G
  • XmNbackground β€” Class: XmCBackground; Type: Pixel; Default: dynamic; Access: CSG
  • XmNbackgroundPixmap β€” Class: XmCPixmap; Type: Pixmap; Default: XmUNSPECIFIED_PIXMAP; Access: CSG
  • XmNborderColor β€” Class: XmCBorderColor; Type: Pixel; Default: XtDefaultForeground; Access: CSG
  • XmNborderPixmap β€” Class: XmCPixmap; Type: Pixmap; Default: XmUNSPECIFIED_PIXMAP; Access: CSG
  • XmNborderWidth β€” Class: XmCBorderWidth; Type: Dimension; Default: 0; Access: CSG
  • XmNcolormap β€” Class: XmCColormap; Type: Colormap; Default: dynamic; Access: CG
  • XmNdepth β€” Class: XmCDepth; Type: int; Default: dynamic; Access: CG
  • XmNdestroyCallback β€” Class: XmCCallback; Type: XtCallbackList; Default: NULL; Access: C
  • XmNheight β€” Class: XmCHeight; Type: Dimension; Default: dynamic; Access: CSG
  • XmNinitialResourcesPersistent β€” Class: XmCInitialResourcesPersistent; Type: Boolean; Default: True; Access: C
  • XmNmappedWhenManaged β€” Class: XmCMappedWhenManaged; Type: Boolean; Default: True; Access: CSG
  • XmNscreen β€” Class: XmCScreen; Type: Screen *; Default: dynamic; Access: CG
  • XmNsensitive β€” Class: XmCSensitive; Type: Boolean; Default: True; Access: CSG
  • XmNtranslations β€” Class: XmCTranslations; Type: XtTranslations; Default: dynamic; Access: CSG
  • XmNwidth β€” Class: XmCWidth; Type: Dimension; Default: dynamic; Access: CSG
  • XmNx β€” Class: XmCPosition; Type: Position; Default: 0; Access: CSG
  • XmNy β€” 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;

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! πŸ’–πŸ‘‘πŸ¦‹