Helps you to define layouts and create new pinboard-object subclasses.
The macro with-geometry
is used for defining layouts and for creating new pinboard-object subclasses, by binding a set of variables to a pane's geometry.
with-geometry
binds the following variables across the forms in
body
to slots in the pane's geometry in much the same way as the Common Lisp macro with-slots
. Except the special cases which are mentioned below, these variables are read-only and should not be set.
Four variables define the geometry of the pane. If you define define your own calculate-layout method, it can set these variables:
An integer specifying the x position of the pane in pixels relative to its parent.
An integer specifying the y position of the pane in pixels relative to its parent.
An integer specifying the width in pixels of the pane.
An integer specifying the height in pixels of the pane.
Four variables specify constraints on the pane. If you define your own calculate-constraints method, it can set these variables:
A real number specifying the minimum width of the pane.
A real number specifying the minimum height of the pane.
A real number specifying the maximum width of the pane.
A real number specifying the maximum height of the pane.
The following variables are also bound but apply only to classes with internal scrolling, such as editor-pane. They can be retrieved by get-horizontal-scroll-parameters and get-vertical-scroll-parameters. They can be set by set-horizontal-scroll-parameters and set-vertical-scroll-parameters. These variables should be regarded as read-only inside with-geometry
(they are writable for backwards compatibility only).
The extent of the horizontal scroll range.
The extent of the vertical scroll range.
The horizontal scroll page size.
The width of the scroll bar slug.
The horizontal scroll step size.
The start of the horizontal scroll range.
The start of the vertical scroll range.
The vertical scroll page size.
The height of the scroll bar slug.
The vertical scroll step size.
x coordinate of the current scroll position.
y coordinate of the current scroll position
The following two variables access the object for which the representation is:
The object whose geometry this is.
The same as %object%
(kept for compatibility with LispWorks 3.1).
calculate-constraints
calculate-layout
convert-relative-position
element
get-horizontal-scroll-parameters
get-vertical-scroll-parameters
scroll
set-horizontal-scroll-parameters
set-vertical-scroll-parameters
Accessing pane geometry
Laying Out CAPI Panes
Creating Panes with Your Own Drawing and Input
CAPI User Guide and Reference Manual (Windows version) - 3 Aug 2017