|
NAMEXmtRegisterWidgetTypes() - register names for widget types.SYNOPSIS#include <Xmt/WidgetType.h>
void XmtRegisterWidgetTypes(XmtWidgetType *types, Cardinal num_types) typedef struct {
typedef Widget (*XmtWidgetConstructor)(Widget parent, String name, ArgList args, Cardinal num_args); typedef void (*XmtSetValueProc)(Widget w, XtPointer address, XrmQuark type, Cardinal size); typedef void (*XmtGetValueProc)(Widget w, XtPointer address, XrmQuark type, Cardinal size); ARGUMENTSINPUTS
DESCRIPTIONXmtRegisterWidgetTypes() registers the widgets described in the types array. Each element of the array must have a name specified in the name field, and either a widget class pointer or a widget constructor procedure specified on the class or constructor fields. Any widget type registered in this way can be used in an xmtChildren or xmtType resource in a resource file, and my be automatically created with Xmt CreateChildren() and related functions. Note that the constructor field is of type XmtWidgetConstructor. This is a standard Motif-style constructor function:The last field of the XmtWidgetType structure, popup, should be set to True if the widget is a popup type that can be legally created as a child of a primitive, non-composite widget. If False, then the widget will never be created as a child of a primitive widget. If a widget class is specified, and popup is True, then the widget will be created with XtCreatePopupShell(), rather than XtCreateWidget(). The remaining two fields of the XmtWidgetType structure, set_value_proc, and get_value_proc are optional and are only necessary for widgets, such as the XmtChooser, the XmtInput Field, and the XmScale, which maintain a state value and can be used to get input from the user in a dialog box. These fields are procedures that set a value on the widget and get a value from the widget. If you register a procedure with these fields set, you can then use that widget type with XmtDialogSetDialogValues(), XmtDialogGetDialogValues() and other automatic dialog creation functions. (See Chapter 29, Custom Dialogs and Automatic Dialog Management, for more information.) The arguments to both procedures are the same: the first is the widget on which the value is to be set, or from which the value is to retrieved. The second argument, address, is the address of the value to be set or the address at which the value is to be stored. type is a quarkified version of the representation type of the value, and size is the length in bytes of the value. These type and size arguments allow some widgets to handle values of multiple types SEE ALSOChapter 11, Automatic Widget Creation,Chapter 29, Custom Dialogs and Automatic Dialog Management, XmtCreateWidgetType(), XmtLookupWidgetType(), XmtRegisterMotifWidgets(), XmtRegisterPopupClass(), XmtRegisterPopupConstructor(), XmtRegisterWidgetClass(), XmtRegisterWidgetConstructor(), XmtRegisterXmtWidgets(), XmtVaRegisterWidgetClasses(), XmtVaRegisterWidgetConstructors().
Visit the GSP FreeBSD Man Page Interface. |