aboutsummaryrefslogtreecommitdiff
path: root/frame.lisp
blob: ed6a78689406534f793bcc19a88f57c317be6dc9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
(uiop:define-package
    :haiku-book/frame
    (:export)
  (:mix-reexport :haiku-book/class)
  (:mix :clim :clim-lisp))

(in-package :haiku-book/frame)

(define-application-frame
    read-haiku
    (book standard-application-frame)
  ()
  (:panes
   (title :title :display-string "Solar short")
   (app :application :display-function 'display-haiku)
   (action-next :push-button :label "Next"
			     :activate-callback (lambda (gadget) (com-next))))
  (:layouts
   (default
    (vertically () title app action-next))))

(define-read-haiku-command (com-next :name "Next")
    ()
  (with-application-frame (frame)
    (next-haiku frame)
    (redisplay-frame-pane frame 'app)))