/[mcclim]/mcclim/Doc/Guided-Tour/hello-world.lisp
ViewVC logotype

Contents of /mcclim/Doc/Guided-Tour/hello-world.lisp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations)
Mon Jan 30 16:14:01 2006 UTC (8 years, 2 months ago) by cfruhwirth
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
Move docs/guided-tour to Doc/Guided-Tour.
Add line-breaks to guided-tour.tex.
1 cfruhwirth 1.1 (eval-when (:compile-toplevel)
2     (asdf:oos 'asdf:load-op :clim)
3     (asdf:oos 'asdf:load-op :clim-clx))
4    
5     (in-package :clim-user)
6    
7     ; LTAG-start:hello-world-def-app
8     (define-application-frame hello-world ()
9     ((greeting :initform "Hello World"
10     :accessor greeting))
11     (:pane (make-pane 'hello-world-pane)))
12     ; LTAG-end
13    
14     ; LTAG-start:hello-world-defclass
15     (defclass hello-world-pane
16     (clim-stream-pane) ())
17     ; LTAG-end
18     ; LTAG-start:hello-world-handle-repaint
19     ;;; Behavior defined by the Handle Repaint Protocol
20     (defmethod handle-repaint ((pane hello-world-pane) region)
21     (let ((w (bounding-rectangle-width pane))
22     (h (bounding-rectangle-height pane)))
23     ;; Blank the pane out
24     (draw-rectangle* pane 0 0 w h
25     :filled t
26     :ink (pane-background pane))
27     ;; Draw greeting in center of pane
28     (draw-text* pane
29     (greeting *application-frame*)
30     (floor w 2) (floor h 2)
31     :align-x :center
32     :align-y :center)))
33     ; LTAG-end
34    

  ViewVC Help
Powered by ViewVC 1.1.5