author | Claus Gittinger <cg@exept.de> |
Fri, 09 Feb 1996 23:13:39 +0100 | |
changeset 349 | e4382398fc59 |
parent 347 | 9ba2cb5c2ec7 |
child 417 | 3f48ca2beb7d |
permissions | -rw-r--r-- |
76 | 1 |
" |
2 |
COPYRIGHT (c) 1995 by 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 |
" |
|
12 |
||
13 |
Controller subclass:#ButtonController |
|
262 | 14 |
instanceVariableNames:'enableChannel pressChannel releaseChannel pressed active entered |
220
635d3f583f61
fast repeat if shift is pressed
Claus Gittinger <cg@exept.de>
parents:
203
diff
changeset
|
15 |
isTriggerOnDown autoRepeat repeatBlock initialDelay repeatDelay |
635d3f583f61
fast repeat if shift is pressed
Claus Gittinger <cg@exept.de>
parents:
203
diff
changeset
|
16 |
pressActionBlock releaseActionBlock isToggle' |
262 | 17 |
classVariableNames:'' |
18 |
poolDictionaries:'' |
|
19 |
category:'Interface-Support-Controllers' |
|
76 | 20 |
! |
21 |
||
22 |
!ButtonController class methodsFor:'documentation'! |
|
23 |
||
24 |
copyright |
|
25 |
" |
|
26 |
COPYRIGHT (c) 1995 by Claus Gittinger |
|
27 |
All Rights Reserved |
|
28 |
||
29 |
This software is furnished under a license and may be used |
|
30 |
only in accordance with the terms of that license and with the |
|
31 |
inclusion of the above copyright notice. This software may not |
|
32 |
be provided or otherwise made available to, or used by, any |
|
33 |
other person. No title to or ownership of the software is |
|
34 |
hereby transferred. |
|
35 |
" |
|
36 |
! |
|
37 |
||
38 |
documentation |
|
39 |
" |
|
40 |
ButtonControllers are used with buttons and handle all user interaction. |
|
41 |
These are automatically created when a Button is created, therefore no manual |
|
42 |
action is required for creation. |
|
133 | 43 |
In normal applications, you dont have to care for the controller; |
44 |
access to the controllers behavior is possible via messages to the button. |
|
125 | 45 |
(setting actions, controlling autorepeat etc.) |
76 | 46 |
|
133 | 47 |
See examples in the Button class. |
48 |
||
76 | 49 |
Instance variables: |
50 |
||
133 | 51 |
enableChannel <ValueHolder pressing is allowed (default: true) |
52 |
on Boolean> |
|
125 | 53 |
|
76 | 54 |
pressed <Boolean> true if currently pressed (read-only) |
125 | 55 |
|
76 | 56 |
entered <Boolean> true if the cursor is currently in this view |
125 | 57 |
|
118 | 58 |
isTriggerOnDown <Boolean> controls if the action should be executed on |
76 | 59 |
press or on release (default: on release). |
125 | 60 |
|
61 |
isToggle <Boolean> controls if the button should show toggle |
|
62 |
behavior (as opposed to one-shot behavior) |
|
63 |
||
76 | 64 |
pressActionBlock <Block> block to evaluate when pressed (default: noop) |
125 | 65 |
|
76 | 66 |
releaseActionBlock <Block> block to evaluate when released (default: noop) |
125 | 67 |
|
76 | 68 |
autoRepeat <Boolean> auto-repeats when pressed long enough (default: false) |
125 | 69 |
|
76 | 70 |
initialDelay <Number> seconds till first auto-repeat (default: 0.2) |
125 | 71 |
|
76 | 72 |
repeatDelay <Number> seconds of repeat intervall (default: 0.025) |
125 | 73 |
|
76 | 74 |
repeatBlock <Block> block evaluated for auto-repeat (internal) |
125 | 75 |
|
76 | 76 |
active <Boolean> true during action evaluation (internal) |
77 |
" |
|
78 |
! ! |
|
79 |
||
80 |
!ButtonController class methodsFor:'defaults'! |
|
81 |
||
82 |
defaultInitialDelay |
|
83 |
"when autorepeat is enabled, and button is not released, |
|
84 |
start repeating after initialDelay seconds" |
|
85 |
||
86 |
^ 0.2 |
|
200 | 87 |
! |
88 |
||
89 |
defaultRepeatDelay |
|
90 |
"when autorepeat is enabled, and button is not released, |
|
91 |
repeat every repeatDelay seconds" |
|
92 |
||
93 |
^ 0.025 |
|
76 | 94 |
! ! |
95 |
||
200 | 96 |
!ButtonController methodsFor:'accessing-behavior'! |
97 |
||
98 |
action:aBlock |
|
99 |
"convenient method: depending on the setting the triggerOnDown flag, |
|
347 | 100 |
either set the press-action & clear any release-action or |
200 | 101 |
vice versa, set the release-action and clear the press-action." |
76 | 102 |
|
200 | 103 |
isTriggerOnDown ifTrue:[ |
347 | 104 |
releaseActionBlock := nil. |
105 |
pressActionBlock := aBlock |
|
200 | 106 |
] ifFalse:[ |
347 | 107 |
releaseActionBlock := aBlock. |
108 |
pressActionBlock := nil |
|
200 | 109 |
] |
347 | 110 |
|
111 |
"Modified: 9.2.1996 / 22:41:22 / cg" |
|
200 | 112 |
! |
118 | 113 |
|
200 | 114 |
autoRepeat |
347 | 115 |
"turn on autorepeat. OBSOLETE; use #autoRepeat:" |
200 | 116 |
|
347 | 117 |
self autoRepeat:true. |
118 |
||
119 |
"Modified: 9.2.1996 / 22:42:46 / cg" |
|
118 | 120 |
! |
121 |
||
200 | 122 |
autoRepeat:aBoolean |
123 |
"turn on/off autorepeat" |
|
124 |
||
125 |
autoRepeat := aBoolean. |
|
126 |
repeatBlock := [self repeat] |
|
121 | 127 |
|
200 | 128 |
"Modified: 5.9.1995 / 22:06:00 / claus" |
129 |
! |
|
130 |
||
131 |
beToggle |
|
132 |
"make the receiver act like a toggle" |
|
133 |
||
134 |
isTriggerOnDown := true. |
|
135 |
isToggle := true |
|
121 | 136 |
! |
76 | 137 |
|
200 | 138 |
beTriggerOnDown |
139 |
"make the receiver act on button press" |
|
140 |
||
141 |
isTriggerOnDown := true |
|
142 |
! |
|
143 |
||
144 |
beTriggerOnUp |
|
145 |
"make the receiver act on button release" |
|
121 | 146 |
|
200 | 147 |
isTriggerOnDown := false |
148 |
! |
|
149 |
||
150 |
disable |
|
151 |
"disable the button" |
|
152 |
||
153 |
enableChannel value ifTrue:[ |
|
154 |
enableChannel value:false. |
|
155 |
"/ view redraw - not needed; I listen to enableChannel |
|
156 |
] |
|
121 | 157 |
! |
158 |
||
200 | 159 |
enable |
160 |
"enable the button" |
|
121 | 161 |
|
200 | 162 |
enableChannel value ifFalse:[ |
163 |
enableChannel value:true. |
|
164 |
"/ view redraw - not needed; I listen to enableChannel |
|
165 |
] |
|
76 | 166 |
! |
167 |
||
200 | 168 |
isTriggerOnDown |
169 |
"return true, if I trigger on press |
|
170 |
(in contrast to triggering on up, which is the default)" |
|
171 |
||
172 |
^ isTriggerOnDown |
|
173 |
! |
|
174 |
||
175 |
pressAction |
|
176 |
"return the pressAction; thats the block which gets evaluated |
|
177 |
when the button is pressed (if non-nil)" |
|
178 |
||
179 |
^ pressActionBlock |
|
180 |
! |
|
181 |
||
182 |
pressAction:aBlock |
|
183 |
"define the action to be performed on press" |
|
184 |
||
185 |
pressActionBlock := aBlock |
|
128 | 186 |
! |
187 |
||
200 | 188 |
releaseAction |
189 |
"return the releaseAction; thats the block which gets evaluated |
|
190 |
when the button is relreased (if non-nil)" |
|
191 |
||
192 |
^ releaseActionBlock |
|
193 |
! |
|
194 |
||
195 |
releaseAction:aBlock |
|
196 |
"define the action to be performed on release" |
|
197 |
||
198 |
releaseActionBlock := aBlock |
|
128 | 199 |
! |
200 |
||
200 | 201 |
triggerOnDown:aBoolean |
202 |
"set/clear the flag which controls if the action block is to be evaluated |
|
203 |
on press or on release. |
|
204 |
(see also ST-80 compatibility methods beTriggerOn*)" |
|
205 |
||
206 |
isTriggerOnDown := aBoolean |
|
128 | 207 |
! ! |
208 |
||
145 | 209 |
!ButtonController methodsFor:'accessing-channels'! |
210 |
||
211 |
enableChannel |
|
212 |
"return the valueHolder which holdes the enable |
|
213 |
boolean value" |
|
214 |
||
215 |
^ enableChannel |
|
216 |
! |
|
217 |
||
218 |
enableChannel:aValueHolder |
|
219 |
"set the valueHolder, which holds the enable boolean value" |
|
220 |
||
162 | 221 |
|wasEnabled| |
222 |
||
145 | 223 |
enableChannel notNil ifTrue:[ |
162 | 224 |
wasEnabled := enableChannel value. |
258
ae4b8f1a6738
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
220
diff
changeset
|
225 |
enableChannel retractInterestsFor:self. |
162 | 226 |
] ifFalse:[ |
227 |
wasEnabled := true |
|
145 | 228 |
]. |
229 |
enableChannel := aValueHolder. |
|
230 |
aValueHolder onChangeSend:#enableStateChange to:self. |
|
162 | 231 |
enableChannel value ~~ wasEnabled ifTrue:[ |
232 |
self enableStateChange |
|
145 | 233 |
] |
162 | 234 |
|
235 |
"Modified: 17.9.1995 / 19:41:18 / claus" |
|
145 | 236 |
! |
237 |
||
238 |
pressChannel:aChannel |
|
239 |
pressChannel := aChannel |
|
240 |
! |
|
241 |
||
242 |
releaseChannel:aChannel |
|
243 |
releaseChannel := aChannel |
|
244 |
! ! |
|
245 |
||
200 | 246 |
!ButtonController methodsFor:'accessing-state'! |
76 | 247 |
|
200 | 248 |
active |
249 |
"return true, if I am active; |
|
250 |
that is: currently performing my action. |
|
251 |
This query can be used to avoid multiple redraws." |
|
76 | 252 |
|
200 | 253 |
^ active |
128 | 254 |
! |
255 |
||
200 | 256 |
active:aBoolean |
257 |
active := aBoolean |
|
76 | 258 |
! |
259 |
||
200 | 260 |
enabled |
261 |
"return true, if I am enabled" |
|
128 | 262 |
|
200 | 263 |
^ enableChannel value |
76 | 264 |
! |
265 |
||
200 | 266 |
entered |
267 |
"return true, if the mouse pointer is currently in my view" |
|
155 | 268 |
|
200 | 269 |
^ entered |
270 |
! |
|
155 | 271 |
|
200 | 272 |
entered:aBoolean |
273 |
entered := aBoolean |
|
155 | 274 |
! |
275 |
||
200 | 276 |
pressed |
277 |
"return true, if I am pressed" |
|
76 | 278 |
|
200 | 279 |
^ pressed |
76 | 280 |
! |
281 |
||
200 | 282 |
pressed:aBoolean |
283 |
pressed ~~ aBoolean ifTrue:[ |
|
284 |
pressed := aBoolean. |
|
285 |
self performAction. |
|
118 | 286 |
]. |
287 |
! |
|
288 |
||
200 | 289 |
setPressed:aBoolean |
290 |
pressed := aBoolean. |
|
121 | 291 |
|
200 | 292 |
"Created: 14.11.1995 / 21:37:08 / cg" |
266 | 293 |
! |
294 |
||
295 |
toggle |
|
296 |
"toggle and perform the action" |
|
297 |
||
298 |
enableChannel value ifTrue:[ |
|
299 |
self toggleNoAction. |
|
300 |
self performAction. |
|
301 |
view changed:#toggle with:pressed |
|
302 |
] |
|
303 |
! |
|
304 |
||
305 |
toggleNoAction |
|
306 |
"toggle, but do NOT perform any action" |
|
307 |
||
308 |
pressed ifTrue:[ |
|
309 |
view turnOff. |
|
310 |
pressed := false. |
|
311 |
] ifFalse:[ |
|
312 |
view turnOn. |
|
313 |
pressed := true. |
|
314 |
]. |
|
76 | 315 |
! ! |
316 |
||
317 |
!ButtonController methodsFor:'event handling'! |
|
318 |
||
200 | 319 |
buttonMultiPress:button x:x y:y |
320 |
^ self buttonPress:button x:x y:y |
|
321 |
! |
|
322 |
||
76 | 323 |
buttonPress:button x:x y:y |
324 |
(button == 1 or:[button == #select]) ifFalse:[ |
|
266 | 325 |
^ super buttonPress:button x:x y:y |
76 | 326 |
]. |
327 |
||
133 | 328 |
enableChannel value ifTrue:[ |
266 | 329 |
isToggle ifTrue:[ |
330 |
self toggle. |
|
331 |
^ self |
|
332 |
]. |
|
118 | 333 |
|
266 | 334 |
pressed ifFalse:[ |
335 |
pressed := true. |
|
336 |
view showActive. |
|
76 | 337 |
|
266 | 338 |
(pressActionBlock notNil or:[model notNil]) ifTrue:[ |
339 |
" |
|
340 |
force output - so that button is drawn correctly in case |
|
341 |
of any long-computation (at high priority) |
|
342 |
" |
|
343 |
view flush. |
|
344 |
]. |
|
76 | 345 |
|
266 | 346 |
self performAction. |
76 | 347 |
|
266 | 348 |
autoRepeat ifTrue:[ |
349 |
Processor addTimedBlock:repeatBlock afterSeconds:initialDelay |
|
350 |
] |
|
351 |
] |
|
76 | 352 |
] |
262 | 353 |
|
354 |
"Modified: 16.12.1995 / 17:31:55 / cg" |
|
76 | 355 |
! |
356 |
||
357 |
buttonRelease:button x:x y:y |
|
358 |
"button was released - if enabled, perform releaseaction" |
|
359 |
||
360 |
(button == 1 or:[button == #select]) ifFalse:[ |
|
266 | 361 |
^ super buttonRelease:button x:x y:y |
76 | 362 |
]. |
118 | 363 |
|
364 |
isToggle ifTrue:[ |
|
266 | 365 |
^ self |
118 | 366 |
]. |
367 |
||
76 | 368 |
pressed ifTrue:[ |
266 | 369 |
autoRepeat ifTrue:[ |
370 |
Processor removeTimedBlock:repeatBlock |
|
371 |
]. |
|
372 |
pressed := false. |
|
373 |
view showPassive. |
|
76 | 374 |
|
266 | 375 |
enableChannel value ifTrue:[ |
376 |
" |
|
377 |
only perform action if released within myself |
|
378 |
" |
|
379 |
((x >= 0) |
|
380 |
and:[x <= view width |
|
381 |
and:[y >= 0 |
|
382 |
and:[y <= view height]]]) ifTrue:[ |
|
383 |
(releaseActionBlock notNil or:[model notNil]) ifTrue:[ |
|
384 |
" |
|
385 |
force output - so that button is drawn correctly in case |
|
386 |
of any long-computation (at high priority) |
|
387 |
" |
|
388 |
view flush. |
|
389 |
]. |
|
76 | 390 |
|
266 | 391 |
self performAction. |
392 |
] |
|
393 |
] |
|
76 | 394 |
] |
262 | 395 |
|
396 |
"Modified: 16.12.1995 / 17:32:09 / cg" |
|
76 | 397 |
! |
398 |
||
200 | 399 |
enableStateChange |
400 |
"this is sent, whenever the enable value has changed" |
|
76 | 401 |
|
200 | 402 |
view notNil ifTrue:[view enableStateChangeRedraw] |
403 |
||
404 |
"Modified: 17.9.1995 / 19:55:52 / claus" |
|
76 | 405 |
! |
406 |
||
200 | 407 |
keyPress:key x:x y:y |
408 |
"trigger on Return and space, if I am the focusView of my group |
|
409 |
(i.e. if I got an explicit focus)" |
|
121 | 410 |
|
349
e4382398fc59
ignore Return key - its meant to close a box
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
411 |
key == Character space ifTrue:[ |
e4382398fc59
ignore Return key - its meant to close a box
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
412 |
view hasFocus ifTrue:[ |
e4382398fc59
ignore Return key - its meant to close a box
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
413 |
"just simulate a buttonPress/release here." |
e4382398fc59
ignore Return key - its meant to close a box
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
414 |
self buttonPress:1 x:0 y:0. |
e4382398fc59
ignore Return key - its meant to close a box
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
415 |
self buttonRelease:1 x:0 y:0. |
e4382398fc59
ignore Return key - its meant to close a box
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
416 |
^ self. |
e4382398fc59
ignore Return key - its meant to close a box
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
417 |
] |
200 | 418 |
]. |
419 |
view keyPress:key x:x y:y |
|
349
e4382398fc59
ignore Return key - its meant to close a box
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
420 |
|
e4382398fc59
ignore Return key - its meant to close a box
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
421 |
"Modified: 9.2.1996 / 23:11:58 / cg" |
121 | 422 |
! |
423 |
||
424 |
performAction |
|
146 | 425 |
|action value| |
133 | 426 |
|
427 |
isToggle ifTrue:[ |
|
428 |
value := pressed |
|
429 |
] ifFalse:[ |
|
430 |
value := true |
|
431 |
]. |
|
76 | 432 |
|
125 | 433 |
" |
145 | 434 |
ST/X style actionBlock evaluation & channel notification ... |
125 | 435 |
" |
76 | 436 |
pressed ifTrue:[ |
145 | 437 |
action := pressActionBlock. |
121 | 438 |
] ifFalse:[ |
145 | 439 |
action := releaseActionBlock. |
121 | 440 |
]. |
125 | 441 |
action notNil ifTrue:[ |
442 |
active := true. |
|
443 |
action numArgs == 0 ifTrue:[ |
|
444 |
action value |
|
445 |
] ifFalse:[ |
|
133 | 446 |
action value:value |
125 | 447 |
]. |
448 |
active := false. |
|
449 |
]. |
|
146 | 450 |
pressChannel notNil ifTrue:[ |
451 |
pressChannel value:pressed |
|
452 |
]. |
|
453 |
releaseChannel notNil ifTrue:[ |
|
454 |
releaseChannel value:pressed not |
|
145 | 455 |
]. |
76 | 456 |
|
125 | 457 |
" |
458 |
ST-80 style model notification ... |
|
459 |
" |
|
121 | 460 |
(isToggle |
461 |
or:[(isTriggerOnDown and:[pressed]) |
|
462 |
or:[isTriggerOnDown not and:[pressed not]]]) ifTrue:[ |
|
125 | 463 |
"the ST-80 way of doing things" |
464 |
view notNil ifTrue:[ |
|
465 |
active := true. |
|
133 | 466 |
view sendChangeMessageWith:value. |
125 | 467 |
active := false. |
468 |
]. |
|
121 | 469 |
]. |
76 | 470 |
! |
471 |
||
200 | 472 |
pointerEnter:state x:x y:y |
473 |
"mouse pointer entered my view. |
|
474 |
Redraw with enteredColors if they differ from the normal colors" |
|
475 |
||
476 |
entered := true. |
|
477 |
enableChannel value ifTrue:[ |
|
478 |
pressed ifTrue:[ |
|
479 |
" |
|
480 |
reentered after a leave with mouse-button down; |
|
481 |
restart autorepeating and/or if I am a button with |
|
482 |
triggerOnDown, show active again. |
|
483 |
" |
|
484 |
autoRepeat ifTrue:[ |
|
485 |
Processor addTimedBlock:repeatBlock afterSeconds:initialDelay |
|
486 |
]. |
|
487 |
isTriggerOnDown ifFalse:[ |
|
488 |
view showActive. |
|
489 |
] |
|
490 |
] ifFalse:[ |
|
491 |
view redraw |
|
492 |
] |
|
493 |
] |
|
76 | 494 |
! |
495 |
||
200 | 496 |
pointerLeave:state |
497 |
"mouse pointer left my view. |
|
498 |
Redraw with normal colors if they differ from enteredColors" |
|
76 | 499 |
|
200 | 500 |
entered := false. |
501 |
pressed ifTrue:[ |
|
502 |
" |
|
503 |
leave with mouse-button down; |
|
504 |
stop autorepeating and/or if I am a button with |
|
505 |
action on release, show passive |
|
506 |
" |
|
507 |
autoRepeat ifTrue:[ |
|
508 |
Processor removeTimedBlock:repeatBlock |
|
509 |
]. |
|
510 |
isTriggerOnDown ifFalse:[ |
|
511 |
view showPassive. |
|
76 | 512 |
] |
200 | 513 |
] ifFalse:[ |
514 |
enableChannel value ifTrue:[ |
|
515 |
view redraw |
|
516 |
] |
|
517 |
] |
|
76 | 518 |
! |
519 |
||
121 | 520 |
repeat |
521 |
"this is sent from the autorepeat-block, when the button has been pressed long |
|
522 |
enough; it simulates a release-press, by evaluating both release |
|
523 |
and press actions." |
|
76 | 524 |
|
220
635d3f583f61
fast repeat if shift is pressed
Claus Gittinger <cg@exept.de>
parents:
203
diff
changeset
|
525 |
|dly| |
635d3f583f61
fast repeat if shift is pressed
Claus Gittinger <cg@exept.de>
parents:
203
diff
changeset
|
526 |
|
76 | 527 |
pressed ifTrue:[ |
133 | 528 |
enableChannel value ifTrue:[ |
121 | 529 |
active ifFalse:[ |
155 | 530 |
self performAction. |
531 |
"/ active := true. |
|
532 |
"/ releaseActionBlock notNil ifTrue:[releaseActionBlock value]. |
|
533 |
"/ pressActionBlock notNil ifTrue:[pressActionBlock value]. |
|
534 |
"/ active := false. |
|
121 | 535 |
|
536 |
autoRepeat ifTrue:[ |
|
220
635d3f583f61
fast repeat if shift is pressed
Claus Gittinger <cg@exept.de>
parents:
203
diff
changeset
|
537 |
self sensor shiftDown ifTrue:[ |
635d3f583f61
fast repeat if shift is pressed
Claus Gittinger <cg@exept.de>
parents:
203
diff
changeset
|
538 |
dly := repeatDelay / 4. |
635d3f583f61
fast repeat if shift is pressed
Claus Gittinger <cg@exept.de>
parents:
203
diff
changeset
|
539 |
] ifFalse:[ |
635d3f583f61
fast repeat if shift is pressed
Claus Gittinger <cg@exept.de>
parents:
203
diff
changeset
|
540 |
dly := repeatDelay |
635d3f583f61
fast repeat if shift is pressed
Claus Gittinger <cg@exept.de>
parents:
203
diff
changeset
|
541 |
]. |
635d3f583f61
fast repeat if shift is pressed
Claus Gittinger <cg@exept.de>
parents:
203
diff
changeset
|
542 |
Processor addTimedBlock:repeatBlock afterSeconds:dly |
121 | 543 |
] |
544 |
] |
|
76 | 545 |
] |
546 |
] |
|
547 |
! ! |
|
121 | 548 |
|
549 |
!ButtonController methodsFor:'initialization'! |
|
550 |
||
551 |
initialize |
|
552 |
super initialize. |
|
553 |
||
266 | 554 |
enableChannel := true asValue. |
555 |
enableChannel onChangeSend:#enableStateChange to:self. |
|
133 | 556 |
|
121 | 557 |
active := false. |
558 |
pressed := false. |
|
559 |
entered := false. |
|
560 |
autoRepeat := false. |
|
561 |
initialDelay := self class defaultInitialDelay. |
|
562 |
repeatDelay := self class defaultRepeatDelay. |
|
563 |
isTriggerOnDown := false. |
|
564 |
isToggle := false. |
|
565 |
! ! |
|
200 | 566 |
|
203 | 567 |
!ButtonController class methodsFor:'documentation'! |
568 |
||
569 |
version |
|
349
e4382398fc59
ignore Return key - its meant to close a box
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
570 |
^ '$Header: /cvs/stx/stx/libwidg/Attic/ButtonC.st,v 1.29 1996-02-09 22:13:39 cg Exp $' |
203 | 571 |
! ! |