3430 buttonMotion:button x:x y:y view:aView |
3430 buttonMotion:button x:x y:y view:aView |
3431 "forward a button-motion for some view" |
3431 "forward a button-motion for some view" |
3432 |
3432 |
3433 |sensor| |
3433 |sensor| |
3434 |
3434 |
|
3435 aView isNil ifTrue:[ |
|
3436 "/ event arrived, after I destroyed it myself |
|
3437 ^ self |
|
3438 ]. |
3435 (sensor := aView sensor) notNil ifTrue:[ |
3439 (sensor := aView sensor) notNil ifTrue:[ |
3436 sensor buttonMotion:button x:x y:y view:aView |
3440 sensor buttonMotion:button x:x y:y view:aView |
3437 ] ifFalse:[ |
3441 ] ifFalse:[ |
3438 aView shown ifTrue:[ "/ could be a late event arrival |
3442 aView shown ifTrue:[ "/ could be a late event arrival |
3439 " |
3443 " |
3440 if there is no sensor ... |
3444 if there is no sensor ... |
3441 " |
3445 " |
3442 aView |
3446 aView |
3443 dispatchEvent:#buttonMotion:x:y: |
3447 dispatchEvent:#buttonMotion:x:y: |
3444 arguments:(Array with:button with:x with:y) |
3448 arguments:(Array with:button with:x with:y) |
3445 |
3449 |
3446 "/ WindowEvent |
3450 "/ WindowEvent |
3447 "/ sendEvent:#buttonMotion:x:y: |
3451 "/ sendEvent:#buttonMotion:x:y: |
3448 "/ arguments:(Array with:button with:x with:y) |
3452 "/ arguments:(Array with:button with:x with:y) |
3449 "/ view:aView |
3453 "/ view:aView |
3450 ] |
3454 ] |
3451 ] |
3455 ] |
3452 |
3456 |
3453 "Modified: / 20.5.1998 / 22:50:32 / cg" |
3457 "Modified: / 20.5.1998 / 22:50:32 / cg" |
3454 ! |
3458 ! |
3455 |
3459 |
3456 buttonMultiPress:button x:x y:y view:aView |
3460 buttonMultiPress:button x:x y:y view:aView |
3457 "forward a button-multi-press event for some view" |
3461 "forward a button-multi-press event for some view" |
3458 |
3462 |
3459 |sensor| |
3463 |sensor| |
3460 |
3464 |
|
3465 aView isNil ifTrue:[ |
|
3466 "/ event arrived, after I destroyed it myself |
|
3467 ^ self |
|
3468 ]. |
3461 (sensor := aView sensor) notNil ifTrue:[ |
3469 (sensor := aView sensor) notNil ifTrue:[ |
3462 sensor buttonMultiPress:button x:x y:y view:aView |
3470 sensor buttonMultiPress:button x:x y:y view:aView |
3463 ] ifFalse:[ |
3471 ] ifFalse:[ |
3464 aView shown ifTrue:[ "/ could be a late event arrival |
3472 aView shown ifTrue:[ "/ could be a late event arrival |
3465 " |
3473 " |
3466 if there is no sensor ... |
3474 if there is no sensor ... |
3467 " |
3475 " |
3468 aView |
3476 aView |
3469 dispatchEvent:#buttonMultiPress:x:y: |
3477 dispatchEvent:#buttonMultiPress:x:y: |
3470 arguments:(Array with:button with:x with:y) |
3478 arguments:(Array with:button with:x with:y) |
3471 |
3479 |
3472 "/ WindowEvent |
3480 "/ WindowEvent |
3473 "/ sendEvent:#buttonMultiPress:x:y: |
3481 "/ sendEvent:#buttonMultiPress:x:y: |
3474 "/ arguments:(Array with:button with:x with:y) |
3482 "/ arguments:(Array with:button with:x with:y) |
3475 "/ view:aView |
3483 "/ view:aView |
3476 ] |
3484 ] |
3477 ] |
3485 ] |
3478 |
3486 |
3479 "Modified: / 20.5.1998 / 22:50:49 / cg" |
3487 "Modified: / 20.5.1998 / 22:50:49 / cg" |
3480 ! |
3488 ! |
3481 |
3489 |
3482 buttonPress:button x:x y:y view:aView |
3490 buttonPress:button x:x y:y view:aView |
3483 "forward a button-press event for some view" |
3491 "forward a button-press event for some view" |
3484 |
3492 |
3485 |sensor| |
3493 |sensor| |
3486 |
3494 |
|
3495 aView isNil ifTrue:[ |
|
3496 "/ event arrived, after I destroyed it myself |
|
3497 ^ self |
|
3498 ]. |
3487 (sensor := aView sensor) notNil ifTrue:[ |
3499 (sensor := aView sensor) notNil ifTrue:[ |
3488 WindowsRightButtonBehavior == true ifTrue:[ |
3500 WindowsRightButtonBehavior == true ifTrue:[ |
3489 button >= 2 ifTrue:[ |
3501 button >= 2 ifTrue:[ |
3490 sensor buttonPress:1 x:x y:y view:aView. |
3502 sensor buttonPress:1 x:x y:y view:aView. |
3491 ^ self. |
3503 ^ self. |
3492 ] |
3504 ] |
3493 ]. |
3505 ]. |
3494 |
3506 |
3495 sensor buttonPress:button x:x y:y view:aView |
3507 sensor buttonPress:button x:x y:y view:aView |
3496 ] ifFalse:[ |
3508 ] ifFalse:[ |
3497 aView shown ifTrue:[ "/ could be a late event arrival |
3509 aView shown ifTrue:[ "/ could be a late event arrival |
3498 " |
3510 " |
3499 if there is no sensor ... |
3511 if there is no sensor ... |
3500 " |
3512 " |
3501 aView |
3513 aView |
3502 dispatchEvent:#buttonPress:x:y: |
3514 dispatchEvent:#buttonPress:x:y: |
3503 arguments:(Array with:button with:x with:y) |
3515 arguments:(Array with:button with:x with:y) |
3504 |
3516 |
3505 "/ WindowEvent |
3517 "/ WindowEvent |
3506 "/ sendEvent:#buttonPress:x:y: |
3518 "/ sendEvent:#buttonPress:x:y: |
3507 "/ arguments:(Array with:button with:x with:y) |
3519 "/ arguments:(Array with:button with:x with:y) |
3508 "/ view:aView |
3520 "/ view:aView |
3509 ] |
3521 ] |
3510 ] |
3522 ] |
3511 |
3523 |
3512 "Modified: / 20.5.1998 / 22:51:02 / cg" |
3524 "Modified: / 20.5.1998 / 22:51:02 / cg" |
3513 ! |
3525 ! |
3514 |
3526 |
3515 buttonRelease:button x:x y:y view:aView |
3527 buttonRelease:button x:x y:y view:aView |
3516 "forward a button-release event for some view" |
3528 "forward a button-release event for some view" |
3517 |
3529 |
3518 |sensor| |
3530 |sensor| |
3519 |
3531 |
|
3532 aView isNil ifTrue:[ |
|
3533 "/ event arrived, after I destroyed it myself |
|
3534 ^ self |
|
3535 ]. |
3520 (sensor := aView sensor) notNil ifTrue:[ |
3536 (sensor := aView sensor) notNil ifTrue:[ |
3521 WindowsRightButtonBehavior == true ifTrue:[ |
3537 WindowsRightButtonBehavior == true ifTrue:[ |
3522 button >= 2 ifTrue:[ |
3538 button >= 2 ifTrue:[ |
3523 sensor buttonRelease:1 x:x y:y view:aView. |
3539 sensor buttonRelease:1 x:x y:y view:aView. |
3524 sensor buttonPress:button x:x y:y view:aView. |
3540 sensor buttonPress:button x:x y:y view:aView. |
3525 sensor buttonRelease:button x:x y:y view:aView. |
3541 sensor buttonRelease:button x:x y:y view:aView. |
3526 ^ self. |
3542 ^ self. |
3527 ]. |
3543 ]. |
3528 ]. |
3544 ]. |
3529 sensor buttonRelease:button x:x y:y view:aView |
3545 sensor buttonRelease:button x:x y:y view:aView |
3530 ] ifFalse:[ |
3546 ] ifFalse:[ |
3531 aView shown ifTrue:[ "/ could be a late event arrival |
3547 aView shown ifTrue:[ "/ could be a late event arrival |
3532 " |
3548 " |
3533 if there is no sensor ... |
3549 if there is no sensor ... |
3534 " |
3550 " |
3535 aView |
3551 aView |
3536 dispatchEvent:#buttonRelease:x:y: |
3552 dispatchEvent:#buttonRelease:x:y: |
3537 arguments:(Array with:button with:x with:y) |
3553 arguments:(Array with:button with:x with:y) |
3538 |
3554 |
3539 "/ WindowEvent |
3555 "/ WindowEvent |
3540 "/ sendEvent:#buttonRelease:x:y: |
3556 "/ sendEvent:#buttonRelease:x:y: |
3541 "/ arguments:(Array with:button with:x with:y) |
3557 "/ arguments:(Array with:button with:x with:y) |
3542 "/ view:aView |
3558 "/ view:aView |
3543 ] |
3559 ] |
3544 ] |
3560 ] |
3545 |
3561 |
3546 "Modified: / 20.5.1998 / 22:51:13 / cg" |
3562 "Modified: / 20.5.1998 / 22:51:13 / cg" |
3547 ! |
3563 ! |
3548 |
3564 |
3549 configureX:x y:y width:w height:h view:aView |
3565 configureX:x y:y width:w height:h view:aView |
3550 "forward a configure for some view" |
3566 "forward a configure for some view" |
3551 |
3567 |
3552 |sensor| |
3568 |sensor| |
3553 |
3569 |
|
3570 aView isNil ifTrue:[ |
|
3571 "/ event arrived, after I destroyed it myself |
|
3572 ^ self |
|
3573 ]. |
3554 (sensor := aView sensor) notNil ifTrue:[ |
3574 (sensor := aView sensor) notNil ifTrue:[ |
3555 sensor configureX:x y:y width:w height:h view:aView |
3575 sensor configureX:x y:y width:w height:h view:aView |
3556 ] ifFalse:[ |
3576 ] ifFalse:[ |
3557 " |
3577 " |
3558 if there is no sensor ... |
3578 if there is no sensor ... |
3559 " |
3579 " |
3560 aView configureX:x y:y width:w height:h |
3580 aView configureX:x y:y width:w height:h |
3561 ] |
3581 ] |
3562 ! |
3582 ! |
3563 |
3583 |
3564 coveredBy:otherView view:aView |
3584 coveredBy:otherView view:aView |
3565 "forward a covered for some view" |
3585 "forward a covered for some view" |
3566 |
3586 |
|
3587 aView isNil ifTrue:[ |
|
3588 "/ event arrived, after I destroyed it myself |
|
3589 ^ self |
|
3590 ]. |
3567 "/ |sensor| |
3591 "/ |sensor| |
3568 "/ |
3592 "/ |
3569 "/ (sensor := aView sensor) notNil ifTrue:[ |
3593 "/ (sensor := aView sensor) notNil ifTrue:[ |
3570 "/ sensor coveredBy:otherView view:aView |
3594 "/ sensor coveredBy:otherView view:aView |
3571 "/ ] ifFalse:[ |
3595 "/ ] ifFalse:[ |
3572 "/ " |
3596 "/ " |
3573 "/ if there is no sensor ... |
3597 "/ if there is no sensor ... |
3574 "/ " |
3598 "/ " |
3575 aView coveredBy:otherView |
3599 aView coveredBy:otherView |
3576 "/ ] |
3600 "/ ] |
3577 |
3601 |
3578 "Modified: / 8.2.1999 / 15:24:52 / cg" |
3602 "Modified: / 8.2.1999 / 15:24:52 / cg" |
3579 ! |
3603 ! |
3580 |
3604 |
3581 destroyedView:aView |
3605 destroyedView:aView |
3582 "forward a destroyed event for some view" |
3606 "forward a destroyed event for some view" |
3583 |
3607 |
3584 |sensor| |
3608 |sensor| |
3585 |
3609 |
|
3610 aView isNil ifTrue:[ |
|
3611 "/ event arrived, after I destroyed it myself |
|
3612 ^ self |
|
3613 ]. |
3586 (sensor := aView sensor) notNil ifTrue:[ |
3614 (sensor := aView sensor) notNil ifTrue:[ |
3587 sensor destroyedView:aView |
3615 sensor destroyedView:aView |
3588 ] ifFalse:[ |
3616 ] ifFalse:[ |
3589 " |
3617 " |
3590 if there is no sensor ... |
3618 if there is no sensor ... |
3591 " |
3619 " |
3592 aView destroyed |
3620 aView destroyed |
3593 ] |
3621 ] |
3594 ! |
3622 ! |
3595 |
3623 |
3596 exposeX:x y:y width:w height:h view:aView |
3624 exposeX:x y:y width:w height:h view:aView |
3597 "forward an expose for some view" |
3625 "forward an expose for some view" |
3598 |
3626 |
3599 |sensor| |
3627 |sensor| |
3600 |
3628 |
|
3629 aView isNil ifTrue:[ |
|
3630 "/ event arrived, after I destroyed it myself |
|
3631 ^ self |
|
3632 ]. |
3601 (sensor := aView sensor) notNil ifTrue:[ |
3633 (sensor := aView sensor) notNil ifTrue:[ |
3602 sensor exposeX:x y:y width:w height:h view:aView |
3634 sensor exposeX:x y:y width:w height:h view:aView |
3603 ] ifFalse:[ |
3635 ] ifFalse:[ |
3604 " |
3636 " |
3605 if there is no sensor ... |
3637 if there is no sensor ... |
3606 " |
3638 " |
3607 aView |
3639 aView |
3608 dispatchEvent:#exposeX:y:width:height: |
3640 dispatchEvent:#exposeX:y:width:height: |
3609 arguments:(Array with:x with:y with:w with:h) |
3641 arguments:(Array with:x with:y with:w with:h) |
3610 |
3642 |
3611 "/ WindowEvent |
3643 "/ WindowEvent |
3612 "/ sendEvent:#exposeX:y:width:height: |
3644 "/ sendEvent:#exposeX:y:width:height: |
3613 "/ arguments:(Array with:x with:y with:w with:h) |
3645 "/ arguments:(Array with:x with:y with:w with:h) |
3614 "/ view:aView |
3646 "/ view:aView |
3737 |
3785 |
3738 |xlatedKey sensor| |
3786 |xlatedKey sensor| |
3739 |
3787 |
3740 self modifierKeyProcessing:untranslatedKey down:false. |
3788 self modifierKeyProcessing:untranslatedKey down:false. |
3741 |
3789 |
|
3790 aView isNil ifTrue:[ |
|
3791 "/ event arrived, after I destroyed it myself |
|
3792 ^ self |
|
3793 ]. |
3742 (sensor := aView sensor) notNil ifTrue:[ |
3794 (sensor := aView sensor) notNil ifTrue:[ |
3743 sensor keyRelease:untranslatedKey x:x y:y view:aView |
3795 sensor keyRelease:untranslatedKey x:x y:y view:aView |
3744 ] ifFalse:[ |
3796 ] ifFalse:[ |
3745 aView shown ifTrue:[ "/ could be a late event arrival |
3797 aView shown ifTrue:[ "/ could be a late event arrival |
3746 " |
3798 " |
3747 if there is no sensor ... |
3799 if there is no sensor ... |
3748 " |
3800 " |
3749 xlatedKey := self translateKey:untranslatedKey forView:aView. |
3801 xlatedKey := self translateKey:untranslatedKey forView:aView. |
3750 xlatedKey notNil ifTrue:[ |
3802 xlatedKey notNil ifTrue:[ |
3751 aView |
3803 aView |
3752 dispatchEvent:#keyRelease:x:y: |
3804 dispatchEvent:#keyRelease:x:y: |
3753 arguments:(Array with:xlatedKey with:x with:y) |
3805 arguments:(Array with:xlatedKey with:x with:y) |
3754 |
3806 |
3755 "/ WindowEvent |
3807 "/ WindowEvent |
3756 "/ sendEvent:#keyRelease:x:y: |
3808 "/ sendEvent:#keyRelease:x:y: |
3757 "/ arguments:(Array with:xlatedKey with:x with:y) |
3809 "/ arguments:(Array with:xlatedKey with:x with:y) |
3758 "/ view:aView |
3810 "/ view:aView |
3759 ] |
3811 ] |
3760 ] |
3812 ] |
3761 ] |
3813 ] |
3762 |
3814 |
3763 "Modified: / 20.5.1998 / 22:52:52 / cg" |
3815 "Modified: / 20.5.1998 / 22:52:52 / cg" |
3764 ! |
3816 ! |
3765 |
3817 |
3766 mappedView:aView |
3818 mappedView:aView |
3767 "forward a mapped event for some view" |
3819 "forward a mapped event for some view" |
3768 |
3820 |
3769 |sensor| |
3821 |sensor| |
3770 |
3822 |
|
3823 aView isNil ifTrue:[ |
|
3824 "/ event arrived, after I destroyed it myself |
|
3825 ^ self |
|
3826 ]. |
3771 (sensor := aView sensor) notNil ifTrue:[ |
3827 (sensor := aView sensor) notNil ifTrue:[ |
3772 sensor mappedView:aView |
3828 sensor mappedView:aView |
3773 ] ifFalse:[ |
3829 ] ifFalse:[ |
3774 " |
3830 " |
3775 if there is no sensor ... |
3831 if there is no sensor ... |
3776 " |
3832 " |
3777 aView mapped |
3833 aView mapped |
3778 ] |
3834 ] |
3779 ! |
3835 ! |
3780 |
3836 |
3781 mouseWheelMotion:buttonState x:x y:y amount:amount deltaTime:dTime view:aView |
3837 mouseWheelMotion:buttonState x:x y:y amount:amount deltaTime:dTime view:aView |
3782 "the mousewheel was moved by some amount (signed). |
3838 "the mousewheel was moved by some amount (signed). |
3783 This event is sent to the current pointer view (like keyPress/release)." |
3839 This event is sent to the current pointer view (like keyPress/release)." |
3784 |
3840 |
3785 |sensor| |
3841 |sensor| |
3786 |
3842 |
|
3843 aView isNil ifTrue:[ |
|
3844 "/ event arrived, after I destroyed it myself |
|
3845 ^ self |
|
3846 ]. |
3787 (sensor := aView sensor) notNil ifTrue:[ |
3847 (sensor := aView sensor) notNil ifTrue:[ |
3788 sensor mouseWheelMotion:buttonState x:x y:y amount:amount deltaTime:dTime view:aView |
3848 sensor mouseWheelMotion:buttonState x:x y:y amount:amount deltaTime:dTime view:aView |
3789 ] ifFalse:[ |
3849 ] ifFalse:[ |
3790 aView shown ifTrue:[ "/ could be a late event arrival |
3850 aView shown ifTrue:[ "/ could be a late event arrival |
3791 " |
3851 " |
3792 if there is no sensor ... |
3852 if there is no sensor ... |
3793 " |
3853 " |
3794 aView |
3854 aView |
3795 dispatchEvent:#mouseWheelMotion:x:y:amount:deltaTime: |
3855 dispatchEvent:#mouseWheelMotion:x:y:amount:deltaTime: |
3796 arguments:(Array with:buttonState with:x with:y with:amount with:dTime ) |
3856 arguments:(Array with:buttonState with:x with:y with:amount with:dTime ) |
3797 ] |
3857 ] |
3798 ] |
3858 ] |
3799 |
3859 |
3800 "Modified: / 21.5.1999 / 13:05:53 / cg" |
3860 "Modified: / 21.5.1999 / 13:05:53 / cg" |
3801 ! |
3861 ! |
3802 |
3862 |
3803 noExposeView:aView |
3863 noExposeView:aView |
3804 "forward a noExpose event for some view" |
3864 "forward a noExpose event for some view" |
3805 |
3865 |
3806 |sensor| |
3866 |sensor| |
3807 |
3867 |
|
3868 aView isNil ifTrue:[ |
|
3869 "/ event arrived, after I destroyed it myself |
|
3870 ^ self |
|
3871 ]. |
3808 (sensor := aView sensor) notNil ifTrue:[ |
3872 (sensor := aView sensor) notNil ifTrue:[ |
3809 sensor noExposeView:aView |
3873 sensor noExposeView:aView |
3810 ] ifFalse:[ |
3874 ] ifFalse:[ |
3811 " |
3875 " |
3812 if there is no sensor ... |
3876 if there is no sensor ... |
3813 " |
3877 " |
3814 aView noExpose |
3878 aView noExpose |
3815 ] |
3879 ] |
3816 ! |
3880 ! |
3817 |
3881 |
3818 pointerEnter:buttonState x:x y:y view:aView |
3882 pointerEnter:buttonState x:x y:y view:aView |
3819 "forward a pointer enter for some view" |
3883 "forward a pointer enter for some view" |
3820 |
3884 |
3821 |sensor| |
3885 |sensor| |
3822 |
3886 |
|
3887 aView isNil ifTrue:[ |
|
3888 "/ event arrived, after I destroyed it myself |
|
3889 ^ self |
|
3890 ]. |
3823 (sensor := aView sensor) notNil ifTrue:[ |
3891 (sensor := aView sensor) notNil ifTrue:[ |
3824 sensor pointerEnter:buttonState x:x y:y view:aView |
3892 sensor pointerEnter:buttonState x:x y:y view:aView |
3825 ] ifFalse:[ |
3893 ] ifFalse:[ |
3826 " |
3894 " |
3827 if there is no sensor ... |
3895 if there is no sensor ... |
3828 " |
3896 " |
3829 aView |
3897 aView |
3830 dispatchEvent:#pointerEnter:x:y: |
3898 dispatchEvent:#pointerEnter:x:y: |
3831 arguments:(Array with:buttonState with:x with:y) |
3899 arguments:(Array with:buttonState with:x with:y) |
3832 |
3900 |
3833 "/ WindowEvent |
3901 "/ WindowEvent |
3834 "/ sendEvent:#pointerEnter:x:y: |
3902 "/ sendEvent:#pointerEnter:x:y: |
3835 "/ arguments:(Array with:buttonState with:x with:y) |
3903 "/ arguments:(Array with:buttonState with:x with:y) |
3836 "/ view:aView |
3904 "/ view:aView |