Skip to Main Content
Volume 6A: Motif Programming Manual
book

Volume 6A: Motif Programming Manual

by David Brennan, Dan Heller, Paula Ferguson
September 1993
Intermediate to advanced content levelIntermediate to advanced
1014 pages
28h 26m
English
O'Reilly Media, Inc.
Content preview from Volume 6A: Motif Programming Manual
} 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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Volume 7A: XView Programming Manual

Volume 7A: XView Programming Manual

Dan Heller

Publisher Resources

ISBN: 9780596000431