typedef struct {
int reason;
XEvent *event;
XmString value;
int length;
} XmSelectionBoxCallbackStruct;
The value of the reason field is an integer value that specifies the reason that the callback routine was invoked. The
field can be one of the following values:
XmCR_OK
XmCR_APPLY
XmCR_CANCEL
XmCR_HELP
XmCR_NO_MATCH
The value and length fields represent the compound string version of the item that the user selected from the list
or typed into the text entry area. In order to get the actual character string for the item, you have to use
XmStringGetLtoR() to convert the compound string into a character string. (See Chapter 19, Compound Strings,
for a discussion of compound strings.)
7.2.2 Internal Widgets
The SelectionDialog is obviously composed of primitive subwidgets, like PushButtons, Labels, a ScrolledList, and a
TextField widget. For most tasks, it is possible to treat the dialog as a single entity because the dialog provides
resources that manage the different components. However, there are some situations where it is useful to be able to get
a handle to the widgets internal to the dialog. The Motif toolkit provides the XmSelectionBoxGetChild()
routine to allow you to access the internal widgets. This routine takes the following form:
Widget
XmSelectionBoxGetChild(widget, child)
Widget widget;
unsigned char child;
The widget parameter is a handle to a dialog widget, not its DialogShell parent. The child parameter is an
enumerated value that specifies a particular subwidget in the ...