table of contents
XmText(3) | Library Functions Manual | XmText(3) |
NAME¶
XmText — The Text widget class "XmText" "widget class" "Text"
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 to STRING, these include STRING; otherwise, they include COMPOUND_TEXT.
- _MOTIF_DEFERRED_CLIPBOARD_TARGETS
- The widget transfers, as type ATOM, a list of the targets it supports for delayed transfer for the CLIPBOARD selection. 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's XmNexportTargets in a drag-and-drop transfer. These include COMPOUND_TEXT, UTF8_STRING, the encoding of the locale, STRING, TEXT, BACKGROUND, and FOREGROUND.
- _MOTIF_LOSE_SELECTION
- The widget takes the following actions:
- •
- When losing the PRIMARY selection, it unhighlights the selected text and calls the XmNlosePrimaryCallback procedures.
- •
- When losing the SECONDARY selection, it removes the secondary selection highlight.
- •
- When losing the _MOTIF_DESTINATION selection, 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 XmNbackground as type PIXEL.
- CLASS
- The widget finds the first shell in the widget hierarchy that has a WM_CLASS property 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 XmNcolormap as type COLORMAP.
- FOREGROUND
- The widget transfers XmNforeground as type PIXEL.
- NAME
- The widget finds the first shell in the widget hierarchy that has a WM_NAME property 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 include COMPOUND_TEXT, UTF8_STRING, the encoding of the locale, STRING, and TEXT.
- TIMESTAMP
- The widget transfers the timestamp used to acquire the selection as type INTEGER.
- _MOTIF_RENDER_TABLE
- The widget transfers XmNrenderTable if it exists, or else the default text render table, as type STRING.
- _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 calling XmRegisterSegmentEncoding and XmMapSegmentEncoding.
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).
XmText Resource Set | ||||
Name | Class | Type | Default | Access |
XmNactivateCallback | XmCCallback | XtCallbackList | NULL | C |
XmNautoShowCursorPosition | XmCAutoShowCursorPosition | Boolean | True | CSG |
XmNcursorPosition | XmCCursorPosition | XmTextPosition | 0 | CSG |
XmNcursorPositionVisible | XmCCursorPositionVisible | Boolean | dynamic | CSG |
XmNdestinationCallback | XmCCallback | XtCallbackList | NULL | C |
XmNeditable | XmCEditable | Boolean | True | CSG |
XmNeditMode | XmCEditMode | int | XmSINGLE_LINE_EDIT | CSG |
XmNfocusCallback | XmCCallback | XtCallbackList | NULL | C |
XmNgainPrimaryCallback | XmCCallback | XtCallbackList | NULL | C |
XmNlosePrimaryCallback | XmCCallback | XtCallbackList | NULL | C |
XmNlosingFocusCallback | XmCCallback | XtCallbackList | NULL | C |
XmNmarginHeight | XmCMarginHeight | Dimension | 5 | CSG |
XmNmarginWidth | XmCMarginWidth | Dimension | 5 | CSG |
XmNmaxLength | XmCMaxLength | int | largest integer | CSG |
XmNmodifyVerifyCallback | XmCCallback | XtCallbackList | NULL | C |
XmNmodifyVerifyCallbackWcs | XmCCallback | XtCallbackList | NULL | C |
XmNmotionVerifyCallback | XmCCallback | XtCallbackList | NULL | C |
XmtotalLines | XmCTotalLines | int | dynamic | C |
XmNsource | XmCSource | XmTextSource | Default source | CSG |
XmNtopCharacter | XmCTopCharacter | XmTextPosition | 0 | CSG |
XmNvalue | XmCValue | String | "" | CSG |
XmNvalueChangedCallback | XmCCallback | XtCallbackList | NULL | C |
XmNvalueWcs | XmCvalueWcs | wchar_t * | (wchar_t *)"" | CSG1 |
XmNverifyBell | XmCVerifyBell | Boolean | dynamic | CSG |
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 is XmCR_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 XmPrintShell as one of its ancestors, then the default value is False; otherwise, it is True.
- 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 is XmCR_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 XmNeditable is used on a widget it sets the dropsite to XmDROP_SITE_ACTIVE.
- 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_EDIT provides 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 XmNeditMode is XmSINGLE_LINE_EDIT are undefined.
- 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 is XmCR_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 is XmCR_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 XmNvalue resource or the XmTextSetString function 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 is XmCR_MODIFYING_TEXT_VALUE. When multiple Text widgets share the same source, only the widget that initiates the source change will generate XmNmodifyVerifyCallback.
- If both XmNmodifyVerifyCallback and XmNmodifyVerifyCallbackWcs are registered callback lists, the procedure(s) in the XmNmodifyVerifyCallback list is always executed first; and the resulting data, which may have been modified, is passed to the XmNmodifyVerifyCallbackWcs callback routines.
- 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 is XmCR_MODIFYING_TEXT_VALUE. When multiple Text widgets share the same source, only the widget that initiates the source change will generate the XmNmodifyVerifyCallbackWcs.
- If both XmNmodifyVerifyCallback and XmNmodifyVerifyCallbackWcs are registered callback lists, the procedure(s) in the XmNmodifyVerifyCallback list is always executed first; and the resulting data, which may have been modified, is passed to the XmNmodifyVerifyCallbackWcs callback routines.
- 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 is XmCR_MOVING_INSERT_CURSOR. It is possible for more than one XmNmotionVerifyCallback to 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 XmNeditMode is XmMULTI_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. XtGetValues for XmNtopCharacter returns the position of the first character in the line that is displayed at the top of the widget.
- 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 wordWrap policy (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 of XmNcursorPosition was explicitly supplied in the argument list. If XmNvalue and XmNvalueWcs are both defined, the value of XmNvalueWcs supersedes that of XmNvalue. XtGetValues returns a copy of the value of the internal buffer and XtSetValues copies 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 is XmCR_VALUE_CHANGED. When multiple Text widgets share the same source, only the widget that initiates the source change will generate the XmNvalueChangedCallback. This callback represents a change in the source in the Text, not in the Text widget. The XmNvalueChangedCallback should occur only in pairs with an XmNmodifyVerifyCallback, assuming that the doit flag in the callback structure of the XmNmodifyVerifyCallback is 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 of XmNcursorPosition was explicitly supplied in the argument list.
- This resource cannot be specified in a resource file.
- If XmNvalue and XmNvalueWcs are both defined, the value of XmNvalueWcs supersedes that of XmNvalue. XtGetValues returns a copy of the value of the internal buffer encoded as a wide character string. XtSetValues copies the value of the wide character string into the internal buffer.
- 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 XmNaudibleWarning resource.
XmText Input Resource Set Name Class Type Default Access XmNpendingDelete 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 XmTextScanType elements. XmTextScanType is 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 (XmNwordWrap is 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 (XmNwordWrap is 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 XmNselectionArray resource. 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 Btn2Down and Btn1Down are integrated.
XmText Output Resource Set Name Class Type Default Access XmNblinkRate 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 XmNwidth resource. If no width is specified the default is 20.
- When the XmNlayoutDirection resource is XmTOP_TO_BOTTOM, and if the XmText widget resource XmNeditMode is XmSINGLE_LINE_EDIT, this attribute is ignored. If no width is specified, the default is 1.
- 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 the XmQTspecifyRenderTable trait. If such an ancestor is found, the font list is initialized to the XmTEXT_RENDER_TABLE value 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 to XmFontList(3) for more information on a font list structure.
- 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 XmNrenderTable is NULL at initialization, the parent hierarchy of the widget is searched for an ancestor that holds the XmQTspecifyRenderTable trait. If such an ancestor is found, the font list is initialized to the XmTEXT_RENDER_TABLE value 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 to XmRenderTable(3) for more information on the render table structure.
- 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 XmNscrollVertical is True.
- When the XmNlayoutDirection resource is XmTOP_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 is True. This attribute is ignored if XmNwordWrap is True.
- 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 XmNwordWrap is True.
- When the XmNlayoutDirection resource is XmTOP_TO_BOTTOM, this attribute is still effective even if XmNwordWrap is True. Also, this attribute is ignored when the application uses a text widget whose parent is a ScrolledWindow and XmNscrollHorizaontal is True.
- XmNrows
- Specifies the initial height of the text window measured in character heights. This attribute is ignored if the text widget resource XmNeditMode is XmSINGLE_LINE_EDIT. The value must be greater than 0 (zero). The default value depends on the value of the XmNheight resource. If no height is specified, the default is 1.
- When the XmNlayoutDirection resource is XmTOP_TO_BOTTOM, this attribute is still effective, even if the XmText widget resource XmNeditMode is XmSINGLE_LINE_EDIT. If no height is specified, the default is 20.
- 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 XmNeditMode is XmSINGLE_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 the XmNscrollHorizontal resource is False.
- Indicates that lines are to be broken at word breaks (that is, when the XmNlayoutDirection resource is XmTOP_TO_BOTTOM, the text does not go off the bottom edge of the window) when the Boolean value is True.
The following resources are used only when text is created in a ScrolledWindow. See the reference page for XmCreateScrolledText.
XmText Scrolling Resource Set | ||||
Name | Class | Type | Default | Access |
XmNscrollHorizontal | XmCScroll | Boolean | True | CG |
XmNscrollLeftSide | XmCScrollSide | Boolean | False | CG |
XmNscrollTopSide | XmCScrollSide | Boolean | False | CG |
XmNscrollVertical | XmCScroll | Boolean | True | CG |
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 XmNscrollingPolicy set to XmAUTOMATIC.
- When the XmNlayoutDirection resource is XmTOP_TO_BOTTOM, this attribute is ignored if the XmText widget resource XmNeditMode is XmSINGLE_LINE_EDIT.
- 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 XmNscrollVertical is False or the Text resource XmNeditMode is XmSINGLE_LINE_EDIT.
- When the XmNlayoutDirection resource is XmTOP_TO_BOTTOM, this resource is still effective, even if the XmText widget resource XmNeditMode is XmSINGLE_LINE_EDIT.
- 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 XmNlayoutDirection resource is XmTOP_TO_BOTTOM, this attribute is ignored if XmNscrollHorizontal is False or the Xmtext resource XmNeditMode is XmSINGLE_LINE_EDIT.
- 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 XmNeditMode is XmSINGLE_LINE_EDIT. This resource is forced to False when the Text widget is placed in a ScrolledWindow with XmNscrollingPolicy set to XmAUTOMATIC.
- When the XmNlayoutDirection resource is XmTOP_TO_BOTTOM, this resource is still effective, even if the XmText widget resource XmNeditMode is XmSINGLE_LINE_EDIT.
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.
XmPrimitive Resource Set | ||||
Name | Class | Type | Default | Access |
XmNbottomShadowColor | XmCBottomShadowColor | Pixel | dynamic | CSG |
XmNbottomShadowPixmap | XmCBottomShadowPixmap | Pixmap | XmUNSPECIFIED_PIXMAP | CSG |
XmNconvertCallback | XmCCallback | XtCallbackList | NULL | C |
XmNforeground | XmCForeground | Pixel | dynamic | CSG |
XmNhelpCallback | XmCCallback | XtCallbackList | NULL | C |
XmNhighlightColor | XmCHighlightColor | Pixel | dynamic | CSG |
XmNhighlightOnEnter | XmCHighlightOnEnter | Boolean | False | CSG |
XmNhighlightPixmap | XmCHighlightPixmap | Pixmap | dynamic | CSG |
XmNhighlightThickness | XmCHighlightThickness | Dimension | 2 | CSG |
XmNlayoutDirection | XmCLayoutDirection | XmDirection | dynamic | CG |
XmNnavigationType | XmCNavigationType | XmNavigationType | XmTAB_GROUP | CSG |
XmNpopupHandlerCallback | XmCCallback | XtCallbackList | NULL | C |
XmNshadowThickness | XmCShadowThickness | Dimension | 2 | CSG |
XmNtopShadowColor | XmCTopShadowColor | Pixel | dynamic | CSG |
XmNtopShadowPixmap | XmCTopShadowPixmap | Pixmap | dynamic | CSG |
XmNtraversalOn | XmCTraversalOn | Boolean | True | CSG |
XmNunitType | XmCUnitType | unsigned char | dynamic | CSG |
XmNuserData | XmCUserData | XtPointer | NULL | CSG |
Core Resource Set | ||||
Name | Class | Type | Default | Access |
XmNaccelerators | XmCAccelerators | XtAccelerators | dynamic | CSG |
XmNancestorSensitive | XmCSensitive | Boolean | dynamic | G |
XmNbackground | XmCBackground | Pixel | dynamic | CSG |
XmNbackgroundPixmap | XmCPixmap | Pixmap | XmUNSPECIFIED_PIXMAP | CSG |
XmNborderColor | XmCBorderColor | Pixel | XtDefaultForeground | CSG |
XmNborderPixmap | XmCPixmap | Pixmap | XmUNSPECIFIED_PIXMAP | CSG |
XmNborderWidth | XmCBorderWidth | Dimension | 0 | CSG |
XmNcolormap | XmCColormap | Colormap | dynamic | CG |
XmNdepth | XmCDepth | int | dynamic | CG |
XmNdestroyCallback | XmCCallback | XtCallbackList | NULL | C |
XmNheight | XmCHeight | Dimension | dynamic | CSG |
XmNinitialResourcesPersistent | XmCInitialResourcesPersistent | Boolean | True | C |
XmNmappedWhenManaged | XmCMappedWhenManaged | Boolean | True | CSG |
XmNscreen | XmCScreen | Screen * | dynamic | CG |
XmNsensitive | XmCSensitive | Boolean | True | CSG |
XmNtranslations | XmCTranslations | XtTranslations | dynamic | CSG |
XmNwidth | XmCWidth | Dimension | dynamic | CSG |
XmNx | XmCPosition | Position | 0 | CSG |
XmNy | XmCPosition | Position | 0 | CSG |
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 XEvent that 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 XEvent that 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_FOCUS callbacks 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;
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 XEvent that 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_FOCUS callbacks 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;
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.
Reason | Valid Fields |
XmCR_LOSING_FOCUS | reason, event, doit, currInsert, newInsert, startPos, endPos |
XmCR_MODIFYING_TEXT_VALUE | reason, event, doit, currInsert, newInsert, startPos, endPos, text |
XmCR_MOVING_INSERT_CURSOR | reason, doit, currInsert, newInsert |
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 XEvent that 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 PRIMARY or SECONDARY, possible values are XmMOVE, XmCOPY, and XmLINK.
- •
- When the selection is CLIPBOARD, possible values are XmCOPY and XmLINK.
- •
- When the selection is _MOTIF_DROP, possible values are XmMOVE, XmCOPY, XmLINK, and XmOTHER. A value of XmOTHER means that the callback procedure must get further information from the XmDropProcCallbackStruct structure 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's XmNdropProc, and destination_data is a pointer to the XmDropProcCallbackStruct structure passed to the XmNdropProc procedure. When the selection is SECONDARY, destination_data is an Atom representing a target recommended 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 an XPoint structure containing the x- and y- coordinates at the location where the data is to be transferred. Once XmTransferDone procedures start to be called, location_data will 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 XmNmotionVerifyCallback procedures with reason value XmCR_MOVING_INSERT_CURSOR. If called with the extend argument, the backward-character() action may produce calls to the XmNgainPrimaryCallback procedures. See callback description for more information.
- In vertical writing, if XmNeditMode is XmSINGLE_LINE_EDIT and XmNnavigationType is XmNONE, traverses to the widget to the left in the tab group. If XmNeditMode is XmMULTI_LINE_EDIT, moves the insertion cursor to the next line in the same column.
- backward-paragraph(extend):
- If XmNeditMode is XmMULTI_LINE_EDIT and 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 XmNeditMode is XmMULTI_LINE_EDIT and 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 XmNmotionVerifyCallback procedures with reason value XmCR_MOVING_INSERT_CURSOR. If called with the extend argument, the backward-paragraph() action may produce calls to the XmNgainPrimaryCallback procedures. See callback description for more information.
- 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 XmNmotionVerifyCallback procedures with reason value XmCR_MOVING_INSERT_CURSOR. If called with the extend argument, the backward-word() action may produce calls to the XmNgainPrimaryCallback procedures. See callback description for more information.
- 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 XmNmotionVerifyCallback procedures with reason value XmCR_MOVING_INSERT_CURSOR. If called with the extend argument, the beginning-of-file() action may produce calls to the XmNgainPrimaryCallback procedures. See callback description for more information.
- 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 XmNmotionVerifyCallback procedures with reason value XmCR_MOVING_INSERT_CURSOR. If called with the extend argument, the beginning-of-line() action may produce calls to the XmNgainPrimaryCallback procedures. See callback description for more information.
- clear-selection():
- Clears the current selection by replacing each character except <Return> with a <space> character.
- The clear-selection() action produces calls to the XmNmodifyVerifyCallback procedures with reason value XmCR_MODIFYING_TEXT_VALUE and the XmNvalueChangedCallback procedures with reason value XmCR_VALUE_CHANGED.
- copy-clipboard():
- If this widget owns the primary selection, this action copies the selection to the clipboard. This action calls the XmNconvertCallback procedures, possibly multiple times, for the CLIPBOARD selection.
- copy-primary():
- Copies the primary selection to just before the insertion cursor. This action calls the XmNdestinationCallback procedures for the PRIMARY selection and the XmCOPY operation. It calls the selection owner's XmNconvertCallback procedures, possibly multiple times, for the PRIMARY selection.
- In addition, the copy-primary() action produces calls to the XmNmodifyVerifyCallback procedures with reason value XmCR_MODIFYING_TEXT_VALUE, to the XmNvalueChangedCallback procedures with reason value XmCR_VALUE_CHANGED, and to the XmNmotionVerifyCallback procedures with reason value XmCR_MOVING_INSERT_CURSOR.
- 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 XmNdestinationCallback procedures for the SECONDARY selection and the XmCOPY operation. The destination's XmNdestinationCallback procedures or the destination component itself invokes the selection owner's XmNconvertCallback procedures, possibly multiple times, for the SECONDARY selection.
- If no secondary selection exists, this action copies the primary selection to the pointer position. This action calls the XmNdestinationCallback procedures for the PRIMARY selection and the XmCOPY operation. It calls the selection owner's XmNconvertCallback procedures, possibly multiple times, for the PRIMARY selection.
- In addition, the copy-to() action produces calls to the XmNmodifyVerifyCallback procedures with reason value XmCR_MODIFYING_TEXT_VALUE, to the XmNvalueChangedCallback procedures with reason value XmCR_VALUE_CHANGED, and to the XmNmotionVerifyCallback procedures with reason value XmCR_MOVING_INSERT_CURSOR. If there is no secondary selection, the copy-to() action may produce calls to the XmNgainPrimaryCallback procedures. See callback description for more information.
- cut-clipboard():
- If this widget owns the primary selection, this action cuts the selection to the clipboard. This action calls the XmNconvertCallback procedures, possibly multiple times, for the CLIPBOARD selection. If the transfer is successful, this action then calls the XmNconvertCallback procedures for the CLIPBOARD selection and the DELETE target.
- In addition, the cut-clipboard() action produces calls to the XmNmodifyVerifyCallback procedures with reason value XmCR_MODIFYING_TEXT_VALUE, and the XmNvalueChangedCallback procedures with reason value XmCR_VALUE_CHANGED.
- cut-primary():
- Cuts the primary selection and pastes it just before the insertion cursor. This action calls the XmNdestinationCallback procedures for the PRIMARY selection and the XmMOVE operation. It calls the selection owner's XmNconvertCallback procedures, possibly multiple times, for the PRIMARY selection. If the transfer is successful, this action then calls the selection owner's XmNconvertCallback procedures for the PRIMARY selection and the DELETE target. The cut-primary() action may produce calls to the XmNgainPrimaryCallback procedures. See callback description for more information.
- In addition, the cut-primary() action produces calls to the XmNmotionVerifyCallback procedures with reason value XmCR_MOVING_INSERT_CURSOR, the XmNmodifyVerifyCallback procedures with reason value XmCR_MODIFYING_TEXT_VALUE, and the XmNvalueChangedCallback procedures with reason value XmCR_VALUE_CHANGED.
- 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 XmNpendingDelete is 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 XmNmodifyVerifyCallback procedures with reason value XmCR_MODIFYING_TEXT_VALUE, and the XmNvalueChangedCallback procedures with reason value XmCR_VALUE_CHANGED.
- 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 XmNpendingDelete is 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 XmNmodifyVerifyCallback procedures with reason value XmCR_MODIFYING_TEXT_VALUE, and the XmNvalueChangedCallback procedures with reason value XmCR_VALUE_CHANGED.
- 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 XmNpendingDelete is 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 XmNmodifyVerifyCallback procedures with reason value XmCR_MODIFYING_TEXT_VALUE, the XmNvalueChangedCallback procedures with reason value XmCR_VALUE_CHANGED, and the XmNmotionVerifyCallback procedures with reason value XmCR_MOVING_INSERT_CURSOR.
- 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 XmNpendingDelete is 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 XmNmodifyVerifyCallback procedures with reason value XmCR_MODIFYING_TEXT_VALUE, the XmNvalueChangedCallback procedures with reason value XmCR_VALUE_CHANGED, and the XmNmotionVerifyCallback procedures with reason value XmCR_MOVING_INSERT_CURSOR.
- delete-selection():
- Deletes the current selection.
- The delete-selection() action produces calls to the XmNmodifyVerifyCallback procedures with reason value XmCR_MODIFYING_TEXT_VALUE, the XmNvalueChangedCallback procedures with reason value XmCR_VALUE_CHANGED, and the XmNmotionVerifyCallback procedures with reason value XmCR_MOVING_INSERT_CURSOR.
- 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 XmNpendingDelete is 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 the XmNmodifyVerifyCallback procedures with reason value XmCR_MODIFYING_TEXT_VALUE, and the XmNvalueChangedCallback procedures with reason value XmCR_VALUE_CHANGED.
- 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 XmNpendingDelete is 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 XmNmodifyVerifyCallback procedures with reason value XmCR_MODIFYING_TEXT_VALUE, the XmNvalueChangedCallback procedures with reason value XmCR_VALUE_CHANGED, and the XmNmotionVerifyCallback procedures with reason value XmCR_MOVING_INSERT_CURSOR.
- 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 XmNmotionVerifyCallback procedures with reason value XmCR_MOVING_INSERT_CURSOR. If called with the extend argument, the end-of-file() action may produce calls to the XmNgainPrimaryCallback procedures. See callback description for more information.
- 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 XmNmotionVerifyCallback procedures with reason value XmCR_MOVING_INSERT_CURSOR. If called with the extend argument, the end-of-line() action may produce calls to the XmNgainPrimaryCallback procedures. See callback description for more information.
- 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 XmNmotionVerifyCallback procedures with reason value XmCR_MOVING_INSERT_CURSOR. The extend-adjust() action may produce calls to the XmNgainPrimaryCallback procedures. See callback description for more information.
- 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 XmNmotionVerifyCallback procedures with reason value XmCR_MOVING_INSERT_CURSOR. The extend-end() action may produce calls to the XmNgainPrimaryCallback procedures. See callback description for more information.
- 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 XmNgainPrimaryCallback procedures. 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 XmNmotionVerifyCallback procedures with reason value XmCR_MOVING_INSERT_CURSOR. If called with the extend argument, the forward-character() action may produce calls to the XmNgainPrimaryCallback procedures. See callback description for more information.
- In vertical writing, if XmNeditMode is XmSINGLE_LINE_EDIT and XmNnavigationType is XmNONE, traverses to the widget to the right in the tab group. If XmNeditMode is XmMULTI_LINE_EDIT, moves the insertion cursor to the previous line in the same column.
- forward-paragraph(extend):
- If XmNeditMode is XmMULTI_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 XmNeditMode is XmMULTI_LINE_EDIT and 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 XmNmotionVerifyCallback procedures with reason value XmCR_MOVING_INSERT_CURSOR. If called with the extend argument, the forward-paragraph() action may produce calls to the XmNgainPrimaryCallback procedures. See callback description for more information.
- 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 XmNmotionVerifyCallback procedures with reason value XmCR_MOVING_INSERT_CURSOR. If called with the extend argument, the forward-word() action may produce calls to the XmNgainPrimaryCallback procedures. See callback description for more information.
- 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 XmNmotionVerifyCallback procedures with reason value XmCR_MOVING_INSERT_CURSOR.
- Help():
- Calls the callbacks for XmNhelpCallback if 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 XmNpendingDelete is 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 XmNmodifyVerifyCallback procedures with reason value XmCR_MODIFYING_TEXT_VALUE, the XmNvalueChangedCallback procedures with reason value XmCR_VALUE_CHANGED, and the XmNmotionVerifyCallback procedures with reason value XmCR_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-string with an empty string will cause the selection to be deselected, and the XmNmotionVerifyCallback procedures to be called with reason value XmCR_MOVING_INSERT_CURSOR, XmCR_MODIFYING_TEXT_VALUE, and XmCR_VALUE_CHANGED.
- 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-select action, 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 XmNmotionVerifyCallback procedures with reason value XmCR_MOVING_INSERT_CURSOR. The key-select() action may produce calls to the XmNgainPrimaryCallback procedures. See callback description for more information.
- In vertical writing, if called with the argument left, and if XmNeditMode is XmMULTI_LINE_EDIT, moves the insertion cursor to the next line in the same column. In vertical writing, if called with the argument right, and if XmNeditMode is XmMULTI_LINE_EDIT, moves the insertion cursor to the previous line in the same column.)
- 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 XmNpendingDelete is 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 XmNmodifyVerifyCallback procedures with reason value XmCR_MODIFYING_TEXT_VALUE, the XmNvalueChangedCallback procedures with reason value XmCR_VALUE_CHANGED, and the XmNmotionVerifyCallback procedures with reason value XmCR_MOVING_INSERT_CURSOR.
- 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 XmNpendingDelete is 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 XmNmodifyVerifyCallback procedures with reason value XmCR_MODIFYING_TEXT_VALUE, the XmNvalueChangedCallback procedures with reason value XmCR_VALUE_CHANGED, and the XmNmotionVerifyCallback procedures with reason value XmCR_MOVING_INSERT_CURSOR.
- 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 XmNpendingDelete is 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 XmNmodifyVerifyCallback procedures with reason value XmCR_MODIFYING_TEXT_VALUE, the XmNvalueChangedCallback procedures with reason value XmCR_VALUE_CHANGED, and the XmNmotionVerifyCallback procedures with reason value XmCR_MOVING_INSERT_CURSOR.
- 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 XmNpendingDelete is 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 XmNmodifyVerifyCallback procedures with reason value XmCR_MODIFYING_TEXT_VALUE, the XmNvalueChangedCallback procedures with reason value XmCR_VALUE_CHANGED, and the XmNmotionVerifyCallback procedures with reason value XmCR_MOVING_INSERT_CURSOR.
- 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 XmNmodifyVerifyCallback procedures with reason value XmCR_MODIFYING_TEXT_VALUE, the XmNvalueChangedCallback procedures with reason value XmCR_VALUE_CHANGED, and the XmNmotionVerifyCallback procedures with reason value XmCR_MOVING_INSERT_CURSOR.
- 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 XmNpendingDelete is 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 XmNmodifyVerifyCallback procedures with reason value XmCR_MODIFYING_TEXT_VALUE, and the XmNvalueChangedCallback procedures with reason value XmCR_VALUE_CHANGED. In the case where there is a non-null selection to be deleted, this action may also produce calls to the XmNmotionVerifyCallback procedures with reason value XmCR_MOVING_INSERT_CURSOR.
- 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 XmNpendingDelete is 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 XmNmodifyVerifyCallback procedures with reason value XmCR_MODIFYING_TEXT_VALUE, the XmNvalueChangedCallback procedures with reason value XmCR_VALUE_CHANGED, and the XmNmotionVerifyCallback procedures with reason value XmCR_MOVING_INSERT_CURSOR.
- link-primary():
- Places a link to the primary selection just before the insertion cursor. This action calls the XmNdestinationCallback procedures for the PRIMARY selection and the XmLINK operation. The Text widget itself performs no transfers; the XmNdestinationCallback procedures 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 XmNdestinationCallback procedures for the SECONDARY selection and the XmLINK operation.
- If no secondary selection exists, this action places a link to the primary selection at the pointer position. This action calls the XmNdestinationCallback procedures for the PRIMARY selection and the XmLINK operation.
- The Text widget itself performs no transfers; the XmNdestinationCallback procedures are responsible for inserting the link to the primary or secondary selection and for taking any related actions.
- 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 XmNmotionVerifyCallback procedures with reason value XmCR_MOVING_INSERT_CURSOR.
- 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 XmNdestinationCallback procedures for the SECONDARY selection and the XmMOVE operation. The destination's XmNdestinationCallback procedures or the destination component itself invokes the selection owner's XmNconvertCallback procedures, possibly multiple times, for the SECONDARY selection. If the transfer is successful, this action then calls the selection owner's XmNconvertCallback procedures for the SECONDARY selection and the DELETE target.
- If no secondary selection exists, this action moves the primary selection to the pointer position. This action calls the XmNdestinationCallback procedures for the PRIMARY selection and the XmMOVE operation. It calls the selection owner's XmNconvertCallback procedures, possibly multiple times, for the PRIMARY selection. If the transfer is successful, this action then calls the selection owner's XmNconvertCallback procedures for the PRIMARY selection and the DELETE target.
- The move-to() action produces calls to the XmNmodifyVerifyCallback procedures with reason value XmCR_MODIFYING_TEXT_VALUE, the XmNvalueChangedCallback procedures with reason value XmCR_VALUE_CHANGED, and the XmNmotionVerifyCallback procedures with reason value XmCR_MOVING_INSERT_CURSOR. If there is no secondary selection, the move-to() action may produce calls to the XmNgainPrimaryCallback procedures. See callback description for more information.
- newline():
- If XmNpendingDelete is 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 XmNmodifyVerifyCallback procedures with reason value XmCR_MODIFYING_TEXT_VALUE, the XmNvalueChangedCallback procedures with reason value XmCR_VALUE_CHANGED, and the XmNmotionVerifyCallback procedures with reason value XmCR_MOVING_INSERT_CURSOR.
- newline-and-backup():
- If XmNpendingDelete is 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 XmNmodifyVerifyCallback procedures with reason value XmCR_MODIFYING_TEXT_VALUE, and the XmNvalueChangedCallback procedures with reason value XmCR_VALUE_CHANGED.
- newline-and-indent():
- If XmNpendingDelete is 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 XmNmodifyVerifyCallback procedures with reason value XmCR_MODIFYING_TEXT_VALUE, the XmNvalueChangedCallback procedures with reason value XmCR_VALUE_CHANGED, and the XmNmotionVerifyCallback procedures with reason value XmCR_MOVING_INSERT_CURSOR.
- next-line():
- Moves the insertion cursor to the next line.
- The next-line() action produces calls to the XmNmotionVerifyCallback procedures with reason value XmCR_MOVING_INSERT_CURSOR.
- next-page(extend):
- If XmNeditMode is XmMULTI_LINE_EDIT and this action is called with no argument, moves the insertion cursor forward one page.
- If XmNeditMode is XmMULTI_LINE_EDIT and 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 XmNmotionVerifyCallback procedures with reason value XmCR_MOVING_INSERT_CURSOR. If called with the extend argument, the next-page() action may produce calls to the XmNgainPrimaryCallback procedures. See callback description for more information.
- In vertical writing, scrolls the viewing window down one page of text.
- 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 XmNlosingFocusCallback procedures are called with reason value XmCR_LOSING_FOCUS.
- page-left(extend):
- If XmNeditMode is XmMULTI_LINE_EDIT and this action is called with no argument, moves the insertion cursor back one page.
- If XmNeditMode is XmMULTI_LINE_EDIT and 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 XmNmotionVerifyCallback procedures with reason value XmCR_MOVING_INSERT_CURSOR. If called with the extend argument, the page-left() action may produce calls to the XmNgainPrimaryCallback procedures. See callback description for more information.
- page-right(extend):
- If XmNeditMode is XmMULTI_LINE_EDIT and this action is called with no argument, moves the insertion cursor forward one page.
- If XmNeditMode is XmMULTI_LINE_EDIT and 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 XmNmotionVerifyCallback procedures with reason value XmCR_MOVING_INSERT_CURSOR. If called with the extend argument, the page-right() action may produce calls to the XmNgainPrimaryCallback procedures. See callback description for more information.
- paste-clipboard():
- Pastes the contents of the clipboard before the insertion cursor. This action calls the XmNdestinationCallback procedures for the CLIPBOARD selection and the XmCOPY operation.
- The paste-clipboard() action produces calls to the XmNmodifyVerifyCallback procedures with reason value XmCR_MODIFYING_TEXT_VALUE, the XmNvalueChangedCallback procedures with reason value XmCR_VALUE_CHANGED, and the XmNmotionVerifyCallback procedures with reason value XmCR_MOVING_INSERT_CURSOR.
- 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 XmNlosingFocusCallback procedures are called with reason value XmCR_LOSING_FOCUS.
- previous-line():
- Moves the insertion cursor to the previous line.
- The previous-line() action produces calls to the XmNmotionVerifyCallback procedures with reason value XmCR_MOVING_INSERT_CURSOR.
- previous-page(extend):
- If XmNeditMode is XmMULTI_LINE_EDIT and this action is called with no argument, moves the insertion cursor back one page.
- If XmNeditMode is XmMULTI_LINE_EDIT and 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 XmNmotionVerifyCallback procedures with reason value XmCR_MOVING_INSERT_CURSOR. If called with the extend argument, the previous-page() action may produce calls to the XmNgainPrimaryCallback procedures. See callback description for more information.
- In vertical writing, if called without an argument, scrolls the viewing window up one page of text.
- process-bdrag()
- If the pointer is within the selection, this action starts a drag operation for the selection. This action sets the XmNconvertProc of the DragContext to a function that calls the XmNconvertCallback procedures, possibly multiple times, for the _MOTIF_DROP selection.
- If no selection exists or the pointer is outside the selection, this action prepares to start a secondary selection at the pointer position.
- 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 procedures as focus is lost (by each widget) as well as callbacks to the XmNfocusCallback procedures 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 XmNeditMode is XmSINGLE_LINE_EDIT, and XmNnavigationType is XmNONE, traverses to the widget below the current one in the tab group.
- If XmNeditMode is XmMULTI_LINE_EDIT and 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 XmNlosingFocusCallback callbacks with reason value XmCR_LOSING_FOCUS.
- If XmNeditMode is XmMULTI_LINE_EDIT, moves the insertion cursor down one line.
- The process-down() action produces calls to the XmNmotionVerifyCallback procedures with reason value XmCR_MOVING_INSERT_CURSOR.
- In vertical writing, moves the insertion cursor one character down.
- process-home():
- Moves the insertion cursor to the beginning of the line.
- The process-home() action produces calls to the XmNmotionVerifyCallback procedures with reason value XmCR_MOVING_INSERT_CURSOR.
- process-return():
- If XmNeditMode is XmSINGLE_LINE_EDIT, calls the callbacks for XmNactivateCallback, and if the parent is a manager, passes the event to the parent. If XmNeditMode is XmMULTI_LINE_EDIT, inserts a newline.
- The process-return() action during single-line edit produces calls to the XmNactivateCallback procedures with reason value XmCR_ACTIVATE. During multi-line editing, the process-return() action produces calls to the XmNmodifyVerifyCallback procedures with reason value XmCR_MODIFYING_TEXT_VALUE, the XmNvalueChangedCallback procedures with reason value XmCR_VALUE_CHANGED, and the XmNmotionVerifyCallback procedures with reason value XmCR_MOVING_INSERT_CURSOR.
- process-shift-down():
- If XmNeditMode is XmMULTI_LINE_EDIT, moves the insertion cursor down one line and selects. If XmNeditMode is XmSINGLE_LINE_EDIT, this action behaves like process-up() in XmSINGLE_LINE_EDIT. Refer to the process-up() action.
- The process-shift-down() action produces calls to the XmNmotionVerifyCallback procedures with reason value XmCR_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 argument down, moves the insertion cursor one character down and extends the current selection.
- process-shift-up():
- If XmNeditMode is XmMULTI_LINE_EDIT, moves the insertion cursor up one line and selects. If XmNeditMode is XmSINGLE_LINE_EDIT, this action behaves like process-up() in XmSINGLE_LINE_EDIT. Refer to the process-up() action.
- The process-shift-up() action produces calls to the XmNmotionVerifyCallback procedures with reason value XmCR_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 argument down, moves the insertion cursor one character down and extends the current selection.
- process-tab(Prev|Next):
- If XmNeditMode is XmSINGLE_LINE_EDIT, traverses to the next tab group if the direction argument is Next, or to the previous tab group if the direction is Prev. If XmNeditMode is XmMULTI_LINE_EDIT, and the direction is Next, the action inserts a tab. The Prev direction has no effect with XmMULTI_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 XmNmotionVerifyCallback procedures with reason value XmCR_MOVING_INSERT_CURSOR. Under single-line editing, the action produces no callbacks, unless it results in the widget losing focus, in which case, the XmNlosingFocusCallback procedures are called with reason value XmCR_LOSING_FOCUS.
- process-up(extend):
- If XmNeditMode is XmSINGLE_LINE_EDIT and XmNnavigationType is XmNONE, traverses to the widget above the current one in the tab group.
- If XmNeditMode is XmMULTI_LINE_EDIT, moves the insertion cursor up one line.
- If XmNeditMode is XmMULTI_LINE_EDIT and 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 XmNmotionVerifyCallback procedures with reason value XmCR_MOVING_INSERT_CURSOR. Under single-line editing, the action produces no callbacks unless it results in the widget losing focus, in which case, the XmNlosingFocusCallback procedures are called with reason value XmCR_LOSING_FOCUS.
- In vertical writing, moves the insertion cursor one character up.
- 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-vertically action produces no callbacks.
- 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 XmNmodifyVerifyCallback procedures with reason value XmCR_MODIFYING_TEXT_VALUE, and the XmNvalueChangedCallback procedures with reason value XmCR_VALUE_CHANGED.
- 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 XmNselectionArray resource.
- The select-adjust() action may produce no callbacks, however, it may produce calls to the XmNgainPrimaryCallback procedures. See callback description for more information.
- select-all():
- Selects all text.
- The select-all() action may produce calls to the XmNgainPrimaryCallback procedures.
- select-end():
- Moves the current selection. The amount of text selected depends on the number of mouse clicks, as specified by the XmNselectionArray resource.
- 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 XmNgainPrimaryCallback procedures.
- self-insert():
- If XmNpendingDelete is 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 XmNmodifyVerifyCallback procedures with reason value XmCR_MODIFYING_TEXT_VALUE, the XmNvalueChangedCallback procedures with reason value XmCR_VALUE_CHANGED, and the XmNmotionVerifyCallback procedures with reason value XmCR_MOVING_INSERT_CURSOR.
- 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 XmNmotionVerifyCallback procedures with reason value XmCR_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.
- 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 XmNnavigationType is XmNONE. In this case, they produce calls to the XmNlosingFocusCallback procedures, with reason value XmCR_FOCUS_MOVED.
- 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 XmNmodifyVerifyCallback procedures with reason value XmCR_MODIFYING_TEXT_VALUE, the XmNvalueChangedCallback procedures with reason value XmCR_VALUE_CHANGED, and the XmNmotionVerifyCallback procedures with reason value XmCR_MOVING_INSERT_CURSOR.
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).