FreeBSD Manual Pages
XmDataField(3) Library Functions Manual XmDataField(3) NAME XmDataField -- The DataField widget class SYNOPSIS #include <Xm/DataF.h> DESCRIPTION The DataField widget is a Data Presentation widget that handles display and entry of data as text. The DataField widget is a subclass of the Xm- TextField widget intended for data entry applications. In addition to all of the normal XmTextField functionality, it supports regular expression- based parsing and acceptance/rejection of its input through the XmNpicture resource, and right justification through the XmNalignment resource. 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 an- other field. 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 program- mer 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 re- maining letters (in either lowercase or uppercase, but include any under- scores 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), re- trieved by using XtGetValues (G), or is not applicable (N/A). +------------------------------------------------------------------------------------------+ | | XmDataField Resource Set| | | | Name | Class | Type | Default | Access | +-------------------------+--------------+----------------+-----------------------+--------+ | XmNalignment | XmCAlignment | unsigned char | XmALIGNMENT_BEGINNING | CSG | +-------------------------+--------------+----------------+-----------------------+--------+ | XmNautoFill | XmCAutoFill | Boolean | True | CSG | +-------------------------+--------------+----------------+-----------------------+--------+ | XmNpicture | XmCPicture | String | NULL | CSG | +-------------------------+--------------+----------------+-----------------------+--------+ | XmNpictureErrorCallback | XmCCallback | XtCallbackList | NULL | C | +-------------------------+--------------+----------------+-----------------------+--------+ | XmNvalidateCallback | XmCCallback | XtCallbackList | NULL | C | +-------------------------+--------------+----------------+-----------------------+--------+ +-------------------------+--------------+----------------+-----------------------+--------+ XmNalignment When set to XmALIGNMENT_END, the widget aligns all its text with the right hand side of the input area. XmNautoFill 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 "###-####" automat- ically inserts a '-' character after receiving three numeric dig- its as input. XmNpictureSpecifies a picture for data entry in the widget. A picture acts as a template that formats the value you enter in a field. An ex- ample 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 pro- cessing. The DataField widget is cleared whenever the XmN- picture resource is changed. XmNpictureErrorCallback 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 Specifies a list of callbacks to be called when data has been en- tered in the XmDataField widget and the user has moved out of the XmDataField widget (usually by pressing the Tab key). The call- backs 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, re- fer to the reference page for that superclass. +---------------------------------------------------------------------------------------------------+ | | XmTextFieldResource Set | | | | Name | Class | Type | Default | Access | +----------------------------+--------------------------+----------------+-----------------+--------+ | XmNactivateCallback | XmCCallback | XtCallbackList | NULL | C | +----------------------------+--------------------------+----------------+-----------------+--------+ | XmNblinkRate | XmCBlinkRate | int | 500 | CSG | +----------------------------+--------------------------+----------------+-----------------+--------+ | XmNcolumns | XmCColumns | short | dynamic | CSG | +----------------------------+--------------------------+----------------+-----------------+--------+ | XmNcursorPosition | XmCCursorPosition | XmTextPosition | 0 | CSG | +----------------------------+--------------------------+----------------+-----------------+--------+ | XmNcursorPositionVisible | XmCCursorPositionVisible | Boolean | dynamic | CSG | +----------------------------+--------------------------+----------------+-----------------+--------+ | XmNdestinationCallback | XmCCallback | XtCallbackList | NULL | C | +----------------------------+--------------------------+----------------+-----------------+--------+ | XmNeditable | XmCEditable | Boolean | True | CSG | +----------------------------+--------------------------+----------------+-----------------+--------+ | XmNfocusCallback | XmCCallback | XtCallbackList | NULL | C | +----------------------------+--------------------------+----------------+-----------------+--------+ | XmNfontList | XmCFontList | XmFontList | dynamic | CSG | +----------------------------+--------------------------+----------------+-----------------+--------+ | XmNgainPrimaryCallback | XmCCallback | XtCallbackList | NULL | C | +----------------------------+--------------------------+----------------+-----------------+--------+ | XmNlosePrimaryCallback | XmCCallback | XtCallbackList | NULL | C | +----------------------------+--------------------------+----------------+-----------------+--------+ | XmNlosingFocusCallback | XmCCallback | XtCallbackList | NULL | C | +----------------------------+--------------------------+----------------+-----------------+--------+ | XmNmarginHeight | XmCMarginHeight | Dimension | 5 | CSG | +----------------------------+--------------------------+----------------+-----------------+--------+ | XmNmarginWidth | XmCMarginWidth | Dimension | 5 | CSG | +----------------------------+--------------------------+----------------+-----------------+--------+ | XmNmaxLength | XmCMaxLength | int | largest integer | CSG | +----------------------------+--------------------------+----------------+-----------------+--------+ | XmNmodifyVerifyCallback | XmCCallback | XtCallbackList | NULL | C | +----------------------------+--------------------------+----------------+-----------------+--------+ | XmNmodifyVerifyCallbackWcs | XmCCallback | XtCallbackList | NULL | C | +----------------------------+--------------------------+----------------+-----------------+--------+ | XmNmotionVerifyCallback | XmCCallback | XtCallbackList | NULL | C | +----------------------------+--------------------------+----------------+-----------------+--------+ | XmNpendingDelete | XmCPendingDelete | Boolean | True | CSG | +----------------------------+--------------------------+----------------+-----------------+--------+ | XmNrenderTable | XmCRenderTable | XmRenderTable | dynamic | CSG | +----------------------------+--------------------------+----------------+-----------------+--------+ | XmNresizeWidth | XmCResizeWidth | Boolean | False | CSG | +----------------------------+--------------------------+----------------+-----------------+--------+ | XmNselectionArray | XmCSelectionArray | XtPointer | default array | CSG | +----------------------------+--------------------------+----------------+-----------------+--------+ | XmNselectionArrayCount | XmCSelectionArrayCount | int | 3 | CSG | +----------------------------+--------------------------+----------------+-----------------+--------+ | XmNselectThreshold | XmCSelectThreshold | int | 5 | CSG | +----------------------------+--------------------------+----------------+-----------------+--------+ | XmNvalue | XmCValue | String | "" | CSG | +----------------------------+--------------------------+----------------+-----------------+--------+ | XmNvalueChangedCallback | XmCCallback | XtCallbackList | NULL | C | +----------------------------+--------------------------+----------------+-----------------+--------+ | XmNvalueWcs | XmCValueWcs | wchar_t * | (wchar_t *)"" | CSG | +----------------------------+--------------------------+----------------+-----------------+--------+ | XmNverifyBell | XmCVerifyBell | Boolean | dynamic | CSG | +----------------------------+--------------------------+----------------+-----------------+--------+ +----------------------------+--------------------------+----------------+-----------------+--------+ +----------------------------------------------------------------------------------------------------+ | | XmPrimitive|Resource Set | | | | Name | Class | Type | Default | Access | +-------------------------+-----------------------+------------------+----------------------+--------+ | XmNbottomShadowColor | XmCBottomShadowColor | Pixel | dynamic | CSG | +-------------------------+-----------------------+------------------+----------------------+--------+ | XmNbottomShadowPixmap | XmCBottomShadowPixmap | Pixmap | XmUNSPECIFIED_PIXMAP | CSG | +-------------------------+-----------------------+------------------+----------------------+--------+ | XmNconvertCallback | XmCCallback | XtCallbackList | NULL | C | +-------------------------+-----------------------+------------------+----------------------+--------+ | XmNforeground | XmCForeground | Pixel | dynamic | CSG | +-------------------------+-----------------------+------------------+----------------------+--------+ | XmNhelpCallback | XmCCallback | XtCallbackList | NULL | C | +-------------------------+-----------------------+------------------+----------------------+--------+ | XmNhighlightColor | XmCHighlightColor | Pixel | dynamic | CSG | +-------------------------+-----------------------+------------------+----------------------+--------+ | XmNhighlightOnEnter | XmCHighlightOnEnter | Boolean | False | CSG | +-------------------------+-----------------------+------------------+----------------------+--------+ | XmNhighlightPixmap | XmCHighlightPixmap | Pixmap | dynamic | CSG | +-------------------------+-----------------------+------------------+----------------------+--------+ | XmNhighlightThickness | XmCHighlightThickness | Dimension | 2 | CSG | +-------------------------+-----------------------+------------------+----------------------+--------+ | XmNlayoutDirection | XmCLayoutDirection | XmDirection | dynamic | CG | +-------------------------+-----------------------+------------------+----------------------+--------+ | XmNnavigationType | XmCNavigationType | XmNavigationType | XmTAB_GROUP | CSG | +-------------------------+-----------------------+------------------+----------------------+--------+ | XmNpopupHandlerCallback | XmCCallback | XtCallbackList | NULL | C | +-------------------------+-----------------------+------------------+----------------------+--------+ | XmNshadowThickness | XmCShadowThickness | Dimension | 2 | CSG | +-------------------------+-----------------------+------------------+----------------------+--------+ | XmNtopShadowColor | XmCTopShadowColor | Pixel | dynamic | CSG | +-------------------------+-----------------------+------------------+----------------------+--------+ | XmNtopShadowPixmap | XmCTopShadowPixmap | Pixmap | dynamic | CSG | +-------------------------+-----------------------+------------------+----------------------+--------+ | XmNtraversalOn | XmCTraversalOn | Boolean | True | CSG | +-------------------------+-----------------------+------------------+----------------------+--------+ | XmNunitType | XmCUnitType | unsigned char | dynamic | CSG | +-------------------------+-----------------------+------------------+----------------------+--------+ | XmNuserData | XmCUserData | XtPointer | NULL | CSG | +-------------------------+-----------------------+------------------+----------------------+--------+ +-------------------------+-----------------------+------------------+----------------------+--------+ +----------------------------------------------------------------------------------------------------------------+ | | Core Resource Set | | | | Name | Class | Type | Default | Access | +-------------------------------+-------------------------------+----------------+----------------------+--------+ | XmNaccelerators | XmCAccelerators | XtAccelerators | dynamic | CSG | +-------------------------------+-------------------------------+----------------+----------------------+--------+ | XmNancestorSensitive | XmCSensitive | Boolean | dynamic | G | +-------------------------------+-------------------------------+----------------+----------------------+--------+ | XmNbackground | XmCBackground | Pixel | dynamic | CSG | +-------------------------------+-------------------------------+----------------+----------------------+--------+ | XmNbackgroundPixmap | XmCPixmap | Pixmap | XmUNSPECIFIED_PIXMAP | CSG | +-------------------------------+-------------------------------+----------------+----------------------+--------+ | XmNborderColor | XmCBorderColor | Pixel | XtDefaultForeground | CSG | +-------------------------------+-------------------------------+----------------+----------------------+--------+ | XmNborderPixmap | XmCPixmap | Pixmap | XmUNSPECIFIED_PIXMAP | CSG | +-------------------------------+-------------------------------+----------------+----------------------+--------+ | XmNborderWidth | XmCBorderWidth | Dimension | 0 | CSG | +-------------------------------+-------------------------------+----------------+----------------------+--------+ | XmNcolormap | XmCColormap | Colormap | dynamic | CG | +-------------------------------+-------------------------------+----------------+----------------------+--------+ | XmNdepth | XmCDepth | int | dynamic | CG | +-------------------------------+-------------------------------+----------------+----------------------+--------+ | XmNdestroyCallback | XmCCallback | XtCallbackList | NULL | C | +-------------------------------+-------------------------------+----------------+----------------------+--------+ | XmNheight | XmCHeight | Dimension | dynamic | CSG | +-------------------------------+-------------------------------+----------------+----------------------+--------+ | XmNinitialResourcesPersistent | XmCInitialResourcesPersistent | Boolean | True | C | +-------------------------------+-------------------------------+----------------+----------------------+--------+ | XmNmappedWhenManaged | XmCMappedWhenManaged | Boolean | True | CSG | +-------------------------------+-------------------------------+----------------+----------------------+--------+ | XmNscreen | XmCScreen | Screen * | dynamic | CG | +-------------------------------+-------------------------------+----------------+----------------------+--------+ | XmNsensitive | XmCSensitive | Boolean | True | CSG | +-------------------------------+-------------------------------+----------------+----------------------+--------+ | XmNtranslations | XmCTranslations | XtTranslations | dynamic | CSG | +-------------------------------+-------------------------------+----------------+----------------------+--------+ | XmNwidth | XmCWidth | Dimension | dynamic | CSG | +-------------------------------+-------------------------------+----------------+----------------------+--------+ | XmNx | XmCPosition | Position | 0 | CSG | +-------------------------------+-------------------------------+----------------+----------------------+--------+ | XmNy | XmCPosition | Position | 0 | CSG | +-------------------------------+-------------------------------+----------------+----------------------+--------+ +-------------------------------+-------------------------------+----------------+----------------------+--------+ Translations XmDataField inherits translations from XmTextField. 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), Xm- TextFieldSetStringWcs(3), XmVaCreateDataField(3), and XmVaCreateManaged- DataField(3). VERSION This manual page documents the XmDataField widget shipped in Motif version 2.2 AUTHOR (c) 2002 by Integrated Computer Solutions, Inc. Edited by Kevin Cook. XmDataField(3)
NAME | SYNOPSIS | DESCRIPTION | Callback Routines | RELATED | VERSION | AUTHOR
Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=XmDataField&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>
