1 (set-extent-begin-glyph
2 (make-extent (point) (point))
3 (setq im (make-glyph [xpm :file "xemacs-icon.xpm"])))
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))
21 [button :descriptor ["ok " (setq ok-select t)
22 :style radio :selected ok-select]])))
24 (set-extent-begin-glyph
25 (make-extent (point) (point))
28 [button :descriptor ["ok" (setq ok-select nil) :style radio
29 :selected (not ok-select)]])))
31 (set-extent-begin-glyph
32 (make-extent (point) (point))
34 (make-glyph [button :descriptor ["ok" (setq ok-select nil)
36 :selected (not ok-select)]])))
37 (set-extent-begin-glyph
38 (make-extent (point) (point))
40 (make-glyph [button :descriptor ["ok" :style toggle
42 (setq ok-select (not ok-select))
43 :selected ok-select]])))
46 (set-extent-begin-glyph
47 (make-extent (point) (point))
49 (make-glyph [button :width 10 :height 2
50 :face modeline-mousable
51 :descriptor "ok" :callback foo
54 (set-extent-begin-glyph
55 (make-extent (point) (point))
56 (setq tree (make-glyph
59 :properties (:items (["One" foo]
66 (set-extent-begin-glyph
67 (make-extent (point) (point))
69 [tab-control :descriptor "My Tab"
72 :properties (:items (["One" foo]
77 (set-extent-begin-glyph
78 (make-extent (point) (point))
79 (setq pgauge (make-glyph
80 [progress-gauge :width 10 :height 2
82 ;; progress the progress ...
85 (set-image-instance-property (glyph-image-instance pgauge) :percent x)
89 ;; progress gauge in the modeline
90 (setq global-mode-string
91 (cons (make-extent nil nil)
93 [progress-gauge :width 5 :pixel-height 16
95 ;; progress the progress ...
98 (set-image-instance-property (glyph-image-instance pg) :percent x)
102 (set-extent-begin-glyph
103 (make-extent (point) (point))
105 [button :face modeline-mousable
106 :descriptor "ok" :callback foo
107 :image [xpm :file "../etc/xemacs-icon.xpm"]]))
110 (set-extent-begin-glyph
111 (make-extent (point) (point))
113 (make-glyph [button :descriptor ["A Big Button" foo ]])))
116 (set-extent-begin-glyph
117 (make-extent (point) (point))
118 (setq edit-field (make-glyph [edit-field :pixel-width 50 :pixel-height 30
120 :descriptor ["Hello"]])))
122 (set-extent-begin-glyph
123 (make-extent (point) (point))
124 (setq combo-box (make-glyph
125 [combo-box :width 10 :descriptor ["Hello"]
126 :properties (:items ("One" "Two" "Three"))])))
129 (set-extent-begin-glyph
130 (make-extent (point) (point))
131 (setq label (make-glyph [label :pixel-width 150 :descriptor "Hello"])))
134 (set-extent-begin-glyph
135 (make-extent (point) (point))
136 (setq str (make-glyph [string :data "Hello There"])))
139 ;(set-extent-begin-glyph
140 ; (make-extent (point) (point))
141 ; (make-glyph [scrollbar :width 50 :height 20 :descriptor ["Hello"]]))
144 (setq sw (make-glyph [subwindow :pixel-width 50 :pixel-height 70]))
145 (set-extent-begin-glyph (make-extent (point) (point)) sw)
150 [layout :pixel-width 200 :pixel-height 250
151 :orientation vertical
153 :border [string :data "Hello There Mrs"]
154 :items ([layout :orientation horizontal
155 :items (radio-button1 radio-button2)]
156 edit-field toggle-button label str)]))
157 (set-glyph-face layout 'gui-element)
158 (set-extent-begin-glyph
159 (make-extent (point) (point)) layout)
161 (setq test-toggle-widget nil)
163 (defun test-toggle (widget)
164 (set-extent-begin-glyph
165 (make-extent (point) (point))
166 (make-glyph (vector 'button
169 :selected `(funcall test-toggle-value
171 :callback `(funcall test-toggle-action
174 (defun test-toggle-action (widget &optional event)
176 (message "Widget is t")
177 (message "Widget is nil")))
179 (defun test-toggle-value (widget)
180 (setq widget (not widget))