Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
XmtRegisterWidgetTypes(3)  Library Functions Manual  XmtRegisterWidgetTypes(3)

NAME
       XmtRegisterWidgetTypes()	- register names for widget types.

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

ARGUMENTS
       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.

DESCRIPTION
       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	proce-
       dure specified on the class or constructor fields. Any widget type reg-
       istered	in  this way can be used in an xmtChildren or xmtType resource
       in a resource file, and my be automatically created  with  Xmt  Create-
       Children() 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	proce-
       dure with these fields set, you can then	use that widget	type with Xmt-
       DialogSetDialogValues(),	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 ALSO
       Chapter 11, Automatic Widget Creation,
       Chapter 29, Custom Dialogs and Automatic	Dialog Management,
       XmtCreateWidgetType(), XmtLookupWidgetType(),
       XmtRegisterMotifWidgets(), XmtRegisterPopupClass(),
       XmtRegisterPopupConstructor(), XmtRegisterWidgetClass(),
       XmtRegisterWidgetConstructor(), XmtRegisterXmtWidgets(),
       XmtVaRegisterWidgetClasses(), XmtVaRegisterWidgetConstructors().

Xmt				  Motif	Tools	     XmtRegisterWidgetTypes(3)

NAME | SYNOPSIS | ARGUMENTS | DESCRIPTION | SEE ALSO

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=XmtRegisterWidgetTypes&sektion=3&manpath=FreeBSD+12.0-RELEASE+and+Ports>

home | help