1 CAPI Reference Entries

drawn-pinboard-object

Class

Summary

The classdrawn-pinboard-object is a subclass ofpinboard-object which is drawn by a supplied function, and is provided as a means of the user creating their own pinboard objects.

Superclasses

pinboard-object

Slots

display-callback

Called to display the object.

Accessors

drawn-pinboard-object-display-callback

Description

Thedisplay-callback is called with the output pane to draw on, thedrawn-pinboard-object itself, and the x, y, width and height of the object, and it is expected to redraw that section.

An alternative way of doing this is to create a subclass ofpinboard-object and to provide a method fordraw-pinboard-object.

Example

(defun draw-an-ellipse 
       (output-pane self x y width height)
       (let ((x-radius (floor width 2))
             (y-radius (floor height 2)))
              (gp:draw-ellipse output-pane
                (+ x x-radius) (+ y y-radius)
                x-radius y-radius
                :foreground :red
                :filled t)))

(capi:contain (make-instance 'capi:drawn-pinboard-object :min-width 200 :min-height 100 :display-callback 'draw-an-ellipse))

See Also

pinboard-layout


CAPI Reference Manual, Liquid Common Lisp Version 5.0 - 3 OCT 1997

Generated with Harlequin WebMaker