XmText (3) Linux Manual Page
XmText — The Text widget class
Synopsis
#include <Xm/Text.h>
Description
Text provides a single-line and multiline text editor for customizing both user and programmatic interfaces. It can be used for single-line string entry, forms entry with verification procedures, and full-window editing. It provides an application with a consistent editing system for textual data. The screen’s textual data adjusts to the application writer’s needs.
Text provides separate callback lists to verify movement of the insert cursor, modification of the text, and changes in input focus. Each of these callbacks provides the verification function with the widget instance, the event that caused the callback, and a data structure specific to the verification type. From this information, the function can verify if the application considers this to be a legitimate state change and can signal the widget whether to continue with the action.
The user interface tailors a new set of translations. The default translations provide key bindings for insert cursor movement, deletion, insertion, and selection of text.
Text allows the user to select regions of text. Selection is based on the model specified in the Inter-Client Communication Conventions Manual (ICCCM). Text supports primary and secondary selection.
In some Asian languages, texts are drawn vertically. Also, some characters are displayed with 90-degree clockwise rotation, and other characters are mapped to vertical glyphs that differ from the normal horizaontal glyphs. Information about which characters require rotation or mapping to vertical glyphs is specified in the X Locale Database (NLS databases) and handled by X library, depending on XNOrientation XOC values. XmText widget should also handle the vertically aligned lines as for editing, entering, or selecting texts.
The vertical writing feature of the XmText widget is enabled when the XmTOP_TO_BOTTOM value is specified for the XmNlayoutDirection resource of the XmText widget. In that case, the horizontal scroll bar is displayed on the bottom of the XmText widget and the vertical scroll bar is displayed on the left side.
Mouse Selection
The Text widget allows text to be edited, inserted, and selected. The user can cut, copy, and paste text by using the clipboard, primary transfer, or secondary transfer. Text also provides a Drag and Drop facility that enables the user to copy or move data within Text or to a different widget. When keyboard focus policy is set to EXPLICIT, the widget that receives focus is the destination widget. In POINTER mode, any keyboard or mouse operation (except secondary selection) in an editable widget establishes that widget as the destination.
If a destination widget becomes insensitive or uneditable, it forfeits its destination status. In EXPLICIT mode, when a widget becomes insensitive, the focus moves to another widget. If that widget is editable, it becomes the destination widget; otherwise, there is no destination widget. The text of any insensitive Text widget is stippled, indicating its state to the user.
The insertion cursor, displayed as an I-beam, shows where input is inserted. Input is inserted just before the insertion cursor.
Text uses the XmQTnavigator, XmQTspecifyRenderTable, and XmQTscrollFrame traits, and holds the XmQTaccessTextual and XmQTtransfer traits. The widget checks its parent for the XmQTscrollFrame trait. If this trait does not exist, then the widget has no scrolling. If the trait does exist, and the ScrollFrame widget has not been initialized, the widget creates two navigators and sets up the scrollbars.
If an application or widget calls the setValue trait method of XmQTaccessTextual, then XmText will call XmTextSetString to set the string value.
Classes
Text inherits behavior, resources, and traits from Core and XmPrimitive.
The class pointer is xmTextWidgetClass.
The class name is XmText.
Data Transfer Behavior
Text supports transfer of the primary, secondary, and clipboard selections and dragging of selected text from the widget. Text can also be the destination for the primary, secondary, and clipboard selections, and it supports dropping of data being dragged onto the widget.
When the XmNconvertCallback procedures are called, the location_data member of the XmConvertCallbackStruct member is NULL if the selected text is being transferred. If the entire text, not the selected text, is being transferred, the value of this member is the widget ID of the Text widget.
As a source of data, Text supports the following targets and associated conversions of data to these targets:
- locale
- If the locale target matches the widget’s locale, the widget transfers the selected text in the encoding of the locale.
COMPOUND_TEXT- The widget transfers the selected text as type
COMPOUND_TEXT. STRING- The widget transfers the selected text as type
STRING. TEXT- If the selected text is fully convertible to the encoding of the locale, the widget transfers the selected text in the encoding of the locale. Otherwise, the widget transfers the selected text as type
COMPOUND_TEXT. UTF8_STRING- The widget transfers the selected text as type
UTF8_STRING. DELETE- The widget deletes the selected text.
_MOTIF_CLIPBOARD_TARGETS- The widget transfers, as type
ATOM, a list of the targets to which the widget can convert data to be placed on the clipboard immediately. If the selected text is fully convertible toSTRING, these includeSTRING; otherwise, they includeCOMPOUND_TEXT. _MOTIF_DEFERRED_CLIPBOARD_TARGETS- The widget transfers, as type
ATOM, a list of the targets it supports for delayed transfer for theCLIPBOARDselection. This widget currently supplies no targets for_MOTIF_DEFERRED_CLIPBOARD_TARGETS. _MOTIF_EXPORT_TARGETS- The widget transfers, as type
ATOM, a list of the targets to be used as the value of the DragContext’sXmNexportTargetsin a drag-and-drop transfer. These includeCOMPOUND_TEXT,UTF8_STRING, the encoding of the locale,STRING,TEXT,BACKGROUND, andFOREGROUND. _MOTIF_LOSE_SELECTION- The widget takes the following actions:
-
- •
- When losing the
PRIMARYselection, it unhighlights the selected text and calls theXmNlosePrimaryCallbackprocedures. - •
- When losing the
SECONDARYselection, it removes the secondary selection highlight. - •
- When losing the
_MOTIF_DESTINATIONselection, if the widget does not have focus, it changes the cursor to indicate that the widget is no longer the destination.
-
As a source of data, Text also supports the following standard Motif targets:
BACKGROUND- The widget transfers
XmNbackgroundas typePIXEL. CLASS- The widget finds the first shell in the widget hierarchy that has a
WM_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 type
WINDOW. COLORMAP- The widget transfers
XmNcolormapas typeCOLORMAP. FOREGROUND- The widget transfers
XmNforegroundas typePIXEL. NAME- The widget finds the first shell in the widget hierarchy that has a
WM_NAMEproperty and transfers the contents as text in the current locale. TARGETS- The widget transfers, as type
ATOM, a list of the targets it supports. These include the standard targets in this list. These also includeCOMPOUND_TEXT,UTF8_STRING, the encoding of the locale,STRING, andTEXT. TIMESTAMP- The widget transfers the timestamp used to acquire the selection as type
INTEGER. _MOTIF_RENDER_TABLE- The widget transfers
XmNrenderTableif it exists, or else the default text render table, as typeSTRING. _MOTIF_ENCODING_REGISTRY- The widget transfers its encoding registry as type
STRING. The value is a list of NULL separated 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.
As a destination for data, Text chooses a target and requests conversion of the selection to that target. If the encoding of the locale is present in the list of available targets, Text chooses a requested target from the available targets in the following order of preference:
- 1.
- The encoding of the locale
- 2.
TEXT- 4.
UTF8_STRING- 3.
COMPOUND_TEXT- 4.
STRING
If the encoding of the locale is not present in the list of available targets, Text chooses a requested target from the available targets in the following order of preference:
- 4.
UTF8_STRING- 1.
COMPOUND_TEXT- 2.
STRING
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).
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 This resource cannot be set in a resource file.
XmNactivateCallback- Specifies the list of callbacks that is called when the user invokes an event that calls the activate() action. The type of the structure whose address is passed to this callback is
XmAnyCallbackStruct. The reason sent by the callback isXmCR_ACTIVATE. XmNautoShowCursorPosition- Ensures that the visible text contains the insert cursor when set to True. If the insert cursor changes, the contents of Text may scroll in order to bring the insertion point into the window. Setting this resource to False, however, does not ensure that Text will not scroll.
XmNcursorPosition- Indicates the position in the text where the current insert cursor is to be located. Position is determined by the number of characters from the beginning of the text. The first character position is 0 (zero).
XmNcursorPositionVisible- If the widget has an
XmPrintShellas one of its ancestors, then the default value isFalse; otherwise, it isTrue. XmNdestinationCallback- Specifies a list of callbacks called when the widget is the destination of a transfer operation. The type of the structure whose address is passed to these callbacks is
XmDestinationCallbackStruct. The reason isXmCR_OK. XmNeditable- When set to True, indicates that the user can edit the text string. Prohibits the user from editing the text when set to False.
- When
XmNeditableis used on a widget it sets the dropsite toXmDROP_SITE_ACTIVE. - When
XmNeditMode- Specifies the set of keyboard bindings used in Text. The default,
XmSINGLE_LINE_EDIT, provides the set of key bindings to be used in editing single-line text.XmMULTI_LINE_EDITprovides the set of key bindings to be used in editing multiline text.- The results of placing a Text widget inside a ScrolledWindow when the Text’s
XmNeditModeisXmSINGLE_LINE_EDITare undefined. - The results of placing a Text widget inside a ScrolledWindow when the Text’s
XmNfocusCallback- Specifies the list of callbacks called when Text accepts input focus. The type of the structure whose address is passed to this callback is
XmAnyCallbackStruct. The reason sent by the callback isXmCR_FOCUS. XmNgainPrimaryCallback- Specifies the list of callbacks called when an event causes the Text widget to gain ownership of the primary selection. The reason sent by the callback is
XmCR_GAIN_PRIMARY. XmNlosePrimaryCallback- Specifies the list of callbacks called when an event causes the Text widget to lose ownership of the primary selection. The reason sent by the callback is
XmCR_LOSE_PRIMARY. XmNlosingFocusCallback- Specifies the list of callbacks called before Text loses input focus. The type of the structure whose address is passed to this callback is
XmTextVerifyCallbackStruct. The reason sent by the callback isXmCR_LOSING_FOCUS. XmNmarginHeight- Specifies the distance between the top edge of the widget window and the text, and between the bottom edge of the widget window and the text.
XmNmarginWidth- Specifies the distance between the left edge of the widget window and the text, and between the right edge of the widget window and the text.
XmNmaxLength- Specifies the maximum length of the text string that can be entered into text from the keyboard. This value must be nonnegative. Strings that are entered by using the
XmNvalueresource or theXmTextSetStringfunction ignore this resource. XmNmodifyVerifyCallback- Specifies the list of callbacks called before text is deleted from or inserted into Text. The type of the structure whose address is passed to this callback is
XmTextVerifyCallbackStruct. The reason sent by the callback isXmCR_MODIFYING_TEXT_VALUE. When multiple Text widgets share the same source, only the widget that initiates the source change will generateXmNmodifyVerifyCallback.- If both
XmNmodifyVerifyCallbackandXmNmodifyVerifyCallbackWcsare registered callback lists, the procedure(s) in theXmNmodifyVerifyCallbacklist is always executed first; and the resulting data, which may have been modified, is passed to theXmNmodifyVerifyCallbackWcscallback routines. - If both
XmNmodifyVerifyCallbackWcs- Specifies the list of callbacks called before text is deleted from or inserted into Text. The type of the structure whose address is passed to this callback is
XmTextVerifyCallbackStructWcs. The reason sent by the callback isXmCR_MODIFYING_TEXT_VALUE. When multiple Text widgets share the same source, only the widget that initiates the source change will generate theXmNmodifyVerifyCallbackWcs.- If both
XmNmodifyVerifyCallbackandXmNmodifyVerifyCallbackWcsare registered callback lists, the procedure(s) in theXmNmodifyVerifyCallbacklist is always executed first; and the resulting data, which may have been modified, is passed to theXmNmodifyVerifyCallbackWcscallback routines. - If both
XmNmotionVerifyCallback- Specifies the list of callbacks called before the insert cursor is moved to a new position. The type of the structure whose address is passed to this callback is
XmTextVerifyCallbackStruct. The reason sent by the callback isXmCR_MOVING_INSERT_CURSOR. It is possible for more than oneXmNmotionVerifyCallbackto be generated from a single action. XmNsource- Specifies the source with which the widget displays text. If no source is specified, the widget creates a default string source. This resource can be used to share text sources between Text widgets.
XmNtopCharacter- Displays the position of text at the top of the window. Position is determined by the number of characters from the beginning of the text. The first character position is 0 (zero).
- If the
XmNeditModeisXmMULTI_LINE_EDIT, the line of text that contains the top character is displayed at the top of the widget without shifting the text left or right.XtGetValuesforXmNtopCharacterreturns the position of the first character in the line that is displayed at the top of the widget. - If the
XmNtotalLines- Indicates the number of lines in the text widget buffer (not necessarily visible). The initial value 1 means the text buffer is empty. The number of lines reported takes into account the
wordWrappolicy (that is, it’s not simply the number of newline characters. XmNvalue- Specifies the string value of the Text widget as a
char*data value. Moves the cursor to position 0 unless a value ofXmNcursorPositionwas explicitly supplied in the argument list. IfXmNvalueandXmNvalueWcsare both defined, the value ofXmNvalueWcssupersedes that ofXmNvalue.XtGetValuesreturns a copy of the value of the internal buffer andXtSetValuescopies the string values into the internal buffer. XmNvalueChangedCallback- Specifies the list of callbacks called after text is deleted from or inserted into Text. The type of the structure whose address is passed to this callback is
XmAnyCallbackStruct. The reason sent by the callback isXmCR_VALUE_CHANGED. When multiple Text widgets share the same source, only the widget that initiates the source change will generate theXmNvalueChangedCallback. This callback represents a change in the source in the Text, not in the Text widget. TheXmNvalueChangedCallbackshould occur only in pairs with anXmNmodifyVerifyCallback, assuming that the doit flag in the callback structure of theXmNmodifyVerifyCallbackis not set to False. XmNvalueWcs- Specifies the string value of the Text widget as a
wchar_t*data value. Moves the cursor to position 0 unless a value ofXmNcursorPositionwas explicitly supplied in the argument list.- This resource cannot be specified in a resource file.
- If
XmNvalueandXmNvalueWcsare both defined, the value ofXmNvalueWcssupersedes that ofXmNvalue.XtGetValuesreturns a copy of the value of the internal buffer encoded as a wide character string.XtSetValuescopies the value of the wide character string into the internal buffer. - This resource cannot be specified in a resource file.
XmNverifyBell- Specifies whether the bell should sound when the verification returns without continuing the action. The default depends on the value of the ancestor VendorShell’s
XmNaudibleWarningresource.XmText Input Resource SetNameClassTypeDefaultAccessXmNpendingDelete XmCPendingDelete Boolean True CSG XmNselectionArray XmCSelectionArray XtPointer default array CSG XmNselectionArrayCount XmCSelectionArrayCount int 4 CSG XmNselectThreshold XmCSelectThreshold int 5 CSG XmNpendingDelete- Indicates that pending delete mode is on when the Boolean value is True. Pending deletion is defined as deletion of the selected text when an insertion is made.
XmNselectionArray- Defines the actions for multiple mouse clicks. The value of the resource is an array of
XmTextScanTypeelements.XmTextScanTypeis an enumeration indicating possible actions. Each mouse click performed within some time of the previous mouse click increments the index into this array and performs the defined action for that index. (This "multiclick" time is specified by the operating environment, and varies among different systems. In general, it is usually set to some fraction of a second.) The possible actions in the order they occur in the default array are as follows:-
- 3.
XmSELECT_POSITION, which resets the insert cursor position.- 4.
XmSELECT_WORD, which selects a word.- 5.
XmSELECT_LINE, which selects a line of text. This action sees a line as delimited by hard newline characters. In other words, if the word wrap feature is on (XmNwordWrapis True), this will ignore the newlines automatically inserted by the widget. This is the default.- 6.
XmSELECT_OUT_LINE, which selects a line of text. This action sees a line as delimited by hard or soft newline characters. In other words, if the word wrap feature is on (XmNwordWrapis True), the newlines automatically inserted by the widget will be treated as delimiting lines.- 7.
XmSELECT_ALL, which selects all of the text.
-
XmNselectionArrayCount- Indicates the number of elements in the
XmNselectionArrayresource. The value must not be negative. XmNselectThreshold- Specifies the number of pixels of motion that is required to select the next character when selection is performed using the click-drag mode of selection. The value must not be negative. This resource also specifies whether a drag should be started and the number of pixels to start a drag when
Btn2DownandBtn1Downare integrated.XmText Output Resource SetNameClassTypeDefaultAccessXmNblinkRate XmCBlinkRate int 500 CSG XmNcolumns XmCColumns short dynamic CSG XmNcursorPositionVisible XmCCursorPositionVisible Boolean True CSG XmNfontList XmCFontList XmFontList dynamic CSG XmNrenderTable XmCRenderTable XmRenderTable dynamic CSG XmNresizeHeight XmCResizeHeight Boolean False CSG XmNresizeWidth XmCResizeWidth Boolean False CSG XmNrows XmCRows short dynamic CSG XmNwordWrap XmCWordWrap Boolean False CSG XmNblinkRate- Specifies the blink rate of the text cursor in milliseconds. The time indicated in the blink rate relates to the time the cursor is visible and the time the cursor is invisible (that is, the time it takes to blink the insertion cursor on and off is twice the blink rate). The cursor does not blink when the blink rate is set to 0 (zero). The value must not be negative.
XmNcolumns- Specifies the initial width of the text window as an integer number of characters. The width equals the number of characters specified by this resource multiplied by the width as derived from the specified font. If the em-space value is available, it is used. If not, the width of the numeral "0" is used. If this is not available, the maximum width is used. For proportionate fonts, the actual number of characters that fit on a given line may be greater than the value specified. The value must be greater than 0 (zero). The default value depends on the value of the
XmNwidthresource. If no width is specified the default is 20.- When the
XmNlayoutDirectionresource isXmTOP_TO_BOTTOM, and if theXmTextwidget resourceXmNeditModeisXmSINGLE_LINE_EDIT, this attribute is ignored. If no width is specified, the default is 1. - When the
XmNcursorPositionVisible- Indicates that the insert cursor position is marked by a text cursor when the Boolean value is True.
XmNfontList- Specifies the font list to be used for Text. The font list is an obsolete structure and is retained only for compatibility with earlier releases of Motif. Use the render table (
XmNrenderTable) instead of font lists wherever possible. If both are specified, the render table will take precedence. If this value is NULL at initialization, the parent hierarchy of the widget is searched for an ancestor that holds theXmQTspecifyRenderTabletrait. If such an ancestor is found, the font list is initialized to theXmTEXT_RENDER_TABLEvalue of the ancestor widget. If no such ancestor is found, the default is implementation dependent.- Text searches the font list for the first occurrence of a font set that has
XmFONTLIST_DEFAULT_TAG. If a default element is not found, the first font set in the font list is used. If the list contains no font sets, the first font in the font list will be used. Refer toXmFontList(3) for more information on a font list structure. - Text searches the font list for the first occurrence of a font set that has
XmNrenderTable- Specifies the render table to be used in deriving a font set or font for rendering text. If both a render table and a font list are specified, the render table will take precedence. If the value of
XmNrenderTableis NULL at initialization, the parent hierarchy of the widget is searched for an ancestor that holds theXmQTspecifyRenderTabletrait. If such an ancestor is found, the font list is initialized to theXmTEXT_RENDER_TABLEvalue of the ancestor widget. If no such ancestor is found, the default is implementation dependent.- Text searches the render table for the first occurrence of a rendition that has the tag
_MOTIF_DEFAULT_LOCALE. If a default element is not found, the first rendition in the table is used. Refer toXmRenderTable(3) for more information on the render table structure. - Text searches the render table for the first occurrence of a rendition that has the tag
XmNresizeHeight- Indicates that Text will attempt to resize its height to accommodate all the text contained in the widget when the Boolean value is True. If the Boolean value is set to True, the text is always displayed, starting from the first position in the source, even if instructed otherwise. This attribute is ignored when the application uses a Text widget whose parent is a ScrolledWindow and when
XmNscrollVerticalis True.- When the
XmNlayoutDirectionresource isXmTOP_TO_BOTTOM, this resource indicates that the text attempts to resize its height to accommodate all the text contained in the widget when the Boolean value isTrue. This attribute is ignored ifXmNwordWrapisTrue. - When the
XmNresizeWidth- Indicates that Text attempts to resize its width to accommodate all the text contained in the widget when the Boolean value is True. This attribute is ignored if
XmNwordWrapis True.- When the
XmNlayoutDirectionresource isXmTOP_TO_BOTTOM, this attribute is still effective even ifXmNwordWrapisTrue. Also, this attribute is ignored when the application uses a text widget whose parent is aScrolledWindowandXmNscrollHorizaontalisTrue. - When the
XmNrows- Specifies the initial height of the text window measured in character heights. This attribute is ignored if the text widget resource
XmNeditModeisXmSINGLE_LINE_EDIT. The value must be greater than 0 (zero). The default value depends on the value of theXmNheightresource. If no height is specified, the default is 1.- When the
XmNlayoutDirectionresource isXmTOP_TO_BOTTOM, this attribute is still effective, even if theXmTextwidget resourceXmNeditModeisXmSINGLE_LINE_EDIT. If no height is specified, the default is 20. - When the
XmNwordWrap- Indicates that lines are to be broken at word breaks (that is, the text does not go off the right edge of the window) when the Boolean value is True. Words are defined as a sequence of characters separated by whitespace. Whitespace is defined as a space, tab, or newline. This attribute is ignored if the text widget resource
XmNeditModeisXmSINGLE_LINE_EDIT. Note that this resource is only valid when the widget is not a scroll one, or, if the widget is a scroll widget, that theXmNscrollHorizontalresource is False.- Indicates that lines are to be broken at word breaks (that is, when the
XmNlayoutDirectionresource isXmTOP_TO_BOTTOM, the text does not go off the bottom edge of the window) when the Boolean value isTrue. - Indicates that lines are to be broken at word breaks (that is, when the
The following resources are used only when text is created in a ScrolledWindow. See the reference page for XmCreateScrolledText.
| ||||||||||||||||||||||||||||||
Note in connection with this table that if the XmNlayoutDirection resource is XmTOP_TO_BOTTOM, the default is True.
XmNscrollHorizontal- Adds a ScrollBar that allows the user to scroll horizontally through text when the Boolean value is True. This resource is forced to False when the Text widget is placed in a ScrolledWindow with
XmNscrollingPolicyset toXmAUTOMATIC.- When the
XmNlayoutDirectionresource isXmTOP_TO_BOTTOM, this attribute is ignored if theXmTextwidget resourceXmNeditModeisXmSINGLE_LINE_EDIT. - When the
XmNscrollLeftSide- Indicates that the vertical ScrollBar should be placed on the left side of the scrolled text window when the Boolean value is True. This attribute is ignored if
XmNscrollVerticalis False or the Text resourceXmNeditModeisXmSINGLE_LINE_EDIT.- When the
XmNlayoutDirectionresource isXmTOP_TO_BOTTOM, this resource is still effective, even if the XmText widget resourceXmNeditModeisXmSINGLE_LINE_EDIT. - When the
XmNscrollTopSide- Indicates that the horizontal ScrollBar should be placed on the top side of the scrolled text window when the Boolean value is True.
- When the
XmNlayoutDirectionresource isXmTOP_TO_BOTTOM, this attribute is ignored ifXmNscrollHorizontalisFalseor theXmtextresourceXmNeditModeisXmSINGLE_LINE_EDIT. - When the
XmNscrollVertical- Adds a ScrollBar that allows the user to scroll vertically through text when the Boolean value is True. This attribute is ignored if the Text resource
XmNeditModeisXmSINGLE_LINE_EDIT. This resource is forced to False when the Text widget is placed in a ScrolledWindow withXmNscrollingPolicyset toXmAUTOMATIC.- When the
XmNlayoutDirectionresource isXmTOP_TO_BOTTOM, this resource is still effective, even if theXmTextwidget resourceXmNeditModeisXmSINGLE_LINE_EDIT. - When the
Inherited Resources
Text 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.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Callback Information
A pointer to the following structure is passed to each callback:
typedef struct
{
int reason;
XEvent * event;
} XmAnyCallbackStruct;
- reason
- Indicates why the callback was invoked
- event
- Points to the
XEventthat triggered the callback
The Text widget defines a new callback structure for use with verification callbacks. Note that not all fields are relevant for every callback reason. The application must first look at the reason field and use only the structure members that are valid for the particular reason. The values startPos, endPos, and text in the callback structure XmTextVerifyCallbackStruct may be modified when the callback is received, and these changes will be reflected as changes made to the source of the Text widget. (For example, all keystrokes can be converted to spaces or NULL characters when a password is entered into a Text widget.) The application programmer should not overwrite the text field, but should attach data to that pointer.
A pointer to the following structure is passed to callbacks for XmNlosingFocusCallback, XmNmodifyVerifyCallback, and XmNmotionVerifyCallback:
typedef struct
{
int reason;
XEvent * event;
Boolean doit;
XmTextPosition currInsert, newInsert;
XmTextPosition startPos, endPos;
XmTextBlock text;
} XmTextVerifyCallbackStruct, *XmTextVerifyPtr;
- reason
- Indicates why the callback was invoked.
- event
- Points to the
XEventthat triggered the callback. It can be NULL. For example, changes made to the Text widget programmatically do not have an event that can be passed to the associated callback. - doit
- Indicates whether the action that invoked the callback is performed. Setting doit to False negates the action. Note that not all actions may be negated. For example,
XmCR_LOSING_FOCUScallbacks may be beyond the control of the widget if they are produced by mouse clicks. - currInsert
- Indicates the current position of the insert cursor.
- newInsert
- Indicates the position at which the user attempts to position the insert cursor.
- startPos
- Indicates the starting position of the text to modify. If the callback is not a modify verification callback, this value is the same as currInsert.
- endPos
- Indicates the ending position of the text to modify. If no text is replaced or deleted, the value is the same as startPos. If the callback is not a modify verification callback, this value is the same as currInsert.
- text
- Points to a structure of type
XmTextBlockRec. This structure holds the textual information to be inserted.
typedef struct
{
char *ptr;
int length;
XmTextFormat format;
} XmTextBlockRec, *XmTextBlock;
-
- ptr
- Points to the text to be inserted.
- length
- Specifies the length of the text to be inserted.
- format
- Specifies the format of the text, either
XmFMT_8_BITorXmFMT_16_BIT.
A pointer to the following structure is passed to callbacks for XmNmodifyVerifyCallbackWcs.
typedef struct
{
int reason;
XEvent *event;
Boolean doit;
XmTextPosition currInsert, newInsert;
XmTextPosition startPos, endPos;
XmTextBlockWcs text;
} XmTextVerifyCallbackStructWcs, *XmTextVerifyPtrWcs;
- reason
- Indicates why the callback was invoked.
- event
- Points to the
XEventthat triggered the callback. It can be NULL. For example, changes made to the Text widget programmatically do not have an event that can be passed to the associated callback. - doit
- Indicates whether the action that invoked the callback is performed. Setting doit to False negates the action. Note that not all actions may be negated. For example,
XmCR_LOSING_FOCUScallbacks may be beyond the control of the widget if they are produced by mouse clicks. - currInsert
- Indicates the current position of the insert cursor.
- newInsert
- Indicates the position at which the user attempts to position the insert cursor.
- startPos
- Indicates the starting position of the text to modify. If the callback is not a modify verification callback, this value is the same as currInsert.
- endPos
- Indicates the ending position of the text to modify. If no text is replaced or deleted, the value is the same as startPos. If the callback is not a modify verification callback, this value is the same as currInsert.
- text
- Points to the following structure of type
XmTextBlockRecWcs. This structure holds the textual information to be inserted.
typedef struct
{
wchar_t *wcsptr;
int length;
} XmTextBlockRecWcs, *XmTextBlockWcs;
-
- wcsptr
- Points to the wide character text to be inserted.
- length
- Specifies the number of characters to be inserted.
The following table describes the reasons for which the individual verification callback structure fields are valid. Note that the event field will never be valid for XmCR_MOVING_INSERT_CURSOR.
|
A pointer to the following callback structure is passed to the XmNdestinationCallback procedures:
typedef struct
{
int reason;
XEvent *event;
Atom selection;
XtEnum operation;
int flags;
XtPointer transfer_id;
XtPointer destination_data;
XtPointer location_data;
Time time;
} XmDestinationCallbackStruct;
- reason
- Indicates why the callback was invoked.
- event
- Points to the
XEventthat triggered the callback. It can be NULL. - selection
- Indicates the selection for which data transfer is being requested. Possible values are
CLIPBOARD,PRIMARY,SECONDARY, and_MOTIF_DROP. - operation
- Indicates the type of transfer operation requested.
-
- •
- When the selection is
PRIMARYorSECONDARY, possible values areXmMOVE,XmCOPY, andXmLINK. - •
- When the selection is
CLIPBOARD, possible values areXmCOPYandXmLINK. - •
- When the selection is
_MOTIF_DROP, possible values areXmMOVE,XmCOPY,XmLINK, andXmOTHER. A value ofXmOTHERmeans that the callback procedure must get further information from theXmDropProcCallbackStructstructure in the destination_data member.
-
- flags
- Indicates whether or not the destination widget is also the source of the data to be transferred. Following are the possible values:
-
XmCONVERTING_NONE- The destination widget is not the source of the data to be transferred.
XmCONVERTING_SAME- The destination widget is the source of the data to be transferred.
-
transfer_id- Serves as a unique ID to identify the transfer transaction.
- destination_data
- Contains information about the destination. When the selection is
_MOTIF_DROP, the callback procedures are called by the drop site’sXmNdropProc, and destination_data is a pointer to theXmDropProcCallbackStructstructure passed to theXmNdropProcprocedure. When the selection isSECONDARY, destination_data is an Atom representing a target recommmended by the selection owner for use in converting the selection. Otherwise, destination_data is NULL. location_data- Contains information about the location where data is to be transferred. The value is always NULL when the selection is
CLIPBOARD. If the value is NULL, the data is to be inserted at the widget’s cursor position. Otherwise, the value is a pointer to anXPointstructure containing the x- and y- coordinates at the location where the data is to be transferred. OnceXmTransferDoneprocedures start to be called,location_datawill no longer be stable. - time
- Indicates the time when the transfer operation began.
Translations
The XmText translations are described in the following list. The actions represent the effective behavior of the associated events, and they may differ in a right-to-left language environment.
The following key names are listed in the X standard key event translation table syntax. This format is the one used by Motif to specify the widget actions corresponding to a given key. A brief overview of the format is provided under VirtualBindings(3). For a complete description of the format, please refer to the X Toolkit Instrinsics Documentation.
≈c s ≈m ≈a<Btn1Down>:- extend-start()
c ≈s ≈m ≈a<Btn1Down>:- move-destination()
≈c ≈s ≈m ≈a<Btn1Down>:- grab-focus()
≈c ≈m ≈a<Btn1Motion>:- extend-adjust()
≈c ≈m ≈a<Btn1Up>:- extend-end()
<Btn2Down>:- process-bdrag()
m ≈a<Btn2Motion>:- secondary-adjust()
≈m a<Btn2Motion>:- secondary-adjust()
s c <Btn2Up>:- link-to()
≈s<Btn2Up>:- copy-to()
≈c<Btn2Up>:- move-to()
:m<Key><osfPrimaryPaste>:- cut-primary()
:a<Key><osfPrimaryPaste>:- cut-primary()
:<Key><osfPrimaryPaste>:- copy-primary()
:m<Key><osfCut>:- cut-primary()
:a<Key><osfCut>:- cut-primary()
:<Key><osfCut>:- cut-clipboard()
:<Key><osfPaste>:- paste-clipboard()
:m<Key><osfCopy>:- copy-primary()
:a<Key><osfCopy>:- copy-primary()
:<Key><osfCopy>:- copy-clipboard()
:s c<Key><osfBeginLine>:- beginning-of-file(
extend) :c<Key><osfBeginLine>:- beginning-of-file()
:s<Key><osfBeginLine>:- beginning-of-line(
extend) :<Key><osfBeginLine>:- beginning-of-line()
:s c<Key><osfEndLine>:- end-of-file(
extend) :c<Key><osfEndLine>:- end-of-file()
:s<Key><osfEndLine>:- end-of-line(
extend) :<Key><osfEndLine>:- end-of-line()
:s<Key><osfPageLeft>:- page-left(
extend) (ignored in vertical writing) :<Key><osfPageLeft>:- page-left() (next-page() in vertical writing)
:s c<Key><osfPageUp>:- page-left(
extend) :c<Key><osfPageUp>:- page-left()
:s<Key><osfPageUp>:- previous-page(
extend) (ignored in vertical writing) :<Key><osfPageUp>:- previous-page() (page-up() in vertical writing)
:s<Key><osfPageRight>:- page-right(
extend) (ignored in vertical writing) :<Key><osfPageRight>:- page-right() (previous-page() in vertical writing)
s c<Key><osfPageDown>:- page-right(
extend) (ignored in vertical writing) :c<Key><osfPageDown>:- page-right()
:s<Key><osfPageDown>:- next-page(
extend) (ignored in vertical writing) :<Key><osfPageDown>:- next-page() (page-down() in vertical writing)
:<Key><osfClear>:- clear-selection()
:<Key><osfBackSpace>:- delete-previous-character()
:s m<Key><osfDelete>:- cut-primary()
:s a<Key><osfDelete>:- cut-primary()
:s<Key><osfDelete>:- cut-clipboard()
:c<Key><osfDelete>:- delete-to-end-of-line()
:<Key><osfDelete>:- delete-next-character()
:c m<Key><osfInsert>:- copy-primary()
:c a<Key><osfInsert>:- copy-primary()
:s<Key><osfInsert>:- paste-clipboard()
:c<Key><osfInsert>:- copy-clipboard()
:s<Key><osfSelect>:- key-select()
:<Key><osfSelect>:- set-anchor()
:<Key><osfSelectAll>:- select-all()
:<Key><osfDeselectAll>:- deselect-all()
:<Key><osfActivate>:- activate()
:<Key><osfAddMode>:- toggle-add-mode()
:<Key><osfHelp>:- Help()
:<Key><osfCancel>:- process-cancel()
:s c<Key><osfLeft>:- backward-word(
extend) ( forward-paragraph(extend) in vertical writing) :c<Key><osfLeft>:- backward-word() (forward-paragraph() in vertical writing)
:s<Key><osfLeft>:- key-select(
left) (process-shift-left() in vertical writing) :<Key><osfLeft>:- backward-character() (process-left() in vertical writing)
:s c<Key><osfRight>:- forward-word(
extend) (backward-paragraph(extend) in vertical writing) :c<Key><osfRight>:- forward-word() (backward-paragraph() in vertical writing)
:s<Key><osfRight>:- key-select(
right) (process-shift-right in vertical writing) :<Key><osfRight>:- forward-character() (process-right() in vertical writing)
:s c<Key><osfUp>:- backward-paragraph(
extend) (backward-word(extend) in vertical writing) :c<Key><osfUp>:- backward-paragraph() (backward-word() in vertical writing)
:s<Key><osfUp>:- process-shift-up() (key-select(
up) in vertical writing) :<Key><osfUp>:- process-up() (backward-character() in vertical writing)
:s c<Key><osfDown>:- forward-paragraph(
extend) (forward-word(extend) in vertical writing) :c<Key><osfDown>:- forward-paragraph() (forward-word() in vertical writing)
:s<Key><osfDown>:- process-shift-down() (key-select(
down) in vertical writing) :<Key><osfDown>:- process-down() (forward-character() in vertical writing)
c ≈m ≈a<Key>slash:- select-all()
c ≈m ≈a<Key>backslash:- deselect-all()
s c ≈m ≈a<Key>Tab:- prev-tab-group()
≈s c ≈m ≈a<Key>Tab:- next-tab-group()
s ≈c ≈m ≈a<Key>Tab:- process-tab(
Prev) ≈s ≈c ≈m ≈a<Key>Tab:- process-tab(
Next) ≈s c ≈m ≈a<Key>Return:- activate()
≈s ≈c ≈m ≈a<Key>Return:- process-return()
≈s c ≈m ≈a<Key>space:- set-anchor()
s c ≈m ≈a<Key>space:- key-select()
s ≈c ≈m ≈a<Key>space:- self-insert()
<Key>:- self-insert()
The Text button event translations are modified when Display’s XmNenableBtn1Transfer resource does not have a value of XmOFF (in other words, it is either XmBUTTON2_TRANSFER or XmBUTTON2_ADJUST). This option allows the actions for selection and transfer to be integrated on <Btn1>, and the actions for extending the selection can be bound to <Btn2>. The actions for <Btn1> that are defined above still apply when the <Btn1> event occurs over text that is not selected. The following actions apply when the <Btn1> event occurs over text that is selected:
<Btn1Down>:- process-bdrag().
<Shift><Btn1Down>:- process-bdrag().
<Ctrl><Btn1Down>:- process-bdrag().
<Btn1Down><Shift><Btn1Up>:- grab-focus(),
extend-end. <Shift><Btn1Down><Shift><Btn1Up>:- extend-start(), extend-end().
<Ctrl><Btn1Down><Shift><Btn1Up>:- move-destination().
When Display’s XmNenableBtn1Transfer resource has a value of XmBUTTON2_ADJUST, the following actions apply:
<Btn2Down>:- extend-start().
<Btn2Motion>:- extend-adjust().
<Btn2Up>:- extend-end().
Action Routines
The XmText action routines are
- activate():
- Calls the callbacks for
XmNactivateCallback. Passes the event to the parent. - backward-character(
extend): - Moves the insertion cursor one character to the left. This action may have different behavior in a right-to-left language environment.
- If called with an argument of extend, moves the insertion cursor as in the case of no argument and extends the current selection.
- The backward-character() action produces calls to the
XmNmotionVerifyCallbackprocedures with reason valueXmCR_MOVING_INSERT_CURSOR. If called with the extend argument, the backward-character() action may produce calls to theXmNgainPrimaryCallbackprocedures. See callback description for more information.- In vertical writing, if
XmNeditModeisXmSINGLE_LINE_EDITandXmNnavigationTypeisXmNONE, traverses to the widget to the left in the tab group. IfXmNeditModeisXmMULTI_LINE_EDIT, moves the insertion cursor to the next line in the same column. - If called with an argument of extend, moves the insertion cursor as in the case of no argument and extends the current selection.
- backward-paragraph(
extend): - If
XmNeditModeisXmMULTI_LINE_EDITand this action is called with no argument, moves the insertion cursor to the first non-whitespace character following the first previous blank line or beginning of the text. If the insertion cursor is already at the beginning of a paragraph, moves the insertion cursor to the beginning of the previous paragraph.- If
XmNeditModeisXmMULTI_LINE_EDITand this action is called with an argument of extend, moves the insertion cursor as in the case of no argument and extends the current selection.- The backward-paragraph() action produces calls to the
XmNmotionVerifyCallbackprocedures with reason valueXmCR_MOVING_INSERT_CURSOR. If called with the extend argument, the backward-paragraph() action may produce calls to theXmNgainPrimaryCallbackprocedures. See callback description for more information. - If
- backward-word(
extend): - If this action is called with no argument, moves the insertion cursor to the first non-whitespace character after the first whitespace character to the left or after the beginning of the line. If the insertion cursor is already at the beginning of a word, moves the insertion cursor to the beginning of the previous word. This action may have different behavior in a locale other than the C locale.
- If called with an argument of extend, moves the insertion cursor as in the case of no argument and extends the current selection.
- The backward-word() action produces calls to the
XmNmotionVerifyCallbackprocedures with reason valueXmCR_MOVING_INSERT_CURSOR. If called with the extend argument, the backward-word() action may produce calls to theXmNgainPrimaryCallbackprocedures. See callback description for more information. - If called with an argument of extend, moves the insertion cursor as in the case of no argument and extends the current selection.
- beep():
- Causes the terminal to beep. The beep() action produces no callbacks.
- beginning-of-file(
extend): - If this action is called with no argument, moves the insertion cursor to the beginning of the text.
- If called with an argument of extend, moves the insertion cursor as in the case of no argument and extends the current selection.
- The beginning-of-file() action produces calls to the
XmNmotionVerifyCallbackprocedures with reason valueXmCR_MOVING_INSERT_CURSOR. If called with the extend argument, the beginning-of-file() action may produce calls to theXmNgainPrimaryCallbackprocedures. See callback description for more information. - If called with an argument of extend, moves the insertion cursor as in the case of no argument and extends the current selection.
- beginning-of-line(
extend): - If this action is called with no argument, moves the insertion cursor to the beginning of the line.
- If called with an argument of extend, moves the insertion cursor as in the case of no argument and extends the current selection.
- The beginning-of-line() action produces calls to the
XmNmotionVerifyCallbackprocedures with reason valueXmCR_MOVING_INSERT_CURSOR. If called with the extend argument, the beginning-of-line() action may produce calls to theXmNgainPrimaryCallbackprocedures. See callback description for more information. - If called with an argument of extend, moves the insertion cursor as in the case of no argument and extends the current selection.
- clear-selection():
- Clears the current selection by replacing each character except
<Return>with a<space>character.- The clear-selection() action produces calls to the
XmNmodifyVerifyCallbackprocedures with reason valueXmCR_MODIFYING_TEXT_VALUEand theXmNvalueChangedCallbackprocedures with reason valueXmCR_VALUE_CHANGED. - The clear-selection() action produces calls to the
- copy-clipboard():
- If this widget owns the primary selection, this action copies the selection to the clipboard. This action calls the
XmNconvertCallbackprocedures, possibly multiple times, for theCLIPBOARDselection. - copy-primary():
- Copies the primary selection to just before the insertion cursor. This action calls the
XmNdestinationCallbackprocedures for thePRIMARYselection and theXmCOPYoperation. It calls the selection owner’sXmNconvertCallbackprocedures, possibly multiple times, for thePRIMARYselection.- In addition, the copy-primary() action produces calls to the
XmNmodifyVerifyCallbackprocedures with reason valueXmCR_MODIFYING_TEXT_VALUE, to theXmNvalueChangedCallbackprocedures with reason valueXmCR_VALUE_CHANGED, and to theXmNmotionVerifyCallbackprocedures with reason valueXmCR_MOVING_INSERT_CURSOR. - In addition, the copy-primary() action produces calls to the
- copy-to():
- If a secondary selection exists, this action copies the secondary selection to the insertion position of the destination component. If the primary selection is in the destination widget, it will be deselected. Otherwise, there is no effect on the primary selection.
- This action calls the destination’s
XmNdestinationCallbackprocedures for theSECONDARYselection and theXmCOPYoperation. The destination’sXmNdestinationCallbackprocedures or the destination component itself invokes the selection owner’sXmNconvertCallbackprocedures, possibly multiple times, for theSECONDARYselection.- If no secondary selection exists, this action copies the primary selection to the pointer position. This action calls the
XmNdestinationCallbackprocedures for thePRIMARYselection and theXmCOPYoperation. It calls the selection owner’sXmNconvertCallbackprocedures, possibly multiple times, for thePRIMARYselection.- In addition, the copy-to() action produces calls to the
XmNmodifyVerifyCallbackprocedures with reason valueXmCR_MODIFYING_TEXT_VALUE, to theXmNvalueChangedCallbackprocedures with reason valueXmCR_VALUE_CHANGED, and to theXmNmotionVerifyCallbackprocedures with reason valueXmCR_MOVING_INSERT_CURSOR. If there is no secondary selection, the copy-to() action may produce calls to theXmNgainPrimaryCallbackprocedures. See callback description for more information. - This action calls the destination’s
- cut-clipboard():
- If this widget owns the primary selection, this action cuts the selection to the clipboard. This action calls the
XmNconvertCallbackprocedures, possibly multiple times, for theCLIPBOARDselection. If the transfer is successful, this action then calls theXmNconvertCallbackprocedures for theCLIPBOARDselection and theDELETEtarget.- In addition, the cut-clipboard() action produces calls to the
XmNmodifyVerifyCallbackprocedures with reason valueXmCR_MODIFYING_TEXT_VALUE, and theXmNvalueChangedCallbackprocedures with reason valueXmCR_VALUE_CHANGED. - In addition, the cut-clipboard() action produces calls to the
- cut-primary():
- Cuts the primary selection and pastes it just before the insertion cursor. This action calls the
XmNdestinationCallbackprocedures for thePRIMARYselection and theXmMOVEoperation. It calls the selection owner’sXmNconvertCallbackprocedures, possibly multiple times, for thePRIMARYselection. If the transfer is successful, this action then calls the selection owner’sXmNconvertCallbackprocedures for thePRIMARYselection and theDELETEtarget. The cut-primary() action may produce calls to theXmNgainPrimaryCallbackprocedures. See callback description for more information.- In addition, the cut-primary() action produces calls to the
XmNmotionVerifyCallbackprocedures with reason valueXmCR_MOVING_INSERT_CURSOR, theXmNmodifyVerifyCallbackprocedures with reason valueXmCR_MODIFYING_TEXT_VALUE, and theXmNvalueChangedCallbackprocedures with reason valueXmCR_VALUE_CHANGED. - In addition, the cut-primary() action produces calls to the
- delete-next-character():
- In normal mode, if there is a nonnull selection, deletes the selection; otherwise, deletes the character following the insertion cursor. In add mode, if there is a nonnull selection, the cursor is not disjoint from the selection, and
XmNpendingDeleteis set to True, deletes the selection; otherwise, deletes the character following the insertion cursor. This may impact the selection.- The delete-next-character() action produces calls to the
XmNmodifyVerifyCallbackprocedures with reason valueXmCR_MODIFYING_TEXT_VALUE, and theXmNvalueChangedCallbackprocedures with reason valueXmCR_VALUE_CHANGED. - The delete-next-character() action produces calls to the
- delete-next-word():
- In normal mode, if there is a nonnull selection, deletes the selection; otherwise, deletes the characters following the insertion cursor to the next space, tab or end-of-line character. In add mode, if there is a nonnull selection, the cursor is not disjoint from the selection, and
XmNpendingDeleteis set to True, deletes the selection; otherwise, deletes the characters following the insertion cursor to the next space, tab or end-of-line character. This may impact the selection. This action may have different behavior in a locale other than the C locale.- The delete-next-word() action produces calls to the
XmNmodifyVerifyCallbackprocedures with reason valueXmCR_MODIFYING_TEXT_VALUE, and theXmNvalueChangedCallbackprocedures with reason valueXmCR_VALUE_CHANGED. - The delete-next-word() action produces calls to the
- delete-previous-character():
- In normal mode, if there is a nonnull selection, deletes the selection; otherwise, deletes the character of text immediately preceding the insertion cursor. In add mode, if there is a nonnull selection, the cursor is not disjoint from the selection, and
XmNpendingDeleteis set to True, deletes the selection; otherwise, deletes the character of text immediately preceding the insertion cursor. This may impact the selection.- The delete-previous-character() action produces calls to the
XmNmodifyVerifyCallbackprocedures with reason valueXmCR_MODIFYING_TEXT_VALUE, theXmNvalueChangedCallbackprocedures with reason valueXmCR_VALUE_CHANGED, and theXmNmotionVerifyCallbackprocedures with reason valueXmCR_MOVING_INSERT_CURSOR. - The delete-previous-character() action produces calls to the
- delete-previous-word():
- In normal mode, if there is a nonnull selection, deletes the selection; otherwise, deletes the characters preceding the insertion cursor to the next space, tab or beginning-of-line character. In add mode, if there is a nonnull selection, the cursor is not disjoint from the selection, and
XmNpendingDeleteis set to True, deletes the selection; otherwise, deletes the characters preceding the insertion cursor to the next space, tab or beginning-of-line character. This may impact the selection. This action may have different behavior in a locale other than the C locale.- The delete-previous-word() action produces calls to the
XmNmodifyVerifyCallbackprocedures with reason valueXmCR_MODIFYING_TEXT_VALUE, theXmNvalueChangedCallbackprocedures with reason valueXmCR_VALUE_CHANGED, and theXmNmotionVerifyCallbackprocedures with reason valueXmCR_MOVING_INSERT_CURSOR. - The delete-previous-word() action produces calls to the
- delete-selection():
- Deletes the current selection.
- The delete-selection() action produces calls to the
XmNmodifyVerifyCallbackprocedures with reason valueXmCR_MODIFYING_TEXT_VALUE, theXmNvalueChangedCallbackprocedures with reason valueXmCR_VALUE_CHANGED, and theXmNmotionVerifyCallbackprocedures with reason valueXmCR_MOVING_INSERT_CURSOR. - The delete-selection() action produces calls to the
- delete-to-end-of-line():
- In normal mode, if there is a nonnull selection, deletes the selection; otherwise, deletes the characters following the insertion cursor to the next end of line character. In add mode, if there is a nonnull selection, the cursor is not disjoint from the selection, and
XmNpendingDeleteis set to True, deletes the selection; otherwise, deletes the characters following the insertion cursor to the next end of line character. This may impact the selection.- The
delete-to-end-of-line()action produces calls to theXmNmodifyVerifyCallbackprocedures with reason valueXmCR_MODIFYING_TEXT_VALUE, and theXmNvalueChangedCallbackprocedures with reason valueXmCR_VALUE_CHANGED. - The
- delete-to-start-of-line():
- In normal mode, if there is a nonnull selection, deletes the selection; otherwise, deletes the characters preceding the insertion cursor to the previous beginning-of-line character. In add mode, if there is a nonnull selection, the cursor is not disjoint from the selection, and
XmNpendingDeleteis set to True, deletes the selection; otherwise, deletes the characters preceding the insertion cursor to the previous beginning-of-line character. This may impact the selection.- The delete-to-start-of-line() action produces calls to the
XmNmodifyVerifyCallbackprocedures with reason valueXmCR_MODIFYING_TEXT_VALUE, theXmNvalueChangedCallbackprocedures with reason valueXmCR_VALUE_CHANGED, and theXmNmotionVerifyCallbackprocedures with reason valueXmCR_MOVING_INSERT_CURSOR. - The delete-to-start-of-line() action produces calls to the
- deselect-all():
- Deselects the current selection. The deselect-all() action produces no callbacks.
- end-of-file(
extend): - If this action is called with no argument, moves the insertion cursor to the end of the text.
- If called with an argument of extend, moves the insertion cursor as in the case of no argument and extends the current selection.
- The end-of-file() action produces calls to the
XmNmotionVerifyCallbackprocedures with reason valueXmCR_MOVING_INSERT_CURSOR. If called with the extend argument, the end-of-file() action may produce calls to theXmNgainPrimaryCallbackprocedures. See callback description for more information. - If called with an argument of extend, moves the insertion cursor as in the case of no argument and extends the current selection.
- end-of-line(
extend): - If this action is called with no argument, moves the insertion cursor to the end of the line. If called with an argument of extend, moves the insertion cursor as in the case of no argument and extends the current selection.
- The end-of-line() action produces calls to the
XmNmotionVerifyCallbackprocedures with reason valueXmCR_MOVING_INSERT_CURSOR. If called with the extend argument, the end-of-line() action may produce calls to theXmNgainPrimaryCallbackprocedures. See callback description for more information. - The end-of-line() action produces calls to the
- extend-adjust():
- Selects text from the anchor to the pointer position and deselects text outside that range. Moving the pointer over several lines selects text from the anchor to the end of each line the pointer moves over and up to the pointer position on the current line.
- The extend-adjust() action produces calls to the
XmNmotionVerifyCallbackprocedures with reason valueXmCR_MOVING_INSERT_CURSOR. The extend-adjust() action may produce calls to theXmNgainPrimaryCallbackprocedures. See callback description for more information. - The extend-adjust() action produces calls to the
- extend-end():
- Moves the insertion cursor to the position of the pointer. The extend-end() action is used to commit the selection. After this action has been done, process-cancel() will no longer cancel the selection.
- The extend-end() action produces calls to the
XmNmotionVerifyCallbackprocedures with reason valueXmCR_MOVING_INSERT_CURSOR. The extend-end() action may produce calls to theXmNgainPrimaryCallbackprocedures. See callback description for more information. - The extend-end() action produces calls to the
- extend-start():
- Adjusts the anchor using the balance-beam method. Selects text from the anchor to the pointer position and deselects text outside that range. The extend-start() action may produce no callbacks, however, the extend-start() action may produce calls to the
XmNgainPrimaryCallbackprocedures. See callback description for more information. - forward-character(
extend): - Moves the insertion cursor one character to the right. This action may have different behavior in a right-to-left language environment.
- If called with an argument of extend, moves the insertion cursor as in the case of no argument and extends the current selection.
- The forward-character() action produces calls to the
XmNmotionVerifyCallbackprocedures with reason valueXmCR_MOVING_INSERT_CURSOR. If called with the extend argument, the forward-character() action may produce calls to theXmNgainPrimaryCallbackprocedures. See callback description for more information.- In vertical writing, if
XmNeditModeisXmSINGLE_LINE_EDITandXmNnavigationTypeisXmNONE, traverses to the widget to the right in the tab group. IfXmNeditModeisXmMULTI_LINE_EDIT, moves the insertion cursor to the previous line in the same column. - If called with an argument of extend, moves the insertion cursor as in the case of no argument and extends the current selection.
- forward-paragraph(
extend): - If
XmNeditModeisXmMULTI_LINE_EDIT, and this action is called with no argument, moves the insertion cursor to the first non-whitespace character following the next blank line. If the insertion cursor is already at the beginning of a paragraph, moves the insertion cursor to the beginning of the next paragraph.- If
XmNeditModeisXmMULTI_LINE_EDITand this action is called with an argument of extend, moves the insertion cursor as in the case of no argument and extends the current selection.- The forward-paragraph() action produces calls to the
XmNmotionVerifyCallbackprocedures with reason valueXmCR_MOVING_INSERT_CURSOR. If called with the extend argument, the forward-paragraph() action may produce calls to theXmNgainPrimaryCallbackprocedures. See callback description for more information. - If
- forward-word(
extend): - If this action is called with no argument, moves the insertion cursor to the first whitespace character or end-of-line following the next non-whitespace character. If the insertion cursor is already at the end of a word, moves the insertion cursor to the end of the next word. This action may have different behavior in a locale other than the C locale.
- If called with an argument of extend, moves the insertion cursor as in the case of no argument and extends the current selection.
- The forward-word() action produces calls to the
XmNmotionVerifyCallbackprocedures with reason valueXmCR_MOVING_INSERT_CURSOR. If called with the extend argument, the forward-word() action may produce calls to theXmNgainPrimaryCallbackprocedures. See callback description for more information. - If called with an argument of extend, moves the insertion cursor as in the case of no argument and extends the current selection.
- grab-focus():
- This key binding performs the action defined in the
XmNselectionArray, depending on the number of multiple mouse clicks. The default selection array ordering is one click to move the insertion cursor to the pointer position, two clicks to select a word, three clicks to select a line of text, and four clicks to select all text. A single click also deselects any selected text and sets the anchor at the pointer position. This action may have different behavior in a locale other than the C locale.- The grab-focus() action produces calls to the
XmNmotionVerifyCallbackprocedures with reason valueXmCR_MOVING_INSERT_CURSOR. - The grab-focus() action produces calls to the
- Help():
- Calls the callbacks for
XmNhelpCallbackif any exist. If there are no help callbacks for this widget, this action calls the help callbacks for the nearest ancestor that has them. - insert-string(string
): - If
XmNpendingDeleteis True and the cursor is not disjoint from the current selection, deletes the entire selection. Inserts string before the insertion cursor.- The insert-string() action produces calls to the
XmNmodifyVerifyCallbackprocedures with reason valueXmCR_MODIFYING_TEXT_VALUE, theXmNvalueChangedCallbackprocedures with reason valueXmCR_VALUE_CHANGED, and theXmNmotionVerifyCallbackprocedures with reason valueXmCR_MOVING_INSERT_CURSOR. Note that, in the case of an empty string, no callbacks will be called, since no modification will have been done. However, if the insertion position is inside the current selection,insert-stringwith an empty string will cause the selection to be deselected, and theXmNmotionVerifyCallbackprocedures to be called with reason valueXmCR_MOVING_INSERT_CURSOR,XmCR_MODIFYING_TEXT_VALUE, andXmCR_VALUE_CHANGED. - The insert-string() action produces calls to the
- key-select(
right|left): - If called with an argument of right, moves the insertion cursor one character to the right and extends the current selection. If called with an argument of left, moves the insertion cursor one character to the left and extends the current selection. If called with no argument, extends the current selection.
- Note that after a
key-selectaction, the selection will still begin at the original anchor, and will extend to the position indicated in the action call. If this new position is on the opposite side of the selection anchor from the previous selection boundary, the original selection will be deselected.- The key-select() action produces calls to the
XmNmotionVerifyCallbackprocedures with reason valueXmCR_MOVING_INSERT_CURSOR. The key-select() action may produce calls to theXmNgainPrimaryCallbackprocedures. See callback description for more information.- In vertical writing, if called with the argument
left, and ifXmNeditModeisXmMULTI_LINE_EDIT, moves the insertion cursor to the next line in the same column. In vertical writing, if called with the argumentright, and ifXmNeditModeisXmMULTI_LINE_EDIT, moves the insertion cursor to the previous line in the same column.) - Note that after a
- kill-next-character():
- In normal mode, if there is a nonnull selection, kills the selection; otherwise, kills the character following the insertion cursor and stores the character in the cut buffer. In add mode, if there is a nonnull selection, the cursor is not disjoint from the selection, and
XmNpendingDeleteis set to True, deletes the selection; otherwise, kills the character following the insertion cursor and stores the character in the cut buffer. This may impact the selection.- The killed text is stored in
CUT_BUFFER0.- The kill-next-character() action produces calls to the
XmNmodifyVerifyCallbackprocedures with reason valueXmCR_MODIFYING_TEXT_VALUE, theXmNvalueChangedCallbackprocedures with reason valueXmCR_VALUE_CHANGED, and theXmNmotionVerifyCallbackprocedures with reason valueXmCR_MOVING_INSERT_CURSOR. - The killed text is stored in
- kill-next-word():
- In normal mode, if there is a nonnull selection, deletes the selection; otherwise, kills the characters following the insertion cursor to the next space, tab or end-of-line character, and stores the characters in the cut buffer. In add mode, if there is a nonnull selection, the cursor is not disjoint from the selection, and
XmNpendingDeleteis set to True, deletes the selection; otherwise, kills the characters following the insertion cursor to the next space, tab or end-of-line character, and stores the characters in the cut buffer. This may impact the selection. This action may have different behavior in a locale other than the C locale.- The killed text is stored in
CUT_BUFFER0.- The kill-next-word() action produces calls to the
XmNmodifyVerifyCallbackprocedures with reason valueXmCR_MODIFYING_TEXT_VALUE, theXmNvalueChangedCallbackprocedures with reason valueXmCR_VALUE_CHANGED, and theXmNmotionVerifyCallbackprocedures with reason valueXmCR_MOVING_INSERT_CURSOR. - The killed text is stored in
- kill-previous-character():
- In normal mode, if there is a nonnull selection, deletes the selection; otherwise, kills the character immediately preceding the insertion cursor and stores the character in the cut buffer. In add mode, if there is a nonnull selection, the cursor is not disjoint from the selection, and
XmNpendingDeleteis set to True, deletes the selection; otherwise, kills the character immediately preceding the insertion cursor and stores the character in the cut buffer. This may impact the selection.- The killed text is stored in
CUT_BUFFER0.- The kill-previous-character() action produces calls to the
XmNmodifyVerifyCallbackprocedures with reason valueXmCR_MODIFYING_TEXT_VALUE, theXmNvalueChangedCallbackprocedures with reason valueXmCR_VALUE_CHANGED, and theXmNmotionVerifyCallbackprocedures with reason valueXmCR_MOVING_INSERT_CURSOR. - The killed text is stored in
- kill-previous-word():
- In normal mode, if there is a nonnull selection, deletes the selection; otherwise, kills the characters preceding the insertion cursor up to the next space, tab or beginning-of-line character, and stores the characters in the cut buffer. In add mode, if there is a nonnull selection, the cursor is not disjoint from the selection, and
XmNpendingDeleteis set to True, deletes the selection; otherwise, kills the characters preceding the insertion cursor up to the next space, tab or beginning-of-line character, and stores the characters in the cut buffer. This may impact the selection. This action may have different behavior in a locale other than the C locale.- The killed text is stored in
CUT_BUFFER0.- The kill-previous-word() action produces calls to the
XmNmodifyVerifyCallbackprocedures with reason valueXmCR_MODIFYING_TEXT_VALUE, theXmNvalueChangedCallbackprocedures with reason valueXmCR_VALUE_CHANGED, and theXmNmotionVerifyCallbackprocedures with reason valueXmCR_MOVING_INSERT_CURSOR. - The killed text is stored in
- kill-selection():
- Kills the currently selected text and stores the text in the cut buffer.
- The killed text is stored in
CUT_BUFFER0.- The kill-selection() action produces calls to the
XmNmodifyVerifyCallbackprocedures with reason valueXmCR_MODIFYING_TEXT_VALUE, theXmNvalueChangedCallbackprocedures with reason valueXmCR_VALUE_CHANGED, and theXmNmotionVerifyCallbackprocedures with reason valueXmCR_MOVING_INSERT_CURSOR. - The killed text is stored in
- kill-to-end-of-line():
- In normal mode, if there is a nonnull selection, deletes the selection; otherwise, kills the characters following the insertion cursor to the next end-of-line character and stores the characters in the cut buffer. In add mode, if there is a nonnull selection, the cursor is not disjoint from the selection, and
XmNpendingDeleteis set to True, deletes the selection; otherwise, kills the characters following the insertion cursor to the next end of line character and stores the characters in the cut buffer. This may impact the selection.- The killed text is stored in
CUT_BUFFER0.- The kill-to-end-of-line() action produces calls to the
XmNmodifyVerifyCallbackprocedures with reason valueXmCR_MODIFYING_TEXT_VALUE, and theXmNvalueChangedCallbackprocedures with reason valueXmCR_VALUE_CHANGED. In the case where there is a non-null selection to be deleted, this action may also produce calls to theXmNmotionVerifyCallbackprocedures with reason valueXmCR_MOVING_INSERT_CURSOR. - The killed text is stored in
- kill-to-start-of-line():
- In normal mode, if there is a nonnull selection, deletes the selection; otherwise, kills the characters preceding the insertion cursor to the next beginning-of-line character and stores the characters in the cut buffer. In add mode, if there is a nonnull selection, the cursor is not disjoint from the selection, and
XmNpendingDeleteis set to True, deletes the selection; otherwise, kills the characters preceding the insertion cursor to the next beginning-of-line character and stores the characters in the cut buffer. This may impact the selection.- The killed text is stored in
CUT_BUFFER0.- The kill-to-start-of-line() action produces calls to the
XmNmodifyVerifyCallbackprocedures with reason valueXmCR_MODIFYING_TEXT_VALUE, theXmNvalueChangedCallbackprocedures with reason valueXmCR_VALUE_CHANGED, and theXmNmotionVerifyCallbackprocedures with reason valueXmCR_MOVING_INSERT_CURSOR. - The killed text is stored in
- link-primary():
- Places a link to the primary selection just before the insertion cursor. This action calls the
XmNdestinationCallbackprocedures for thePRIMARYselection and theXmLINKoperation. The Text widget itself performs no transfers; theXmNdestinationCallbackprocedures are responsible for inserting the link to the primary selection and for taking any related actions. - link-to():
- If a secondary selection exists, this action places a link to the secondary selection at the insertion position of the destination component. This action calls the destination’s
XmNdestinationCallbackprocedures for theSECONDARYselection and theXmLINKoperation.- If no secondary selection exists, this action places a link to the primary selection at the pointer position. This action calls the
XmNdestinationCallbackprocedures for thePRIMARYselection and theXmLINKoperation.- The Text widget itself performs no transfers; the
XmNdestinationCallbackprocedures are responsible for inserting the link to the primary or secondary selection and for taking any related actions. - If no secondary selection exists, this action places a link to the primary selection at the pointer position. This action calls the
- move-destination():
- Moves the insertion cursor to the pointer position without changing any existing current selection. If there is a current selection, sets the widget as the destination widget. This also moves the widget focus to match the insertion cursor.
- The move-destination() action produces calls to the
XmNmotionVerifyCallbackprocedures with reason valueXmCR_MOVING_INSERT_CURSOR. - The move-destination() action produces calls to the
- move-to():
- If a secondary selection exists, this action moves the secondary selection to the insertion position of the destination component. If the secondary selection is in the destination widget, and the secondary selection and the primary selection overlap, the result is undefined. This action calls the destination’s
XmNdestinationCallbackprocedures for theSECONDARYselection and theXmMOVEoperation. The destination’sXmNdestinationCallbackprocedures or the destination component itself invokes the selection owner’sXmNconvertCallbackprocedures, possibly multiple times, for theSECONDARYselection. If the transfer is successful, this action then calls the selection owner’sXmNconvertCallbackprocedures for theSECONDARYselection and theDELETEtarget.- If no secondary selection exists, this action moves the primary selection to the pointer position. This action calls the
XmNdestinationCallbackprocedures for thePRIMARYselection and theXmMOVEoperation. It calls the selection owner’sXmNconvertCallbackprocedures, possibly multiple times, for thePRIMARYselection. If the transfer is successful, this action then calls the selection owner’sXmNconvertCallbackprocedures for thePRIMARYselection and theDELETEtarget.- The move-to() action produces calls to the
XmNmodifyVerifyCallbackprocedures with reason valueXmCR_MODIFYING_TEXT_VALUE, theXmNvalueChangedCallbackprocedures with reason valueXmCR_VALUE_CHANGED, and theXmNmotionVerifyCallbackprocedures with reason valueXmCR_MOVING_INSERT_CURSOR. If there is no secondary selection, the move-to() action may produce calls to theXmNgainPrimaryCallbackprocedures. See callback description for more information. - If no secondary selection exists, this action moves the primary selection to the pointer position. This action calls the
- newline():
- If
XmNpendingDeleteis True and the cursor is not disjoint from the current selection, deletes the entire selection. Inserts a newline before the insertion cursor.- The newline() action produces calls to the
XmNmodifyVerifyCallbackprocedures with reason valueXmCR_MODIFYING_TEXT_VALUE, theXmNvalueChangedCallbackprocedures with reason valueXmCR_VALUE_CHANGED, and theXmNmotionVerifyCallbackprocedures with reason valueXmCR_MOVING_INSERT_CURSOR. - The newline() action produces calls to the
- newline-and-backup():
- If
XmNpendingDeleteis True and the cursor is not disjoint from the current selection, deletes the entire selection. Inserts a newline just before the insertion cursor and repositions the insertion cursor to the end of the line before the newline.- The newline-and-backup() action produces calls to the
XmNmodifyVerifyCallbackprocedures with reason valueXmCR_MODIFYING_TEXT_VALUE, and theXmNvalueChangedCallbackprocedures with reason valueXmCR_VALUE_CHANGED. - The newline-and-backup() action produces calls to the
- newline-and-indent():
- If
XmNpendingDeleteis True and the cursor is not disjoint from the current selection, deletes the entire selection. Inserts a newline and then the same number of whitespace characters as at the beginning of the previous line.- The newline-and-indent() action produces calls to the
XmNmodifyVerifyCallbackprocedures with reason valueXmCR_MODIFYING_TEXT_VALUE, theXmNvalueChangedCallbackprocedures with reason valueXmCR_VALUE_CHANGED, and theXmNmotionVerifyCallbackprocedures with reason valueXmCR_MOVING_INSERT_CURSOR. - The newline-and-indent() action produces calls to the
- next-line():
- Moves the insertion cursor to the next line.
- The next-line() action produces calls to the
XmNmotionVerifyCallbackprocedures with reason valueXmCR_MOVING_INSERT_CURSOR. - The next-line() action produces calls to the
- next-page(
extend): - If
XmNeditModeisXmMULTI_LINE_EDITand this action is called with no argument, moves the insertion cursor forward one page.- If
XmNeditModeisXmMULTI_LINE_EDITand this action is called with an argument of extend, it moves the insertion cursor as in the case of no argument and extends the current selection.- The next-page() action produces calls to the
XmNmotionVerifyCallbackprocedures with reason valueXmCR_MOVING_INSERT_CURSOR. If called with the extend argument, the next-page() action may produce calls to theXmNgainPrimaryCallbackprocedures. See callback description for more information.- In vertical writing, scrolls the viewing window down one page of text.
- If
- next-tab-group():
- Traverses to the next tab group.
- The next-tab-group() action produces no callbacks, unless it results in the widget losing focus, in which case, the
XmNlosingFocusCallbackprocedures are called with reason valueXmCR_LOSING_FOCUS. - The next-tab-group() action produces no callbacks, unless it results in the widget losing focus, in which case, the
- page-left(
extend): - If
XmNeditModeisXmMULTI_LINE_EDITand this action is called with no argument, moves the insertion cursor back one page.- If
XmNeditModeisXmMULTI_LINE_EDITand this action is called with an argument of extend, it moves the insertion cursor as in the case of no argument and extends the current selection.- The page-left() action produces calls to the
XmNmotionVerifyCallbackprocedures with reason valueXmCR_MOVING_INSERT_CURSOR. If called with the extend argument, the page-left() action may produce calls to theXmNgainPrimaryCallbackprocedures. See callback description for more information. - If
- page-right(
extend): - If
XmNeditModeisXmMULTI_LINE_EDITand this action is called with no argument, moves the insertion cursor forward one page.- If
XmNeditModeisXmMULTI_LINE_EDITand this action is called with an argument of extend, it moves the insertion cursor as in the case of no argument and extends the current selection.- The page-right() action produces calls to the
XmNmotionVerifyCallbackprocedures with reason valueXmCR_MOVING_INSERT_CURSOR. If called with the extend argument, the page-right() action may produce calls to theXmNgainPrimaryCallbackprocedures. See callback description for more information. - If
- paste-clipboard():
- Pastes the contents of the clipboard before the insertion cursor. This action calls the
XmNdestinationCallbackprocedures for theCLIPBOARDselection and theXmCOPYoperation.- The paste-clipboard() action produces calls to the
XmNmodifyVerifyCallbackprocedures with reason valueXmCR_MODIFYING_TEXT_VALUE, theXmNvalueChangedCallbackprocedures with reason valueXmCR_VALUE_CHANGED, and theXmNmotionVerifyCallbackprocedures with reason valueXmCR_MOVING_INSERT_CURSOR. - The paste-clipboard() action produces calls to the
- prev-tab-group():
- Traverses to the previous tab group.
- The prev-tab-group() action produces no callbacks, unless it results in the widget losing focus, in which case, the
XmNlosingFocusCallbackprocedures are called with reason valueXmCR_LOSING_FOCUS. - The prev-tab-group() action produces no callbacks, unless it results in the widget losing focus, in which case, the
- previous-line():
- Moves the insertion cursor to the previous line.
- The previous-line() action produces calls to the
XmNmotionVerifyCallbackprocedures with reason valueXmCR_MOVING_INSERT_CURSOR. - The previous-line() action produces calls to the
- previous-page(
extend): - If
XmNeditModeisXmMULTI_LINE_EDITand this action is called with no argument, moves the insertion cursor back one page.- If
XmNeditModeisXmMULTI_LINE_EDITand this action is called with an argument of extend, it moves the insertion cursor as in the case of no argument and extends the current selection.- The previous-page() action produces calls to the
XmNmotionVerifyCallbackprocedures with reason valueXmCR_MOVING_INSERT_CURSOR. If called with the extend argument, the previous-page() action may produce calls to theXmNgainPrimaryCallbackprocedures. See callback description for more information.- In vertical writing, if called without an argument, scrolls the viewing window up one page of text.
- If
- process-bdrag()
- If the pointer is within the selection, this action starts a drag operation for the selection. This action sets the
XmNconvertProcof the DragContext to a function that calls theXmNconvertCallbackprocedures, possibly multiple times, for the_MOTIF_DROPselection.- If no selection exists or the pointer is outside the selection, this action prepares to start a secondary selection at the pointer position.
Note:procedures as focus is lost (by each widget) as well as callbacks to the- Note that when dragging a secondary selection to a different widget, focus will shift momentarily to the second widget, and then back to the original widget. This will generate callbacks to the XmNlosingFocusCallback
XmNfocusCallbackprocedures as focus is regained.
- process-cancel():
- Cancels the current extend-adjust(), secondary-adjust() or process-bdrag() operation and leaves the selection state as it was before the operation; otherwise, and if the parent is a manager, passes the event to the parent.
- process-down(
extend): - If
XmNeditModeisXmSINGLE_LINE_EDIT, andXmNnavigationTypeisXmNONE, traverses to the widget below the current one in the tab group.- If
XmNeditModeisXmMULTI_LINE_EDITand this action is called with an argument of extend, moves the insertion cursor as in the case of no argument and extends the current selection.- In this case, the action will produce the
XmNlosingFocusCallbackcallbacks with reason valueXmCR_LOSING_FOCUS.- If
XmNeditModeisXmMULTI_LINE_EDIT, moves the insertion cursor down one line.- The process-down() action produces calls to the
XmNmotionVerifyCallbackprocedures with reason valueXmCR_MOVING_INSERT_CURSOR.- In vertical writing, moves the insertion cursor one character down.
- If
- process-home():
- Moves the insertion cursor to the beginning of the line.
- The process-home() action produces calls to the
XmNmotionVerifyCallbackprocedures with reason valueXmCR_MOVING_INSERT_CURSOR. - The process-home() action produces calls to the
- process-return():
- If
XmNeditModeisXmSINGLE_LINE_EDIT, calls the callbacks forXmNactivateCallback, and if the parent is a manager, passes the event to the parent. IfXmNeditModeisXmMULTI_LINE_EDIT, inserts a newline.- The process-return() action during single-line edit produces calls to the
XmNactivateCallbackprocedures with reason valueXmCR_ACTIVATE. During multi-line editing, the process-return() action produces calls to theXmNmodifyVerifyCallbackprocedures with reason valueXmCR_MODIFYING_TEXT_VALUE, theXmNvalueChangedCallbackprocedures with reason valueXmCR_VALUE_CHANGED, and theXmNmotionVerifyCallbackprocedures with reason valueXmCR_MOVING_INSERT_CURSOR. - The process-return() action during single-line edit produces calls to the
- process-shift-down():
- If
XmNeditModeisXmMULTI_LINE_EDIT, moves the insertion cursor down one line and selects. IfXmNeditModeisXmSINGLE_LINE_EDIT, this action behaves like process-up() inXmSINGLE_LINE_EDIT. Refer to the process-up() action.- The process-shift-down() action produces calls to the
XmNmotionVerifyCallbackprocedures with reason valueXmCR_MOVING_INSERT_CURSOR.- In vertical writing, if called with the argument
up, moves the insertion cursor one character up and extends the current selection. If called with the argumentdown, moves the insertion cursor one character down and extends the current selection. - The process-shift-down() action produces calls to the
- process-shift-up():
- If
XmNeditModeisXmMULTI_LINE_EDIT, moves the insertion cursor up one line and selects. IfXmNeditModeisXmSINGLE_LINE_EDIT, this action behaves like process-up() inXmSINGLE_LINE_EDIT. Refer to the process-up() action.- The process-shift-up() action produces calls to the
XmNmotionVerifyCallbackprocedures with reason valueXmCR_MOVING_INSERT_CURSOR.- In vertical writing, if called with the argument
up, moves the insertion cursor one character up and extends the current selection. If called with the argumentdown, moves the insertion cursor one character down and extends the current selection. - The process-shift-up() action produces calls to the
- process-tab(
Prev|Next): - If
XmNeditModeisXmSINGLE_LINE_EDIT, traverses to the next tab group if the direction argument isNext, or to the previous tab group if the direction isPrev. IfXmNeditModeisXmMULTI_LINE_EDIT, and the direction isNext, the action inserts a tab. ThePrevdirection has no effect withXmMULTI_LINE_EDIT. In the Text widget, there is a preset tab stop at every eighth columns.- The process-tab() action under multi-line editing produces calls to the
XmNmotionVerifyCallbackprocedures with reason valueXmCR_MOVING_INSERT_CURSOR. Under single-line editing, the action produces no callbacks, unless it results in the widget losing focus, in which case, theXmNlosingFocusCallbackprocedures are called with reason valueXmCR_LOSING_FOCUS. - The process-tab() action under multi-line editing produces calls to the
- process-up(
extend): - If
XmNeditModeisXmSINGLE_LINE_EDITandXmNnavigationTypeisXmNONE, traverses to the widget above the current one in the tab group.- If
XmNeditModeisXmMULTI_LINE_EDIT, moves the insertion cursor up one line.- If
XmNeditModeisXmMULTI_LINE_EDITand this action is called with an argument of extend, moves the insertion cursor as in the case of no argument and extends the current selection.- The process-up() action under multi-line editing produces calls to the
XmNmotionVerifyCallbackprocedures with reason valueXmCR_MOVING_INSERT_CURSOR. Under single-line editing, the action produces no callbacks unless it results in the widget losing focus, in which case, theXmNlosingFocusCallbackprocedures are called with reason valueXmCR_LOSING_FOCUS.- In vertical writing, moves the insertion cursor one character up.
- If
- redraw-display():
- Redraws the contents of the text window.
- The redraw-display() action produces no callbacks.
- scroll-cursor-vertically(percentage
): - Scrolls the line containing the insertion cursor vertically to an intermediate position in the visible window based on an input percentage. A value of 0 indicates the top of the window; a value of 100, the bottom of the window. If this action is called with no argument, the line containing the insertion cursor is scrolled vertically to a new position designated by the y position of the event passed to the routine.
- The
scroll-cursor-verticallyaction produces no callbacks. - The
- scroll-one-line-down():
- Scrolls the text area down one line.
- The scroll-one-line-down() action produces no callbacks.
- scroll-one-line-up():
- Scrolls the text area up one line.
- The scroll-one-line-up() action produces no callbacks.
- secondary-adjust():
- Extends the secondary selection to the pointer position.
- The secondary-adjust() action produces no callbacks.
- secondary-notify():
- Copies the secondary selection to the insertion cursor of the destination widget.
- The secondary-notify() action produces calls to the
XmNmodifyVerifyCallbackprocedures with reason valueXmCR_MODIFYING_TEXT_VALUE, and theXmNvalueChangedCallbackprocedures with reason valueXmCR_VALUE_CHANGED. - The secondary-notify() action produces calls to the
- secondary-start():
- Marks the beginning of a secondary selection.
- The secondary-start() action produces no callbacks.
- select-adjust():
- Moves the current selection. The amount of text selected depends on the number of mouse clicks, as specified by the
XmNselectionArrayresource.- The select-adjust() action may produce no callbacks, however, it may produce calls to the
XmNgainPrimaryCallbackprocedures. See callback description for more information. - The select-adjust() action may produce no callbacks, however, it may produce calls to the
- select-all():
- Selects all text.
- The select-all() action may produce calls to the
XmNgainPrimaryCallbackprocedures. - The select-all() action may produce calls to the
- select-end():
- Moves the current selection. The amount of text selected depends on the number of mouse clicks, as specified by the
XmNselectionArrayresource.- The select-end() action produces no callbacks.
- select-start():
- Marks the beginning of a new selection region.
- The select-start() action may produce calls to the
XmNgainPrimaryCallbackprocedures. - The select-start() action may produce calls to the
- self-insert():
- If
XmNpendingDeleteis True and the cursor is not disjoint from the current selection, deletes the entire selection. Inserts the character associated with the key pressed at the insertion cursor.- The self-insert() action produces calls to the
XmNmodifyVerifyCallbackprocedures with reason valueXmCR_MODIFYING_TEXT_VALUE, theXmNvalueChangedCallbackprocedures with reason valueXmCR_VALUE_CHANGED, and theXmNmotionVerifyCallbackprocedures with reason valueXmCR_MOVING_INSERT_CURSOR. - The self-insert() action produces calls to the
- set-anchor():
- Resets the anchor point for extended selections. Resets the destination of secondary selection actions.
- The set-anchor() action produces no callbacks.
- set-insertion-point():
- Sets the insertion position to the position of the mouse pointer.
- The set-insertion-point() action produces calls to the
XmNmotionVerifyCallbackprocedures with reason valueXmCR_MOVING_INSERT_CURSOR. Note that if the mouse pointer is already over the position of the insertion cursor, the cursor will not be moved, and no callbacks will be produced. - The set-insertion-point() action produces calls to the
- set-selection-hint():
- Sets the text source and location of the current selection.
- The set-selection-hint() action produces no callbacks.
- toggle-add-mode():
- Toggles the state of Add Mode.
- The toggle-add-mode() action produces no callbacks.
- toggle-overstrike():
- Toggles the state of the text insertion mode. By default, characters typed into the Text widget are inserted at the position of the insertion cursor. In overstrike mode, characters entered into the Text widget replace the characters that directly follow the insertion cursor. In overstrike mode, when the end of a line is reached, characters are appended to the end of the line.
- The following traversal actions generate no callbacks unless they result in the loss of focus by the widget in question, as when
XmNnavigationTypeisXmNONE. In this case, they produce calls to theXmNlosingFocusCallbackprocedures, with reason valueXmCR_FOCUS_MOVED. - The following traversal actions generate no callbacks unless they result in the loss of focus by the widget in question, as when
- traverse-home():
- Traverses to the first widget in the tab group.
- traverse-next():
- Traverses to the next widget in the tab group.
- traverse-prev():
- Traverses to the previous widget in the tab group.
- unkill():
- Restores last killed text to the position of the insertion cursor (or whatever is currently in the
CUT_BUFFER0). The inserted text appears before the insertion cursor.- The unkill() action produces calls to the
XmNmodifyVerifyCallbackprocedures with reason valueXmCR_MODIFYING_TEXT_VALUE, theXmNvalueChangedCallbackprocedures with reason valueXmCR_VALUE_CHANGED, and theXmNmotionVerifyCallbackprocedures with reason valueXmCR_MOVING_INSERT_CURSOR. - The unkill() action produces calls to the
Additional Behavior
This widget has the following additional behavior:
<FocusIn>:- Draws the insertion cursor as solid and starts blinking the cursor.
<FocusOut>:- Displays the insertion cursor as a stippled I-beam unless it is the destination widget and stops the cursor from blinking.
Virtual Bindings
The bindings for virtual keys are vendor specific. For information about bindings for virtual buttons and keys, see VirtualBindings(3).
Related
Core(3), XmCreateScrolledText(3), XmCreateText(3), XmFontList(3), XmFontListAppendEntry(3), XmPrimitive(3), XmTextClearSelection(3), XmTextCopy(3), XmTextCopyLink(3), XmTextCut(3), XmTextEnableRedisplay(3), XmTextDisableRedisplay(3), XmTextField(3), XmTextFindString(3), XmTextFindStringWcs(3), XmTextGetBaseline(3), XmTextGetEditable(3), XmTextGetInsertionPosition(3), XmTextGetLastPosition(3), XmTextGetMaxLength(3), XmTextGetSelection(3), XmTextGetSelectionWcs(3), XmTextGetSelectionPosition(3), XmTextGetSource(3), XmTextGetString(3), XmTextGetStringWcs(3), XmTextGetSubstring(3), XmTextGetSubstringWcs(3), XmTextGetTopCharacter(3), XmTextInsert(3), XmTextInsertWcs(3), XmTextPaste(3), XmTextPasteLink(3), XmTextPosToXY(3), XmTextPosition(3), XmTextRemove(3), XmTextReplace(3), XmTextReplaceWcs(3), XmTextScroll(3), XmTextSetAddMode(3), XmTextSetEditable(3), XmTextSetHighlight(3), XmTextSetInsertionPosition(3), XmTextSetMaxLength(3), XmTextSetSelection(3), XmTextSetSource(3), XmTextSetString(3), XmTextSetStringWcs(3), XmTextSetTopCharacter(3), XmTextShowPosition(3), XmTextXYToPos(3), XmVaCreateText(3), and XmVaCreateManagedText(3).
