equal
deleted
inserted
replaced
36 documentation |
36 documentation |
37 " |
37 " |
38 ClickMenuViews are like menuViews, but deselects automatically |
38 ClickMenuViews are like menuViews, but deselects automatically |
39 after clicked on an entry. |
39 after clicked on an entry. |
40 |
40 |
41 ClickMenuViews can be used as static menus (i.e. non-popping); |
41 ClickMenuViews can be used as persistent menus (i.e. non-popping); |
42 for example, the old launcher uses an instance of ClickMenuView. |
42 for example, the old launcher uses an instance of ClickMenuView. |
|
43 |
|
44 CAVEAT: |
|
45 to support a better NextStep look, some popUpMenus should |
|
46 become automatically a clickMenu ... (really ?) |
43 |
47 |
44 [author:] |
48 [author:] |
45 Claus Gittinger |
49 Claus Gittinger |
|
50 |
|
51 [see also:] |
|
52 PopUpMenu PullDownMenu |
|
53 MenuView |
46 " |
54 " |
47 ! |
55 ! |
48 |
56 |
49 examples |
57 examples |
50 " |
58 " |
51 stupid example: |
59 stupid example: |
52 |
60 [exBegin] |
53 |top menu1 menu2 application| |
61 |top menu1 menu2 application| |
54 |
62 |
55 application := Plug new. |
63 application := Plug new. |
56 application respondTo:#foo |
64 application respondTo:#foo |
57 with:[Transcript showCr:'foo']. |
65 with:[Transcript showCr:'foo']. |
84 bar |
92 bar |
85 baz |
93 baz |
86 nil |
94 nil |
87 moreFoo |
95 moreFoo |
88 nil |
96 nil |
89 destroy |
97 quit |
90 ) |
98 ) |
91 receiver:application. |
99 receiver:application. |
92 |
100 |
93 menu1 subMenuAt:#moreFoo put:( |
101 menu1 subMenuAt:#moreFoo put:( |
94 PopUpMenu labels:#( |
102 PopUpMenu labels:#( |
103 ) |
111 ) |
104 ). |
112 ). |
105 menu1 resize; open. |
113 menu1 resize; open. |
106 top add:menu1. |
114 top add:menu1. |
107 top openWithExtent:(menu1 extent). |
115 top openWithExtent:(menu1 extent). |
108 |
116 [exEnd] |
109 |
|
110 |
|
111 " |
117 " |
112 ! ! |
118 ! ! |
113 |
119 |
114 !ClickMenuView methodsFor:'event handling'! |
120 !ClickMenuView methodsFor:'event handling'! |
115 |
121 |
116 buttonRelease:button x:x y:y |
122 buttonRelease:button x:x y:y |
|
123 "redefined to automatically deselect on release" |
|
124 |
117 super buttonRelease:button x:x y:y. |
125 super buttonRelease:button x:x y:y. |
118 self selection:nil |
126 self selection:nil |
|
127 |
|
128 "Modified: 27.4.1996 / 14:42:07 / cg" |
119 ! ! |
129 ! ! |
120 |
130 |
121 !ClickMenuView class methodsFor:'documentation'! |
131 !ClickMenuView class methodsFor:'documentation'! |
122 |
132 |
123 version |
133 version |
124 ^ '$Header: /cvs/stx/stx/libwidg/ClickMenuView.st,v 1.10 1996-04-25 17:30:13 cg Exp $' |
134 ^ '$Header: /cvs/stx/stx/libwidg/ClickMenuView.st,v 1.11 1996-04-27 18:20:57 cg Exp $' |
125 ! ! |
135 ! ! |