Specifications
Athena Widget Set libXaw 1.0.7
6.2.3.1. Example
If you wish to force the Dialog to neverresize one or more of its children then set left and right
to XawChainLeft and top and bottom to XawChainTop.This will cause the child to remain a
fixed distance from the top and left edges of the Dialog, and to neverresize.
6.2.3.2. Special Considerations
The Dialog widget automatically sets the top and bottom resources for all Children that are sub-
classes of the Command widget, as well as the widget children that are used to contain the label,
value,and icon.This policyallows the buttons at the bottom of the Dialog to interact correctly
with the predefined children, and makes it possible for a client to simply create and manage a new
Command button without having to specify its constraints.
The Dialog will also set fromLeft to the last button in the Dialog for each newbutton added to
the Dialog widget.
The automatically added constraints cannot be overridden, as theyare policydecisions of the Dia-
log widget. If a more flexible Dialog is desired, the application is free to use the Form widget to
create its own Dialog policy.
6.2.4. Automatically Created Children.
The Dialog uses Label widgets to contain the label and icon.These widgets are named label and
icon respectively.The Dialog value is contained in an AsciiTextwidget whose name is value.
Using XtNameToWidget the application can change those resources associated with each of
these widgets that are not available through the Dialog widget itself.
6.2.5. Convenience Routines
To return the character string in the text field, use XawDialogGetValueString.
String XawDialogGetValueString(w)
Widget w;
w Specifies the Dialog widget.
This function returns a copyofthe value string of the Dialog widget. This string is allocated by
the AsciiTextwidget and will remain valid and unchanged until another call to XawDialogGet-
ValueString or an XtGetValues call on the value widget, when the string will be automatically
freed, and a newstring is returned. This string may be freed earlier by calling the function
XawAsciiSourceFreeString.
To add a newbutton to the Dialog widget use XawDialogAddButton.
void XawDialogAddButton(w, name, func, client_data)
Widget w;
String name;
XtCallbackProc func;
XtPointer client_data;
w Specifies the Dialog widget.
name Specifies the name of the newCommand button to be added to the Dialog.
func Specifies a callback function to be called when this button is activated. If NULL
is specified then no callback is added.
client_data Specifies the client_data to be passed to the func.
This function is merely a shorthand for the code sequence:
{
114