/[mcclim]/mcclim/Doc/Guided-Tour/simple-draw.lisp
ViewVC logotype

Contents of /mcclim/Doc/Guided-Tour/simple-draw.lisp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations)
Sun Mar 19 15:34:24 2006 UTC (8 years ago) by rgoldman
Branch: MAIN
CVS Tags: mcclim-0-9-4, McCLIM-0-9-5, McCLIM-0-9-4, McCLIM-0-9-6, McCLIM-0-9-3, McCLIM-0-9-2, HEAD
Changes since 1.1: +1 -1 lines
define-application-frame was misspelled.
1 (define-application-frame hello-frame () ()
2 (:pane (make-instance 'hello-data-pane
3 :hs 200 :hs+ +fill+ :vs 200 :vs+ +fill+))
4 (:settings :title "Hello from Lisp"))
5
6 (define-application-pane hello-data-pane ());; inherits basic-clim-pane
7 ;; by default ())
8 ;; Behavior defined via CLOS class specialization
9
10 (defmethod handle-repaint ((pane hello-data-pane) region &key &allow-other-keys)
11 (declare (ignore region))
12 (let* ((w (bounding-rectangle-width pane))
13 (h (bounding-rectangle-height pane)))
14 ;; Blank the pane out
15 (draw-rectangle* pane 0 0 w h :filled t :ink (pane-background pane))
16 ;; Center the label
17 (draw-text* pane "Hello" (floor w 2) (floor h 2) :align-x :center :align-y :center)))
18
19 (defmethod button-release ((pane hello-data-pane)
20 (button-name (eql :right))
21 &key x y &allow-other-keys)
22 (draw-point* pane x y))

  ViewVC Help
Powered by ViewVC 1.1.5