<<<<<<<<<<<<<<<<<

motif_form(motif) Motif motif_form(motif)

NAME

motif_form - a container for other widgets

DESCRIPTION

A Form is a container widget with no input semantics oif its own. Constraints are placed on the children of the Form to define attachments for each of the child's four sides.

For a more complete description of this Motif widget, consult "OSF/Motif Programmer's Reference."

SUPERCLASS

motif_bulletin_board

INSTANCE VARIABLES

MESSAGES

@ resource selects resource for a subsequent set or query.

: value sets the current resource to value. Since most resources have mixed case, you should enclose any resource name in quotes. Resource names are the Motif names with the XmN prefix removed. Some resources can only be set before the widget is created. For efficiency, set as many resources as you can before creation.

scalar_value? returns the value of the current resource whose type is integer.

string_value? returns the value of the current resource whose type is string.

pointer_value? returns the value of the current resource whose type is a pointer of any kind.

create! creates an instance of the widget. Any resources that have been specified prior to the create! will be set. An id? message also sends a create!.

on! realizes the widget. Realizing a widget creates its windows and displays it when it is managed.

EXAMPLE

/* Illustrate the form widget */

/* In: scripts/motif/form.scr */

<motifinit

motif application="Form Example";

motif_form new: aForm parent=motif @ "width" : 200 @ "height" : 200 @ `fractionBase' : 3 create! ; motif_push_button new: upper_left parent=aForm @ "topAttachment" : XmATTACH_FORM @ "leftAttachment" : XmATTACH_FORM @ `rightAttachment' : XmATTACH_POSITION @ `rightPosition' : 1 @ `bottomAttachment' : XmATTACH_POSITION @ `bottomPosition' : 1 @ "labelString" : "Upper Left" activate_action=popon create! ; motif_error_dialog new: error parent=motif @ "messageString" : "OH NO!!!" @ "dialogStyle" : XmDIALOG_APPLICATION_MODAL create! ;

actions new: popon tick_actions="error on!;"; motif_push_button new: upper_right parent=aForm @ "topAttachment" : XmATTACH_FORM @ "rightAttachment" : XmATTACH_FORM @ `leftAttachment' : XmATTACH_POSITION @ `leftPosition' : 2 @ `bottomAttachment' : XmATTACH_POSITION @ `bottomPosition' : 1 @ "labelString" : "Upper Right" activate_action=activated_upper_right arm_action=armed_upper_right disarm_action=disarmed_upper_right enter_action=entered_upper_right exit_action=exited_upper_right create! ; actions new: activated_upper_right tick_actions="! activated upper right"; actions new: armed_upper_right tick_actions="! armed upper right"; actions new: disarmed_upper_right tick_actions="! disarmed upper right"; actions new: entered_upper_right tick_actions="! entered upper right"; actions new: exited_upper_right tick_actions="! exited upper right";

motif_push_button new: lower_right parent=aForm @ "bottomAttachment" : XmATTACH_FORM @ "rightAttachment" : XmATTACH_FORM @ `leftAttachment' : XmATTACH_POSITION @ `leftPosition' : 2 @ `topAttachment' : XmATTACH_POSITION @ `topPosition' : 2 @ "labelString" : "Lower Right" create! ; motif_push_button new: lower_left parent=aForm @ "bottomAttachment" : XmATTACH_FORM @ "leftAttachment" : XmATTACH_FORM @ `rightAttachment' : XmATTACH_POSITION @ `rightPosition' : 1 @ `topAttachment' : XmATTACH_POSITION @ `topPosition' : 2 @ "labelString" : "Lower Left" create! ; motif_push_button new: middle parent=aForm @ `rightAttachment' : XmATTACH_POSITION @ `rightPosition' : 2 @ `topAttachment' : XmATTACH_POSITION @ `topPosition' : 1 @ `leftAttachment' : XmATTACH_POSITION @ `leftPosition' : 1 @ `bottomAttachment' : XmATTACH_POSITION @ `bottomPosition' : 2 @ "labelString" : "Middle" create! ; motif on! start!;

SEE ALSO

motif, motif_bulletin_board


Please send comments and suggestions to
consult@rpi.edu