} XmTextScanType;
XmSELECT_WHITESPACE works in the same way as XmSELECT_WORD. Each successive button click in a Text
widget selects the text according to the corresponding item in the array. The default array is defined as follows:
static XmTextScanType sarray[] = {
XmSELECT_POSITION, XmSELECT_WORD, XmSELECT_LINE, XmSELECT_ALL
};
You should keep the items in the array in ascending order, so as not to confuse the user. The following code fragment
shows an acceptable change to the array:
static XmTextScanType sarray[] = {
XmSELECT_POSITION, XmSELECT_WORD, XmSELECT_LINE, XmSELECT_PARAGRAPH,
XmSELECT_ALL
};
...
XtVaSetValues (text_w,
XmNselectionArray, selectionArray,
XmNselectionArrayCount, 5,
NULL);
The maximum time interval between button clicks in a multi−click action is specified by the multiClickTime
resource. This resource is maintained by the X server and set for all applications; it is not a Motif resource. The value
of the resource can be retrieved using XtGetMultiClickTime() and changed with
XtSetMultiClickTime(). For more discussion on this value, see Chapter 11, Labels and Buttons.
The XmNselectThreshold resource can be used to modify the behavior of click−and−drag actions. This resource
specifies the number of pixels that the user must move the pointer before a character can be selected. The default
value is 5, which means that the user must move the mouse at least 5 pixels before the Text widget decides whether or
not to select a character. This threshold is used throughout ...