Provided by: libmotif-dev_2.3.4-5ubuntu0.1_amd64
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). ┌──────────────────────────────────────────────────────────────────────────────────────────────────────┐ --
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). XmText(3)