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

motif_top_level_shell(motif) Motif motif_top_level_shell(motif)

NAME

motif_top_level_shell - top-level popup shell

DESCRIPTION

The motif_top_level_shell provides a popup shell for long- lived popups. Many window manager treat transient shells (such as motif_form_dialogs) differently than other windows. This class allows programmers to have multiple top- level shells, all with the same properties (interactive placement, independent icons, etc.) in a single application.

SUPERCLASS

motif

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 top_level_shell widget */ /* In: scripts/motif/toplevel.scr */

<motifinit

motif application="Form Example";

motif_push_button new: formButton parent=motif @ "labelString" : "Push to Pop up a Form" activate_action=popup_form create! ; actions new: popup_form tick_actions+ "formshell on!;" tick_actions+ " formButton @ `labelString' : `Push to remove form' activate_action=popdown_form; " ; actions new: popdown_form tick_actions+ "formshell off!;" tick_actions+ " formButton @ `labelString' : `Push to Pop up a FormDialog' activate_action=popup_form; " ;

motif_top_level_shell new: formshell parent=motif @ `title' : `Sample Form' create! ;

motif_form new: aForm parent=formshell @ "width" : 200 @ "height" : 200 create! ; motif_push_button new: upper_left parent=aForm @ "topAttachment" : XmATTACH_FORM @ "leftAttachment" : XmATTACH_FORM @ "labelString" : "Upper Left" activate_action=popon create! ; motif_error_dialog new: error parent=motif @ "messageString" : "OH NO!!!" create! ;

actions new: popon tick_actions="error on!;"; motif_push_button new: upper_right parent=aForm

@ "topAttachment" : XmATTACH_FORM @ "rightAttachment" : XmATTACH_FORM @ "labelString" : "Upper Right" create! ; motif_push_button new: lower_right parent=aForm @ "bottomAttachment" : XmATTACH_FORM @ "rightAttachment" : XmATTACH_FORM @ "labelString" : "Lower Right" create! ; motif_push_button new: lower_left parent=aForm @ "bottomAttachment" : XmATTACH_FORM @ "leftAttachment" : XmATTACH_FORM @ "labelString" : "Lower Left" create! ; motif_push_button new: middle parent=aForm @ "bottomAttachment" : XmATTACH_WIDGET @ "topAttachment" : XmATTACH_WIDGET @ "leftAttachment" : XmATTACH_WIDGET @ "rightAttachment" : XmATTACH_WIDGET @ "rightWidget" : [upper_right id?] @ "leftWidget" : [upper_left id?] @ "topWidget" : [upper_left id?] @ "bottomWidget" : [lower_left id?] @ "labelString" : "Middle" create! ; motif on! start!;

SEE ALSO

motif motif_form motif_form_dialog motif_message_dialog motif_error_dialog motif_information_dialog motif_question_dialog motif_warning_dialog motif_working_dialog motif_prompt_dialog motif_selection_dialog motif_file_selection_dialog


Please send comments and suggestions to
consult@rpi.edu