Specifications
Athena Widget Set libXaw 1.0.7
app_con_return Returns the application context of this application, if non-NULL.
application_class Specifies the class name of this application, which is usually the generic
name for all instances of this application. Auseful convention is to form
the class name by capitalizing the first letter of the application name. For
example, the application named ‘‘xman’’has a class name of ‘‘Xman’’.
options Specifies howtoparse the command line for anyapplication-specific
resources. The options argument is passed as a parameter to XrmPar-
seCommand.For further information, see Xlib — C Language X Inter-
face.
num_options Specifies the number of entries in the options list.
argc_in_out Specifies a pointer to the number of command line parameters.
argv_in_out Specifies the command line parameters.
fallback_resources Specifies resource values to be used if the site-wide application class
defaults file cannot be opened, or NULL.
args Specifies the argument list to use when creating the Application shell.
num_args Specifies the number of arguments in args.
This function will remove the command line arguments that the toolkit reads from argc_in_out,
and argv_in_out.Itwill then attempt to open the display.Ifthe display cannot be opened, an
error message is issued and XtAppInitialize terminates the application. Once the display is
opened, all resources are read from the locations specified by the Intrinsics. This function returns
an ApplicationShell widget to be used as the root of the application’swidget tree.
2.3. Creating a Widget
Creating a widget is a three-step process. First, the widget instance is allocated, and various
instance-specific attributes are set by using XtCreateWidget.Second, the widget’sparent is
informed of the newchild by using XtManageChild.Finally,Xwindows are created for the par-
ent and all its children by using XtRealizeWidget and specifying the top-most widget. The first
twosteps can be combined by using XtCreateManagedWidget.Inaddition, XtRealizeWidget
is automatically called when the child becomes managed if the parent is already realized.
To allocate, initialize, and manage a widget, use XtCreateManagedWidget.
Widget XtCreateManagedWidget(name, widget_class, parent, args, num_args)
String name;
WidgetClass widget_class;
Widget parent;
ArgList args;
Cardinal num_args;
name Specifies the instance name for the created widget that is used for retrieving wid-
get resources.
widget_class Specifies the widget class pointer for the created widget.
parent Specifies the parent widget ID.
args Specifies the argument list. The argument list is a variable-length list composed
of name and value pairs that contain information pertaining to the specific widget
instance being created. Forfurther information, see Section 2.7.2.
num_args Specifies the number of arguments in the argument list. If the num_args is zero,
the argument list is neverreferenced.
When a widget instance is successfully created, the widget identifier is returned to the application.
If an error is encountered, the XtError routine is invokedtoinform the user of the error.
7