Page 311 Table of Contents Index Page 313
Chapters
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30
A, B, C, D, E



CHAPTER 29. PANES

In the second pass (called space allocation), the frame manager attempts to obtain the required
amount of space from the host window system. The top-level pane is allocated the space that is
actually available. Each pane, in turn, allocates space recursively to each of its descendants in
the hierarchy according to the pane's rules of composition.

Minor issue: It isn't alway possible to allocate the required space. What is the protocol
for handling these space allocation failures? Some kind of error should be signalled when the
constraints can't be satisfied, which can be handled by the application. Otherwise the panes
will fall where they may. The
define-application-frame macro should provide an option that
allows programmers to conveniently specify a condition handler. | ILA

For many types of panes, the application programmer can indicate the space requirements of the
pane at creation time by using the space requirement options (described above), as well as by
calling the change-space-requirements function (described below). For example, application
panes are used to display application-specific information, so the application can determine how
much space should normally be given to them.

Other pane types automatically calculate how much space they need based on the information
they need to display. For example, label panes automatically calculate their space requirement
based on the text they need to display.

A composite pane calculates its space requirement based on the requirements of its children and
its own particular rule for arranging them. For example, a pane that arranges its children in
a vertical stack would return as its desired height the sum of the heights of its children. Note
however that a composite is not required by the layout protocol to respect the space requests of
its children; in fact, composite panes aren't even required to ask their children.

Space requirements are expressed for each of the two dimensions as a preferred size, a mininum
size below which the pane cannot be shrunk, and a maxium size above which the pane cannot
be grown. (The minimum and maximum sizes can also be specified as relative amounts.) All
sizes are specified as a real number indicating the number of device units (such as pixels).

=> change-space-requirements pane &key resize-frame &rest space-req-keys [Generic Function]
This function can be invoked to indicate that the space requirements for pane have changed.
Any of the options that applied to the pane at creation time can be passed into this function as
well.

resize-frame determines whether the frame should be resized to accommodate the new space
requirement of the hierarchy. If resize-frame is true, then layout-frame will be invoked on the
frame. If resize-frame is false, then the frame may or may not get resized depending on the pane
hierarchy and the :resize-frame option that was supplied to define-application-frame.

=> note-space-requirements-changed sheet pane [Generic Function]
This function is invoked whenever pane's space requirements have changed. sheet must be the
parent of pane. Invoking this function essentially means that compose-space will be reinvoked on
pane, then it will reply with a space requirement that is not equal to the reply that was given
on the last call to compose-space.


Page 311 Table of Contents Index Page 313
Chapters
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30
A, B, C, D, E