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

motif_main_window(motif) Motif motif_main_window(motif)

NAME

motif_main_window - a standard layout for the primary window of an application

DESCRIPTION

A MainWindow provides a standard layout for the primary window of an application. This layout includes a MenuBar, a CommandWindow, a work region and ScrollBars. Any or all of these areas are optional.

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

SUPERCLASS

motif_scrolled_window

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 main window */ /* file: scripts/motif/mainwindow.scr */

<motifinit motif application="Main Window Example";

motif_main_window new: aMainWindow parent=motif @ "scrollingPolicy" : XmAUTOMATIC enter_action=entered_window create! ; actions new: entered_window tick_actions="! entered main window" ; motif_drawing_area new: aDrawingArea parent=aMainWindow @ width : 512 @ height : 512 enter_action=entered_drawingarea expose_action=aDrawingArea_exposed create! ; motif_command new: aCommand parent=aMainWindow @ "promptString" : "Enter any Lymb statement" create! ; actions new: entered_drawingarea tick_actions="! entered drawing area" ; actions new: aDrawingArea_exposed tick_actions+ "aWindow draw_line:(10,10,200,200); xdisplay flush!;" ; <menus motif on!; xwindow new: aWindow id=[aDrawingArea window_id?] ; motif widget_tree!;

motif start!;

SEE ALSO

motif, motif_scrolled_window, motif_manager


Please send comments and suggestions to
consult@rpi.edu