1 (set-extent-begin-glyph
2 (make-extent (point) (point))
3 (setq im (make-glyph [xpm :file "xemacs-icon.xpm"])))
7 (setq ok-select (not ok-select)))
9 (defun fee () (interactive) (message "hello"))
13 (set-extent-begin-glyph
14 (make-extent (point) (point))
17 [button :descriptor ["ok " (setq ok-select t)
18 :style radio :selected ok-select]])))
20 (set-extent-begin-glyph
21 (make-extent (point) (point))
24 [button :descriptor ["ok" (setq ok-select nil) :style radio
25 :selected (not ok-select)]])))
27 (set-extent-begin-glyph
28 (make-extent (point) (point))
30 (make-glyph [button :descriptor ["ok" (setq ok-select nil)
32 :selected (not ok-select)]])))
33 (set-extent-begin-glyph
34 (make-extent (point) (point))
36 (make-glyph [button :descriptor ["ok" :style toggle
38 (setq ok-select (not ok-select))
39 :selected ok-select]])))
42 (set-extent-begin-glyph
43 (make-extent (point) (point))
45 (make-glyph [button :width 10 :height 2
46 :face modeline-mousable
47 :descriptor "ok" :callback foo
50 (set-extent-begin-glyph
51 (make-extent (point) (point))
52 (setq tree (make-glyph
55 :properties (:items (["One" foo]
62 (set-extent-begin-glyph
63 (make-extent (point) (point))
65 [tab-control :descriptor "My Tab"
67 :properties (:items (["One" foo]
72 (set-extent-begin-glyph
73 (make-extent (point) (point))
74 (setq pgauge (make-glyph
75 [progress-gauge :width 10 :height 2
77 ;; progress the progress ...
80 (set-image-instance-property (glyph-image-instance pgauge) :percent x)
84 ;; progress gauge in the modeline
85 (setq global-mode-string
86 (cons (make-extent nil nil)
88 [progress-gauge :width 5 :pixel-height 16
90 ;; progress the progress ...
93 (set-image-instance-property (glyph-image-instance pg) :percent x)
97 (set-extent-begin-glyph
98 (make-extent (point) (point))
100 [button :face modeline-mousable
101 :descriptor "ok" :callback foo
102 :image [xpm :file "../etc/xemacs-icon.xpm"]]))
105 (set-extent-begin-glyph
106 (make-extent (point) (point))
107 (make-glyph [button :descriptor ["A Big Button" foo ]]))
110 (set-extent-begin-glyph
111 (make-extent (point) (point))
112 (setq edit-field (make-glyph [edit-field :pixel-width 50 :pixel-height 30
114 :descriptor ["Hello"]])))
116 (set-extent-begin-glyph
117 (make-extent (point) (point))
118 (setq combo-box (make-glyph
119 [combo-box :width 10 :descriptor ["Hello"]
120 :properties (:items ("One" "Two" "Three"))])))
123 (set-extent-begin-glyph
124 (make-extent (point) (point))
125 (setq label (make-glyph [label :pixel-width 150 :descriptor "Hello"])))
128 (set-extent-begin-glyph
129 (make-extent (point) (point))
130 (setq str (make-glyph [string :data "Hello There"])))
133 ;(set-extent-begin-glyph
134 ; (make-extent (point) (point))
135 ; (make-glyph [scrollbar :width 50 :height 20 :descriptor ["Hello"]]))
138 (setq sw (make-glyph [subwindow :pixel-width 50 :pixel-height 70]))
139 (set-extent-begin-glyph (make-extent (point) (point)) sw)
144 [layout :pixel-width 200 :pixel-height 250
145 :orientation vertical
147 :border [string :data "Hello There Mrs"]
148 :items ([layout :orientation horizontal
149 :items (radio-button1 radio-button2)]
150 edit-field toggle-button label str)]))
151 (set-glyph-face layout 'gui-element)
152 (set-extent-begin-glyph
153 (make-extent (point) (point)) layout)
155 (setq test-toggle-widget nil)
157 (defun test-toggle (widget)
158 (set-extent-begin-glyph
159 (make-extent (point) (point))
160 (make-glyph (vector 'button
163 :selected `(funcall test-toggle-value
165 :callback `(funcall test-toggle-action
168 (defun test-toggle-action (widget &optional event)
170 (message "Widget is t")
171 (message "Widget is nil")))
173 (defun test-toggle-value (widget)
174 (setq widget (not widget))