annotate tests/glyph-test.el @ 384:bbff43aa5eb7 r21-2-7

Import from CVS: tag r21-2-7
author cvs
date Mon, 13 Aug 2007 11:08:24 +0200
parents
children aabb7f5b1c81
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents:
diff changeset
1 (set-extent-begin-glyph
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents:
diff changeset
2 (make-extent (point) (point))
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents:
diff changeset
3 (make-glyph [xpm :file "../etc/xemacs-icon.xpm"]))
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents:
diff changeset
4
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents:
diff changeset
5 (defun foo ()
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents:
diff changeset
6 (interactive)
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents:
diff changeset
7 (setq ok-select (not ok-select)))
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents:
diff changeset
8
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents:
diff changeset
9 ;; button in a group
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents:
diff changeset
10 (setq ok-select nil)
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents:
diff changeset
11 (set-extent-begin-glyph
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents:
diff changeset
12 (make-extent (point) (point))
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents:
diff changeset
13 (make-glyph [button :descriptor ["ok " (setq ok-select t)
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents:
diff changeset
14 :style radio :selected ok-select]]))
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents:
diff changeset
15 ;; button in a group
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents:
diff changeset
16 (set-extent-begin-glyph
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents:
diff changeset
17 (make-extent (point) (point))
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents:
diff changeset
18 (make-glyph [button :descriptor ["ok" (setq ok-select nil) :style radio
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents:
diff changeset
19 :selected (not ok-select)]]))
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents:
diff changeset
20 ;; normal pushbutton
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents:
diff changeset
21 (set-extent-begin-glyph
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents:
diff changeset
22 (make-extent (point) (point))
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents:
diff changeset
23 (setq pbutton (make-glyph [button :width 10 :height 2
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents:
diff changeset
24 :face modeline-mousable
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents:
diff changeset
25 :descriptor ["ok" foo :selected t]])))
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents:
diff changeset
26 ;; normal pushbutton
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents:
diff changeset
27 (set-extent-begin-glyph
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents:
diff changeset
28 (make-extent (point) (point))
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents:
diff changeset
29 (make-glyph [button :descriptor ["A Big Button" foo ]]))
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents:
diff changeset
30 ;; edit box
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents:
diff changeset
31 (set-extent-begin-glyph
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents:
diff changeset
32 (make-extent (point) (point))
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents:
diff changeset
33 (setq hedit (make-glyph [edit :pixel-width 50 :pixel-height 30
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents:
diff changeset
34 :face bold-italic
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents:
diff changeset
35 :descriptor ["Hello"]])))
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents:
diff changeset
36 ;; combo box
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents:
diff changeset
37 (set-extent-begin-glyph
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents:
diff changeset
38 (make-extent (point) (point))
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents:
diff changeset
39 (setq hcombo (make-glyph
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents:
diff changeset
40 [combo :width 10 :height 3 :descriptor ["Hello"]
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents:
diff changeset
41 :properties (:items ("One" "Two" "Three"))])))
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents:
diff changeset
42
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents:
diff changeset
43 ;; line
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents:
diff changeset
44 (set-extent-begin-glyph
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents:
diff changeset
45 (make-extent (point) (point))
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents:
diff changeset
46 (make-glyph [label :pixel-width 150 :descriptor "Hello"]))
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents:
diff changeset
47
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents:
diff changeset
48 ;; scrollbar
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents:
diff changeset
49 ;(set-extent-begin-glyph
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents:
diff changeset
50 ; (make-extent (point) (point))
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents:
diff changeset
51 ; (make-glyph [scrollbar :width 50 :height 20 :descriptor ["Hello"]]))
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents:
diff changeset
52
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents:
diff changeset
53 ;; generic subwindow
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents:
diff changeset
54 (setq sw (make-glyph [subwindow :pixel-width 50 :pixel-height 50]))
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents:
diff changeset
55 (set-extent-begin-glyph (make-extent (point) (point)) sw)
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents:
diff changeset
56