author | Claus Gittinger <cg@exept.de> |
Sun, 14 Jan 1996 15:21:47 +0100 | |
changeset 284 | fb625951b7fc |
parent 281 | 0f41c95fa722 |
child 335 | 81c8965c4437 |
permissions | -rw-r--r-- |
0 | 1 |
" |
5 | 2 |
COPYRIGHT (c) 1989 by Claus Gittinger |
59 | 3 |
All Rights Reserved |
0 | 4 |
|
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
12 |
||
13 |
PopUpView subclass:#PopUpMenu |
|
281
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
14 |
instanceVariableNames:'menuView lastSelection memorize hideOnLeave actionLabels |
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
15 |
actionLines actionValues hideOnRelease defaultHideOnRelease' |
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
16 |
classVariableNames:'DefaultHideOnRelease' |
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
17 |
poolDictionaries:'' |
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
18 |
category:'Views-Menus' |
0 | 19 |
! |
20 |
||
38 | 21 |
!PopUpMenu class methodsFor:'documentation'! |
22 |
||
23 |
copyright |
|
24 |
" |
|
25 |
COPYRIGHT (c) 1989 by Claus Gittinger |
|
59 | 26 |
All Rights Reserved |
38 | 27 |
|
28 |
This software is furnished under a license and may be used |
|
29 |
only in accordance with the terms of that license and with the |
|
30 |
inclusion of the above copyright notice. This software may not |
|
31 |
be provided or otherwise made available to, or used by, any |
|
32 |
other person. No title to or ownership of the software is |
|
33 |
hereby transferred. |
|
34 |
" |
|
35 |
! |
|
36 |
||
37 |
documentation |
|
38 |
" |
|
39 |
This class provides PopUpMenu functionality; Actually, this class |
|
40 |
only provides the popup and shadow functionality and wraps another |
|
41 |
view, which is the actual menu-list (usually an instance of MenuView). |
|
42 |
||
43 |
PopUpMenus are usually created with a list of labels, selectors and a |
|
44 |
receivier. Once activated, the specified receiver will be sent a |
|
45 |
'selector'-message. |
|
112 | 46 |
|
47 |
PopupMenus may be either assigned statically to a view (via the #middleButtonMenu: |
|
48 |
message) or created dynamically as required. |
|
49 |
Static definition makes sense, if the menu stays constant and you want to |
|
50 |
assign it once for the lifetime of the view. |
|
51 |
||
52 |
Dynamic menus are easier to use, if the number of or look of the entries has to |
|
53 |
change according the internal state of some model. Also, this is the ST-80 way |
|
54 |
of using popupMenus. For dynamic popups, the views model is asked for a menu |
|
55 |
via the #menuSelector each time a button press occurs. |
|
56 |
||
57 |
See examples section for more. |
|
63 | 58 |
" |
59 |
! |
|
38 | 60 |
|
63 | 61 |
examples |
62 |
" |
|
284 | 63 |
|
38 | 64 |
Examples: |
65 |
||
284 | 66 |
|p| |
67 |
p := PopUpMenu |
|
68 |
labels:#('foo' |
|
69 |
'bar' |
|
70 |
'baz') |
|
71 |
selectors:#( |
|
72 |
#foo |
|
73 |
#bar |
|
74 |
#baz) |
|
75 |
receiver:nil. |
|
76 |
p showAtPointer |
|
38 | 77 |
|
78 |
||
79 |
sometimes, you want to specify both selectors and some arguments |
|
80 |
to be sent; this is done by: |
|
81 |
||
284 | 82 |
|p| |
83 |
p := PopUpMenu |
|
84 |
labels:#('foo' 'bar' 'baz') |
|
85 |
selectors:#(#foo: #bar: #foo:) |
|
86 |
args:#(1 2 3) |
|
87 |
receiver:nil. |
|
88 |
p showAtPointer |
|
38 | 89 |
|
90 |
or, the same selector but different arguments: |
|
91 |
||
284 | 92 |
|p| |
93 |
p := PopUpMenu |
|
94 |
labels:#('foo' 'bar' 'baz') |
|
95 |
selectors:#foo: |
|
96 |
args:#(1 2 3) |
|
97 |
receiver:nil. |
|
98 |
p showAtPointer |
|
38 | 99 |
|
100 |
Normally, you do not show the menu explicitely, but install |
|
112 | 101 |
it as a either as middleButtonMenu of some view or return it from |
102 |
a model. |
|
103 |
(Views/Controllers button-event handler will show it when the middle |
|
104 |
button is pressed ...) |
|
105 |
Static menu: |
|
38 | 106 |
|
284 | 107 |
|v m| |
38 | 108 |
|
284 | 109 |
v := View new. |
110 |
m := PopUpMenu |
|
111 |
labels:#('lower' |
|
112 |
'raise' |
|
113 |
'-' |
|
114 |
'destroy') |
|
115 |
selectors:#(#lower #raise nil #destroy) |
|
116 |
receiver:v. |
|
117 |
v middleButtonMenu:m. |
|
118 |
v open |
|
38 | 119 |
|
112 | 120 |
Dynamic menu: |
121 |
(since we need some model which responds to a menu-message, |
|
122 |
we use a plug in the example below; normally, this would be your model) |
|
123 |
||
284 | 124 |
|v model| |
112 | 125 |
|
284 | 126 |
model := Plug new. |
127 |
model respondTo:#getMenu with:[PopUpMenu labels:#('foo' 'bar') |
|
128 |
selectors:#(foo bar)]. |
|
129 |
model respondTo:#foo with:[Transcript showCr:'models foo called']. |
|
130 |
model respondTo:#bar with:[Transcript showCr:'models bar called']. |
|
112 | 131 |
|
284 | 132 |
v := View new. |
133 |
v model:model; menu:#getMenu. |
|
134 |
v open |
|
112 | 135 |
|
136 |
Dynamic menus are the MVC-way (i.e. ST-80) way of doing things. |
|
137 |
They are usually easier to use, if the menu changes depending on the models |
|
138 |
state. (for example, see the systemBrowsers menus being different when |
|
139 |
things are selected ...) |
|
140 |
||
38 | 141 |
It is also possible, to add check-mark entries, with an entry string |
142 |
starting with the special sequence '\c' (for check-mark). The value |
|
143 |
passed will be the truth-state of the check-mark. |
|
144 |
||
284 | 145 |
|m v| |
38 | 146 |
|
284 | 147 |
v := View new. |
148 |
m := PopUpMenu |
|
149 |
labels:#('\c foo' |
|
150 |
'\c bar') |
|
151 |
selectors:#(#value: #value:) |
|
152 |
receiver:[:v | Transcript show:'arg: '; showCr:v]. |
|
153 |
v middleButtonMenu:m. |
|
154 |
v open |
|
38 | 155 |
|
156 |
Finally, you can wrap other views into a popup menu (for example, |
|
157 |
to implement menus with icons or other components). |
|
158 |
The view should respond to some messages sent from here (for |
|
159 |
example: #hideSubmenus, #deselectWithoutRedraw and others). |
|
160 |
Currently there is only one class in the system, which can be used |
|
161 |
this way (PatternMenu in the DrawTool demo): |
|
162 |
||
284 | 163 |
|v p| |
38 | 164 |
|
284 | 165 |
v := View new. |
166 |
p := PatternMenu new. |
|
167 |
p patterns:(Array with:Color red |
|
168 |
with:Color green |
|
169 |
with:Color blue). |
|
170 |
v middleButtonMenu:(PopUpMenu forMenu:p). |
|
171 |
v open |
|
38 | 172 |
|
173 |
or try: |
|
174 |
||
284 | 175 |
|v p| |
38 | 176 |
|
284 | 177 |
v := View new. |
178 |
p := PatternMenu new. |
|
179 |
p patterns:(Array with:Color red |
|
180 |
with:Color green |
|
181 |
with:Color blue). |
|
182 |
p selectors:#value:. |
|
183 |
p receiver:[:val | v viewBackground:val. v clear]. |
|
184 |
p args:(Array with:Color red |
|
185 |
with:Color green |
|
186 |
with:Color blue). |
|
187 |
v middleButtonMenu:(PopUpMenu forMenu:p). |
|
188 |
v open |
|
38 | 189 |
|
190 |
||
191 |
ST-80 style: |
|
192 |
||
193 |
The above menus all did some message send on selection; it is |
|
194 |
also possible, to use Smalltalk-80 style menus (which return some value |
|
195 |
from their startup method): |
|
196 |
||
284 | 197 |
|m selection| |
38 | 198 |
|
284 | 199 |
m := PopUpMenu |
200 |
labels:#('one' 'two' 'three'). |
|
201 |
selection := m startUp. |
|
202 |
Transcript show:'the selection was: '; showCr:selection |
|
38 | 203 |
|
204 |
startUp will return the entries index, or 0 if there was no selection. |
|
205 |
You can also specify an array of values to be returned instead of the |
|
206 |
index: |
|
207 |
||
284 | 208 |
|m selection| |
38 | 209 |
|
284 | 210 |
m := PopUpMenu |
211 |
labels:#('one' 'two' 'three') |
|
212 |
values:#(10 20 30). |
|
213 |
selection := m startUp. |
|
214 |
Transcript show:'the value was: '; showCr:selection |
|
38 | 215 |
|
216 |
In ST/X style menus, separating lines between entries are created |
|
217 |
by a '-'-string as its label text (and corresponding nil-entries in the |
|
218 |
selectors- and args-arrays). |
|
219 |
In ST-80, you have to pass the indices of the lines in an extra array: |
|
220 |
||
284 | 221 |
|m selection| |
38 | 222 |
|
284 | 223 |
m := PopUpMenu |
224 |
labels:#('one' 'two' 'three' 'four' 'five') |
|
225 |
lines:#(2 4). |
|
226 |
selection := m startUp. |
|
227 |
Transcript show:'the value was: '; showCr:selection |
|
38 | 228 |
|
229 |
or: |
|
284 | 230 |
|m selection| |
38 | 231 |
|
284 | 232 |
m := PopUpMenu |
233 |
labels:#('one' 'two' 'three') |
|
234 |
lines:#(2) |
|
235 |
values:#(10 20 30). |
|
236 |
selection := m startUp. |
|
237 |
Transcript show:'the value was: '; showCr:selection |
|
38 | 238 |
|
239 |
Use whichever interface you prefer. |
|
240 |
" |
|
119 | 241 |
! ! |
242 |
||
243 |
!PopUpMenu class methodsFor:'instance creation'! |
|
38 | 244 |
|
245 |
forMenu:aMenuView |
|
246 |
"this wraps an already existing menu - allowing to put any |
|
247 |
view (not just MenuViews) into popups (for example, menus |
|
248 |
with icons, or other components). |
|
249 |
Currently, there is only one example of different menus in |
|
250 |
the system (PatternMenu in the DrawTool) which could be used |
|
251 |
this way. |
|
252 |
The view should respond to some of the menuView messages |
|
253 |
(such as hideSubmenu, deselectWithoutRedraw etc.)" |
|
254 |
||
255 |
|newMenu| |
|
256 |
||
257 |
newMenu := self onSameDeviceAs:aMenuView. |
|
258 |
newMenu addSubView:aMenuView. |
|
259 |
newMenu menu:aMenuView. |
|
260 |
^ newMenu |
|
261 |
! |
|
262 |
||
202 | 263 |
labels:labels selector:aSelector args:args receiver:anObject |
264 |
"create and return a popup menu with labels as entries. |
|
265 |
Each item will send aSelector with a corresponding argument from the |
|
266 |
args array to anObject. The menu is created on the default DIsplay" |
|
267 |
||
268 |
" |
|
269 |
OBSOLETE protocol: #labels:selectors:... knows how to handle single-symbol selectors-arg |
|
270 |
" |
|
271 |
^ self labels:labels selectors:aSelector args:args receiver:anObject |
|
272 |
! |
|
273 |
||
274 |
labels:labels selector:aSelector args:args receiver:anObject for:aView |
|
275 |
"create and return a popup menu with labels as entries. |
|
276 |
Each item will send aSelector with a corresponding argument from the |
|
277 |
args array to anObject. The menu is created on the same physical device |
|
258
ae4b8f1a6738
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
278 |
as aView (which is only of interest in multi-Display applications; |
202 | 279 |
typical applications can use the sibbling message without the for: argument)." |
280 |
||
281 |
" |
|
282 |
OBSOLETE protocol: #labels:selectors:... knows how to handle single-symbol selectors-arg |
|
283 |
" |
|
284 |
^ self labels:labels selectors:aSelector args:args receiver:anObject for:aView |
|
285 |
! |
|
286 |
||
287 |
labels:labels selectors:selectors |
|
288 |
"create and return a menu with label-items and selectors. The receiver |
|
289 |
will either be defined later, or not used at all (if opened via startUp)" |
|
290 |
||
291 |
^ self labels:labels selectors:selectors args:nil receiver:nil for:nil |
|
292 |
! |
|
293 |
||
294 |
labels:labels selectors:selectors args:argArray |
|
295 |
"create and return a menu with label-items and selectors. The receiver |
|
296 |
will either be defined later, or not used at all (if opened via startUp)" |
|
297 |
||
298 |
^ self labels:labels selectors:selectors args:argArray receiver:nil for:nil |
|
299 |
! |
|
300 |
||
301 |
labels:labels selectors:selectors args:args receiver:anObject |
|
302 |
"create and return a popup menu with labels as entries. |
|
303 |
Each item will send a corresponding selector:argument from the selectors- |
|
304 |
and args array to anObject. The menu is created on the default Display" |
|
305 |
||
306 |
^ self labels:labels selectors:selectors args:args receiver:anObject for:nil |
|
307 |
! |
|
308 |
||
38 | 309 |
labels:labels selectors:selectors args:args receiver:anObject for:aView |
63 | 310 |
"create and return a popup menu with labels as entries. |
311 |
Each item will send a corresponding selector:argument from the selectors- |
|
312 |
and args array to anObject. The menu is created on the same physical device |
|
258
ae4b8f1a6738
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
313 |
as aView (which is only of interest in multi-Display applications; |
63 | 314 |
typical applications can use the sibbling message without the for: argument)." |
315 |
||
38 | 316 |
|newMenu| |
317 |
||
318 |
newMenu := self onSameDeviceAs:aView. |
|
319 |
newMenu menu:(MenuView |
|
59 | 320 |
labels:labels |
321 |
selectors:selectors |
|
322 |
args:args |
|
323 |
receiver:anObject |
|
324 |
in:newMenu). |
|
38 | 325 |
^ newMenu |
326 |
! |
|
327 |
||
119 | 328 |
labels:labels selectors:selectors receiver:anObject |
329 |
"create and return a popup menu with labels as entries. |
|
330 |
Each item will send a message with a selector from the corresponding |
|
331 |
selectors-array. |
|
332 |
The menu is created on the default Display." |
|
333 |
||
334 |
^ self labels:labels selectors:selectors args:nil receiver:anObject for:nil |
|
63 | 335 |
! |
336 |
||
202 | 337 |
labels:labels selectors:selectors receiver:anObject for:aView |
338 |
"create and return a popup menu with labels as entries. |
|
339 |
Each item will send a corresponding selector from the selectors-array |
|
340 |
to anObject. The menu is created on the same physical device |
|
258
ae4b8f1a6738
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
341 |
as aView (which is only of interest in multi-Display applications; |
202 | 342 |
typical applications can use the sibbling message without the for: argument)." |
63 | 343 |
|
202 | 344 |
^ self labels:labels selectors:selectors args:nil receiver:anObject for:aView |
0 | 345 |
! ! |
346 |
||
347 |
!PopUpMenu class methodsFor:'ST-80 instance creation'! |
|
348 |
||
202 | 349 |
labelArray:labels lines:lines values:values |
350 |
"ST80R4 compatibility" |
|
119 | 351 |
|
202 | 352 |
^ self labels:labels lines:lines values:values |
0 | 353 |
! |
354 |
||
119 | 355 |
labelArray:labels values:values |
356 |
"ST80R4 compatibility" |
|
357 |
||
358 |
^ self labels:labels lines:nil values:values |
|
359 |
! |
|
360 |
||
202 | 361 |
labelList:labels |
362 |
"ST80R4 compatibility: |
|
363 |
given a list consisting of group label entries (to be separated by |
|
364 |
lines), convert into standard form (using '-' for lines. |
|
365 |
" |
|
366 |
||
367 |
^ self labelList:labels values:nil |
|
119 | 368 |
|
202 | 369 |
" |
370 |
(PopUpMenu labels:#('1' '2' '3')) showAtPointer |
|
371 |
(PopUpMenu labelList:#(('1') ('2' '3'))) showAtPointer |
|
372 |
(PopUpMenu labelList:#(('1') ('2') ('3'))) showAtPointer |
|
373 |
" |
|
374 |
! |
|
375 |
||
376 |
labelList:labels lines:lines values:values |
|
377 |
"mhmh what is that ?" |
|
378 |
||
379 |
^ (self new) labels:labels lines:lines values:values |
|
119 | 380 |
! |
381 |
||
0 | 382 |
labelList:labels values:values |
119 | 383 |
"ST80R4 compatibility: |
384 |
given a list consisting of group label entries (to be separated by |
|
385 |
lines), convert into standard form (using '-' for lines. |
|
386 |
" |
|
387 |
||
388 |
|newLabels newValues lS vS first| |
|
389 |
||
390 |
newLabels := OrderedCollection new. |
|
391 |
newValues := OrderedCollection new. |
|
392 |
lS := ReadStream on:labels. |
|
393 |
values notNil ifTrue:[vS := ReadStream on:values]. |
|
394 |
first := true. |
|
395 |
[lS atEnd] whileFalse:[ |
|
396 |
|entry| |
|
397 |
||
398 |
entry := lS next. |
|
399 |
entry isCollection ifTrue:[ |
|
400 |
first ifFalse:[ |
|
401 |
newLabels add:'-'. |
|
402 |
values notNil ifTrue:[newValues add:nil] |
|
403 |
]. |
|
404 |
newLabels addAll:entry. |
|
405 |
values notNil ifTrue:[newValues addAll:(vS next:entry size)] |
|
406 |
] ifFalse:[ |
|
407 |
newLabels add:entry. |
|
408 |
values notNil ifTrue:[newValues add:(vS next)] |
|
409 |
]. |
|
410 |
first := false. |
|
411 |
]. |
|
412 |
values isNil ifTrue:[ |
|
413 |
^ self labels:newLabels |
|
414 |
]. |
|
415 |
^ self labels:newLabels values:newValues |
|
416 |
||
417 |
" |
|
418 |
(PopUpMenu labels:#('1' '2' '3') values:#(1 2 3)) showAtPointer |
|
419 |
(PopUpMenu labelList:#(('1') ('2' '3')) values:#(1 2 3)) showAtPointer |
|
420 |
(PopUpMenu labelList:#(('1') ('2') ('3')) values:#(1 2 3)) showAtPointer |
|
421 |
" |
|
422 |
! |
|
423 |
||
202 | 424 |
labels:labels |
425 |
"ST80R2 compatibility" |
|
59 | 426 |
|
202 | 427 |
^ self labels:labels lines:nil values:nil |
0 | 428 |
! |
429 |
||
202 | 430 |
labels:labels lines:lines |
431 |
"ST80R2 compatibility" |
|
0 | 432 |
|
202 | 433 |
^ self labels:labels lines:lines values:nil |
77 | 434 |
! |
435 |
||
202 | 436 |
labels:labels lines:lines values:values |
437 |
"ST80R2 compatibility" |
|
127 | 438 |
|
202 | 439 |
^ (self new) labels:labels lines:lines values:values |
77 | 440 |
! |
441 |
||
202 | 442 |
labels:labels values:values |
443 |
"ST80R2 compatibility" |
|
59 | 444 |
|
202 | 445 |
^ self labels:labels lines:nil values:values |
127 | 446 |
! ! |
447 |
||
202 | 448 |
!PopUpMenu class methodsFor:'defaults'! |
0 | 449 |
|
202 | 450 |
updateStyleCache |
451 |
DefaultHideOnRelease := StyleSheet at:#popupHideOnRelease default:true. |
|
0 | 452 |
! ! |
453 |
||
454 |
!PopUpMenu methodsFor:'ST-80 activation'! |
|
455 |
||
456 |
startUp |
|
38 | 457 |
"start the menu modal - return the selected value, |
458 |
or - if no values where specified - return the index. |
|
0 | 459 |
If nothing was selected, return 0. |
38 | 460 |
Modal - i.e. stay in the menu until finished. |
461 |
This is the ST-80 way of launching a menu." |
|
0 | 462 |
|
281
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
463 |
^ self startUpAt:nil |
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
464 |
|
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
465 |
" |
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
466 |
Transcript showCr:(PopUpMenu labels:#('foo' 'bar' 'baz')) startUp |
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
467 |
Transcript showCr:(PopUpMenu labels:#('foo' 'bar' 'baz') |
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
468 |
values:#(foo bar baz)) startUp |
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
469 |
" |
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
470 |
|
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
471 |
"Modified: 10.1.1996 / 20:16:40 / cg" |
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
472 |
! |
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
473 |
|
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
474 |
startUpAt:aPoint |
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
475 |
"start the menu modal - return the selected value, |
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
476 |
or - if no values where specified - return the index. |
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
477 |
If nothing was selected, return 0. |
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
478 |
Modal - i.e. stay in the menu until finished. |
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
479 |
This is the ST-80 way of launching a menu." |
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
480 |
|
96 | 481 |
|return rec sel0 sel1 arg| |
63 | 482 |
|
119 | 483 |
return := 0. |
484 |
||
0 | 485 |
menuView action:[:selected | |
281
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
486 |
|actionIndex value sel retVal| |
38 | 487 |
|
281
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
488 |
retVal := 0. |
95 | 489 |
|
281
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
490 |
menuView args isNil ifTrue:[ |
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
491 |
menuView selectors notNil ifTrue:[ |
119 | 492 |
"/ sel := menuView selectors at:selected. |
493 |
"/ sel notNil ifTrue:[sel0 := sel]. |
|
494 |
||
495 |
"/ (arg := menuView checkFlags at:selected) isNil ifTrue:[ |
|
281
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
496 |
sel0 := menuView selectors at:selected. |
119 | 497 |
"/ ] ifFalse:[ |
498 |
"/ sel1 := menuView selectors at:selected. |
|
499 |
"/ ]. |
|
281
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
500 |
"/ retVal := nil. |
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
501 |
] |
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
502 |
] ifFalse:[ |
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
503 |
actionIndex := menuView args at:selected. |
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
504 |
actionIndex notNil ifTrue:[ |
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
505 |
actionValues isNil ifTrue:[ |
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
506 |
menuView selectors notNil ifTrue:[ |
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
507 |
"/ mhmh an ST/X menu started the ST-80 way |
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
508 |
sel1 := menuView selectors at:selected. |
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
509 |
arg := actionIndex. |
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
510 |
"/ retVal := nil. |
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
511 |
] ifFalse:[ |
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
512 |
retVal := actionIndex |
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
513 |
] |
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
514 |
] ifFalse:[ |
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
515 |
retVal := actionValues at:actionIndex. |
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
516 |
(retVal isKindOf:PopUpMenu) ifTrue:[ |
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
517 |
retVal := retVal startUp |
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
518 |
] |
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
519 |
] |
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
520 |
] ifFalse:[ |
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
521 |
"/ mhmh an ST/X menu started the ST-80 way |
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
522 |
menuView selectors notNil ifTrue:[ |
119 | 523 |
"/ (arg := menuView checkFlags at:selected) isNil ifTrue:[ |
281
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
524 |
sel0 := menuView selectors at:selected. |
119 | 525 |
"/ ] ifFalse:[ |
526 |
"/ sel1 := menuView selectors at:selected. |
|
527 |
"/ ]. |
|
281
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
528 |
"/ retVal := nil. |
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
529 |
] |
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
530 |
] |
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
531 |
]. |
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
532 |
return := retVal |
0 | 533 |
]. |
281
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
534 |
aPoint isNil ifTrue:[ |
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
535 |
self showAtPointer |
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
536 |
] ifFalse:[ |
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
537 |
self showAt:aPoint. |
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
538 |
]. |
96 | 539 |
|
540 |
"/ |
|
541 |
"/ mhmh an ST/X menu started the ST-80 way |
|
542 |
"/ |
|
543 |
(sel0 notNil or:[sel1 notNil]) ifTrue:[ |
|
281
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
544 |
rec := menuView receiver. |
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
545 |
sel0 notNil ifTrue:[ |
131 | 546 |
^ sel0 |
547 |
"/ rec perform:sel0 |
|
281
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
548 |
] ifFalse:[ |
131 | 549 |
^ Array with:sel1 with:arg. |
550 |
"/ rec perform:sel1 with:arg. |
|
281
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
551 |
] |
95 | 552 |
]. |
63 | 553 |
^ return |
38 | 554 |
|
555 |
" |
|
63 | 556 |
Transcript showCr:(PopUpMenu labels:#('foo' 'bar' 'baz')) startUp |
38 | 557 |
Transcript showCr:(PopUpMenu labels:#('foo' 'bar' 'baz') |
281
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
558 |
values:#(foo bar baz)) startUp |
38 | 559 |
" |
281
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
560 |
|
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
561 |
"Created: 10.1.1996 / 20:11:42 / cg" |
0f41c95fa722
added method to open menu at a particular position
Claus Gittinger <cg@exept.de>
parents:
258
diff
changeset
|
562 |
"Modified: 10.1.1996 / 20:12:26 / cg" |
110 | 563 |
! |
564 |
||
565 |
startUpWithHeading:aString |
|
566 |
"start the menu modal - return the selected value, |
|
567 |
or - if no values where specified - return the index. |
|
568 |
If nothing was selected, return 0. |
|
569 |
Modal - i.e. stay in the menu until finished. |
|
570 |
This is the ST-80 way of launching a menu." |
|
571 |
||
572 |
defaultHideOnRelease := false. |
|
573 |
menuView labels notNil ifTrue:[ |
|
574 |
menuView labels:(Array with:aString with:'=') , menuView labels. |
|
575 |
]. |
|
576 |
menuView selectors notNil ifTrue:[ |
|
577 |
menuView selectors:(Array with:nil with:nil) , menuView selectors. |
|
578 |
]. |
|
579 |
"/ menuView disable:1; disable:2. |
|
580 |
||
581 |
^ self startUp. |
|
582 |
||
583 |
" |
|
584 |
(PopUpMenu |
|
585 |
labels:#('foo' 'bar')) |
|
586 |
startUp |
|
587 |
" |
|
588 |
" |
|
589 |
(PopUpMenu |
|
590 |
labels:#('foo' 'bar')) |
|
591 |
startUpWithHeading:'hello' |
|
592 |
" |
|
0 | 593 |
! ! |
594 |
||
202 | 595 |
!PopUpMenu methodsFor:'accessing-behavior'! |
596 |
||
597 |
hideOnLeave:aBoolean |
|
598 |
"set/clear the hideOnLeave attribute, which controls |
|
599 |
if the menu should be hidden when the pointer leaves |
|
600 |
the view (used with multiple-menus)" |
|
601 |
||
602 |
hideOnLeave := aBoolean |
|
603 |
! |
|
604 |
||
605 |
hideOnRelease:aBoolean |
|
606 |
"set/clear the hideOnRelease attribute, which controls |
|
607 |
if the menu should be hidden when the button is released" |
|
608 |
||
609 |
hideOnRelease := aBoolean. |
|
610 |
menuView hideOnRelease:aBoolean |
|
611 |
! ! |
|
612 |
||
613 |
!PopUpMenu methodsFor:'accessing-items'! |
|
614 |
||
615 |
indexOf:indexOrName |
|
616 |
"return the index of a submenu - or 0 if there is none" |
|
617 |
||
618 |
^ menuView indexOf:indexOrName |
|
619 |
! |
|
620 |
||
621 |
labels |
|
622 |
"return the list of labels" |
|
623 |
||
624 |
actionLabels notNil ifTrue:[ |
|
625 |
^ actionLabels asStringCollection |
|
626 |
]. |
|
627 |
^ menuView list |
|
628 |
! |
|
629 |
||
630 |
labels:labelString lines:lineArray values:valueArray |
|
631 |
"define the menu the ST-80 way (with labels and lines defined separately)" |
|
632 |
||
633 |
|labelArray argArray convertedLabels |
|
634 |
offs dstOffs linePos| |
|
635 |
||
636 |
actionLabels := labelString. |
|
637 |
actionLines := lineArray. |
|
638 |
actionValues := valueArray. |
|
639 |
||
640 |
labelArray := labelString asStringCollection. |
|
641 |
||
642 |
convertedLabels := Array new:(labelArray size + lineArray size). |
|
643 |
argArray := Array new:(labelArray size + lineArray size). |
|
644 |
||
645 |
offs := 1. |
|
646 |
dstOffs := 1. |
|
647 |
1 to:lineArray size do:[:lineIndex | |
|
648 |
linePos := lineArray at:lineIndex. |
|
649 |
[offs <= linePos] whileTrue:[ |
|
650 |
convertedLabels at:dstOffs put:(labelArray at:offs). |
|
651 |
argArray at:dstOffs put:offs. |
|
652 |
offs := offs + 1. |
|
653 |
dstOffs := dstOffs + 1 |
|
654 |
]. |
|
655 |
convertedLabels at:dstOffs put:'-'. |
|
656 |
argArray at:dstOffs put:nil. |
|
657 |
dstOffs := dstOffs + 1 |
|
658 |
]. |
|
659 |
[offs <= labelArray size] whileTrue:[ |
|
660 |
convertedLabels at:dstOffs put:(labelArray at:offs). |
|
661 |
argArray at:dstOffs put:offs. |
|
662 |
offs := offs + 1. |
|
663 |
dstOffs := dstOffs + 1 |
|
664 |
]. |
|
665 |
self menu:(MenuView |
|
666 |
labels:convertedLabels |
|
667 |
selectors:nil |
|
668 |
args:argArray |
|
669 |
receiver:nil |
|
670 |
in:self) |
|
671 |
! |
|
672 |
||
673 |
lines |
|
674 |
"st-80 compatibility" |
|
675 |
||
676 |
^ actionLines |
|
677 |
! |
|
678 |
||
679 |
numberOfItems |
|
680 |
"return the number of items in the menu" |
|
681 |
||
682 |
actionLabels notNil ifTrue:[ |
|
683 |
^ actionLabels asStringCollection size |
|
684 |
]. |
|
685 |
^ menuView list size |
|
686 |
! |
|
687 |
||
688 |
remove:indexOrName |
|
689 |
"remove a menu entry" |
|
690 |
||
691 |
menuView remove:indexOrName |
|
692 |
! |
|
693 |
||
694 |
subMenuAt:indexOrName put:aMenu |
|
695 |
"define a submenu to be shown for entry indexOrName" |
|
696 |
||
697 |
" |
|
698 |
aMenu hideOnLeave:true. |
|
699 |
" |
|
700 |
menuView subMenuAt:indexOrName put:aMenu. |
|
701 |
"tell the submenu to notify me when action is performed" |
|
702 |
aMenu superMenu:self. |
|
703 |
||
704 |
" |
|
705 |
|v m someObject| |
|
706 |
||
707 |
v := View new. |
|
708 |
m := PopUpMenu labels:#('1' '2' '3') |
|
709 |
selectors:#(one two nil) |
|
710 |
receiver:someObject |
|
711 |
for:nil. |
|
712 |
m subMenuAt:3 put:(PopUpMenu |
|
713 |
labels:#('a' 'b' 'c') |
|
714 |
selectors:#(a b c) |
|
715 |
receiver:someObject |
|
716 |
for:nil). |
|
717 |
v middleButtonMenu:m. |
|
718 |
v realize |
|
719 |
" |
|
720 |
! |
|
721 |
||
722 |
values |
|
723 |
"st-80 compatibility" |
|
724 |
||
725 |
^ actionValues |
|
726 |
! |
|
727 |
||
728 |
values:aValueArray |
|
729 |
"st-80 compatibility" |
|
730 |
||
731 |
actionValues := aValueArray |
|
732 |
! ! |
|
733 |
||
734 |
!PopUpMenu methodsFor:'accessing-look'! |
|
735 |
||
736 |
font:aFont |
|
737 |
menuView font:aFont |
|
738 |
! |
|
739 |
||
740 |
viewBackground:aColor |
|
741 |
"this is a kludge and will vanish ..." |
|
742 |
||
743 |
super viewBackground:aColor. |
|
744 |
menuView viewBackground:aColor |
|
745 |
! ! |
|
746 |
||
747 |
!PopUpMenu methodsFor:'accessing-mvc'! |
|
748 |
||
749 |
changeMessage |
|
750 |
"forward from my menu" |
|
751 |
||
752 |
^ menuView changeMessage |
|
753 |
! |
|
754 |
||
755 |
changeMessage:aSymbol |
|
756 |
"forward to my menu" |
|
757 |
||
758 |
menuView changeMessage:aSymbol |
|
759 |
! |
|
760 |
||
761 |
model |
|
762 |
^ menuView model |
|
763 |
! |
|
764 |
||
765 |
model:aModel |
|
766 |
menuView model:aModel |
|
767 |
! ! |
|
768 |
||
769 |
!PopUpMenu methodsFor:'deactivation'! |
|
770 |
||
771 |
hide |
|
772 |
"hide the menu - if there are any pop-up-submenus, hide them also" |
|
773 |
||
774 |
menuView hideSubmenu. |
|
775 |
windowGroup notNil ifTrue:[ |
|
776 |
windowGroup removeView:menuView. |
|
777 |
]. |
|
778 |
super hide. |
|
779 |
menuView superMenu notNil ifTrue:[ |
|
780 |
menuView superMenu regainControl |
|
781 |
]. |
|
782 |
! ! |
|
783 |
||
70 | 784 |
!PopUpMenu methodsFor:'event handling'! |
0 | 785 |
|
161 | 786 |
buttonMotion:state x:x y:y |
70 | 787 |
|p superMenu| |
7 | 788 |
|
161 | 789 |
state == 0 ifTrue:[^ self]. |
790 |
||
38 | 791 |
((x >= 0) and:[x < width]) ifTrue:[ |
59 | 792 |
((y >= 0) and:[y < height]) ifTrue:[ |
105 | 793 |
hideOnRelease := true. |
161 | 794 |
menuView buttonMotion:state x:x y:y. |
59 | 795 |
^ self |
796 |
] |
|
0 | 797 |
]. |
7 | 798 |
|
799 |
"outside of myself" |
|
70 | 800 |
superMenu := menuView superMenu. |
801 |
superMenu notNil ifTrue:[ |
|
59 | 802 |
p := device translatePoint:(x @ y) |
803 |
from:drawableId |
|
804 |
to:(menuView superMenu id). |
|
161 | 805 |
superMenu buttonMotion:state x:p x y:p y |
7 | 806 |
]. |
807 |
||
808 |
menuView subMenuShown isNil ifTrue:[ |
|
161 | 809 |
menuView pointerLeave:state. |
7 | 810 |
]. |
811 |
||
0 | 812 |
hideOnLeave ifTrue:[ |
59 | 813 |
self hide |
38 | 814 |
]. |
0 | 815 |
! |
816 |
||
105 | 817 |
buttonPress:button x:x y:y |
818 |
hideOnRelease ifTrue:[ |
|
819 |
self hide. |
|
820 |
" |
|
821 |
menuView buttonRelease:button x:x y:y. |
|
822 |
" |
|
823 |
menuView superMenu notNil ifTrue:[ |
|
824 |
menuView superMenu submenuTriggered |
|
825 |
]. |
|
826 |
menuView buttonRelease:button x:x y:y. |
|
827 |
] ifFalse:[ |
|
828 |
hideOnRelease := true. |
|
829 |
((x >= 0) and:[x < width]) ifTrue:[ |
|
830 |
((y >= 0) and:[y < height]) ifTrue:[ |
|
831 |
menuView buttonPress:button x:x y:y. |
|
832 |
^ self |
|
833 |
] |
|
834 |
]. |
|
835 |
]. |
|
836 |
! |
|
837 |
||
0 | 838 |
buttonRelease:button x:x y:y |
105 | 839 |
hideOnRelease ifFalse:[ |
840 |
^ self |
|
841 |
]. |
|
842 |
||
0 | 843 |
self hide. |
7 | 844 |
" |
845 |
menuView buttonRelease:button x:x y:y. |
|
846 |
" |
|
847 |
menuView superMenu notNil ifTrue:[ |
|
59 | 848 |
menuView superMenu submenuTriggered |
7 | 849 |
]. |
850 |
menuView buttonRelease:button x:x y:y. |
|
112 | 851 |
! |
852 |
||
853 |
keyPress:key x:x y:y |
|
854 |
"/ hideOnRelease := true. |
|
855 |
menuView keyPress:key x:x y:y. |
|
202 | 856 |
! |
857 |
||
858 |
pointerEnter:state x:x y:y |
|
859 |
"catch quick release of button" |
|
860 |
||
861 |
hideOnLeave ifTrue:[ |
|
862 |
state == 0 ifTrue:[^ self hide]. |
|
863 |
] |
|
864 |
! |
|
865 |
||
866 |
pointerLeave:state |
|
867 |
"/ menuView pointerLeave:state. |
|
868 |
"/ hideOnLeave ifTrue:[ |
|
869 |
"/ self hide |
|
870 |
"/ ]. |
|
871 |
"/ menuView superMenu notNil ifTrue:[ |
|
872 |
"/ menuView superMenu regainControl |
|
873 |
"/ ] |
|
0 | 874 |
! ! |
202 | 875 |
|
876 |
!PopUpMenu methodsFor:'initialization'! |
|
877 |
||
878 |
initEvents |
|
879 |
super initEvents. |
|
880 |
self enableEnterLeaveEvents. |
|
881 |
self enableMotionEvents. |
|
882 |
! |
|
883 |
||
884 |
initialize |
|
885 |
super initialize. |
|
886 |
||
887 |
memorize := true. |
|
888 |
hideOnLeave := false. |
|
889 |
defaultHideOnRelease := DefaultHideOnRelease. |
|
890 |
! ! |
|
891 |
||
892 |
!PopUpMenu methodsFor:'menuview messages'! |
|
893 |
||
894 |
doesNotUnderstand:aMessage |
|
895 |
"forward all menu-view messages" |
|
896 |
||
897 |
(menuView respondsTo:(aMessage selector)) ifTrue:[ |
|
898 |
^ aMessage sendTo:menuView |
|
899 |
]. |
|
900 |
^ super doesNotUnderstand:aMessage |
|
901 |
! ! |
|
902 |
||
903 |
!PopUpMenu methodsFor:'private accessing'! |
|
904 |
||
905 |
menu:aMenu |
|
906 |
"set the actual menu" |
|
907 |
||
908 |
menuView := aMenu. |
|
909 |
menuView origin:(margin @ margin). |
|
910 |
menuView borderWidth:0. |
|
911 |
menuView masterView:self |
|
912 |
! |
|
913 |
||
914 |
menuView |
|
915 |
"return the actual menu" |
|
916 |
||
917 |
^ menuView |
|
918 |
! |
|
919 |
||
920 |
superMenu:aMenu |
|
921 |
"return the superMenu" |
|
922 |
||
923 |
menuView superMenu:aMenu |
|
924 |
! ! |
|
925 |
||
926 |
!PopUpMenu methodsFor:'realization'! |
|
927 |
||
928 |
fixSize |
|
929 |
"called right before the view is made visible. |
|
930 |
adjust my size to the size of the actual menu" |
|
931 |
||
932 |
|extra newWidth newHeight| |
|
933 |
||
934 |
extra := margin * 2. |
|
935 |
menuView resizeIfChanged. |
|
936 |
newWidth := menuView width + extra. |
|
937 |
newHeight := menuView height + extra. |
|
938 |
((newWidth ~~ width) or:[newHeight ~~ height]) ifTrue:[ |
|
939 |
self extent:(menuView width + extra) @ (menuView height + extra) |
|
940 |
]. |
|
941 |
super fixSize |
|
942 |
! |
|
943 |
||
944 |
realize |
|
945 |
menuView deselectWithoutRedraw. |
|
946 |
super realize. |
|
947 |
hideOnRelease := defaultHideOnRelease. |
|
948 |
! ! |
|
949 |
||
205 | 950 |
!PopUpMenu class methodsFor:'documentation'! |
951 |
||
952 |
version |
|
284 | 953 |
^ '$Header: /cvs/stx/stx/libwidg/PopUpMenu.st,v 1.31 1996-01-14 14:21:47 cg Exp $' |
205 | 954 |
! ! |