Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
72 lines (66 sloc) 2.46 KB
(in-package :test-gtk)
(defmodel test-entry (vbox)
:kids (kids-list?
:kids (test-entry-1))
(mk-check-button :md-name :cool
:init t
:label "Cool")
:markup (with-markup ()
(with-markup (:foreground :green)
"frame labels")
:kids (test-entry-2))
:kids (kids-list?
(mk-spin-button :md-name :spin
:init 10)))
:kids (kids-list?
(mk-label :text "Entry completion test (press i)")
:max-length 20
:completion (loop for i from 1 to 10 collect
(format nil "Item ~d" i))))))))
(defun test-entry-1 ()
(c? (the-kids
:expand t :fill t
:markup (c? (with-markup (:font-desc "24")
(with-markup (:foreground :blue
:font-family "Arial"
:font-desc (with-widget-value (s :spin :alternative 10)
(truncate s)))
(widget-value :entry))
(with-markup (:underline :double
:weight :bold
:foreground :red
:font-desc (with-widget-value (s :hscale :alternative 10)
(truncate s)))
(with-markup (:strikethrough (widget-value :cool))
(with-markup (:strikethrough (not (widget-value :cool)))
:selectable t)
(mk-entry :md-name :entry :auto-update t :init "Testing"))))
(defun test-entry-2 ()
(c? (the-kids
:kids (c? (the-kids
:kids (the-kids
(mk-check-button :md-name :sensitive
:label "Sensitive")
(mk-check-button :md-name :visible
:init t
:label "Visible")))
(mk-hscale :md-name :hscale
:visible (c? (widget-value :visible))
:sensitive (c? (widget-value :sensitive))
:expand t :fill t
:min 0 :max 100
:init 10)))))))