1mNAME0m
       place - Geometry manager for fixed or rubber-sheet placement

1mSYNOPSIS0m
       1mplace 4m22moption24m 4marg24m ?4marg24m 4m...24m?


1mDESCRIPTION0m
       The  placer  is  a  geometry  manager for Tk.  It provides simple fixed
       placement of windows, where you specify the exact size and location  of
       one window, called the 4mslave24m, within another window, called the 4mmaster24m.
       The placer also provides rubber-sheet placement, where you specify  the
       size  and  location of the slave in terms of the dimensions of the mas-
       ter, so that the slave changes size and location in response to changes
       in  the size of the master.  Lastly, the placer allows you to mix these
       styles of placement so that, for example, the slave has a  fixed  width
       and height but is centered inside the master.


       1mplace 4m22mwindow24m 4moption24m 4mvalue24m ?4moption24m 4mvalue24m 4m...24m?
              Arrange  for  the placer to manage the geometry of a slave whose
              pathName is 4mwindow24m.  The remaining arguments consist of  one  or
              more  4moption-value24m  pairs that specify the way in which 4mwindow24m's
              geometry is managed.  4mOption24m may have any of the values accepted
              by the 1mplace configure 22mcommand.

       1mplace configure 4m22mwindow24m ?4moption24m? ?4mvalue24m 4moption24m 4mvalue24m 4m...24m?
              Query  or modify the geometry options of the slave given by 4mwin-0m
              4mdow24m.  If no 4moption24m is specified, this  command  returns  a  list
              describing  the  available  options  (see  1mTk_ConfigureInfo  22mfor
              information on the format of this list).  If 4moption24m is specified
              with  no  4mvalue24m,  then the command returns a list describing the
              one named option (this list will be identical to the correspond-
              ing  sublist  of  the value returned if no 4moption24m is specified).
              If one or more 4moption-value24m pairs are specified, then  the  com-
              mand modifies the given option(s) to have the given value(s); in
              this case the command returns an empty string.

              The following 4moption-value24m pairs are supported:

              1m-anchor 4m22mwhere0m
                     4mWhere24m specifies which point of 4mwindow24m is to be positioned
                     at  the (x,y) location selected by the 1m-x22m, 1m-y22m, 1m-relx22m, and
                     1m-rely 22moptions.  The anchor point is in terms of the outer
                     area  of  4mwindow24m  including  its border, if any.  Thus if
                     4mwhere24m is 1mse 22mthen the lower-right corner of 4mwindow24m's  bor-
                     der  will  appear at the given (x,y) location in the mas-
                     ter.  The anchor position defaults to 1mnw22m.

              1m-bordermode 4m22mmode0m
                     4mMode24m determines the degree to which  borders  within  the
                     master  are  used  in  determining  the  placement of the
                     slave.  The default and most common value is 1minside22m.   In
                     this  case the placer considers the area of the master to
                     be the innermost area of the master, inside  any  border:
                     an  option  of  1m-x  0 22mcorresponds to an x-coordinate just
                     inside the border and an option of  1m-relwidth  1.0  22mmeans
                     4mwindow24m will fill the area inside the master's border.

                     If  4mmode24m is 1moutside 22mthen the placer considers the area of
                     the master to include its border; this mode is  typically
                     used  when placing 4mwindow24m outside its master, as with the
                     options 1m-x 0 -y 0 -anchor ne22m.  Lastly, 4mmode24m may be speci-
                     fied  as  1mignore22m, in which case borders are ignored:  the
                     area of the master is considered to  be  its  official  X
                     area,  which includes any internal border but no external
                     border.  A bordermode of 1mignore 22mis probably not very use-
                     ful.

              1m-height 4m22msize0m
                     4mSize24m  specifies  the  height  for  4mwindow24m in screen units
                     (i.e. any of the forms accepted  by  1mTk_GetPixels22m).   The
                     height  will  be  the outer dimension of 4mwindow24m including
                     its border, if any.  If 4msize24m is an empty string, or if no
                     1m-height  22mor  1m-relheight  22moption  is  specified,  then the
                     height requested internally by the window will be used.

              1m-in 4m22mmaster0m
                     4mMaster24m specifies the path name of the window relative  to
                     which 4mwindow24m is to be placed.  4mMaster24m must either be 4mwin-0m
                     4mdow24m's parent or a  descendant  of  4mwindow24m's  parent.   In
                     addition,  4mmaster24m  and 4mwindow24m must both be descendants of
                     the same top-level window.  These restrictions are neces-
                     sary  to guarantee that 4mwindow24m is visible whenever 4mmaster0m
                     is visible.  If this option isn't specified then the mas-
                     ter defaults to 4mwindow24m's parent.

              1m-relheight 4m22msize0m
                     4mSize24m  specifies  the height for 4mwindow24m.  In this case the
                     height is specified as a floating-point  number  relative
                     to  the  height  of  the master: 0.5 means 4mwindow24m will be
                     half as high as the master, 1.0 means  4mwindow24m  will  have
                     the  same  height  as  the  master,  and  so on.  If both
                     1m-height 22mand 1m-relheight 22mare specified for a  slave,  their
                     values  are  summed.  For example, 1m-relheight 1.0 -height0m
                     1m-2 22mmakes the slave 2 pixels shorter than the master.

              1m-relwidth 4m22msize0m
                     4mSize24m specifies the width for 4mwindow24m.  In  this  case  the
                     width is specified as a floating-point number relative to
                     the width of the master: 0.5 means 4mwindow24m will be half as
                     wide  as  the master, 1.0 means 4mwindow24m will have the same
                     width as the master, and so on.  If both 1m-width 22mand 1m-rel-0m
                     1mwidth 22mare specified for a slave, their values are summed.
                     For example, 1m-relwidth 1.0 -width 5  22mmakes  the  slave  5
                     pixels wider than the master.

              1m-relx 4m22mlocation0m
                     4mLocation24m  specifies  the  x-coordinate  within the master
                     window of the anchor point for 4mwindow24m.  In this case  the
                     location  is  specified in a relative fashion as a float-
                     ing-point number:  0.0 corresponds to the  left  edge  of
                     the  master  and 1.0 corresponds to the right edge of the
                     master.  4mLocation24m need not be in the range  0.0-1.0.   If
                     both  1m-x  22mand  1m-relx 22mare specified for a slave then their
                     values are summed.  For example, 1m-relx 0.5  -x  -2  22mposi-
                     tions  the left edge of the slave 2 pixels to the left of
                     the center of its master.

              1m-rely 4m22mlocation0m
                     4mLocation24m specifies the  y-coordinate  within  the  master
                     window  of the anchor point for 4mwindow24m.  In this case the
                     value is specified in a relative fashion as  a  floating-
                     point  number:   0.0  corresponds  to the top edge of the
                     master and 1.0 corresponds to the bottom edge of the mas-
                     ter.  4mLocation24m need not be in the range 0.0-1.0.  If both
                     1m-y 22mand 1m-rely 22mare specified for a slave then their  values
                     are  summed.   For  example, 1m-rely 0.5 -x 3 22mpositions the
                     top edge of the slave 3 pixels below the  center  of  its
                     master.

              1m-width 4m22msize0m
                     4mSize24m specifies the width for 4mwindow24m in screen units (i.e.
                     any of the forms accepted by  1mTk_GetPixels22m).   The  width
                     will  be  the outer width of 4mwindow24m including its border,
                     if any.  If 4msize24m is an empty string, or if no  1m-width  22mor
                     1m-relwidth  22moption  is specified, then the width requested
                     internally by the window will be used.

              1m-x 4m22mlocation0m
                     4mLocation24m specifies the  x-coordinate  within  the  master
                     window  of  the anchor point for 4mwindow24m.  The location is
                     specified in screen units (i.e. any of the forms accepted
                     by  1mTk_GetPixels22m)  and  need not lie within the bounds of
                     the master window.

              1m-y 4m22mlocation0m
                     4mLocation24m specifies the  y-coordinate  within  the  master
                     window  of  the anchor point for 4mwindow24m.  The location is
                     specified in screen units (i.e. any of the forms accepted
                     by  1mTk_GetPixels22m)  and  need not lie within the bounds of
                     the master window.

              If the same value is specified  separately  with  two  different
              options,  such  as  1m-x 22mand 1m-relx22m, then the most recent option is
              used and the older one is ignored.

       1mplace forget 4m22mwindow0m
              Causes the placer to stop managing the geometry of 4mwindow24m.  As a
              side  effect  of this command 4mwindow24m will be unmapped so that it
              doesn't appear on the screen.  If 4mwindow24m isn't currently managed
              by  the  placer  then  the  command has no effect.  This command
              returns an empty string.

       1mplace info 4m22mwindow0m
              Returns a list giving the current configuration of 4mwindow24m.   The
              list  consists of 4moption-value24m pairs in exactly the same form as
              might be specified to the 1mplace configure 22mcommand.

       1mplace slaves 4m22mwindow0m
              Returns a list of all the slave windows for which 4mwindow24m is  the
              master.   If there are no slaves for 4mwindow24m then an empty string
              is returned.

       If the configuration of a window has been retrieved  with  1mplace  info22m,
       that configuration can be restored later by first using 1mplace forget 22mto
       erase any existing information for the window and then  invoking  1mplace0m
       1mconfigure 22mwith the saved information.

1mFINE POINTS0m
       It is not necessary for the master window to be the parent of the slave
       window.  This feature is useful in at least two situations.  First, for
       complex  window  layouts it means you can create a hierarchy of subwin-
       dows whose only purpose is to assist in the layout of the parent.   The
       ``real  children'' of the parent (i.e. the windows that are significant
       for the application's user interface) can be children of the parent yet
       be  placed  inside  the  windows  of the geometry-management hierarchy.
       This means that the path names of the ``real children''  don't  reflect
       the geometry-management hierarchy and users can specify options for the
       real children without being aware of the structure of the geometry-man-
       agement hierarchy.

       A  second  reason for having a master different than the slave's parent
       is to tie two siblings together.  For example, the placer can  be  used
       to  force  a  window always to be positioned centered just below one of
       its siblings by specifying the configuration
              1m-in 4m22msibling24m 1m-relx 0.5 -rely 1.0 -anchor n -bordermode outside0m
       Whenever the sibling is repositioned in the future, the slave  will  be
       repositioned as well.

       Unlike  many  other  geometry  managers (such as the packer) the placer
       does not make any attempt to manipulate the geometry of the master win-
       dows  or  the  parents  of  slave  windows  (i.e.  it doesn't set their
       requested sizes).  To control the sizes of  these  windows,  make  them
       windows like frames and canvases that provide configuration options for
       this purpose.

1mEXAMPLE0m
       Make the label occupy the middle bit of the toplevel, no matter how  it
       is resized:
              label .l -text "In the\nMiddle!" -bg black -fg white
              1mplace 22m.l -relwidth .3 -relx .35 -relheight .3 -rely .35


1mSEE ALSO0m
       grid(n), pack(n)


1mKEYWORDS0m
       geometry manager, height, location, master, place, rubber sheet, slave,
