Flexible Windows

version 13/130803 by Jon Ingold

  • Home page
  • Beginning
  • Previous
  • Next

  •     Section: Sizing Windows

    Once the rough positions of the windows has been decided, the next thing to allocate is their size. This can be done two ways, either by taking a proportional of the window being spawned from (so a 40% slice or a 15% slice), or taking a window of fixed size (in pixels for graphics windows, and in columns/rows for text windows). The proportion to take, or the width of a fixed size side-window (equivalently, the height of a top or bottom window) is set using the "measurement" property of the g-window. So we could write

        The scale method of the side-window is g-proportional. The measurement of the side-window is 25.

        The scale method of the banner-window is g-fixed-size. The measure of the banner-window is 30.

    Finally, if we are using proportional windows, we can optionally set a "minimum size", which if the window gets below, it will take, rather than using the proportional scale.