| Did you know ... | Search Documentation: |
| Window Layout |
Window layout in a frame
The layout of windows in a frame is normally specified using Window ->below', Window ->above, Window ->left and Window ->right‘.
How the windows are resized when the frame is resized is determined
by their stretchabilities and schrinkabilities (window<->hor_stretch,
window<->ver_stretch, window<->ver_shrink
and‘Window
<->hor_shrink’).
The layout of windows in a frame is viewed as an consists_of
hierarchy of rows of windows that are either stacked left-to-right or
top-to-bottom. The layout specification starts by building the
inner-most stack. Suppose we want to make the following layout:
------------------------- | Dialog | ------------------------- | | Picture | | browser |----------------- | | View | -------------------------
This is realised by the following sequence of messages:
new(F, frame('My Frame')), % Create the frame
send(F, new(P, picture)), % Start with picture (or view)
send(new(view), below, P), % Stack the view
send(new(browser, left, P), % Put the browser left
send(new(dialog, above, P). % And the dialog on top
Thus, if two simple windows are related, a horizontal or vertical
stack is created. Each new window that is related in the same direction
to one of the outermost windows enlarges the stack. If a window is
related in a different direction to any member of the stack, a new stack
is created with the window and the old stack as members.
Parent: Windows
->append ->right ->left ->below ->above