All Manuals > CAPI User Guide and Reference Manual > 23 LW-GT Reference Entries

objects-displayer Class

Summary

A subclass of pinboard-layout, which adds displaying of hierarchial objects.

Package

lw-gt

Superclasses

pinboard-layout

Initargs
:drawing-object
A drawing-object or a list (see Description below).
:use-metafile
A generalized boolean.
:natural-width
Integers.
Accessors

objects-displayer-objects

Description

The class objects-displayer is a subclass of pinboard-layout that in addition to pinboard-objects can also have "drawing objects" which contain hierarchies of graphics. These objects are created by the make-draw-* functions and the positioning functions (position-and-fit-object, position-object, fit-object). An objects-displayer can also have in its description pinboard-objects-displayers, which can also contain hierarchies of drawings.

drawing-object is either a "drawing-object-spec", which is an instance of a subclass of drawing-object, or a list of "drawing-object-specs". The value can be modified later by (setf objects-displayer-drawing-object). The drawing objects in the objects slot are displayed after any pinboard-objects in the layout-description of pane (if any) are displayed. If it is a list, they are displayed according to the order in the list. This is implemented via a display-callback, so you cannot use :display-callback in an objects-displayer.

Objects which are the result of the positioning functions are being positioned and scaled again when the objects-displayer is resized, before being displayed.

use-metafile specifies whether the drawing of the objects should be done via a metafile. When using a metafile, the objects are first drawn to an internal metafile, which is then drawn to the pane. The result is another scaling (between the size of the metafile and the size of pane). Note that means that objects that are drawn in their "absolute" size (not inside a fitting object, or explicitly absolute) are resized at that stage. Drawing via a metafile makes resizing better and faster.

When use-metafile is true, natural-width and natural-height define the size of the metafile to create in pixels. For objects that are supposed to be drawn in their absolute size, that will affect how much they are actually resized. The default value of use-metafile is true. The default value of natural-width x natural-height is 800 x 600.

Objects in the drawing-object list or inside the hierarchy inside any of these objects may change, which may require redisplaying it. The function force-objects-redraw can be used to force redrawing all the objects.

Notes

The drawing via the metafile is applicable only to the drawing objects, not to the pinboard-objects in the layout-description of the pane.

See also

position-object
fit-object
position-and-fit-object
make-draw-line
make-draw-lines
make-draw-arc
make-draw-polygon
make-draw-ellipse
make-draw-circle
make-draw-rectangle
force-objects-redraw
14.1 Lower level - drawing objects and objects displayers


CAPI User Guide and Reference Manual (Windows version) - 01 Dec 2021 19:34:19