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))
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))
41 (make-glyph [button :descriptor ["ok4" :style toggle
43 (setq ok-select (not ok-select))
44 :selected ok-select]])))
47 (set-extent-begin-glyph
48 (make-extent (point) (point))
50 (make-glyph [button :width 10 :height 2
51 :face modeline-mousable
52 :descriptor "ok" :callback foo
55 (set-extent-begin-glyph
56 (make-extent (point) (point))
57 (setq tree (make-glyph
60 :properties (:items (["One" foo]
67 (set-extent-begin-glyph
68 (make-extent (point) (point))
70 [tab-control :descriptor "My Tab"
73 :properties (:items (["One" foo :selected t]
74 ["Two" fee :selected nil]
75 ["Three" foo :selected nil]))])))
78 (set-extent-begin-glyph
79 (make-extent (point) (point))
80 (setq pgauge (make-glyph
81 [progress-gauge :width 10 :height 2
83 ;; progress the progress ...
86 (set-image-instance-property (glyph-image-instance pgauge) :value x)
90 ;; progress gauge in the modeline
91 (setq global-mode-string
92 (cons (make-extent nil nil)
94 [progress-gauge :width 5 :pixel-height 16
96 ;; progress the progress ...
99 (set-image-instance-property (glyph-image-instance pg) :value x)
103 (set-extent-begin-glyph
104 (make-extent (point) (point))
106 [button :face modeline-mousable
107 :descriptor "ok" :callback foo
108 :image [xpm :file "../etc/xemacs-icon.xpm"]]))
111 (set-extent-begin-glyph
112 (make-extent (point) (point))
114 (make-glyph [button :descriptor ["A Big Button" foo ]])))
117 (set-extent-begin-glyph
118 (make-extent (point) (point))
119 (setq edit-field (make-glyph [edit-field :pixel-width 50 :pixel-height 30
121 :descriptor ["Hello"]])))
123 (set-extent-begin-glyph
124 (make-extent (point) (point))
125 (setq combo-box (make-glyph
126 [combo-box :width 10 :descriptor ["Hello"]
127 :properties (:items ("One" "Two" "Three"))])))
130 (set-extent-begin-glyph
131 (make-extent (point) (point))
132 (setq label (make-glyph [label :pixel-width 150 :descriptor "Hello"])))
135 (set-extent-begin-glyph
136 (make-extent (point) (point))
137 (setq str (make-glyph [string :data "Hello There"])))
140 ;(set-extent-begin-glyph
141 ; (make-extent (point) (point))
142 ; (make-glyph [scrollbar :width 50 :height 20 :descriptor ["Hello"]]))
145 (setq sw (make-glyph [subwindow :pixel-width 50 :pixel-height 70]))
146 (set-extent-begin-glyph (make-extent (point) (point)) sw)
151 [layout :pixel-width 200 :pixel-height 250
152 :orientation vertical
154 :border [string :data "Hello There Mrs"]
155 :items ([layout :orientation horizontal
156 :items (radio-button1 radio-button2)]
157 edit-field toggle-button label str)]))
158 (set-glyph-face layout 'gui-element)
159 (set-extent-begin-glyph
160 (make-extent (point) (point)) layout)
162 (setq test-toggle-widget nil)
164 (defun test-toggle (widget)
165 (set-extent-begin-glyph
166 (make-extent (point) (point))
167 (make-glyph (vector 'button
170 :selected `(funcall test-toggle-value
172 :callback `(funcall test-toggle-action
175 (defun test-toggle-action (widget &optional event)
177 (message "Widget is t")
178 (message "Widget is nil")))
180 (defun test-toggle-value (widget)
181 (setq widget (not widget))