equal
deleted
inserted
replaced
38 " |
38 " |
39 ! |
39 ! |
40 |
40 |
41 version |
41 version |
42 " |
42 " |
43 $Header: /cvs/stx/stx/libwidg/ButtonController.st,v 1.14 1995-08-24 03:02:02 claus Exp $ |
43 $Header: /cvs/stx/stx/libwidg/ButtonController.st,v 1.15 1995-08-27 00:33:47 claus Exp $ |
44 " |
44 " |
45 ! |
45 ! |
46 |
46 |
47 documentation |
47 documentation |
48 " |
48 " |
416 ] |
416 ] |
417 ] |
417 ] |
418 ! |
418 ! |
419 |
419 |
420 performAction |
420 performAction |
421 |action value channel| |
421 |action value| |
422 |
422 |
423 isToggle ifTrue:[ |
423 isToggle ifTrue:[ |
424 value := pressed |
424 value := pressed |
425 ] ifFalse:[ |
425 ] ifFalse:[ |
426 value := true |
426 value := true |
429 " |
429 " |
430 ST/X style actionBlock evaluation & channel notification ... |
430 ST/X style actionBlock evaluation & channel notification ... |
431 " |
431 " |
432 pressed ifTrue:[ |
432 pressed ifTrue:[ |
433 action := pressActionBlock. |
433 action := pressActionBlock. |
434 channel := pressChannel. |
|
435 ] ifFalse:[ |
434 ] ifFalse:[ |
436 action := releaseActionBlock. |
435 action := releaseActionBlock. |
437 channel := releaseChannel. |
|
438 ]. |
436 ]. |
439 action notNil ifTrue:[ |
437 action notNil ifTrue:[ |
440 active := true. |
438 active := true. |
441 action numArgs == 0 ifTrue:[ |
439 action numArgs == 0 ifTrue:[ |
442 action value |
440 action value |
443 ] ifFalse:[ |
441 ] ifFalse:[ |
444 action value:value |
442 action value:value |
445 ]. |
443 ]. |
446 active := false. |
444 active := false. |
447 ]. |
445 ]. |
448 channel notNil ifTrue:[ |
446 pressChannel notNil ifTrue:[ |
449 channel value:true |
447 pressChannel value:pressed |
|
448 ]. |
|
449 releaseChannel notNil ifTrue:[ |
|
450 releaseChannel value:pressed not |
450 ]. |
451 ]. |
451 |
452 |
452 " |
453 " |
453 ST-80 style model notification ... |
454 ST-80 style model notification ... |
454 " |
455 " |