procedure

:frame    name

Creates the primary frame for a TCL interpreter or a secondary top level frame for the interpreter.
name is used to generate the path name of the window to be created. It may have either the format of a widget name (e.g. :frame SYS) or the format required by TK for a path name (e.g. :frame .sys).
If the supplied frame name does not start with a period it is assumed to be a widget name. The name will be lower-cased (using the string tolower command) and a period prefixed. If the name thus generated is the same as the name returned by the self frame-name command (see common.tcl) then it is assumed that this is the primary frame for the interpreter (see also the :toplevel argument following).
The conditions for this to be the primary frame will be met if name is the same as the global TCL variable frame.

bindings

A number of bindings are made by default by the :frame procedure.

(1) when the window manager delete window event is generated (normally by the frame being Quit by the user) then the TCL command click NAME :quit will be executed where NAME is the widget name generated from name.

        (2)       If the frame being created is the primary frame for the interpreter
then a binding is made applicable to all windows in the interpreter for the
keyboard sequence Ctrl+Alt+Delete to the sequence required to orderly
finish and destroy the entire application. Since interpreters are automatically
created as necessary if they do not exist when invoked this is a convenient
way of causing a specific interpreter to be reloaded. The sequences
Ctrl+Delete and Alt+Delete may also be used which is particularly of use
when using terminals for which the full sequence has more dramatic effects.
        (3)       If the frame being created is the primary frame for the interpreter
then bindings are made applicable to all windows in the interpreter for the
keyboard sequences F1 , Shift+F1 and Alt+F1. These invoke features in the
online Help system. For further details see the section later in this document
which describes the Help system.
        (4)       For frames created with the parameter :transient T a binding is
made such that the window is destroyed  when an Unmap event occurs
(normally by the frame being Closed by the user).
        (5)       A binding is made such that if button 1 is pressed while
positioned over the frame footer area (if :show-footer T) then the footer is
cleared.
        (6)       A binding is made such that if button 3 is pressed while
positioned over the frame footer area (if :show-footer T) then the frame busy
indicator is cleared.
        (7)       For frames (other than those created with the parameter
:transient T) a binding is made such that when an  Unmap event  occurs the
global variable WMapState is set to 0 and the procedure click-unmap is
invoked if it exists.
        (8)       For frames (other than those created with the parameter
:transient T) a binding is made such that when a  Map event  occurs the
global variable WMapState is set to 1 and the procedure click-map is
invoked if it exists.
        (9)       For frames (other than those created with the parameter
:transient T) a binding is made such that when a  Visibility event  occurs the
procedure click-visibility is invoked if it exists.
        (10)      If the frame being created is the primary frame for the interpreter
then bindings are made applicable to all windows in the interpreter for the
keyboard sequence Shift+F2. This starts a dialogue which enables the TCL
source files used by the interpreter to be displayed.

        arguments

The :frame procedure may have a number of arguments however none of
these is mandatory.

                        :label                  string
        string is used as the title of the window and will appear centered in the
top bar of the window bounding box.
        e.g.    :label   “System Control”
The default value for the :label argument is “name frame”.

                        :icon-name              string
        string is used as the title of the icon for the window.
        e.g     :icon-name   “SysCntl”
The default value for the :icon-name argument is “name”.


                        :icon-image             string
        string is the name of a file which should contain a X bit map to be used
as the icon for the window.
        e.g     :icon-image   “@/MIDAS/tcl/bitmaps/egarray”
The default value for the :icon-image argument is “@$env(ICONHOME)/default”.

                        :w                      number
        number is the width of the window in pixels.
        e.g     :w   600

                        :h                      number
        number is the height of the window in pixels.
        e.g.    :h   400
The :w and :h parameters may be omitted in which case the packer geometry manager will be
used and the size of the window will be determined by its contents. If however the :w and :h
parameters are supplied then the placer geometry manager will be used by default for this
window.

                        :toplevel               T|F
        If the value of this argument is T (true) then the window is created
using the TK toplevel command otherwise it is created using the TK frame
command.
By default (if this argument is not supplied) the frame command is used if the name supplied
for the frame is the same as the value returned by the self frame-name command (the global
variable frame) otherwise the toplevel command is used.

                        :transient              T
        If the value of this argument is T (true) then the window is taken to only
have a short term existence. A binding is made for the window which causes
it to be removed from the screen (destroyed) if the window is closed
(unmapped). A global variable is created by taking the last component of the
window name and appending the string visible. (i.e. the name .tape.ss would
create the variable ssvisible. This variable has the value 1 when the transient
window is created and the value 0 when it is destroyed.
The default value for this option is F (false). A transient window is never iconized.

                        :show-footer    T
        If the value of this argument is T (true) then a footer is created for this
window.. The footer occupies an area of one character height at the bottom of
the window. The footer is described in more detail later in this document.
The default is that no footer is created

                        :resize         F
        If the value of this argument is F (false) then the window created may
not be resized. The initial size of the window is determined by the geometry
manager (if packing is used) or by the :w and :h parameter values if specified
and placing is used.
By default windows may be resized using the mouse


                        :closed         T
        If the value of this argument is T (true) then the window is created and
iconified.
By default windows are created open.

                        :pack                   T
        If the value of this argument is T (true) then the packer geometry
manager is used to position the footer (if it exists) at the bottom left hand
corner of the window.

                        :place                  T
        If the value of this argument is T (true) then the placer geometry
manager is used to position the footer (if it exists) at the bottom left hand
corner of the window.
If neither the :pack nor :place arguments are specified then the choice of geometry manager
is determined by the presence (place) or absence (pack) of the :w and :h arguments.