pinboard-layout provides two very useful pieces of functionality for displaying CAPI windows. Firstly it is a subclass of static-layout and so it allows its children to be positioned anywhere within itself (like a pinboard). Secondly it supports pinboard-objects which are rectangular areas within the layout which have size and drawing functionality.
pinboard-layout lays out its children, it positions them at the
specified as hints (using
:y), and sizes them to their minimum size (which can be specified using
:visible-max-width). Objects can be moved and resized inside the
(setf pinboard-pane-position) and
(setf pinboard-pane-size). You can find which object is the top object at a point by using pinboard-object-at-position.
By default, the
pinboard-layout is made sufficiently large to accommodate all of its children, as specified by
in the superclass static-layout. Note that this results in the pinboard resizing itself automatically when objects are added, removed, moved or resized. If the layout has scrollbars these are also affected. If you need the sizing capabilities, then use the class simple-pinboard-layout which surrounds a single child, and adopts the size constraints of that child.
The pinboard layout handles the display of pinboard objects itself by calculating which objects are visible in the region that needs redrawing, and then by calling the generic function draw-pinboard-object on these objects in the order that they are specified in the layout description. This means that if two pinboard objects overlap, the later one in the layout description will be on top of the other one. In other words, the description defines the Z-order for objects of type pinboard-object. (See the note below regarding the Z-order for objects of type simple-pane.)
The children of the
pinboard-layout are defined by its
(inherited from layout). When the contents of the layout need to be manipulated while it is on the screen, it is possible to do this by using
(setf layout-description). However, when the change involves only pinboard-objects, it is much more efficient to use manipulate-pinboard instead. This will also cause less flickering.
Highlighting of the layout's children by highlight-pinboard-object is controlled by the value of highlight-style , as follows:
Swaps the foreground and background colors.
Uses system colors.
record-dependent-object can be used to record objects that need to be cleaned-up when the pinboard layout is destroyed.
:drawing-modecontrols quality of drawing in a
pinboard-layout, including anti-aliasing of any text displayed on Microsoft Windows and GTK+.
:draw-with-buffer t, which uses a pixmap to buffer the output before drawing it to the screen. See output-pane for more information.
pinboard-layoutdefines its own default display-callback (see output-pane), pinboard-layout-display. If you want to do additional drawing, see pinboard-layout-display.
There are further examples in Self-contained examples.
Creating graphical objects
Tooltips for output panes
CAPI User Guide and Reference Manual (Macintosh version) - 3 Aug 2017