Mercurial > hg > xemacs-beta
comparison tests/glyph-test.el @ 434:9d177e8d4150 r21-2-25
Import from CVS: tag r21-2-25
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:30:53 +0200 |
parents | 3ecd8885ac67 |
children | 84b14dcb0985 |
comparison
equal
deleted
inserted
replaced
433:892ca416f0fb | 434:9d177e8d4150 |
---|---|
149 :items (radio-button1 radio-button2)] | 149 :items (radio-button1 radio-button2)] |
150 edit-field toggle-button label str)])) | 150 edit-field toggle-button label str)])) |
151 (set-glyph-face layout 'gui-element) | 151 (set-glyph-face layout 'gui-element) |
152 (set-extent-begin-glyph | 152 (set-extent-begin-glyph |
153 (make-extent (point) (point)) layout) | 153 (make-extent (point) (point)) layout) |
154 | 154 |
155 (setq test-toggle-widget nil) | |
156 | |
157 (defun test-toggle (widget) | |
158 (set-extent-begin-glyph | |
159 (make-extent (point) (point)) | |
160 (make-glyph (vector 'button | |
161 :descriptor "ok" | |
162 :style 'toggle | |
163 :selected `(funcall test-toggle-value | |
164 ,widget) | |
165 :callback `(funcall test-toggle-action | |
166 ,widget))))) | |
167 | |
168 (defun test-toggle-action (widget &optional event) | |
169 (if widget | |
170 (message "Widget is t") | |
171 (message "Widget is nil"))) | |
172 | |
173 (defun test-toggle-value (widget) | |
174 (setq widget (not widget)) | |
175 (not widget)) |