Initial commit of newLISP.
[newlisp.git] / guiserver / cursor-demo.lsp
blob44a3fcb29e0bbc27e7f279b212de2c372368f332
1 #!/usr/bin/newlisp
2 ;;
3 ;; cursor-demo - demonstrate cursor shapes with gs:set-cursor
5 ;;;; initialization
6 (set-locale "C")
7 (load (append (env "NEWLISPDIR") "/guiserver.lsp"))
9 (gs:init)
10 ;(gs:set-trace true)
12 (set 'cursor-shapes '(
13 "default"
14 "crosshair"
15 "text"
16 "wait"
17 "sw-resize"
18 "se-resize"
19 "nw-resize"
20 "ne-resize"
21 "n-resize"
22 "s-resize"
23 "w-resize"
24 "e-resize"
25 "hand"
26 "move"
29 ;; describe the GUI
30 (gs:frame 'CursorDemo 100 100 500 200 "Cursor shapes - move the cursor over the panels")
31 (gs:set-grid-layout 'CursorDemo 2 7)
33 (dolist (c cursor-shapes)
34 (set 'id (sym c))
35 (gs:panel id)
36 (gs:set-background id (list (random) (random) (random)))
37 (gs:set-cursor id c)
38 (gs:add-to 'CursorDemo id))
40 ;(gs:set-resizable 'CursorDemo nil)
42 (gs:set-visible 'CursorDemo true)
44 (gs:listen)
46 ;; eof