Document revision date: 10 November 2000 | |
Previous | Contents | Index |
Retrieves all the text from the compound string text widget.
XmString DXmCSTextGetString(widget) Widget widget; |
A pointer to a compound string holding all the current text in the compound string text widget.
widget
The identifier (widget ID) of the compound string text widget.
The DXmCSTextGetString routine retrieves the current compound string from the compound string text widget. The application is responsible for freeing the storage associated with the compound string by calling the Intrinsic routine XtStringFree. See the DXmCreateCSText, DXmCSTextSetString, and DXmCSTextReplace routines for related information. See also the X Window System Toolkit manual for more information about using the Intrinsic routines.
Retrieves (returns) the logical position of the first character in the displayed text.
DXmCSTextPosition DXmCSTextGetTopPosition(widget) Widget widget |
An integer that represents the logical position of the first character in the text buffer.
widget
The identifier (widget ID) of the compound string text widget.
The DXmCSTextGetTopPosition routine returns the logical position of the first character in the displayed text. If the direction is left to right, the first character is at the top left of the display. If the direction is right to left the first character is at the top right of the display.
Indicates whether the compound string text widget currently owns the primary selection.
Boolean DXmCSTextHasSelection(widget) Widget widget |
A Boolean value that, when True, indicates that the widget currently owns the primary selection.
widget
The identifier (widget ID) of the compound string text widget.
The DXmCSTextHasSelection routine returns True if the compound string text widget currently owns the primary selection and False if it does not.
Scrolls text horizontally.
void DXmCSTextHorizontalScroll(widget, n) Widget widget int n |
widget
The identifier (widget ID) of the compound string text widget.n
An integer that represents the number of pixels to scroll to the left or right. A positive value means scroll right; a negative value means scroll left.
The DXmCSTextHorizontalScroll routine scrolls text horizontally (left or right) by the given number of pixels.
Inserts new text into the compound string text widget.
DXmCSTextStatus DXmCSTextInsert(widget, pos, value) Widget widget DXmCSTextPosition pos; XmString value; |
A value that represents the status (success or failure) of the insertion operation, as follows:
Value Description DXmCSTextStatusEditDone Text was inserted successfully. DXmCSTextStatusEditError Text was not inserted (failure).
widget
The identifier (widget ID) of the compound string text widget.pos
The logical position at which to insert the new text.value
The compound string representation of the text.
The DXmCSTextInsert routine inserts new text into the compound string text widget at the specified logical position, returning the success or failure of that operation.
Retrieves (returns) the number of visible lines in the compound string text widget.
int DXmCSTextNumLines(widget) Widget widget |
An integer that represents the number of visible lines.
widget
The identifier (widget ID) of the compound string text widget.
The DXmCSTextNumLines routine returns an integer that represents the number of lines in the compound string text widget that are visible to the user.
Pastes the data from the clipboard into the text at the current cursor position.
Boolean DXmCSTextPaste(widget) Widget widget |
A Boolean value that, when True, indicates that the data was pasted successfully from the clipboard into the text.
widget
The identifier (widget ID) of the compound string text widget.
The DXmCSTextPaste routine pastes the data from the clipboard into the text at the current cursor position, returning the success or failure of that operation. (See the OSF/Motif Programmer's Reference and the OSF/Motif Programmer's Guide for more information about the clipboard.) See the DXmCreateCSText, DXmCSTextCopy, DXmCSTextCut, and DXmCSTextRemove routines for related information.
Retrieves (returns) the x and y position of a specified character in the text.
Boolean DXmCSTextPosToXY(widget, position, x, y) Widget widget; DXmCSTextPosition position; Position *x; Position *y; |
A Boolean function that, when True, returns the x and y position of the character in text. When False, no x and y position is returned.
widget
The identifier (widget ID) of the compound string text widget.position
Specifies the position in the text of the character for which the x- and y-coordinates will be returned.x
A pointer to the x-coordinate relative to the upper left corner of the widget. (Valid only when the routine returns True.)y
A pointer to the y-coordinate relative to the upper left corner of the widget. (Valid only when the routine returns True.)
The DXmCSTextPosToXY routine converts the logical position of a specified character in the text to the corresponding x- and y-coordinates. See the DXmCSTextXYToPos routine for related information.
Removes the currently selected (highlighted) text.
Boolean DXmCSTextRemove(widget) Widget widget |
A Boolean value that, when True, indicates that the text was removed successfully.
widget
The identifier (widget ID) of the compound string text widget.
The DXmCSTextRemove routine removes the currently selected (highlighted) text, returning the success or failure of that operation. See the DXmCreateCSText, DXmCSTextCopy, DXmCSTextCut, and DXmCSTextPaste routines for related information.
Replaces a specified segment of text in a compound string text widget.
DXmCSTextStatus DXmCSTextReplace(widget, from_pos, to_pos, value) Widget widget; DXmCSTextPosition from_pos; DXmCSTextPosition to_pos; XmString value; |
A value that represents the status (success or failure) of the replace operation, as follows:
Value Description DXmCSTextStatusEditDone Text replaced successfully. DXmCSTextStatusEditError Text not replaced (failure).
widget
The identifier (widget ID) of the compound string text widget.from_pos
Represents the first character position of the text being replaced.to_pos
Represents the last character position of the text being replaced.value
Replacement text for part of the current text in the compound string text widget, or additional text to be inserted into the compound string text widget.
The DXmCSTextReplace routine replaces part of the text in the compound string text widget. Within the widget, positions are numbered starting at 0 and increasing sequentially. For example, to replace the second and third characters in the text, from_pos should be 1 and to_pos should be 3. To insert text after the fourth character, from_pos and to_pos should both be 4. See the DXmCreateCSText, DXmCSTextSetString, and DXmCSTextGetString routines for related information.
Controls whether the CSText widget is in Add Mode.
void DXmCSTextSetAddMode(widget,state) Widget widget; Boolean state; |
widget
The identifier (widget ID) of the compound string text widget.state
A Boolean function that, when True, turns on Add Mode and, when False, turns off Add Mode.
The DXmCSTextSetAddMode routine controls whether the CSText widget is in Add Mode, which, when True, allows the user to move the insertion cursor without affecting the primary selection.
Specifies whether the text in the widget can be edited by the user.
void DXmCSTextSetEditable(widget, editable) Widget widget; Boolean editable; |
widget
The identifier (widget ID) of the compound string text widget.editable
A Boolean value that, when True, indicates that the user can edit the text in the compound string text widget. When False, the user cannot edit the text.
The DXmCSTextSetEditable specifies whether text in the compound string text widget can be edited by the user, returning either True or False to indicate the permission state. See the DXmCreateCSText and DXmCSTextGetEditable routines for related information.
Changes the highlighting of the compound string text located between two specified logical positions.
void DXmCSTextSetHighlight(widget, left, right, mode) Widget widget; DXmCSTextPosition left; DXmCSTextPosition right; XmHighlightMode mode; |
widget
The identifier (widget ID) of the compound string text widget.left
The left boundary of the text to be highlighted.right
The right boundary of the text to be highlighted.mode
One of the following types of highlighting:
Value Description XmHIGHLIGHT_NORMAL Removes highlighting XmHIGHLIGHT_SELECTED Uses reverse video XmHIGHLIGHT_SECONDARY_SELECTED Uses underlining
The DXmCSTextSetHighlight routine changes the highlighting of the compound string text located between two specified positions, by removing the highlighting or by implementing underlining or reverse video. This visual change in the display does not affect (set) the selections.
Sets the insertion cursor to the specified logical position in the text.
void DXmCSTextSetInsertionPosition(widget, position) Widget widget; DXmCSTextPosition position; |
widget
The identifier (widget ID) of the compound string text widget.position
The position of the insertion cursor.
The DXmCSTextSetInsertionPosition routine sets the insertion cursor to the specified logical position (indicated by number of characters) in the text. See the DXmCSTextGetInsertionPosition for related information.
Sets the maximum allowable length of the text in the compound string text widget.
void DXmCSTextSetMaxLength(widget, max_length) Widget widget; int max_length; |
widget
The identifier (widget ID) of the compound string text widget.max_length
An integer that represents the maximum length, in characters, of the text in the compound string text widget. This argument sets the XmNmaxLength resource used by the DXmCreateCSText routine.
The DXmCSTextSetMaxLength routine sets the maximum allowable length of the text in the compound string text widget. It prohibits the user from entering text longer than this limit. See the related routines DXmCreateCSText and DXmCSTextGetMaxLength.
Designates the specified text as the current primary selection by highlighting it in the compound string text widget.
void DXmCSTextSetSelection(widget, first, last, time) Widget widget; DXmCSTextPosition first; DXmCSTextPosition last; Time time; |
widget
The identifier (widget ID) of the compound string text widget.first
Represents the position of the first character in text being selected.last
Represents the position of the last character in the text being selected.time
Specifies the time of the event that generated the call to the DXmCSTextSetSelection routine.
The DXmCSTextSetSelection routine designates the specified text as the current primary selection by highlighting it in the compound string text widget. Within the text window, first marks the position of the first character in the text and last marks the last character. The field characters start at 0 and increase sequentially.See the DXmCreateCSText, DXmCSTextGetSelection, and DXmCSTextClearSelection routines for related information.
Replaces all the text in the compound string text widget with new text.
void DXmCSTextSetString(widget, value) Widget widget; XmString value; |
widget
The identifier (widget ID) of the compound string text widget.value
The text that replaces all text in the current compound string text widget.
The DXmCSTextSetString routine replaces all the text in the compound string text widget with new text specified by the value argument. See the DXmCreateCSText and DXmCSTextGetString routines for related information.
Sets the logical position of the first character in the displayed text.
void DXmCSTextSetTopPosition(widget, top_position) Widget widget; DXmCSTextPosition top_position; |
widget
The identifier (widget ID) of the compound string text widget.top_position
The logical position of the first character in the text.
The DXmCSTextSetTopPosition routine sets the logical position of the first character in the displayed text. If the direction is left to right, the first character is at the top left of the display. If the direction is right to left the first character is at the top right of the display.
Displays text located at a specified position.
void DXmCSTextShowPosition(widget, position) Widget widget; DXmCSTextPosition position; |
widget
The identifier (widget ID) of the compound string text widget.position
The logical position of a character in the text that is to be displayed.
The DXmCSTextShowPosition displays the text located at a specified position, which is the logical position of a character in that text.
Scrolls text vertically.
void DXmCSTextVerticalScroll(widget, n) Widget widget; int n; |
widget
The identifier (widget ID) of the compound string text widget.n
An integer that represents the number of lines to scroll up or down. A positive value means scroll up; a negative value means scroll down.
The DXmCSTextVerticalScroll routine scrolls text vertically by the given number of lines. See the DXmCSTextHorizontalScroll routine for related information.
Previous | Next | Contents | Index |
privacy and legal statement | ||
5635PRO_009.HTML |