Maplets[Elements]
Window
define a window
Calling Sequence
Parameters
Description
Examples
Window(opts)
Window[refID](opts)
opts
-
equation(s) of the form option=value where option is one of defaultbutton, height, layout, menubar, reference, resizable, title, toolbar, width, xcoord, or ycoord; specify options for the Window element
refID
name or string that gives reference to the element
The Window element defines a window in a Maplet application. A Maplet application window consists of a title bar, optional menu bar, optional toolbar, and a body.
A window should not be thought of as a Maplet application, but rather as one element within a Maplet application. A Maplet application can contain more than one window. Each window can contain many elements that control the layout and function of the window.
A Window element can contain most elements. It cannot contain the Maplet element or dialog elements.
A Window element can be contained in a Maplet element.
The Window element features can be modified by using options. To simplify specifying options in the Maplets package, certain options and contents can be set without using an equation. The following table lists elements, symbols, and types (in the left column) and the corresponding option or content (in the right column) to which inputs of this type are, by default, assigned.
Elements, Symbols, or Types
Assumed Option or Content
list, BoxLayout element, or GridLayout element
layout option
MenuBar element
menubar option
reference option
string or symbol
title option
ToolBar element
toolbar option
The following table describes the control and use of the Window element options.
An x in the I column indicates that the option can be initialized, that is, specified in the calling sequence (element definition).
An x in the R column indicates that the option is required in the calling sequence.
An x in the G column indicates that the option can be read, that is, retrieved by using the Get tool.
An x in the S column indicates that the option can be written, that is, set by using the SetOption element or the Set tool.
Option
I
R
G
S
defaultbutton
x
height
layout
menubar
reference
resizable
title
toolbar
visible*
width
xcoord
ycoord
* visible whether the window is visible to the user.
The opts argument can contain one or more of the following equations that set Maplet application options.
defaultbutton = Button element
The button that is activated when ENTER is pressed. If the defaultbutton option is not specified, the first Button defined for the Window is the default button.
height = posint
The window height in pixels.
layout = layout element or reference to such an element (name or string)
The window layout or reference to a layout.
menubar = MenuBar element or reference to a MenuBar element (name or string)
A menu bar or reference to a menu bar for the window.
reference = name or string
A reference to the Window element.
If the reference is specified by both an index, for example, Window[refID], and a reference in the calling sequence, the index reference takes precedence.
resizable = true or false
Whether the window is resizable. By default, the value is true.
title = string or symbol
The title that appears in the window title bar. The default title is Maplet.
toolbar = ToolBar element or reference to a ToolBar element (name or string)
A reference to a toolbar.
width = posint
The window width in pixels.
xcoord = nonnegint
The offset of the left edge of the window from the left side of the screen in pixels. By default, the window is centered horizontally.
ycoord = nonnegint
The offset of the top edge of the window from the top side of the screen in pixels. By default, the window is centered vertically.
with⁡MapletsElements:
maplet≔Maplet⁡Window⁡title=A Simple Maplet,A simple Maplet application.,Button⁡OK,Shutdown⁡:
MapletsDisplay⁡maplet
See Also
Maplets/LayoutElements
Maplets/MenuElements
Maplets/OtherElements
Maplets/ToolBarElements
Maplets[Display]
Maplets[Elements][BoxLayout]
Maplets[Elements][Button]
Maplets[Elements][GridLayout]
Maplets[Elements][Maplet]
Maplets[Elements][Menu]
Maplets[Elements][RunWindow]
Maplets[Elements][SetOption]
Maplets[Elements][Shutdown]
Maplets[Elements][ToolBar]
Maplets[Tools][Get]
Maplets[Tools][Set]
Overview of Maplet Applications
plot[color]
Download Help Document