3.19 frame%
Implements: top-level-window<%>
A frame is a top-level container window. It has a title bar (which displays the frame's label), an optional menu bar, and an optional status line.
Under Windows, both Multiple Document Interface (MDI) and Single Document Interface (SDI) frames are supported.
(->newframe% (label_) [(parent_)] [(width_)] [(height_)] [(x_)] [(y_)] [(style_)] [(enabled_)] [(border_)] [(spacing_)] [(alignment_)] [(min-width_)] [(min-height_)] [(stretchable-width_)] [(stretchable-height_)])frame%object
label: string (up to 200 characters)
parent=#f:frame%object or#f
width=#f: exact integer in [0, 10000] or#f
height=#f: exact integer in [0, 10000] or#f
x=#f: exact integer in [-10000, 10000] or#f
y=#f: exact integer in [-10000, 10000] or#f
style=null: list of symbols in'(no-resize-border no-caption no-system-menu mdi-parent mdi-child toolbar-button hide-menu-bar float metal)
enabled=#t: boolean
border=0: exact integer in [0, 1000]
spacing=0: exact integer in [0, 1000]
alignment='(center top): two-element list:'left,'center, or'rightand'top,'center, or'bottom
min-width=graphical minimum width: exact integer in [0, 10000]
min-height=graphical minimum height: exact integer in [0, 10000]
stretchable-width=#t: boolean
stretchable-height=#t: booleanThe
labelstring is displayed in the frame's title bar. If the frame's label is changed (seeset-label), the title bar is updated.The
parentargument can be#for an existing frame. Under Windows, ifparentis an existing frame, the new frame is always on top of its parent. Also, theparentframe may be an MDI parent frame from a new MDI child frame. Under Windows and X (for many window managers), a frame is iconized when its parent is iconized.If
parentis#f, then the eventspace for the new frame is the current eventspace, as determined bycurrent-eventspace. Otherwise,parent's eventspace is the new frame's eventspace.If the
widthorheightargument is not#f, it specifies an initial size for the frame (in pixels) assuming that it is larger than the minimum size, otherwise the minimum size is used.If the
xoryargument is not#f, it specifies an initial location for the frame. Otherwise, a location is selected automatically (tiling frames and dialogs as they are created).The
styleflags adjust the appearance of the frame on some platforms:'no-resize-border-- omits the resizeable border around the window (Windows, X MWM) or grow box in the bottom right corner (Mac OS X)'no-caption-- omits the title bar for the frame (Windows, X MWM)(X Gnome, X KDE: the frame decoration is omitted completely when
'no-resize-borderand'no-captionare combined.)'no-system-menu-- omits the system menu (Windows)'mdi-child-- creates the frame as a MDI (multiple document interface) child frame, mutually exclusive with'mdi-parent(Windows)'mdi-parent-- creates the frame as a MDI (multiple document interface) parent frame, mutually exclusive with'mdi-child(Windows)'toolbar-button-- includes a toolbar button on the frame's title bar (Mac OS X); a click on the toolbar button triggers a call toon-toolbar-button-click'hide-menu-bar-- hides the menu bar and dock when the frame is active (Mac OS X)'float-- causes the frame to stay in front of all other non-floating windows (Windows and Mac OS X always, X when combined with'no-caption); under Mac OS X, a floating frame shares the focus with an active non-floating frame; when this style is combined with'no-caption, then showing the frame does not cause the keyboard focus to shift to the window, and under X, clicking the frame does not move the focus'metal-- draws the frame with a brushed-metal background (Mac OS X); this style is ignored when'no-captionis specified
If the
'mdi-childstyle is specified, theparentmust be a frame with the'mdi-parentstyle, otherwise anexn:fail:contractexception is raised.Even if the frame is not shown, a few notification events may be queued for the frame on creation. Consequently, the new frame's resources (e.g., memory) cannot be reclaimed until some events are handled, or the frame's eventspace is shut down.
For information about the
enabledargument, seewindow<%>. For information about theborder,spacing, andalignmentarguments, seearea-container<%>. For information about themin-width,min-height,stretchable-width, andstretchable-heightarguments, seearea<%>.
Methods
create-status-line
get-menu-bar
has-status-line?
iconize
is-iconized?
is-maximized?
maximize
modified
on-mdi-activate
on-menu-char
on-subwindow-char
on-toolbar-button-click
set-icon
set-status-text
All Methods
accept-drop-files from window<%>
add-child from area-container<%>
after-new-child from area-container<%>
begin-container-sequence from area-container<%>
border from area-container<%>
can-close? (augmentable only) from top-level-window<%>
can-exit? from top-level-window<%>
center from top-level-window<%>
change-children from area-container<%>
client->screen from window<%>
container-flow-modified from area-container<%>
container-size from area-container<%>
create-status-line from frame%
delete-child from area-container<%>
enable from window<%>
end-container-sequence from area-container<%>
focus from window<%>
get-alignment from area-container<%>
get-children from area-container<%>
get-client-size from window<%>
get-cursor from window<%>
get-edit-target-object from top-level-window<%>
get-edit-target-window from top-level-window<%>
get-eventspace from top-level-window<%>
get-focus-object from top-level-window<%>
get-focus-window from top-level-window<%>
get-graphical-min-size from area<%>
get-handle from window<%>
get-height from window<%>
get-label from window<%>
get-menu-bar from frame%
get-parent from area<%>
get-plain-label from window<%>
get-size from window<%>
get-top-level-window from area<%>
get-width from window<%>
get-x from window<%>
get-y from window<%>
has-focus? from window<%>
has-status-line? from frame%
iconize from frame%
is-enabled? from window<%>
is-iconized? from frame%
is-maximized? from frame%
is-shown? from window<%>
maximize from frame%
min-height from area<%>
min-width from area<%>
modified from frame%
move from top-level-window<%>
on-activate from top-level-window<%>
on-close (augmentable only) from top-level-window<%>
on-drop-file from window<%>
on-exit from top-level-window<%>
on-focus from window<%>
on-mdi-activate from frame%
on-menu-char from frame%
on-message from top-level-window<%>
on-move from window<%>
on-size from window<%>
on-subwindow-char from frame%
overrides on-subwindow-char from window<%>
on-subwindow-event from window<%>
on-superwindow-enable from window<%>
on-superwindow-show from window<%>
on-system-menu-char from top-level-window<%>
on-toolbar-button-click from frame%
on-traverse-char from top-level-window<%>
place-children from area-container<%>
popup-menu from window<%>
reflow-container from area-container<%>
refresh from window<%>
resize from top-level-window<%>
screen->client from window<%>
set-alignment from area-container<%>
set-cursor from window<%>
set-icon from frame%
set-label from window<%>
set-status-text from frame%
show from top-level-window<%>
overrides show from window<%>
spacing from area-container<%>
stretchable-height from area<%>
stretchable-width from area<%>