Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,15 @@
|
|||
(use-package :ltk)
|
||||
|
||||
(defun show-message (text)
|
||||
"Show message in a label on a Tk window"
|
||||
(with-ltk ()
|
||||
(let* ((label (make-instance 'label :text text))
|
||||
(button (make-instance 'button :text "Done"
|
||||
:command (lambda ()
|
||||
(ltk::break-mainloop)
|
||||
(ltk::update)))))
|
||||
(pack label :side :top :expand t :fill :both)
|
||||
(pack button :side :right)
|
||||
(mainloop))))
|
||||
|
||||
(show-message "Goodbye World")
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
(in-package :clim-user)
|
||||
|
||||
(defclass hello-world-pane
|
||||
(clim-stream-pane) ())
|
||||
|
||||
(define-application-frame hello-world ()
|
||||
((greeting :initform "Goodbye World"
|
||||
:accessor greeting))
|
||||
(:pane (make-pane 'hello-world-pane)))
|
||||
|
||||
;;; Behaviour defined by the Handle Repaint Protocol
|
||||
(defmethod handle-repaint ((pane hello-world-pane) region)
|
||||
(let ((w (bounding-rectangle-width pane))
|
||||
(h (bounding-rectangle-height pane)))
|
||||
;; Blank the pane out
|
||||
(draw-rectangle* pane 0 0 w h
|
||||
:filled t
|
||||
:ink (pane-background pane))
|
||||
;; Draw greeting in center of pane
|
||||
(draw-text* pane
|
||||
(greeting *application-frame*)
|
||||
(floor w 2) (floor h 2)
|
||||
:align-x :center
|
||||
:align-y :center)))
|
||||
|
||||
(run-frame-top-level
|
||||
(make-application-frame 'hello-world
|
||||
:width 200 :height 200))
|
||||
Loading…
Add table
Add a link
Reference in a new issue