author | Claus Gittinger <cg@exept.de> |
Fri, 12 Oct 2018 14:25:13 +0200 | |
changeset 5923 | f14f15fe8894 |
parent 5889 | 42b2e8de59ef |
child 5949 | 10935e855698 |
permissions | -rw-r--r-- |
1301
93a3ec8c339c
OOPS - stefan what happened to your checkin (garbage)
Claus Gittinger <cg@exept.de>
parents:
1294
diff
changeset
|
1 |
" |
332 | 2 |
COPYRIGHT (c) 1996 by eXept Software AG / Claus Gittinger |
3 |
All Rights Reserved |
|
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 |
" |
|
1884
bf33562ea53b
use rootWindowId (save a message send)
Claus Gittinger <cg@exept.de>
parents:
1696
diff
changeset
|
12 |
"{ Package: 'stx:libwidg2' }" |
bf33562ea53b
use rootWindowId (save a message send)
Claus Gittinger <cg@exept.de>
parents:
1696
diff
changeset
|
13 |
|
4824 | 14 |
"{ NameSpace: Smalltalk }" |
15 |
||
129 | 16 |
View subclass:#ComboView |
3312
ad1dcdaa7ba7
Support for selection via mouse wheel
Stefan Vogel <sv@exept.de>
parents:
3290
diff
changeset
|
17 |
instanceVariableNames:'field pullDownButton list listHolder listMsg action resizableMenu |
4187 | 18 |
currentIndex comboMenuHolder comboMenuMessage' |
2950 | 19 |
classVariableNames:'DefaultButtonForm ComboButtonForms' |
1306
56e90a9e5da1
renambe #enableStateChange to #enableStateChanged
Claus Gittinger <cg@exept.de>
parents:
1301
diff
changeset
|
20 |
poolDictionaries:'' |
56e90a9e5da1
renambe #enableStateChange to #enableStateChanged
Claus Gittinger <cg@exept.de>
parents:
1301
diff
changeset
|
21 |
category:'Views-Interactors' |
129 | 22 |
! |
23 |
||
263
865b7d99d3f5
added an example for a menu-pull-hook
Claus Gittinger <cg@exept.de>
parents:
247
diff
changeset
|
24 |
!ComboView class methodsFor:'documentation'! |
129 | 25 |
|
332 | 26 |
copyright |
27 |
" |
|
28 |
COPYRIGHT (c) 1996 by eXept Software AG / Claus Gittinger |
|
29 |
All Rights Reserved |
|
30 |
||
31 |
This software is furnished under a license and may be used |
|
32 |
only in accordance with the terms of that license and with the |
|
33 |
inclusion of the above copyright notice. This software may not |
|
34 |
be provided or otherwise made available to, or used by, any |
|
35 |
other person. No title to or ownership of the software is |
|
36 |
hereby transferred. |
|
37 |
" |
|
38 |
||
39 |
||
40 |
! |
|
41 |
||
129 | 42 |
documentation |
43 |
" |
|
44 |
A ComboView combines some field (typically an enterField or Label) |
|
45 |
with a drop down list of default inputs; |
|
46 |
ComboView is abstract, providing protocol common to ComboBoxView and |
|
47 |
ComboListView. See documentation & examples there. |
|
274
92b51554b1d7
allow form to be specified by styleSheet
Claus Gittinger <cg@exept.de>
parents:
269
diff
changeset
|
48 |
|
92b51554b1d7
allow form to be specified by styleSheet
Claus Gittinger <cg@exept.de>
parents:
269
diff
changeset
|
49 |
[author:] |
92b51554b1d7
allow form to be specified by styleSheet
Claus Gittinger <cg@exept.de>
parents:
269
diff
changeset
|
50 |
Claus Gittinger |
92b51554b1d7
allow form to be specified by styleSheet
Claus Gittinger <cg@exept.de>
parents:
269
diff
changeset
|
51 |
|
3312
ad1dcdaa7ba7
Support for selection via mouse wheel
Stefan Vogel <sv@exept.de>
parents:
3290
diff
changeset
|
52 |
[instance variables:] |
ad1dcdaa7ba7
Support for selection via mouse wheel
Stefan Vogel <sv@exept.de>
parents:
3290
diff
changeset
|
53 |
currentIndex Integer index into the list, that is currently selected |
ad1dcdaa7ba7
Support for selection via mouse wheel
Stefan Vogel <sv@exept.de>
parents:
3290
diff
changeset
|
54 |
|
274
92b51554b1d7
allow form to be specified by styleSheet
Claus Gittinger <cg@exept.de>
parents:
269
diff
changeset
|
55 |
[see also:] |
92b51554b1d7
allow form to be specified by styleSheet
Claus Gittinger <cg@exept.de>
parents:
269
diff
changeset
|
56 |
PopUpList |
1281 | 57 |
ComboListView ComboBoxView ExtendedComboBox |
274
92b51554b1d7
allow form to be specified by styleSheet
Claus Gittinger <cg@exept.de>
parents:
269
diff
changeset
|
58 |
PullDownMenu Label EntryField |
129 | 59 |
" |
60 |
! |
|
61 |
||
62 |
examples |
|
63 |
" |
|
308 | 64 |
see examples in ComboListView and ComboBoxView |
129 | 65 |
" |
66 |
! ! |
|
67 |
||
263
865b7d99d3f5
added an example for a menu-pull-hook
Claus Gittinger <cg@exept.de>
parents:
247
diff
changeset
|
68 |
!ComboView class methodsFor:'defaults'! |
129 | 69 |
|
5889 | 70 |
activeForm |
71 |
<resource: #style (#'comboView.activeDownForm' |
|
72 |
#'comboView.activeDownFormFile')> |
|
73 |
||
74 |
^ self formForKey:#activeLogo styleFormKey:#'comboView.activeDownForm' styleFilenameKey:#'comboView.activeDownFormFile' |
|
75 |
||
76 |
"Created: / 17-08-2018 / 17:21:52 / Claus Gittinger" |
|
77 |
! |
|
78 |
||
129 | 79 |
buttonForm |
282 | 80 |
"return the pull-buttons image" |
81 |
||
1344
100e4d309847
support for disabled-image in pull-button
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
82 |
<resource: #style (#'comboView.downForm' |
100e4d309847
support for disabled-image in pull-button
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
83 |
#'comboView.downFormFile')> |
274
92b51554b1d7
allow form to be specified by styleSheet
Claus Gittinger <cg@exept.de>
parents:
269
diff
changeset
|
84 |
|
276
8f90ed6c37bc
allow either fileName or form to be given by styleSheet
Claus Gittinger <cg@exept.de>
parents:
274
diff
changeset
|
85 |
|fileName form| |
129 | 86 |
|
525 | 87 |
DefaultButtonForm notNil ifTrue:[ |
88 |
^ DefaultButtonForm |
|
89 |
]. |
|
90 |
||
1334 | 91 |
form := StyleSheet at:#'comboView.downForm'. |
274
92b51554b1d7
allow form to be specified by styleSheet
Claus Gittinger <cg@exept.de>
parents:
269
diff
changeset
|
92 |
form isNil ifTrue:[ |
1334 | 93 |
fileName := StyleSheet at:#'comboView.downFormFile' "default:'ComboDn.14.xbm'". |
1622
ea4d9baf568f
try bitmaps in package directory
Claus Gittinger <cg@exept.de>
parents:
1560
diff
changeset
|
94 |
fileName notNil ifTrue:[ |
1633 | 95 |
form := Smalltalk imageFromFileNamed:fileName forClass:self. |
2174
ab242e29da64
button init code made publicly available
Claus Gittinger <cg@exept.de>
parents:
2157
diff
changeset
|
96 |
form isNil ifTrue:[ |
ab242e29da64
button init code made publicly available
Claus Gittinger <cg@exept.de>
parents:
2157
diff
changeset
|
97 |
form := Smalltalk imageFromFileNamed:fileName inPackage:'stx:libwidg'. |
ab242e29da64
button init code made publicly available
Claus Gittinger <cg@exept.de>
parents:
2157
diff
changeset
|
98 |
] |
1622
ea4d9baf568f
try bitmaps in package directory
Claus Gittinger <cg@exept.de>
parents:
1560
diff
changeset
|
99 |
]. |
274
92b51554b1d7
allow form to be specified by styleSheet
Claus Gittinger <cg@exept.de>
parents:
269
diff
changeset
|
100 |
]. |
92b51554b1d7
allow form to be specified by styleSheet
Claus Gittinger <cg@exept.de>
parents:
269
diff
changeset
|
101 |
form isNil ifTrue:[ |
5383 | 102 |
form := self defaultButtonForm. |
274
92b51554b1d7
allow form to be specified by styleSheet
Claus Gittinger <cg@exept.de>
parents:
269
diff
changeset
|
103 |
]. |
92b51554b1d7
allow form to be specified by styleSheet
Claus Gittinger <cg@exept.de>
parents:
269
diff
changeset
|
104 |
form notNil ifTrue:[ |
525 | 105 |
form := DefaultButtonForm := form onDevice:Display. |
106 |
^ form |
|
274
92b51554b1d7
allow form to be specified by styleSheet
Claus Gittinger <cg@exept.de>
parents:
269
diff
changeset
|
107 |
]. |
92b51554b1d7
allow form to be specified by styleSheet
Claus Gittinger <cg@exept.de>
parents:
269
diff
changeset
|
108 |
^ nil |
92b51554b1d7
allow form to be specified by styleSheet
Claus Gittinger <cg@exept.de>
parents:
269
diff
changeset
|
109 |
|
1344
100e4d309847
support for disabled-image in pull-button
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
110 |
"Modified: / 28.4.1999 / 12:49:42 / cg" |
304 | 111 |
! |
112 |
||
3839
d269a10c33c9
comment/format in: #comboButtonFor:
Claus Gittinger <cg@exept.de>
parents:
3836
diff
changeset
|
113 |
comboButtonFor:aComboView |
5889 | 114 |
<resource: #style (#'comboView.button.activeForegroundColor' |
2176 | 115 |
#'comboView.button.activeBackgroundColor' |
2174
ab242e29da64
button init code made publicly available
Claus Gittinger <cg@exept.de>
parents:
2157
diff
changeset
|
116 |
#'comboView.button.activeLevel' |
ab242e29da64
button init code made publicly available
Claus Gittinger <cg@exept.de>
parents:
2157
diff
changeset
|
117 |
#'comboView.button.passiveLevel' )> |
ab242e29da64
button init code made publicly available
Claus Gittinger <cg@exept.de>
parents:
2157
diff
changeset
|
118 |
|
5889 | 119 |
|pullDownButton logo disabledLogo activeLogo enteredLogo lvl clr| |
2174
ab242e29da64
button init code made publicly available
Claus Gittinger <cg@exept.de>
parents:
2157
diff
changeset
|
120 |
|
3839
d269a10c33c9
comment/format in: #comboButtonFor:
Claus Gittinger <cg@exept.de>
parents:
3836
diff
changeset
|
121 |
pullDownButton := ComboBoxButton in:aComboView. |
2174
ab242e29da64
button init code made publicly available
Claus Gittinger <cg@exept.de>
parents:
2157
diff
changeset
|
122 |
pullDownButton controller beTriggerOnDown. |
2785
3c705bdd5792
Do not use obsolete message #logo:
Stefan Vogel <sv@exept.de>
parents:
2750
diff
changeset
|
123 |
pullDownButton label:(logo := self buttonForm). |
2174
ab242e29da64
button init code made publicly available
Claus Gittinger <cg@exept.de>
parents:
2157
diff
changeset
|
124 |
|
2950 | 125 |
ComboButtonForms isNil ifTrue:[ |
126 |
ComboButtonForms := IdentityDictionary new. |
|
127 |
]. |
|
128 |
||
5889 | 129 |
disabledLogo := self disabledForm. |
130 |
activeLogo := self activeForm. |
|
131 |
enteredLogo := self enteredForm. |
|
2950 | 132 |
|
2176 | 133 |
disabledLogo notNil ifTrue:[ |
134 |
pullDownButton passiveLogo:logo. |
|
135 |
pullDownButton activeLogo:logo. |
|
136 |
pullDownButton disabledLogo:disabledLogo. |
|
2174
ab242e29da64
button init code made publicly available
Claus Gittinger <cg@exept.de>
parents:
2157
diff
changeset
|
137 |
]. |
2950 | 138 |
|
2174
ab242e29da64
button init code made publicly available
Claus Gittinger <cg@exept.de>
parents:
2157
diff
changeset
|
139 |
pullDownButton showLamp:false. |
ab242e29da64
button init code made publicly available
Claus Gittinger <cg@exept.de>
parents:
2157
diff
changeset
|
140 |
|
2176 | 141 |
activeLogo notNil ifTrue:[ |
142 |
pullDownButton activeLogo:activeLogo. |
|
143 |
pullDownButton passiveLogo:logo. |
|
2785
3c705bdd5792
Do not use obsolete message #logo:
Stefan Vogel <sv@exept.de>
parents:
2750
diff
changeset
|
144 |
pullDownButton label:logo. |
2176 | 145 |
]. |
146 |
||
147 |
enteredLogo notNil ifTrue:[ |
|
148 |
pullDownButton enteredLogo:enteredLogo. |
|
149 |
]. |
|
150 |
||
2174
ab242e29da64
button init code made publicly available
Claus Gittinger <cg@exept.de>
parents:
2157
diff
changeset
|
151 |
(lvl := StyleSheet at:#'comboView.button.activeLevel') notNil ifTrue:[ |
ab242e29da64
button init code made publicly available
Claus Gittinger <cg@exept.de>
parents:
2157
diff
changeset
|
152 |
pullDownButton activeLevel:lvl |
ab242e29da64
button init code made publicly available
Claus Gittinger <cg@exept.de>
parents:
2157
diff
changeset
|
153 |
]. |
ab242e29da64
button init code made publicly available
Claus Gittinger <cg@exept.de>
parents:
2157
diff
changeset
|
154 |
(lvl := StyleSheet at:#'comboView.button.passiveLevel') notNil ifTrue:[ |
ab242e29da64
button init code made publicly available
Claus Gittinger <cg@exept.de>
parents:
2157
diff
changeset
|
155 |
pullDownButton passiveLevel:lvl |
ab242e29da64
button init code made publicly available
Claus Gittinger <cg@exept.de>
parents:
2157
diff
changeset
|
156 |
]. |
ab242e29da64
button init code made publicly available
Claus Gittinger <cg@exept.de>
parents:
2157
diff
changeset
|
157 |
|
2176 | 158 |
(clr := StyleSheet colorAt:#'comboView.button.activeForegroundColor') notNil ifTrue:[ |
159 |
pullDownButton activeForegroundColor:clr |
|
160 |
]. |
|
161 |
(clr := StyleSheet colorAt:#'comboView.button.activeBackgroundColor') notNil ifTrue:[ |
|
162 |
pullDownButton activeBackgroundColor:clr |
|
163 |
]. |
|
164 |
||
2174
ab242e29da64
button init code made publicly available
Claus Gittinger <cg@exept.de>
parents:
2157
diff
changeset
|
165 |
pullDownButton activeLevel == pullDownButton passiveLevel ifTrue:[ |
ab242e29da64
button init code made publicly available
Claus Gittinger <cg@exept.de>
parents:
2157
diff
changeset
|
166 |
pullDownButton activeLevel:0. |
ab242e29da64
button init code made publicly available
Claus Gittinger <cg@exept.de>
parents:
2157
diff
changeset
|
167 |
]. |
ab242e29da64
button init code made publicly available
Claus Gittinger <cg@exept.de>
parents:
2157
diff
changeset
|
168 |
^ pullDownButton. |
5889 | 169 |
|
170 |
"Modified: / 17-08-2018 / 17:23:38 / Claus Gittinger" |
|
2174
ab242e29da64
button init code made publicly available
Claus Gittinger <cg@exept.de>
parents:
2157
diff
changeset
|
171 |
! |
ab242e29da64
button init code made publicly available
Claus Gittinger <cg@exept.de>
parents:
2157
diff
changeset
|
172 |
|
415 | 173 |
defaultFont |
174 |
"/ for now - should come from the styleSheet |
|
175 |
||
4567 | 176 |
^ EditField defaultFont. |
177 |
"/ ^ SelectionInListView defaultFont. |
|
415 | 178 |
|
179 |
"Created: 4.6.1997 / 15:44:17 / cg" |
|
180 |
! |
|
181 |
||
304 | 182 |
defaultListMessage |
183 |
^ #list |
|
184 |
||
185 |
"Created: 26.2.1997 / 19:34:50 / cg" |
|
605 | 186 |
! |
187 |
||
5889 | 188 |
disabledForm |
189 |
<resource: #style (#'comboView.disabledDownForm' |
|
190 |
#'comboView.disabledDownFormFile')> |
|
191 |
||
192 |
^ self formForKey:#disabledLogo styleFormKey:#'comboView.disabledDownForm' styleFilenameKey:#'comboView.disabledDownFormFile' |
|
193 |
||
194 |
"Created: / 17-08-2018 / 17:20:34 / Claus Gittinger" |
|
195 |
! |
|
196 |
||
197 |
enteredForm |
|
198 |
<resource: #style (#'comboView.enteredDownForm' |
|
199 |
#'comboView.enteredDownFormFile')> |
|
200 |
||
201 |
^ self formForKey:#enteredLogo styleFormKey:#'comboView.enteredDownForm' styleFilenameKey:#'comboView.enteredDownFormFile' |
|
202 |
||
203 |
"Created: / 17-08-2018 / 17:22:43 / Claus Gittinger" |
|
204 |
! |
|
205 |
||
605 | 206 |
updateStyleCache |
3842 | 207 |
"flush the forms cache" |
208 |
||
2950 | 209 |
DefaultButtonForm := ComboButtonForms := nil. |
605 | 210 |
|
211 |
"Created: / 3.11.1997 / 15:28:48 / cg" |
|
304 | 212 |
! ! |
213 |
||
5383 | 214 |
!ComboView class methodsFor:'image specs'! |
215 |
||
216 |
defaultButtonForm |
|
217 |
"This resource specification was automatically generated |
|
218 |
by the ImageEditor of ST/X." |
|
219 |
||
220 |
"Do not manually edit this!! If it is corrupted, |
|
221 |
the ImageEditor may not be able to read the specification." |
|
222 |
||
223 |
" |
|
224 |
self defaultButtonForm inspect |
|
225 |
ImageEditor openOnClass:self andSelector:#defaultButtonForm |
|
226 |
Icon flushCachedIcons |
|
227 |
" |
|
228 |
||
229 |
<resource: #image> |
|
230 |
||
231 |
^Icon |
|
232 |
constantNamed:'ComboView class defaultButtonForm' |
|
233 |
ifAbsentPut:[(Depth1Image width:12 height:12) bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@') |
|
234 |
colorMapFromArray:#[0 0 0] |
|
235 |
mask:((ImageMask width:12 height:12) bits:(ByteArray fromPackedString:'@@<OC0<OC0=?;3?OG8<OC0XO@@=?;0@O'); yourself); yourself] |
|
236 |
! ! |
|
237 |
||
5889 | 238 |
!ComboView class methodsFor:'private'! |
239 |
||
240 |
formForKey:key styleFormKey:styleFormKey styleFilenameKey:styleFilenameKey |
|
241 |
ComboButtonForms isNil ifTrue:[ |
|
242 |
ComboButtonForms := IdentityDictionary new. |
|
243 |
]. |
|
244 |
||
245 |
^ ComboButtonForms |
|
246 |
at:key |
|
247 |
ifAbsentPut:[ |
|
248 |
|logo fn| |
|
249 |
logo := StyleSheet at:styleFormKey. |
|
250 |
logo isNil ifTrue:[ |
|
251 |
fn := StyleSheet at:styleFilenameKey. |
|
252 |
fn notNil ifTrue:[ |
|
253 |
logo := Smalltalk imageFromFileNamed:fn forClass:self. |
|
254 |
logo isNil ifTrue:[ |
|
255 |
logo := Smalltalk imageFromFileNamed:fn inPackage:'stx:libwidg'. |
|
256 |
] |
|
257 |
] |
|
258 |
]. |
|
259 |
logo |
|
260 |
]. |
|
261 |
||
262 |
"Created: / 17-08-2018 / 17:25:10 / Claus Gittinger" |
|
263 |
! ! |
|
264 |
||
4972 | 265 |
!ComboView class methodsFor:'queries'! |
266 |
||
267 |
isAbstract |
|
268 |
"Return if this class is an abstract class. |
|
269 |
True is returned here for myself only; false for subclasses. |
|
270 |
Abstract subclasses must redefine this again." |
|
271 |
||
272 |
^ self == ComboView. |
|
273 |
! ! |
|
274 |
||
304 | 275 |
!ComboView methodsFor:'accessing-behavior'! |
276 |
||
277 |
action:aBlock |
|
278 |
"specify, a block, which is evaluated when the lists selection changes. |
|
279 |
This is an additional hook - normally, you would communicate with the model |
|
280 |
alone" |
|
281 |
||
282 |
action := aBlock. |
|
283 |
||
284 |
"Created: 26.7.1996 / 17:44:18 / cg" |
|
285 |
"Modified: 26.2.1997 / 19:37:18 / cg" |
|
411 | 286 |
! |
287 |
||
288 |
enabled |
|
4663 | 289 |
"return true, if it is enabled" |
2892 | 290 |
|
1207 | 291 |
enableChannel isNil ifTrue:[^ true]. |
4663 | 292 |
^ enableChannel value ? true |
1294 | 293 |
! |
294 |
||
295 |
enabled:aBoolean |
|
296 |
"enable/disable components" |
|
297 |
||
298 |
self enableChannel value:aBoolean. |
|
299 |
||
300 |
"Modified: / 30.3.1999 / 14:56:18 / stefan" |
|
2892 | 301 |
! |
302 |
||
303 |
resizableMenu |
|
304 |
"return true, if the menu is to be resizable. |
|
305 |
This feature is as yet unimplemented." |
|
306 |
||
307 |
^ resizableMenu ? false |
|
308 |
! |
|
309 |
||
310 |
resizableMenu:aBoolean |
|
311 |
"enable/disable, if the menu is to be resizable. |
|
312 |
This feature is as yet unimplemented." |
|
313 |
||
314 |
resizableMenu := aBoolean |
|
411 | 315 |
! ! |
316 |
||
317 |
!ComboView methodsFor:'accessing-channels'! |
|
318 |
||
319 |
enableChannel |
|
2892 | 320 |
"return a valueHolder for enable/disable" |
321 |
||
1207 | 322 |
enableChannel isNil ifTrue:[ |
1294 | 323 |
self enableChannel:(true asValue). |
411 | 324 |
]. |
1207 | 325 |
^ enableChannel |
411 | 326 |
|
1294 | 327 |
"Modified: / 30.3.1999 / 16:20:25 / stefan" |
129 | 328 |
! ! |
329 |
||
330 |
!ComboView methodsFor:'accessing-components'! |
|
331 |
||
1560 | 332 |
field |
333 |
"return the field (input or label) component. |
|
334 |
For knowledgable users only." |
|
335 |
||
336 |
^ field |
|
337 |
||
338 |
"Created: / 26.9.1999 / 13:33:15 / cg" |
|
339 |
! |
|
340 |
||
129 | 341 |
menuButton |
342 |
"return the menuButton component" |
|
343 |
||
344 |
^ pullDownButton |
|
345 |
||
346 |
"Created: 28.2.1996 / 15:03:14 / cg" |
|
347 |
! ! |
|
348 |
||
349 |
!ComboView methodsFor:'accessing-contents'! |
|
350 |
||
181 | 351 |
contents |
304 | 352 |
"get the contents of my field" |
353 |
||
4115 | 354 |
|m| |
181 | 355 |
|
4115 | 356 |
(m := field model) isNil ifTrue:[ |
357 |
^ field contents |
|
358 |
]. |
|
359 |
^ m value |
|
360 |
||
361 |
"Created: / 14-05-1996 / 13:05:16 / cg" |
|
362 |
"Modified: / 21-03-2012 / 12:06:42 / cg" |
|
181 | 363 |
! |
364 |
||
365 |
contents:something |
|
304 | 366 |
"set the contents of my field; questionable" |
367 |
||
214 | 368 |
|m| |
369 |
||
370 |
(m := field model) notNil ifTrue:[ |
|
304 | 371 |
m value:something |
214 | 372 |
] |
181 | 373 |
|
374 |
"Created: 14.5.1996 / 13:05:33 / cg" |
|
304 | 375 |
"Modified: 26.2.1997 / 16:56:08 / cg" |
181 | 376 |
! |
377 |
||
889
7879fffb4810
oops #list returned wrong list
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
378 |
list |
7879fffb4810
oops #list returned wrong list
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
379 |
"return the list" |
7879fffb4810
oops #list returned wrong list
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
380 |
|
7879fffb4810
oops #list returned wrong list
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
381 |
^ list |
7879fffb4810
oops #list returned wrong list
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
382 |
|
7879fffb4810
oops #list returned wrong list
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
383 |
"Created: / 18.5.1998 / 18:58:08 / cg" |
7879fffb4810
oops #list returned wrong list
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
384 |
! |
7879fffb4810
oops #list returned wrong list
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
385 |
|
129 | 386 |
list:aList |
304 | 387 |
"set the list explicitely; used internally or |
388 |
to be send from the outside if no model/listHolder is used." |
|
389 |
||
3312
ad1dcdaa7ba7
Support for selection via mouse wheel
Stefan Vogel <sv@exept.de>
parents:
3290
diff
changeset
|
390 |
list ~~ aList ifTrue:[ |
5661 | 391 |
self assert:(aList isNil or:[aList isSequenceable]). |
3369
9f8f7c5d328f
Correct selection behavior (start with line 1)
Stefan Vogel <sv@exept.de>
parents:
3365
diff
changeset
|
392 |
currentIndex := 1. |
3312
ad1dcdaa7ba7
Support for selection via mouse wheel
Stefan Vogel <sv@exept.de>
parents:
3290
diff
changeset
|
393 |
list := aList. |
2474 | 394 |
]. |
3315 | 395 |
"maybe some values have been added to / removed from list" |
396 |
self enableStateChanged. |
|
1294 | 397 |
|
398 |
"Modified: / 30.3.1999 / 14:17:38 / stefan" |
|
129 | 399 |
! ! |
400 |
||
853 | 401 |
!ComboView methodsFor:'accessing-look'! |
402 |
||
403 |
backgroundColor |
|
404 |
||
405 |
^field backgroundColor |
|
406 |
! |
|
407 |
||
408 |
backgroundColor:aColor |
|
409 |
||
410 |
field backgroundColor:aColor |
|
411 |
! |
|
412 |
||
413 |
font:aFont |
|
414 |
||
415 |
super font:aFont. |
|
1183
667132091c2f
ComboBox's inputField ought to use its default font.
Claus Gittinger <cg@exept.de>
parents:
1126
diff
changeset
|
416 |
self setFieldsFont:aFont. |
853 | 417 |
! |
418 |
||
419 |
foregroundColor |
|
420 |
||
421 |
^field foregroundColor |
|
422 |
! |
|
423 |
||
424 |
foregroundColor:aColor |
|
425 |
||
426 |
field foregroundColor:aColor |
|
427 |
! ! |
|
428 |
||
214 | 429 |
!ComboView methodsFor:'accessing-mvc'! |
430 |
||
4187 | 431 |
comboMenuHolder |
432 |
^ comboMenuHolder |
|
433 |
! |
|
434 |
||
4225 | 435 |
comboMenuHolder:aMenuHolder |
436 |
"allows for arbitrary menus to be opened via the combo button" |
|
437 |
||
438 |
comboMenuHolder := aMenuHolder. |
|
439 |
! |
|
440 |
||
441 |
comboMenuHolder:aMenuHolder comboMenuMessage:aSelectorToTheHolder |
|
442 |
"allows for arbitrary menus to be opened via the combo button" |
|
443 |
||
444 |
comboMenuHolder := aMenuHolder. |
|
445 |
comboMenuMessage := aSelectorToTheHolder. |
|
4187 | 446 |
! |
447 |
||
448 |
comboMenuMessage |
|
449 |
^ comboMenuMessage |
|
450 |
! |
|
451 |
||
4225 | 452 |
comboMenuMessage:aSelectorToTheHolder |
453 |
"allows for arbitrary menus to be opened via the combo button" |
|
454 |
||
455 |
comboMenuMessage := aSelectorToTheHolder. |
|
4187 | 456 |
! |
457 |
||
5592 | 458 |
currentIndex |
459 |
^ currentIndex |
|
460 |
! |
|
461 |
||
277
44eadbccc2b7
added support for a separate listHolder
Claus Gittinger <cg@exept.de>
parents:
276
diff
changeset
|
462 |
listHolder:aValueHolder |
44eadbccc2b7
added support for a separate listHolder
Claus Gittinger <cg@exept.de>
parents:
276
diff
changeset
|
463 |
"set the listHolder. |
44eadbccc2b7
added support for a separate listHolder
Claus Gittinger <cg@exept.de>
parents:
276
diff
changeset
|
464 |
If not set, the list is supposed to be set explicitely" |
44eadbccc2b7
added support for a separate listHolder
Claus Gittinger <cg@exept.de>
parents:
276
diff
changeset
|
465 |
|
44eadbccc2b7
added support for a separate listHolder
Claus Gittinger <cg@exept.de>
parents:
276
diff
changeset
|
466 |
listHolder notNil ifTrue:[ |
304 | 467 |
listHolder removeDependent:self. |
277
44eadbccc2b7
added support for a separate listHolder
Claus Gittinger <cg@exept.de>
parents:
276
diff
changeset
|
468 |
]. |
44eadbccc2b7
added support for a separate listHolder
Claus Gittinger <cg@exept.de>
parents:
276
diff
changeset
|
469 |
listHolder := aValueHolder. |
44eadbccc2b7
added support for a separate listHolder
Claus Gittinger <cg@exept.de>
parents:
276
diff
changeset
|
470 |
listHolder notNil ifTrue:[ |
304 | 471 |
aValueHolder addDependent:self. |
277
44eadbccc2b7
added support for a separate listHolder
Claus Gittinger <cg@exept.de>
parents:
276
diff
changeset
|
472 |
]. |
3274
e162e9218179
must fetch the lists value when the listHilder is set.
Claus Gittinger <cg@exept.de>
parents:
3247
diff
changeset
|
473 |
|
e162e9218179
must fetch the lists value when the listHilder is set.
Claus Gittinger <cg@exept.de>
parents:
3247
diff
changeset
|
474 |
"/ cg: either fetch it here or when realized; |
5180 | 475 |
"/ (otherwise we'd never fetch the list if it won't change later) |
3274
e162e9218179
must fetch the lists value when the listHilder is set.
Claus Gittinger <cg@exept.de>
parents:
3247
diff
changeset
|
476 |
"/ realized ifTrue:[ |
304 | 477 |
self getListFromModel. |
3274
e162e9218179
must fetch the lists value when the listHilder is set.
Claus Gittinger <cg@exept.de>
parents:
3247
diff
changeset
|
478 |
"/ ] |
277
44eadbccc2b7
added support for a separate listHolder
Claus Gittinger <cg@exept.de>
parents:
276
diff
changeset
|
479 |
|
3274
e162e9218179
must fetch the lists value when the listHilder is set.
Claus Gittinger <cg@exept.de>
parents:
3247
diff
changeset
|
480 |
"Modified: / 09-11-2007 / 15:59:18 / cg" |
277
44eadbccc2b7
added support for a separate listHolder
Claus Gittinger <cg@exept.de>
parents:
276
diff
changeset
|
481 |
! |
44eadbccc2b7
added support for a separate listHolder
Claus Gittinger <cg@exept.de>
parents:
276
diff
changeset
|
482 |
|
44eadbccc2b7
added support for a separate listHolder
Claus Gittinger <cg@exept.de>
parents:
276
diff
changeset
|
483 |
listMessage:aSymbol |
44eadbccc2b7
added support for a separate listHolder
Claus Gittinger <cg@exept.de>
parents:
276
diff
changeset
|
484 |
"define the message selector sent to the model, to fetch |
44eadbccc2b7
added support for a separate listHolder
Claus Gittinger <cg@exept.de>
parents:
276
diff
changeset
|
485 |
the list. If not defined, #list is used" |
44eadbccc2b7
added support for a separate listHolder
Claus Gittinger <cg@exept.de>
parents:
276
diff
changeset
|
486 |
|
304 | 487 |
listMsg := aSymbol |
277
44eadbccc2b7
added support for a separate listHolder
Claus Gittinger <cg@exept.de>
parents:
276
diff
changeset
|
488 |
|
44eadbccc2b7
added support for a separate listHolder
Claus Gittinger <cg@exept.de>
parents:
276
diff
changeset
|
489 |
"Created: 14.2.1997 / 19:16:52 / cg" |
304 | 490 |
"Modified: 26.2.1997 / 19:33:09 / cg" |
277
44eadbccc2b7
added support for a separate listHolder
Claus Gittinger <cg@exept.de>
parents:
276
diff
changeset
|
491 |
! |
44eadbccc2b7
added support for a separate listHolder
Claus Gittinger <cg@exept.de>
parents:
276
diff
changeset
|
492 |
|
214 | 493 |
model:aModel |
304 | 494 |
"set the model, which is supposed to provide the boxes value. |
495 |
If a listMessage was defined, it is also responsible for providing |
|
496 |
the list" |
|
497 |
||
214 | 498 |
super model:aModel. |
499 |
||
3596 | 500 |
listHolder isNil ifTrue:[ |
501 |
self getListFromModel. |
|
502 |
]. |
|
314
6ff49c930c71
fetch models value when a model is assigned;
Claus Gittinger <cg@exept.de>
parents:
312
diff
changeset
|
503 |
self getValueFromModel. |
304 | 504 |
|
314
6ff49c930c71
fetch models value when a model is assigned;
Claus Gittinger <cg@exept.de>
parents:
312
diff
changeset
|
505 |
"Modified: 28.2.1997 / 19:08:45 / cg" |
310 | 506 |
! ! |
507 |
||
508 |
!ComboView methodsFor:'change & update'! |
|
214 | 509 |
|
510 |
update:something with:aParameter from:changedObject |
|
1207 | 511 |
|
214 | 512 |
changedObject == model ifTrue:[ |
310 | 513 |
listHolder isNil ifTrue:[ |
514 |
self getListFromModel. |
|
515 |
]. |
|
516 |
self getValueFromModel. |
|
517 |
^ self |
|
214 | 518 |
]. |
310 | 519 |
changedObject == listHolder ifTrue:[ |
520 |
self getListFromModel. |
|
521 |
^ self |
|
522 |
]. |
|
523 |
||
214 | 524 |
super update:something with:aParameter from:changedObject |
525 |
||
1294 | 526 |
"Created: / 15.7.1996 / 12:26:49 / cg" |
527 |
"Modified: / 28.2.1997 / 13:48:51 / cg" |
|
528 |
"Modified: / 30.3.1999 / 14:17:55 / stefan" |
|
214 | 529 |
! ! |
530 |
||
869
a1838cce9641
popup menu on space or return
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
531 |
!ComboView methodsFor:'event handling'! |
a1838cce9641
popup menu on space or return
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
532 |
|
1306
56e90a9e5da1
renambe #enableStateChange to #enableStateChanged
Claus Gittinger <cg@exept.de>
parents:
1301
diff
changeset
|
533 |
enableStateChanged |
1294 | 534 |
"the enable state has changed - pass this to my field and pullDownButton" |
535 |
||
536 |
|msg| |
|
537 |
||
538 |
(enableChannel isNil or:[enableChannel value]) ifTrue:[ |
|
539 |
msg := #enable |
|
540 |
] ifFalse:[ |
|
541 |
msg := #disable |
|
542 |
]. |
|
543 |
field perform:msg ifNotUnderstood:nil. |
|
544 |
||
3755 | 545 |
list isEmptyOrNil ifTrue:[ |
4186 | 546 |
"/ may only do this, if the list is static or a valueModel. |
547 |
"/ If it is a block, we do not know what value will be returned the next |
|
548 |
"/ time. |
|
549 |
listHolder isBlock ifFalse:[ |
|
550 |
msg := #disable |
|
551 |
]. |
|
1294 | 552 |
]. |
553 |
pullDownButton perform:msg ifNotUnderstood:nil. |
|
554 |
||
555 |
"Modified: / 22.2.1999 / 00:47:46 / cg" |
|
556 |
"Modified: / 30.3.1999 / 14:17:10 / stefan" |
|
557 |
! |
|
558 |
||
3312
ad1dcdaa7ba7
Support for selection via mouse wheel
Stefan Vogel <sv@exept.de>
parents:
3290
diff
changeset
|
559 |
handlesMouseWheelMotion:event inView:aView |
ad1dcdaa7ba7
Support for selection via mouse wheel
Stefan Vogel <sv@exept.de>
parents:
3290
diff
changeset
|
560 |
"we handle delegated mousewheel events" |
ad1dcdaa7ba7
Support for selection via mouse wheel
Stefan Vogel <sv@exept.de>
parents:
3290
diff
changeset
|
561 |
|
ad1dcdaa7ba7
Support for selection via mouse wheel
Stefan Vogel <sv@exept.de>
parents:
3290
diff
changeset
|
562 |
^ true |
ad1dcdaa7ba7
Support for selection via mouse wheel
Stefan Vogel <sv@exept.de>
parents:
3290
diff
changeset
|
563 |
! |
ad1dcdaa7ba7
Support for selection via mouse wheel
Stefan Vogel <sv@exept.de>
parents:
3290
diff
changeset
|
564 |
|
869
a1838cce9641
popup menu on space or return
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
565 |
keyPress:key x:x y:y |
2868 | 566 |
"pull the menu on space and return keys" |
567 |
||
2025 | 568 |
<resource: #keyboard (#Return)> |
569 |
||
2868 | 570 |
(key == Character space or:[key == #Return]) ifTrue:[ |
869
a1838cce9641
popup menu on space or return
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
571 |
self pullMenu. |
a1838cce9641
popup menu on space or return
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
572 |
^ self. |
a1838cce9641
popup menu on space or return
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
573 |
]. |
a1838cce9641
popup menu on space or return
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
574 |
|
a1838cce9641
popup menu on space or return
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
575 |
^ super keyPress:key x:x y:y |
a1838cce9641
popup menu on space or return
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
576 |
|
a1838cce9641
popup menu on space or return
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
577 |
"Modified: / 21.4.1998 / 20:10:05 / cg" |
3236 | 578 |
! |
579 |
||
3312
ad1dcdaa7ba7
Support for selection via mouse wheel
Stefan Vogel <sv@exept.de>
parents:
3290
diff
changeset
|
580 |
mouseWheelMotion:buttonState x:x y:y amount:amount deltaTime:dTime view:delegatingView |
ad1dcdaa7ba7
Support for selection via mouse wheel
Stefan Vogel <sv@exept.de>
parents:
3290
diff
changeset
|
581 |
"scroll through the list items" |
ad1dcdaa7ba7
Support for selection via mouse wheel
Stefan Vogel <sv@exept.de>
parents:
3290
diff
changeset
|
582 |
|
ad1dcdaa7ba7
Support for selection via mouse wheel
Stefan Vogel <sv@exept.de>
parents:
3290
diff
changeset
|
583 |
self enableChannel value ifFalse:[ |
ad1dcdaa7ba7
Support for selection via mouse wheel
Stefan Vogel <sv@exept.de>
parents:
3290
diff
changeset
|
584 |
^ self. |
ad1dcdaa7ba7
Support for selection via mouse wheel
Stefan Vogel <sv@exept.de>
parents:
3290
diff
changeset
|
585 |
]. |
ad1dcdaa7ba7
Support for selection via mouse wheel
Stefan Vogel <sv@exept.de>
parents:
3290
diff
changeset
|
586 |
|
ad1dcdaa7ba7
Support for selection via mouse wheel
Stefan Vogel <sv@exept.de>
parents:
3290
diff
changeset
|
587 |
list isNil ifTrue:[ |
ad1dcdaa7ba7
Support for selection via mouse wheel
Stefan Vogel <sv@exept.de>
parents:
3290
diff
changeset
|
588 |
self getListFromModel. |
3365
06a46f12cb2e
changed #mouseWheelMotion:x:y:amount:deltaTime:view:
Stefan Vogel <sv@exept.de>
parents:
3327
diff
changeset
|
589 |
list isEmptyOrNil ifTrue:[ |
06a46f12cb2e
changed #mouseWheelMotion:x:y:amount:deltaTime:view:
Stefan Vogel <sv@exept.de>
parents:
3327
diff
changeset
|
590 |
"nothing to scroll" |
06a46f12cb2e
changed #mouseWheelMotion:x:y:amount:deltaTime:view:
Stefan Vogel <sv@exept.de>
parents:
3327
diff
changeset
|
591 |
^ self |
06a46f12cb2e
changed #mouseWheelMotion:x:y:amount:deltaTime:view:
Stefan Vogel <sv@exept.de>
parents:
3327
diff
changeset
|
592 |
]. |
3312
ad1dcdaa7ba7
Support for selection via mouse wheel
Stefan Vogel <sv@exept.de>
parents:
3290
diff
changeset
|
593 |
]. |
ad1dcdaa7ba7
Support for selection via mouse wheel
Stefan Vogel <sv@exept.de>
parents:
3290
diff
changeset
|
594 |
|
3369
9f8f7c5d328f
Correct selection behavior (start with line 1)
Stefan Vogel <sv@exept.de>
parents:
3365
diff
changeset
|
595 |
self deltaSelect:amount sign negated. |
3312
ad1dcdaa7ba7
Support for selection via mouse wheel
Stefan Vogel <sv@exept.de>
parents:
3290
diff
changeset
|
596 |
! |
ad1dcdaa7ba7
Support for selection via mouse wheel
Stefan Vogel <sv@exept.de>
parents:
3290
diff
changeset
|
597 |
|
3236 | 598 |
processEvent:anEvent |
3290
d6fafe560ade
bugfix - processEvents should have a look for which button is pressed
ca
parents:
3281
diff
changeset
|
599 |
|evView point x y button| |
3236 | 600 |
|
3495 | 601 |
"/ only care for buttonpress in my field... |
602 |
anEvent isButtonPressEvent ifFalse:[^ false]. |
|
603 |
evView := anEvent view. |
|
604 |
evView isNil ifTrue:[^ false]. |
|
605 |
||
3290
d6fafe560ade
bugfix - processEvents should have a look for which button is pressed
ca
parents:
3281
diff
changeset
|
606 |
button := anEvent state. |
d6fafe560ade
bugfix - processEvents should have a look for which button is pressed
ca
parents:
3281
diff
changeset
|
607 |
((button == 1) or:[button == #select]) ifFalse:[ |
d6fafe560ade
bugfix - processEvents should have a look for which button is pressed
ca
parents:
3281
diff
changeset
|
608 |
^ false |
d6fafe560ade
bugfix - processEvents should have a look for which button is pressed
ca
parents:
3281
diff
changeset
|
609 |
]. |
d6fafe560ade
bugfix - processEvents should have a look for which button is pressed
ca
parents:
3281
diff
changeset
|
610 |
|
3236 | 611 |
(field isNil or:[field shown not]) ifTrue:[ |
612 |
^ false |
|
613 |
]. |
|
614 |
(field isKeyboardConsumer and:[field isEnabled]) ifTrue:[ |
|
615 |
^ false |
|
616 |
]. |
|
617 |
||
3755 | 618 |
x := anEvent x. |
619 |
y := anEvent y. |
|
3236 | 620 |
|
621 |
evView ~~ field ifTrue:[ |
|
622 |
(evView isSameOrComponentOf:field) ifFalse:[ |
|
623 |
^ false |
|
624 |
]. |
|
3755 | 625 |
point := x @ y. |
4994 | 626 |
point := device translatePoint:point fromView:evView toView:field. |
3755 | 627 |
x := point x. |
628 |
y := point y. |
|
3236 | 629 |
]. |
630 |
(x between:0 and:field width) ifFalse:[^ false]. |
|
631 |
(y between:0 and:field height) ifFalse:[^ false]. |
|
632 |
||
3281 | 633 |
self pullMenu == false ifTrue:[ ^ false ]. |
3495 | 634 |
|
635 |
"/ although eaten, we still must care for the focus !! |
|
636 |
self wantsFocusWithButtonPress ifTrue:[ |
|
3503 | 637 |
self windowGroup notNil ifTrue:[ |
638 |
self windowGroup focusView:self. |
|
639 |
"/ Transcript showCR:self windowGroup focusCameByTab. |
|
640 |
] |
|
3495 | 641 |
]. |
3236 | 642 |
^ true |
869
a1838cce9641
popup menu on space or return
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
643 |
! ! |
a1838cce9641
popup menu on space or return
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
644 |
|
2499 | 645 |
!ComboView methodsFor:'initialization & release'! |
129 | 646 |
|
3236 | 647 |
destroy |
648 |
|wgrp| |
|
649 |
||
650 |
(wgrp := self windowGroup) notNil ifTrue:[ |
|
651 |
wgrp removePreEventHook:self. |
|
652 |
]. |
|
653 |
super destroy. |
|
654 |
! |
|
655 |
||
3825 | 656 |
initStyle |
657 |
super initStyle. |
|
658 |
||
659 |
self borderWidth:(EditField defaultBorderWidth). |
|
660 |
self borderColor:(EditField defaultBorderColor). |
|
661 |
! |
|
662 |
||
129 | 663 |
initialize |
2750 | 664 |
|prefExt leftInset rightInset prefWidth halfSpacing nm lvl| |
129 | 665 |
|
666 |
super initialize. |
|
308 | 667 |
|
304 | 668 |
listMsg := self class defaultListMessage. |
669 |
aspectMsg := self class defaultAspectMessage. |
|
670 |
changeMsg := self class defaultChangeMessage. |
|
129 | 671 |
|
672 |
self initializeField. |
|
3825 | 673 |
field origin:margin@margin corner:1.0@1.0. |
2136 | 674 |
self shadowColor:(field shadowColor). |
129 | 675 |
|
331 | 676 |
self initializeButton. |
2174
ab242e29da64
button init code made publicly available
Claus Gittinger <cg@exept.de>
parents:
2157
diff
changeset
|
677 |
pullDownButton pressAction:[self pullMenu]. |
280 | 678 |
prefExt := pullDownButton preferredExtent. |
679 |
prefWidth := prefExt x. |
|
680 |
||
129 | 681 |
pullDownButton origin:1.0@0.0 corner:1.0@1.0. |
217 | 682 |
styleSheet is3D ifTrue:[ |
280 | 683 |
halfSpacing := ViewSpacing // 2. |
684 |
leftInset := rightInset := prefWidth + halfSpacing. |
|
2750 | 685 |
(lvl := styleSheet at:#'comboView.level' default:nil) notNil ifTrue:[ |
686 |
self level:lvl. |
|
319 | 687 |
field level:0. |
688 |
field rightInset:margin. |
|
689 |
] ifFalse:[ |
|
690 |
pullDownButton rightInset:halfSpacing. |
|
691 |
field leftInset:halfSpacing |
|
692 |
]. |
|
217 | 693 |
] ifFalse:[ |
280 | 694 |
leftInset := prefWidth + pullDownButton borderWidth. |
695 |
rightInset := prefWidth. |
|
217 | 696 |
]. |
1125 | 697 |
|
3836 | 698 |
"/ what a hack... |
1696
f1bae6d68ffe
eliminated styleSheet name = win95 queries
Claus Gittinger <cg@exept.de>
parents:
1633
diff
changeset
|
699 |
nm := styleSheet name. |
3836 | 700 |
(nm = #win95 or:[nm = #win98 or:[nm = #winXP or:[nm = #st80 or:[nm = #winVista]]]]) ifTrue:[ |
1125 | 701 |
field level:0. |
2750 | 702 |
lvl isNil ifTrue:[self level:-1]. |
1125 | 703 |
pullDownButton rightInset:0. |
1696
f1bae6d68ffe
eliminated styleSheet name = win95 queries
Claus Gittinger <cg@exept.de>
parents:
1633
diff
changeset
|
704 |
nm ~= #st80 ifTrue:[ |
3429
f2b4b84cd477
added preferredWidth & preferredHeight
Claus Gittinger <cg@exept.de>
parents:
3369
diff
changeset
|
705 |
leftInset := (ArrowButton new preferredWidth). |
1126 | 706 |
rightInset := leftInset. |
1125 | 707 |
]. |
708 |
field origin:0.0@0.0. |
|
2750 | 709 |
field leftInset:0. |
1125 | 710 |
"/ field topInset:1; bottomInset:1. |
2750 | 711 |
"/ nm = #winXP ifTrue:[ |
712 |
"/ self borderWidth:1. |
|
713 |
"/ self borderColor:(Color blue lightened). |
|
714 |
"/ ]. |
|
1125 | 715 |
]. |
1126 | 716 |
field rightInset:rightInset. |
280 | 717 |
pullDownButton leftInset:leftInset negated. |
129 | 718 |
|
3429
f2b4b84cd477
added preferredWidth & preferredHeight
Claus Gittinger <cg@exept.de>
parents:
3369
diff
changeset
|
719 |
self initialHeight:field preferredHeight + ViewSpacing. |
129 | 720 |
" |
721 |
|b| |
|
722 |
||
723 |
b := ComboBoxView new. |
|
724 |
b list:#('hello' 'world' 'this' 'is' 'st/x'). |
|
725 |
b open |
|
726 |
" |
|
727 |
||
1125 | 728 |
"Created: / 28.2.1996 / 15:03:17 / cg" |
729 |
"Modified: / 8.9.1998 / 20:33:22 / cg" |
|
331 | 730 |
! |
731 |
||
732 |
initializeButton |
|
2174
ab242e29da64
button init code made publicly available
Claus Gittinger <cg@exept.de>
parents:
2157
diff
changeset
|
733 |
pullDownButton := self class comboButtonFor:self. |
331 | 734 |
pullDownButton disable. |
735 |
! |
|
736 |
||
737 |
initializeField |
|
4972 | 738 |
"concrete subclass is responsible to instantiate |
739 |
a field widget here. |
|
740 |
For comboList, this will be a label; |
|
741 |
for comboBox, this will be an editfield" |
|
742 |
||
331 | 743 |
self subclassResponsibility |
744 |
||
745 |
"Created: 29.3.1997 / 11:17:14 / cg" |
|
2157 | 746 |
! |
747 |
||
3236 | 748 |
realize |
3238 | 749 |
|pullMenuIfClickedOnField wgrp| |
3236 | 750 |
|
751 |
super realize. |
|
752 |
||
3824 | 753 |
pullMenuIfClickedOnField := |
754 |
styleSheet |
|
755 |
at:#'comboView.pullMenuIfClickedOnField' |
|
756 |
default:[ OperatingSystem isMSWINDOWSlike ]. |
|
3236 | 757 |
|
758 |
pullMenuIfClickedOnField == true ifTrue:[ |
|
3238 | 759 |
wgrp := self windowGroup. |
760 |
wgrp notNil ifTrue:[ wgrp addPreEventHook:self ]. |
|
3236 | 761 |
]. |
762 |
! |
|
763 |
||
2157 | 764 |
release |
765 |
listHolder notNil ifTrue:[ |
|
766 |
listHolder removeDependent:self. |
|
767 |
listHolder := nil. |
|
768 |
]. |
|
769 |
super release |
|
129 | 770 |
! ! |
771 |
||
2406 | 772 |
!ComboView methodsFor:'menu interaction'! |
773 |
||
4564
be449e47ce4b
Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
4563
diff
changeset
|
774 |
createPullDownMenuForList:aList |
be449e47ce4b
Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
4563
diff
changeset
|
775 |
"pull the menu - triggered from the button" |
be449e47ce4b
Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
4563
diff
changeset
|
776 |
|
be449e47ce4b
Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
4563
diff
changeset
|
777 |
|menu index| |
be449e47ce4b
Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
4563
diff
changeset
|
778 |
|
be449e47ce4b
Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
4563
diff
changeset
|
779 |
comboMenuHolder notNil ifTrue:[ |
be449e47ce4b
Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
4563
diff
changeset
|
780 |
menu := (comboMenuHolder perform:comboMenuMessage ? #value). |
be449e47ce4b
Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
4563
diff
changeset
|
781 |
(menu isKindOf:Menu) ifTrue:[ |
be449e47ce4b
Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
4563
diff
changeset
|
782 |
menu := MenuPanel new menu:menu. |
be449e47ce4b
Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
4563
diff
changeset
|
783 |
] |
be449e47ce4b
Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
4563
diff
changeset
|
784 |
] ifFalse:[ |
be449e47ce4b
Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
4563
diff
changeset
|
785 |
menu := MenuPanel new. |
be449e47ce4b
Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
4563
diff
changeset
|
786 |
menu doAccessCharacterTranslation:false. |
be449e47ce4b
Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
4563
diff
changeset
|
787 |
menu labels:aList. |
be449e47ce4b
Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
4563
diff
changeset
|
788 |
menu hideOnRelease:false. |
be449e47ce4b
Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
4563
diff
changeset
|
789 |
menu backgroundColor: field backgroundColor. |
be449e47ce4b
Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
4563
diff
changeset
|
790 |
|
be449e47ce4b
Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
4563
diff
changeset
|
791 |
index := 1. |
be449e47ce4b
Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
4563
diff
changeset
|
792 |
|
be449e47ce4b
Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
4563
diff
changeset
|
793 |
menu do:[:el | |
be449e47ce4b
Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
4563
diff
changeset
|
794 |
el value:#select: argument:index. |
be449e47ce4b
Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
4563
diff
changeset
|
795 |
index := index + 1. |
be449e47ce4b
Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
4563
diff
changeset
|
796 |
]. |
be449e47ce4b
Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
4563
diff
changeset
|
797 |
menu receiver:self. |
be449e47ce4b
Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
4563
diff
changeset
|
798 |
]. |
be449e47ce4b
Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
4563
diff
changeset
|
799 |
|
be449e47ce4b
Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
4563
diff
changeset
|
800 |
menu font:self font. |
be449e47ce4b
Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
4563
diff
changeset
|
801 |
menu preferredWidth:self width. |
be449e47ce4b
Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
4563
diff
changeset
|
802 |
|
be449e47ce4b
Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
4563
diff
changeset
|
803 |
^ menu |
be449e47ce4b
Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
4563
diff
changeset
|
804 |
|
be449e47ce4b
Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
4563
diff
changeset
|
805 |
"Modified: / 25-03-2014 / 01:21:57 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
be449e47ce4b
Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
4563
diff
changeset
|
806 |
! |
be449e47ce4b
Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
4563
diff
changeset
|
807 |
|
3369
9f8f7c5d328f
Correct selection behavior (start with line 1)
Stefan Vogel <sv@exept.de>
parents:
3365
diff
changeset
|
808 |
deltaSelect:delta |
9f8f7c5d328f
Correct selection behavior (start with line 1)
Stefan Vogel <sv@exept.de>
parents:
3365
diff
changeset
|
809 |
"change selection by delta. Wrap at start/end" |
9f8f7c5d328f
Correct selection behavior (start with line 1)
Stefan Vogel <sv@exept.de>
parents:
3365
diff
changeset
|
810 |
|
9f8f7c5d328f
Correct selection behavior (start with line 1)
Stefan Vogel <sv@exept.de>
parents:
3365
diff
changeset
|
811 |
|newIndex| |
9f8f7c5d328f
Correct selection behavior (start with line 1)
Stefan Vogel <sv@exept.de>
parents:
3365
diff
changeset
|
812 |
|
3556
e7d87b5b3cf7
care for mouse-wheel deltaSelect: if list is empty
Claus Gittinger <cg@exept.de>
parents:
3503
diff
changeset
|
813 |
list size == 0 ifTrue:[^ self]. |
e7d87b5b3cf7
care for mouse-wheel deltaSelect: if list is empty
Claus Gittinger <cg@exept.de>
parents:
3503
diff
changeset
|
814 |
|
3369
9f8f7c5d328f
Correct selection behavior (start with line 1)
Stefan Vogel <sv@exept.de>
parents:
3365
diff
changeset
|
815 |
newIndex := currentIndex + delta. |
9f8f7c5d328f
Correct selection behavior (start with line 1)
Stefan Vogel <sv@exept.de>
parents:
3365
diff
changeset
|
816 |
newIndex > list size ifTrue:[ |
9f8f7c5d328f
Correct selection behavior (start with line 1)
Stefan Vogel <sv@exept.de>
parents:
3365
diff
changeset
|
817 |
newIndex := 1. |
9f8f7c5d328f
Correct selection behavior (start with line 1)
Stefan Vogel <sv@exept.de>
parents:
3365
diff
changeset
|
818 |
] ifFalse:[ |
9f8f7c5d328f
Correct selection behavior (start with line 1)
Stefan Vogel <sv@exept.de>
parents:
3365
diff
changeset
|
819 |
newIndex <= 0 ifTrue:[ |
9f8f7c5d328f
Correct selection behavior (start with line 1)
Stefan Vogel <sv@exept.de>
parents:
3365
diff
changeset
|
820 |
newIndex := list size. |
9f8f7c5d328f
Correct selection behavior (start with line 1)
Stefan Vogel <sv@exept.de>
parents:
3365
diff
changeset
|
821 |
]. |
9f8f7c5d328f
Correct selection behavior (start with line 1)
Stefan Vogel <sv@exept.de>
parents:
3365
diff
changeset
|
822 |
]. |
9f8f7c5d328f
Correct selection behavior (start with line 1)
Stefan Vogel <sv@exept.de>
parents:
3365
diff
changeset
|
823 |
|
9f8f7c5d328f
Correct selection behavior (start with line 1)
Stefan Vogel <sv@exept.de>
parents:
3365
diff
changeset
|
824 |
self select:newIndex. |
9f8f7c5d328f
Correct selection behavior (start with line 1)
Stefan Vogel <sv@exept.de>
parents:
3365
diff
changeset
|
825 |
! |
9f8f7c5d328f
Correct selection behavior (start with line 1)
Stefan Vogel <sv@exept.de>
parents:
3365
diff
changeset
|
826 |
|
2406 | 827 |
pullMenu |
3281 | 828 |
"pull the menu - triggered from the button |
829 |
returns false if the menu cannot be opened" |
|
2406 | 830 |
|
3281 | 831 |
|menu origin opensMenu| |
2406 | 832 |
|
833 |
self getListFromModel. |
|
834 |
||
4227 | 835 |
opensMenu := ((list notEmptyOrNil or:[comboMenuHolder notNil]) |
836 |
and:[self enableChannel value]). |
|
3281 | 837 |
|
838 |
opensMenu ifTrue:[ |
|
2406 | 839 |
menu := self createPullDownMenuForList:list. |
4994 | 840 |
origin := device translatePoint:(0 @ self height) fromView:self toView:nil. |
4227 | 841 |
"/ menu extentChangedFlag:false. |
842 |
"/ menu originChangedFlag:false. |
|
843 |
menu showAt:origin resizing:false. |
|
2406 | 844 |
]. |
845 |
||
846 |
pullDownButton turnOff. |
|
3281 | 847 |
^ opensMenu |
2406 | 848 |
|
849 |
"Created: / 10.10.2001 / 14:47:25 / cg" |
|
850 |
"Modified: / 10.10.2001 / 15:04:44 / cg" |
|
851 |
! |
|
852 |
||
853 |
select:anIndex |
|
854 |
"sent from the popped menu, when an item was selected" |
|
855 |
||
856 |
self subclassResponsibility |
|
857 |
||
858 |
"Modified: 27.2.1997 / 15:19:07 / cg" |
|
859 |
! ! |
|
860 |
||
129 | 861 |
!ComboView methodsFor:'message delegation'! |
862 |
||
863 |
doesNotUnderstand:aMessage |
|
4824 | 864 |
"delegate to my field" |
865 |
||
129 | 866 |
(field respondsTo:aMessage selector) ifTrue:[ |
1207 | 867 |
^ aMessage sendTo:field |
129 | 868 |
]. |
869 |
^ super doesNotUnderstand:aMessage |
|
870 |
||
871 |
"Created: 28.2.1996 / 15:03:17 / cg" |
|
872 |
"Modified: 28.2.1996 / 15:06:09 / cg" |
|
166 | 873 |
! |
874 |
||
2300 | 875 |
flash |
4824 | 876 |
"delegate to my field" |
877 |
||
2300 | 878 |
field flash |
879 |
! |
|
880 |
||
5630 | 881 |
flash:messageOrNil withColor:flashColor |
4824 | 882 |
"delegate to my field" |
883 |
||
5630 | 884 |
field flash:messageOrNil withColor:flashColor |
885 |
||
886 |
"Modified (format): / 21-10-2017 / 23:13:39 / cg" |
|
4824 | 887 |
! |
888 |
||
166 | 889 |
respondsTo:aSymbol |
4824 | 890 |
"delegate to my field" |
891 |
||
166 | 892 |
^ (field respondsTo:aSymbol) or:[super respondsTo:aSymbol] |
893 |
||
894 |
"Created: 2.5.1996 / 16:57:34 / stefan" |
|
129 | 895 |
! ! |
896 |
||
214 | 897 |
!ComboView methodsFor:'private'! |
898 |
||
899 |
getListFromModel |
|
277
44eadbccc2b7
added support for a separate listHolder
Claus Gittinger <cg@exept.de>
parents:
276
diff
changeset
|
900 |
"fetch the list - either from the listHolder, or |
44eadbccc2b7
added support for a separate listHolder
Claus Gittinger <cg@exept.de>
parents:
276
diff
changeset
|
901 |
from the model. If no listMessage was defined, fetch it |
44eadbccc2b7
added support for a separate listHolder
Claus Gittinger <cg@exept.de>
parents:
276
diff
changeset
|
902 |
using #list." |
44eadbccc2b7
added support for a separate listHolder
Claus Gittinger <cg@exept.de>
parents:
276
diff
changeset
|
903 |
|
44eadbccc2b7
added support for a separate listHolder
Claus Gittinger <cg@exept.de>
parents:
276
diff
changeset
|
904 |
listHolder notNil ifTrue:[ |
5352 | 905 |
"/ should blocks be evaluated when the pull-down list is actually needed? |
906 |
"/ listHolder isBlock ifFalse:[ |
|
907 |
self list:listHolder value |
|
908 |
"/ ] |
|
277
44eadbccc2b7
added support for a separate listHolder
Claus Gittinger <cg@exept.de>
parents:
276
diff
changeset
|
909 |
] ifFalse:[ |
304 | 910 |
(model notNil and:[listMsg notNil]) ifTrue:[ |
911 |
(model respondsTo:listMsg) ifTrue:[ |
|
912 |
self list:(model perform:listMsg) |
|
277
44eadbccc2b7
added support for a separate listHolder
Claus Gittinger <cg@exept.de>
parents:
276
diff
changeset
|
913 |
] |
44eadbccc2b7
added support for a separate listHolder
Claus Gittinger <cg@exept.de>
parents:
276
diff
changeset
|
914 |
] |
214 | 915 |
]. |
916 |
||
917 |
"Created: 15.7.1996 / 12:22:56 / cg" |
|
304 | 918 |
"Modified: 26.2.1997 / 19:40:58 / cg" |
214 | 919 |
! |
920 |
||
921 |
getValueFromModel |
|
922 |
||
923 |
"Modified: 15.7.1996 / 12:28:59 / cg" |
|
1183
667132091c2f
ComboBox's inputField ought to use its default font.
Claus Gittinger <cg@exept.de>
parents:
1126
diff
changeset
|
924 |
! |
667132091c2f
ComboBox's inputField ought to use its default font.
Claus Gittinger <cg@exept.de>
parents:
1126
diff
changeset
|
925 |
|
1210
55f2c4209f94
oops - only pull-button is disabled with empty list;
Claus Gittinger <cg@exept.de>
parents:
1207
diff
changeset
|
926 |
setFieldsFont:aFont |
55f2c4209f94
oops - only pull-button is disabled with empty list;
Claus Gittinger <cg@exept.de>
parents:
1207
diff
changeset
|
927 |
field font:aFont. |
214 | 928 |
! ! |
929 |
||
129 | 930 |
!ComboView methodsFor:'queries'! |
931 |
||
932 |
preferredExtent |
|
285 | 933 |
"compute & return the boxes preferredExtent from the components' preferrences" |
934 |
||
683 | 935 |
|fieldPref buttonPref m menuPrefX menuPrefY w h| |
129 | 936 |
|
3573
29daa27bd290
changed #preferredExtent - use explicitExtent instvar
Stefan Vogel <sv@exept.de>
parents:
3556
diff
changeset
|
937 |
"/ If I have an explicit preferredExtent.. |
29daa27bd290
changed #preferredExtent - use explicitExtent instvar
Stefan Vogel <sv@exept.de>
parents:
3556
diff
changeset
|
938 |
explicitExtent notNil ifTrue:[ |
29daa27bd290
changed #preferredExtent - use explicitExtent instvar
Stefan Vogel <sv@exept.de>
parents:
3556
diff
changeset
|
939 |
^ explicitExtent |
29daa27bd290
changed #preferredExtent - use explicitExtent instvar
Stefan Vogel <sv@exept.de>
parents:
3556
diff
changeset
|
940 |
]. |
312 | 941 |
|
3573
29daa27bd290
changed #preferredExtent - use explicitExtent instvar
Stefan Vogel <sv@exept.de>
parents:
3556
diff
changeset
|
942 |
"/ If I have a cached preferredExtent value.. |
312 | 943 |
preferredExtent notNil ifTrue:[ |
944 |
^ preferredExtent |
|
945 |
]. |
|
946 |
||
129 | 947 |
list isNil ifTrue:[ |
308 | 948 |
self getListFromModel |
949 |
]. |
|
950 |
||
951 |
list isNil ifTrue:[ |
|
683 | 952 |
menuPrefX := menuPrefY := 0 |
129 | 953 |
] ifFalse:[ |
4503 | 954 |
|graphicsDevice| |
955 |
||
4994 | 956 |
graphicsDevice := device ? Screen current. |
4503 | 957 |
m := (MenuView onDevice:graphicsDevice) labels:list. |
3429
f2b4b84cd477
added preferredWidth & preferredHeight
Claus Gittinger <cg@exept.de>
parents:
3369
diff
changeset
|
958 |
menuPrefX := m preferredWidth. |
1348 | 959 |
|
960 |
"/ the menuView returns rubbish ... |
|
961 |
"/ menuPrefY := (m preferredExtentForLines:1 cols:10) y |
|
962 |
||
963 |
"/ any non-strings ? |
|
964 |
menuPrefY := list |
|
965 |
inject:('X' heightOn:self) |
|
966 |
into:[:max :el | el isString ifTrue:[ |
|
967 |
max |
|
968 |
] ifFalse:[ |
|
969 |
max max:(el heightOn:self) |
|
970 |
] |
|
971 |
]. |
|
129 | 972 |
]. |
973 |
||
302
8af5f51ce7a5
preferredExtent is sum of menu + button
Claus Gittinger <cg@exept.de>
parents:
285
diff
changeset
|
974 |
fieldPref := field preferredExtent. |
8af5f51ce7a5
preferredExtent is sum of menu + button
Claus Gittinger <cg@exept.de>
parents:
285
diff
changeset
|
975 |
buttonPref := pullDownButton preferredExtent. |
8af5f51ce7a5
preferredExtent is sum of menu + button
Claus Gittinger <cg@exept.de>
parents:
285
diff
changeset
|
976 |
|
319 | 977 |
w := ((fieldPref x max:menuPrefX) max:50) + buttonPref x. |
978 |
w := w + margin + margin. |
|
683 | 979 |
h := (fieldPref y max:buttonPref y) max:menuPrefY. |
319 | 980 |
h := h + margin + margin. |
981 |
^ w @ h |
|
129 | 982 |
|
4060 | 983 |
"Created: / 28-02-1996 / 15:03:17 / cg" |
984 |
"Modified: / 18-07-2011 / 09:31:31 / cg" |
|
129 | 985 |
! ! |
986 |
||
4832 | 987 |
!ComboView methodsFor:'testing'! |
988 |
||
989 |
isComboView |
|
990 |
^ true |
|
991 |
! ! |
|
992 |
||
263
865b7d99d3f5
added an example for a menu-pull-hook
Claus Gittinger <cg@exept.de>
parents:
247
diff
changeset
|
993 |
!ComboView class methodsFor:'documentation'! |
129 | 994 |
|
995 |
version |
|
4824 | 996 |
^ '$Header$' |
3777
83c52227471d
changed: #createPullDownMenuForList:
Claus Gittinger <cg@exept.de>
parents:
3755
diff
changeset
|
997 |
! |
83c52227471d
changed: #createPullDownMenuForList:
Claus Gittinger <cg@exept.de>
parents:
3755
diff
changeset
|
998 |
|
83c52227471d
changed: #createPullDownMenuForList:
Claus Gittinger <cg@exept.de>
parents:
3755
diff
changeset
|
999 |
version_CVS |
4824 | 1000 |
^ '$Header$' |
129 | 1001 |
! ! |
4180 | 1002 |