2 Bitmaps, Viewports, and Windows
The Editor's Main Buffer is a child of the root viewport. If you invoke the Editor, this window is part of the viewport hierarchy. To see the children of the root viewport, use the function viewport-children
:
(viewport-children (root-viewport))To find out who the parent of any viewport or window is, use the function
viewport-parent
:(viewport-parent *window*)Children belong to their parent viewport or window. Children of viewports or windows are not visible unless they are located within their parent's screen clipping region. Children always occlude their parent; a parent never occludes its children. If a window is activated, its ancestors are also activated (its children may be, as well; see the reference page for
activate-viewport
). If a window is deactivated, its children are also deactivated. If a window that has deactivated ancestors is reactivated, the ancestors are also reactivated. When a parent has more than one child, as the root viewport often does, the order of the parent's children, or the sibling stack, controls how the siblings overlap or occlude each other on the screen. Viewports or windows near the top of the stack occlude viewports or windows that are lower on the stack. A viewport or window can be moved to the top or bottom of the sibling stack by using the functions expose-viewport
and hide-viewport
.
The following example creates two overlapping windows and makes one the child of the other:
(setq *parent1* (make-window :width 100 :height 100 :title "parent1"))The window(setq *child1* (make-window :width 60 :height 50 :y 50 :title "child1" :parent *parent1*))
*child1*
is a child of*parent1*
.Generated with Harlequin WebMaker