1 (set-extent-begin-glyph
2 (make-extent (point) (point))
3 (setq im (make-glyph [xbm :file "xemacsicon.xbm"])))
5 (set-extent-begin-glyph
6 (make-extent (point) (point))
7 (make-glyph [string :data "xemacs"]))
11 (setq ok-select (not ok-select)))
13 (defun fee () (interactive) (message "hello"))
17 (set-extent-begin-glyph
18 (make-extent (point) (point))
22 :descriptor ["ok1" (setq ok-select t)
23 :style radio :selected ok-select]])))
25 (set-extent-begin-glyph
26 (make-extent (point) (point))
29 [button :descriptor ["ok2" (setq ok-select nil) :style radio
30 :selected (not ok-select)]])))
32 (set-extent-begin-glyph
33 (make-extent (point) (point))
35 (make-glyph [button :descriptor ["ok3" (setq ok-select nil)
37 :selected (not ok-select)]])))
38 (set-extent-begin-glyph
39 (make-extent (point) (point))
42 [button :descriptor ["ok4" :style toggle
44 (setq ok-select (not ok-select))
45 :selected ok-select]])))
48 (set-extent-begin-glyph
49 (make-extent (point) (point))
51 (make-glyph [button :width 10 :height 2
52 :face modeline-mousable
53 :descriptor "ok" :callback foo
56 (set-extent-begin-glyph
57 (make-extent (point) (point))
58 (setq tree (make-glyph
68 (set-extent-begin-glyph
69 (make-extent (point) (point))
71 [tab-control :descriptor "My Tab"
74 :items (["One" foo :selected t]
75 ["Two" fee :selected nil]
76 ["Three" foo :selected nil])])))
79 (set-extent-begin-glyph
80 (make-extent (point) (point))
81 (setq pgauge (make-glyph
82 [progress-gauge :width 10 :height 2 :value 0
84 ;; progress the progress ...
87 (set-glyph-image pgauge `[progress-gauge :width 10 :height 2
88 :descriptor "ok" :value ,x])
92 ;; progress gauge in the modeline
93 (setq global-mode-string
94 (cons (make-extent nil nil)
96 [progress-gauge :width 5 :pixel-height 16
98 ;; progress the progress ...
102 `[progress-gauge :width 5 :pixel-height 16
103 :descriptor "ok" :value ,x])
108 (set-extent-begin-glyph
109 (make-extent (point) (point))
111 [button :face modeline-mousable
112 :descriptor "ok" :callback foo
113 :image [xpm :file "../etc/xemacs-icon.xpm"]]))
116 (set-extent-begin-glyph
117 (make-extent (point) (point))
119 (make-glyph [button :descriptor ["A Big Button" foo ]])))
122 (set-extent-begin-glyph
123 (make-extent (point) (point))
124 (make-glyph (setq edit-field [edit-field :pixel-width 50 :pixel-height 30
126 :descriptor ["Hello"]])))
128 (set-extent-begin-glyph
129 (make-extent (point) (point))
130 (make-glyph (setq combo-box
131 [combo-box :width 10 :descriptor ["Hello"]
132 :items ("One" "Two" "Three")])))
135 (set-extent-begin-glyph
136 (make-extent (point) (point))
137 (make-glyph (setq label [label :pixel-width 150 :descriptor "Hello"])))
140 (set-extent-begin-glyph
141 (make-extent (point) (point))
144 [string :data "Hello There"])))
147 ;(set-extent-begin-glyph
148 ; (make-extent (point) (point))
149 ; (make-glyph [scrollbar :width 50 :height 20 :descriptor ["Hello"]]))
152 (setq sw (make-glyph [subwindow :pixel-width 50 :pixel-height 70]))
153 (set-extent-begin-glyph (make-extent (point) (point)) sw)
158 `[layout :descriptor "The Layout"
159 :orientation vertical
161 :border [string :data "Hello There Mrs"]
162 :items ([layout :orientation horizontal
163 :items (,radio-button1 ,radio-button2)]
164 ,edit-field ,toggle-button ,label ,str)]))
165 ;(set-glyph-face layout 'gui-element)
166 (set-extent-begin-glyph
167 (make-extent (point) (point)) layout)
169 ;; another test layout
170 (set-extent-begin-glyph
171 (make-extent (point) (point))
173 (make-glyph `[layout :descriptor "The Layout"
174 :orientation vertical
175 :items ([progress-gauge :value 0 :width 10 :height 2
176 :descriptor "ok"])])))
178 (set-glyph-image layout-2 `[layout :descriptor "The Layout"
179 :orientation vertical
180 :items ([progress-gauge :value 4 :width 10 :height 2
182 (setq test-toggle-widget nil)
184 (defun test-toggle (widget)
185 (set-extent-begin-glyph
186 (make-extent (point) (point))
187 (make-glyph (vector 'button
190 :selected `(funcall test-toggle-value
192 :callback `(funcall test-toggle-action
195 (defun test-toggle-action (widget &optional event)
197 (message "Widget is t")
198 (message "Widget is nil")))
200 (defun test-toggle-value (widget)
201 (setq widget (not widget))