-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlabel.lisp
58 lines (45 loc) · 1.89 KB
/
label.lisp
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
;; -*- mode: Lisp; Syntax: Common-Lisp; Package: cells; -*-
#|
Celtk -- Cells, Tcl, and Tk
Copyright (C) 2006 by Kenneth Tilton
This library is free software; you can redistribute it and/or
modify it under the terms of the Lisp Lesser GNU Public License
(http://opensource.franz.com/preamble.html), known as the LLGPL.
This library is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the Lisp Lesser GNU Public License for more details.
|#
(in-package :celtk)
(deftk label (widget)
()
(:tk-spec label
-activebackground -activeforeground -anchor
-background -bitmap -borderwidth -compound -cursor
-disabledforeground (tkfont -font) -foreground
-highlightbackground -highlightcolor -highlightthickness -image
(tk-justify -justify)
-padx -pady -relief -takefocus -text -textvariable -underline
-height -state -width -wraplength)
(:default-initargs
:id (gentemp "LBL")))
;;; --- images -------------------------------------------------------
(defobserver image-files ()
(loop for (name file-pathname) in (set-difference new-value old-value :key 'car)
do (tk-format `(:pre-make-tk ,self)
"image create photo ~(~a.~a~) -file {~a} -height ~a -width ~a"
(^path) name (namestring file-pathname)
(^height)(^width))))
;--------------------------------------------------------------------------
(deftk message (widget)
()
(:tk-spec message
-activebackground -activeforeground -anchor
-background -bitmap -borderwidth -compound -cursor
-disabledforeground (tkfont -font) -foreground
-highlightbackground -highlightcolor -highlightthickness -image
(tk-justify -justify)
-padx -pady -relief
-takefocus -text -textvariable
-underline -wraplength -width -state -height)
(:default-initargs
:id (gentemp "MSG")))