GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
XmtRegisterWidgetTypes(3) FreeBSD Library Functions Manual XmtRegisterWidgetTypes(3)

XmtRegisterWidgetTypes() - register names for widget types.

#include <Xmt/WidgetType.h>

void XmtRegisterWidgetTypes(XmtWidgetType *types, Cardinal num_types)

typedef struct {
String name;
WidgetClass class;
XmtWidgetConstructor constructor;
XmtSetValueProc set_value_proc;
XmtGetValueProc get_value_proc;
int popup; } XmtWidgetType;

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);

INPUTS
types
An array of XmtWidgetType structures describing the widget types and the names to register them under.
num_types
The number of elements in the types array.

XmtRegisterWidgetTypes() 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

Chapter 11, Automatic Widget Creation,
Chapter 29, Custom Dialogs and Automatic Dialog Management, XmtCreateWidgetType(), XmtLookupWidgetType(), XmtRegisterMotifWidgets(), XmtRegisterPopupClass(), XmtRegisterPopupConstructor(), XmtRegisterWidgetClass(), XmtRegisterWidgetConstructor(), XmtRegisterXmtWidgets(), XmtVaRegisterWidgetClasses(), XmtVaRegisterWidgetConstructors().
Motif Tools Xmt

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.