/[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.1 - (show annotations)
Mon Jan 30 16:14:01 2006 UTC (8 years, 2 months ago) by cfruhwirth
Branch: MAIN
Move docs/guided-tour to Doc/Guided-Tour.
Add line-breaks to guided-tour.tex.
1 (define-application-frarae 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