author | Claus Gittinger <cg@exept.de> |
Thu, 23 Nov 1995 03:26:58 +0100 | |
changeset 197 | 00927189c882 |
parent 174 | d80a6cc3f9b2 |
child 202 | 01f3cbb8e20e |
permissions | -rw-r--r-- |
0 | 1 |
" |
4 | 2 |
COPYRIGHT (c) 1991 by Claus Gittinger |
127 | 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 |
MenuView subclass:#ClickMenuView |
|
14 |
instanceVariableNames:'' |
|
15 |
classVariableNames:'' |
|
16 |
poolDictionaries:'' |
|
17 |
category:'Views-Menus' |
|
18 |
! |
|
19 |
||
38 | 20 |
!ClickMenuView class methodsFor:'documentation'! |
21 |
||
22 |
copyright |
|
23 |
" |
|
24 |
COPYRIGHT (c) 1991 by Claus Gittinger |
|
127 | 25 |
All Rights Reserved |
0 | 26 |
|
38 | 27 |
This software is furnished under a license and may be used |
28 |
only in accordance with the terms of that license and with the |
|
29 |
inclusion of the above copyright notice. This software may not |
|
30 |
be provided or otherwise made available to, or used by, any |
|
31 |
other person. No title to or ownership of the software is |
|
32 |
hereby transferred. |
|
33 |
" |
|
34 |
! |
|
35 |
||
36 |
version |
|
174
d80a6cc3f9b2
uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents:
127
diff
changeset
|
37 |
^ '$Header: /cvs/stx/stx/libwidg/Attic/ClckMenuV.st,v 1.6 1995-11-11 16:19:18 cg Exp $' |
38 | 38 |
! |
39 |
||
40 |
documentation |
|
41 |
" |
|
42 |
ClickMenuViews are like menuViews, but deselects automatically |
|
43 |
after clicked on an entry. |
|
127 | 44 |
ClickMenuViews can be used as static menus (i.e. non-popping); |
45 |
for example, the old launcher uses an instance of ClickMenuView. |
|
46 |
" |
|
47 |
! |
|
48 |
||
49 |
examples |
|
50 |
" |
|
51 |
|top menu1 menu2| |
|
52 |
||
53 |
top := StandardSystemView new. |
|
54 |
menu1 := ClickMenuView |
|
55 |
labels:#( |
|
56 |
'foo' |
|
57 |
'bar' |
|
58 |
'baz ' |
|
59 |
'-' |
|
60 |
'more foo' |
|
61 |
'=' |
|
62 |
'quit' |
|
63 |
) |
|
64 |
selectors:#( |
|
65 |
foo |
|
66 |
bar |
|
67 |
baz |
|
68 |
nil |
|
69 |
moreFoo |
|
70 |
nil |
|
71 |
destroy |
|
72 |
) |
|
73 |
receiver:top. |
|
74 |
||
75 |
menu1 subMenuAt:#moreFoo put:( |
|
76 |
PopUpMenu labels:#( |
|
77 |
'more1 ' |
|
78 |
'more2 ' |
|
79 |
'more3' |
|
80 |
) |
|
81 |
selectors:#( |
|
82 |
more1 |
|
83 |
more2 |
|
84 |
more3 |
|
85 |
) |
|
86 |
receiver:self |
|
87 |
). |
|
88 |
menu1 resize; open. |
|
89 |
top add:menu1. |
|
90 |
top openWithExtent:(menu1 extent). |
|
38 | 91 |
" |
92 |
! ! |
|
0 | 93 |
|
94 |
!ClickMenuView methodsFor:'event handling'! |
|
95 |
||
96 |
buttonRelease:button x:x y:y |
|
97 |
super buttonRelease:button x:x y:y. |
|
98 |
self selection:nil |
|
99 |
! ! |