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])
107 (set-extent-begin-glyph
108 (make-extent (point) (point))
110 [button :face modeline-mousable
111 :descriptor "ok" :callback foo
112 :image [xpm :file "../etc/xemacs-icon.xpm"]]))
115 (set-extent-begin-glyph
116 (make-extent (point) (point))
118 (make-glyph [button :descriptor ["A Big Button" foo ]])))
121 (set-extent-begin-glyph
122 (make-extent (point) (point))
123 (make-glyph (setq edit-field [edit-field :pixel-width 50 :pixel-height 30
125 :descriptor ["Hello"]])))
127 (set-extent-begin-glyph
128 (make-extent (point) (point))
129 (make-glyph (setq combo-box
130 [combo-box :width 10 :descriptor ["Hello"]
131 :items ("One" "Two" "Three")])))
134 (set-extent-begin-glyph
135 (make-extent (point) (point))
136 (make-glyph (setq label [label :pixel-width 150 :descriptor "Hello"])))
139 (set-extent-begin-glyph
140 (make-extent (point) (point))
143 [string :data "Hello There"])))
146 ;(set-extent-begin-glyph
147 ; (make-extent (point) (point))
148 ; (make-glyph [scrollbar :width 50 :height 20 :descriptor ["Hello"]]))
151 (setq sw (make-glyph [subwindow :pixel-width 50 :pixel-height 70]))
152 (set-extent-begin-glyph (make-extent (point) (point)) sw)
157 `[layout :descriptor "The Layout"
158 :orientation vertical
160 :border [string :data "Hello There Mrs"]
161 :items ([layout :orientation horizontal
162 :items (,radio-button1 ,radio-button2)]
163 ,edit-field ,toggle-button ,label ,str)]))
164 ;(set-glyph-face layout 'gui-element)
165 (set-extent-begin-glyph
166 (make-extent (point) (point)) layout)
168 ;; another test layout
169 (set-extent-begin-glyph
170 (make-extent (point) (point))
172 (make-glyph `[layout :descriptor "The Layout"
173 :orientation vertical
174 :items ([progress-gauge :value 0 :width 10 :height 2
175 :descriptor "ok"])])))
177 (set-glyph-image layout-2 `[layout :descriptor "The Layout"
178 :orientation vertical
179 :items ([progress-gauge :value 4 :width 10 :height 2
181 (setq test-toggle-widget nil)
183 (defun test-toggle (widget)
184 (set-extent-begin-glyph
185 (make-extent (point) (point))
186 (make-glyph (vector 'button
189 :selected `(funcall test-toggle-value
191 :callback `(funcall test-toggle-action
194 (defun test-toggle-action (widget &optional event)
196 (message "Widget is t")
197 (message "Widget is nil")))
199 (defun test-toggle-value (widget)
200 (setq widget (not widget))