{ <window> = } wpanel <file>
or
{ <window>= } wpanel {
<sub_panel_block>
}
Define a panel window.
<window>
A window identifier whose contents are to be a layout of sub-panels. If this is omitted, the
next free window will be used.
<file>
A text file containing
the layout and contents of sub-panels. There is no default file extension.
If this parameter is not present, sub-panel details will be expected to
appear in a language block following the command line.
<sub_panel_block>
A language block, providing the layout and contents of sub-panels.
-at=<atable>
An atable to be searched within callback procedures for this window. This
means that any identifiers within <atable>
referenced in a callback do not have to be prefixed by ~<">atable>. This cannot be the
local atable.
-col=<color>
The background color of the window contents. If omitted, a default color is
used.
-dec=<n>
A specification of the window decoration to be added by the window manager.
Possible values are:
0 (or -no_dec) for no decoration at all,
1 for full decoration (the default),
>1 for custom decoration, see Window Decoration.
-dim=<screen_xy>
Define the dimensions of the panel contents area in pixels. This is a
2-element numeric array. If omitted, the area is computed to enclose all
the defined sub-panels.
-emb=<string>
Embed the window into a container provided by
an external client. <string> is the name of an embed container created by the
embed command.
If the embed container does not exist or is invalid, this switch is ignored.
-ent
Use the behavior such that pressing the Enter
key activates (selects) push buttons. The default behavior is for the
space key to perform this function. This switch is valid on Windows systems
only.
-fix
Create the window fixed size, i.e. non-resizable. This is the default
behavior unless window.resizable has previously
been set. Use -no_fix to make the window resizable.
When a panel window is resizable and has scrollbars (-sc)
it cannot be grown to a size larger than the sum of its contents.
-fo=<font>
The font to be used for sub-panel text. This must be a fixed font. If omitted,
a default fixed font is used.
-gap=<num>
The gap, in pixels, to be used between sub-panels. The default value is 4.
-geo=<screen_box>
The geometry of the window in screen coordinates, either just its position
(a 2-element array) or its full rectangle geometry (a 4-element array).
The default is the value of window.outrect.
-gh
The window should be initially ghosted, i.e. insensitive to user-interaction.
The default is the current value of window.ghosted.
-ic
Open the window in iconic form. The default is the value of window.open.
-inv
Open the window invisible. The default is the value of window.visibility.
-m=<num>
The size of the window margin, in pixels, within which sub-panels are positioned.
The default value is 4.
-mas
Define the window as a master window. When a master window is iconized,
this also iconizes all other windows.
-mb
Give the window a menubar for user buttons. If omitted, the window
will be created without a menubar.
-mf=<font>
The font to be used for menubar text. This must be a fixed font. If omitted
a default fixed font is used. This option has no effect on Windows systems,
where menubar font and color are controlled by the window manager.
-num
Include the window slot number in the window's title. Use -no_num
to suppress it. The default behavior is governed by the value of the system
numeric window_numbers.
-ocol=<color>
The other color for use in the window, e.g. for text. If omitted, a default
color is used.
-pos=<screen_xy>
The position of the menu in screen coordinates. This is a 2-element array.
The default is the value of window.outrect[1:2].
-sc
Give the window scrollbars. When a window has scrollbars defined, they
are only visible when the window size is too small for all sub-panels
to be visible. Scrollbars are only defined as default when the window
is fixed size (-fix) and external window dimensions
have been given (-geo).
-sh=<string>
A shell name for communication with X application resources. If omitted, the value
panel is used.
-tb
Display the window icon in the Windows taskbar. The default behavior is
not to display it in the taskbar but only to display it on the desktop when
minimized. This switch has no meaning on Unix systems.
-tit=<string>
Provide a title for the window. The default is the value of window.title.
The <sub_panel_block> or the contents of <file> is made up of sub-panel definitions each describing a sub-panel or providing control information for layout purposes:
The general form is:
{<name> :} <sub-panel> {<parameters>} {<switches>}or
{<name> :} <window-command> {<parameters>} {<switches>}
where:
<name>
A user-given name for subsequent sub-panel reference purposes.
<sub_panel>
A sub-panel definition, one of the following:
button - a push-button
check_button - a toggle-button
clock - a clock
column { } - lay out sub-panels in column fashion
combo_box - an interactive text input box with a pulldown menu for possible choices
dial - an interactive dial
gap - the spacing between sub-panels
label - a label
list - a scrollable list to select from
log - a scrollable log for text output only
options - a button and pulldown to select from
progress - a numeric progress bar
radio_box - a one-of-many list to select from
row { } - lay out sub-panels in row fashion
sash - a decorative line between sub-panels (dynamically repositionable)
separator - a decorative line between sub-panels
slider - an interactive slider
text - an interactive text input box
window - an empty sub-window
<window-command>
A window insertion definition, one of the following commands:
walpha - an alpha window
wcomponent - a component window
wdisplay - a display window
wgraphic - a graphic window
wpanel - a panel window
wtab - a tab window
wtable - a table window
wtree - a tree window
wweb - a web window
<parameters>
and <switches>
These define
the contents and geometry of sub-panels. Consult Panels. For details of
window-command parameters, consult the relevant command.
Selection may be made from sub-panels during command polling or during pop-up menu selection when used with the -m option.
Details of sub-panel attributes may be examined or set after window creation via the window structure member window.panels.
New sub-panels may be added to an existing panel window by the command paneladd.
Create a file browser panel window named fview.
window fview=wpanel, -tit='File Browser' { # Top row: a prompt and a text input sub-panel row { label 'Filename' fname: text } # Second row: an empty window sub-panel to accommodate the meat of the file # Scrollbars are added awin: window <500,500>,-sc } # Define a callback to display the contents of the file whenever the # contents of the text sub-panel change. fview.fname.exec = { args w=window, p=panel if (p.text) w.awin = walpha ^(p.text) }
Commands: |
choice, embed, hint, paneladd, poll, wclose, window, wopen, wsize |
Identifiers: |
win# (window), window_numbers (numeric) |
Structures: |