(new frame% [label label] [ [parent parent] [width width] [height height] [x x] [y y] [style style] [enabled enabled] [border border] [spacing spacing] [alignment alignment] [min-width min-width] [min-height min-height] [stretchable-width stretchable-width] [stretchable-height stretchable-height]]) → (is-a?/c frame%) label : label-string? parent : (or/c (is-a?/c frame%) #f) = #f width : (or/c dimension-integer? #f) = #f height : (or/c dimension-integer? #f) = #f x : (or/c position-integer? #f) = #f y : (or/c position-integer? #f) = #f
(listof (or/c 'no-resize-border 'no-caption 'no-system-menu 'hide-menu-bar 'toolbar-button 'float 'metal 'fullscreen-button 'fullscreen-aux)) = null enabled : any/c = #t border : spacing-integer? = 0 spacing : spacing-integer? = 0
(list/c (or/c 'left 'center 'right) (or/c 'top 'center 'bottom)) = '(center top) min-width : (or/c dimension-integer? #f) = #f min-height : (or/c dimension-integer? #f) = #f stretchable-width : any/c = #t stretchable-height : any/c = #t
The parent argument can be #f or an existing frame. On Windows, if parent is an existing frame, the new frame is always on top of its parent. On Windows and Unix (for many window managers), a frame is iconized when its parent is iconized.
If parent is #f, then the eventspace for the new frame is the current eventspace, as determined by current-eventspace. Otherwise, parent’s eventspace is the new frame’s eventspace.
If the width or height argument 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 x or y argument 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 style flags adjust the appearance of the frame on some platforms:
omits the resizeable border around the window (Windows, Unix), ability to resize the window (Mac OS X), or grow box in the bottom right corner (older Mac OS X)
omits the title bar for the frame (Windows, Mac OS X, Unix)
omits the system menu (Windows)
includes a toolbar button on the frame’s title bar (Mac OS X 10.6 and earlier); a click on the toolbar button triggers a call to on-toolbar-button-click
hides the menu bar and dock when the frame is active (Mac OS X) or asks the window manager to make the frame fullscreen (Unix)
causes the frame to stay in front of all other non-floating windows (Windows, Mac OS X, Unix); on 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 on Unix, clicking the frame does not move the focus; on Windows, a floating frame has no taskbar button
ignored (formerly supported for Mac OS X)
includes a button on the frame’s title bar to put the frame in fullscreen mode (Mac OS X 10.7 and later)
allows the frame to accompany another that is in fullscreen mode (Mac OS X 10.7 and later)
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 enabled argument, see window<%>. For information about the border, spacing, and alignment arguments, see area-container<%>. For information about the min-width, min-height, stretchable-width, and stretchable-height arguments, see area<%>.
Changed in version 18.104.22.168 of package gui-lib: Added 'fullscreen-button and 'fullscreen-aux options for style.
See also set-status-text.
A frame’s mode can be changed by the user, and such changes do not go through this method. A program cannot detect when a frame has been put in fullscreen mode except by polling is-fullscreened?.
Added in version 22.214.171.124 of package gui-lib.
A frame’s iconization can be changed by the user, and such changes do not go through this method. A program cannot detect when a frame has been iconized except by polling is-iconized?.
Added in version 126.96.36.199 of package gui-lib.
A window’s maximization can be changed by the user, and such changes do not go through this method; use on-size to monitor size changes.
Default implementation: If maximize? is #f, the window is restored, otherwise it is maximized.
When the match corresponds to a complete shortcut combination, the menu item’s callback is called (before on-menu-char returns).
If the event does not correspond to a complete shortcut combination, the event may be handled anyway if it corresponds to a mnemonic in the menu bar (i.e., an underlined letter in a menu’s title, which is installed by including an ampersand in the menu’s label). If a mnemonic match is found, the keyboard focus is moved to the menu bar (selecting the menu with the mnemonic), and #t is returned.
(send a-frame on-subwindow-char receiver event) → boolean? receiver : (is-a?/c window<%>) event : (is-a?/c key-event%)
(or (send this on-menu-char event) (send this on-system-menu-char event) (send this on-traverse-char event))