annotate tests/glyph-test.el @ 5623:444713e89160

Fix XLIKE_output_blank comment typo. -------------------- ChangeLog entries follow: -------------------- src/ChangeLog addition: 2011-12-27 Didier Verna <didier@xemacs.org> * redisplay-xlike-inc.c (XLIKE_output_blank): Fix comment typo.
author Didier Verna <didier@xemacs.org>
date Tue, 27 Dec 2011 15:37:03 +0100
parents 308d34e9f07d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4781
8a653fbe5c27 Add copyright and GPL v2 or later notices to Andy Piper's contributions, with
Jerry James <james@xemacs.org>
parents: 462
diff changeset
1 ;;; Copyright (C) 1998 Andy Piper
8a653fbe5c27 Add copyright and GPL v2 or later notices to Andy Piper's contributions, with
Jerry James <james@xemacs.org>
parents: 462
diff changeset
2
5402
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 4781
diff changeset
3 ;; This file is part of XEmacs.
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 4781
diff changeset
4 ;;
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 4781
diff changeset
5 ;; XEmacs is free software: you can redistribute it and/or modify it
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 4781
diff changeset
6 ;; under the terms of the GNU General Public License as published by the
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 4781
diff changeset
7 ;; Free Software Foundation, either version 3 of the License, or (at your
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 4781
diff changeset
8 ;; option) any later version.
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 4781
diff changeset
9 ;;
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 4781
diff changeset
10 ;; XEmacs is distributed in the hope that it will be useful, but WITHOUT
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 4781
diff changeset
11 ;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 4781
diff changeset
12 ;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 4781
diff changeset
13 ;; for more details.
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 4781
diff changeset
14 ;;
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 4781
diff changeset
15 ;; You should have received a copy of the GNU General Public License
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 4781
diff changeset
16 ;; along with XEmacs. If not, see <http://www.gnu.org/licenses/>.
4781
8a653fbe5c27 Add copyright and GPL v2 or later notices to Andy Piper's contributions, with
Jerry James <james@xemacs.org>
parents: 462
diff changeset
17
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
18 (set-extent-begin-glyph
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
19 (make-extent (point) (point))
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 438
diff changeset
20 (setq im (make-glyph [xbm :file "xemacsicon.xbm"])))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
21
438
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
22 (set-extent-begin-glyph
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
23 (make-extent (point) (point))
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
24 (make-glyph [string :data "xemacs"]))
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
25
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
26 (defun foo ()
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
27 (interactive)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
28 (setq ok-select (not ok-select)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
29
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
30 (defun fee () (interactive) (message "hello"))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
31
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
32 ;; button in a group
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
33 (setq ok-select nil)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
34 (set-extent-begin-glyph
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
35 (make-extent (point) (point))
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 438
diff changeset
36 (make-glyph
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 438
diff changeset
37 (setq radio-button1
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 438
diff changeset
38 [button :face widget
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 438
diff changeset
39 :descriptor ["ok1" (setq ok-select t)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
40 :style radio :selected ok-select]])))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
41 ;; button in a group
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
42 (set-extent-begin-glyph
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
43 (make-extent (point) (point))
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 438
diff changeset
44 (make-glyph
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 438
diff changeset
45 (setq radio-button2
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 438
diff changeset
46 [button :descriptor ["ok2" (setq ok-select nil) :style radio
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
47 :selected (not ok-select)]])))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
48 ;; toggle button
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
49 (set-extent-begin-glyph
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
50 (make-extent (point) (point))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
51 (setq tbutton
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 438
diff changeset
52 (make-glyph [button :descriptor ["ok3" (setq ok-select nil)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
53 :style toggle
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
54 :selected (not ok-select)]])))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
55 (set-extent-begin-glyph
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
56 (make-extent (point) (point))
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 438
diff changeset
57 (make-glyph
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 438
diff changeset
58 (setq toggle-button
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 438
diff changeset
59 [button :descriptor ["ok4" :style toggle
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 438
diff changeset
60 :callback
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 438
diff changeset
61 (setq ok-select (not ok-select))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 438
diff changeset
62 :selected ok-select]])))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
63
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
64 ;; normal pushbutton
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
65 (set-extent-begin-glyph
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
66 (make-extent (point) (point))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
67 (setq push-button
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
68 (make-glyph [button :width 10 :height 2
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
69 :face modeline-mousable
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 438
diff changeset
70 :descriptor "ok" :callback foo
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
71 :selected t])))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
72 ;; tree view
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
73 (set-extent-begin-glyph
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
74 (make-extent (point) (point))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
75 (setq tree (make-glyph
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
76 [tree-view :width 10
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
77 :descriptor "My Tree"
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 438
diff changeset
78 :items (["One" foo]
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 438
diff changeset
79 (["Two" foo]
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 438
diff changeset
80 ["Four" foo]
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 438
diff changeset
81 "Six")
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 438
diff changeset
82 "Three")])))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
83
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
84 ;; tab control
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
85 (set-extent-begin-glyph
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
86 (make-extent (point) (point))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
87 (setq tab (make-glyph
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
88 [tab-control :descriptor "My Tab"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
89 :face highlight
438
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
90 :orientation right
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 438
diff changeset
91 :items (["One" foo :selected t]
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 438
diff changeset
92 ["Two" fee :selected nil]
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 438
diff changeset
93 ["Three" foo :selected nil])])))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
94
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
95 ;; progress gauge
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
96 (set-extent-begin-glyph
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
97 (make-extent (point) (point))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
98 (setq pgauge (make-glyph
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 438
diff changeset
99 [progress-gauge :width 10 :height 2 :value 0
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
100 :descriptor "ok"])))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
101 ;; progress the progress ...
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
102 (let ((x 0))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
103 (while (<= x 100)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 438
diff changeset
104 (set-glyph-image pgauge `[progress-gauge :width 10 :height 2
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 438
diff changeset
105 :descriptor "ok" :value ,x])
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
106 (setq x (+ x 5))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
107 (sit-for 0.1)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
108
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
109 ;; progress gauge in the modeline
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
110 (setq global-mode-string
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
111 (cons (make-extent nil nil)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
112 (setq pg (make-glyph
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
113 [progress-gauge :width 5 :pixel-height 16
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
114 :descriptor "ok"]))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
115 ;; progress the progress ...
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
116 (let ((x 0))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
117 (while (<= x 100)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 438
diff changeset
118 (set-glyph-image pg
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 438
diff changeset
119 `[progress-gauge :width 5 :pixel-height 16
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 438
diff changeset
120 :descriptor "ok" :value ,x])
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
121 (setq x (+ x 5))
462
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents: 442
diff changeset
122 (redisplay-frame)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
123 (sit-for 0.1)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
124
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
125 (set-extent-begin-glyph
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
126 (make-extent (point) (point))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
127 (make-glyph
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
128 [button :face modeline-mousable
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
129 :descriptor "ok" :callback foo
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
130 :image [xpm :file "../etc/xemacs-icon.xpm"]]))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
131
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
132 ;; normal pushbutton
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
133 (set-extent-begin-glyph
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
134 (make-extent (point) (point))
438
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
135 (setq pbutton
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
136 (make-glyph [button :descriptor ["A Big Button" foo ]])))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
137
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
138 ;; edit box
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
139 (set-extent-begin-glyph
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
140 (make-extent (point) (point))
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 438
diff changeset
141 (make-glyph (setq edit-field [edit-field :pixel-width 50 :pixel-height 30
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
142 :face bold-italic
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
143 :descriptor ["Hello"]])))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
144 ;; combo box
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
145 (set-extent-begin-glyph
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
146 (make-extent (point) (point))
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 438
diff changeset
147 (make-glyph (setq combo-box
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 438
diff changeset
148 [combo-box :width 10 :descriptor ["Hello"]
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 438
diff changeset
149 :items ("One" "Two" "Three")])))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
150
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
151 ;; label
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
152 (set-extent-begin-glyph
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
153 (make-extent (point) (point))
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 438
diff changeset
154 (make-glyph (setq label [label :pixel-width 150 :descriptor "Hello"])))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
155
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
156 ;; string
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
157 (set-extent-begin-glyph
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
158 (make-extent (point) (point))
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 438
diff changeset
159 (make-glyph
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 438
diff changeset
160 (setq str
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 438
diff changeset
161 [string :data "Hello There"])))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
162
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
163 ;; scrollbar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
164 ;(set-extent-begin-glyph
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
165 ; (make-extent (point) (point))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
166 ; (make-glyph [scrollbar :width 50 :height 20 :descriptor ["Hello"]]))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
167
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
168 ;; generic subwindow
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
169 (setq sw (make-glyph [subwindow :pixel-width 50 :pixel-height 70]))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
170 (set-extent-begin-glyph (make-extent (point) (point)) sw)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
171
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
172 ;; layout
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
173 (setq layout
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
174 (make-glyph
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 438
diff changeset
175 `[layout :descriptor "The Layout"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 438
diff changeset
176 :orientation vertical
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 438
diff changeset
177 :justify left
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 438
diff changeset
178 :border [string :data "Hello There Mrs"]
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 438
diff changeset
179 :items ([layout :orientation horizontal
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 438
diff changeset
180 :items (,radio-button1 ,radio-button2)]
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 438
diff changeset
181 ,edit-field ,toggle-button ,label ,str)]))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 438
diff changeset
182 ;(set-glyph-face layout 'gui-element)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
183 (set-extent-begin-glyph
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
184 (make-extent (point) (point)) layout)
434
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
185
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 438
diff changeset
186 ;; another test layout
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 438
diff changeset
187 (set-extent-begin-glyph
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 438
diff changeset
188 (make-extent (point) (point))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 438
diff changeset
189 (setq layout-2
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 438
diff changeset
190 (make-glyph `[layout :descriptor "The Layout"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 438
diff changeset
191 :orientation vertical
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 438
diff changeset
192 :items ([progress-gauge :value 0 :width 10 :height 2
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 438
diff changeset
193 :descriptor "ok"])])))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 438
diff changeset
194
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 438
diff changeset
195 (set-glyph-image layout-2 `[layout :descriptor "The Layout"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 438
diff changeset
196 :orientation vertical
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 438
diff changeset
197 :items ([progress-gauge :value 4 :width 10 :height 2
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 438
diff changeset
198 :descriptor "ok"])])
434
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
199 (setq test-toggle-widget nil)
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
200
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
201 (defun test-toggle (widget)
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
202 (set-extent-begin-glyph
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
203 (make-extent (point) (point))
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
204 (make-glyph (vector 'button
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
205 :descriptor "ok"
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
206 :style 'toggle
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
207 :selected `(funcall test-toggle-value
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
208 ,widget)
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
209 :callback `(funcall test-toggle-action
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
210 ,widget)))))
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
211
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
212 (defun test-toggle-action (widget &optional event)
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
213 (if widget
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
214 (message "Widget is t")
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
215 (message "Widget is nil")))
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
216
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
217 (defun test-toggle-value (widget)
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
218 (setq widget (not widget))
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
219 (not widget))