DeviceWorkstation.st
changeset 3231 b7fc5adc9404
parent 3224 b7f5e47f9598
child 3236 3c7711c2e661
equal deleted inserted replaced
3230:e6e06f7b7df4 3231:b7fc5adc9404
  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
  3620 focusInView:aView
  3652 focusInView:aView
  3621     "forward a focusIn event for some view"
  3653     "forward a focusIn event for some view"
  3622 
  3654 
  3623     |sensor|
  3655     |sensor|
  3624 
  3656 
       
  3657     aView isNil ifTrue:[
       
  3658         "/ event arrived, after I destroyed it myself
       
  3659         ^ self
       
  3660     ].
  3625     (sensor := aView sensor) notNil ifTrue:[
  3661     (sensor := aView sensor) notNil ifTrue:[
  3626 	sensor focusInView:aView
  3662         sensor focusInView:aView
  3627     ] ifFalse:[
  3663     ] ifFalse:[
  3628 	"
  3664         "
  3629 	 if there is no sensor ...
  3665          if there is no sensor ...
  3630 	"
  3666         "
  3631 	aView
  3667         aView
  3632 	    dispatchEvent:#focusIn
  3668             dispatchEvent:#focusIn
  3633 	    arguments:nil
  3669             arguments:nil
  3634 
  3670 
  3635 "/        WindowEvent
  3671 "/        WindowEvent
  3636 "/            sendEvent:#focusIn
  3672 "/            sendEvent:#focusIn
  3637 "/            arguments:nil
  3673 "/            arguments:nil
  3638 "/            view:aView
  3674 "/            view:aView
  3644 focusOutView:aView 
  3680 focusOutView:aView 
  3645     "forward a focusOut event for some view"
  3681     "forward a focusOut event for some view"
  3646 
  3682 
  3647     |sensor|
  3683     |sensor|
  3648 
  3684 
       
  3685     aView isNil ifTrue:[
       
  3686         "/ event arrived, after I destroyed it myself
       
  3687         ^ self
       
  3688     ].
  3649     (sensor := aView sensor) notNil ifTrue:[
  3689     (sensor := aView sensor) notNil ifTrue:[
  3650 	sensor focusOutView:aView
  3690         sensor focusOutView:aView
  3651     ] ifFalse:[
  3691     ] ifFalse:[
  3652 	"
  3692         "
  3653 	 if there is no sensor ...
  3693          if there is no sensor ...
  3654 	"
  3694         "
  3655 	aView
  3695         aView
  3656 	    dispatchEvent:#focusOut
  3696             dispatchEvent:#focusOut
  3657 	    arguments:nil
  3697             arguments:nil
  3658 
  3698 
  3659 "/        WindowEvent
  3699 "/        WindowEvent
  3660 "/            sendEvent:#focusOut
  3700 "/            sendEvent:#focusOut
  3661 "/            arguments:nil
  3701 "/            arguments:nil
  3662 "/            view:aView
  3702 "/            view:aView
  3668 graphicsExposeX:x y:y width:w height:h final:final view:aView
  3708 graphicsExposeX:x y:y width:w height:h final:final view:aView
  3669     "forward a graphic expose for some view"
  3709     "forward a graphic expose for some view"
  3670 
  3710 
  3671     |sensor|
  3711     |sensor|
  3672 
  3712 
       
  3713     aView isNil ifTrue:[
       
  3714         "/ event arrived, after I destroyed it myself
       
  3715         ^ self
       
  3716     ].
  3673     (sensor := aView sensor) notNil ifTrue:[
  3717     (sensor := aView sensor) notNil ifTrue:[
  3674 	sensor graphicsExposeX:x y:y width:w height:h final:final view:aView
  3718         sensor graphicsExposeX:x y:y width:w height:h final:final view:aView
  3675     ] ifFalse:[
  3719     ] ifFalse:[
  3676 	"
  3720         "
  3677 	 if there is no sensor ...
  3721          if there is no sensor ...
  3678 	"
  3722         "
  3679 	aView
  3723         aView
  3680 	    dispatchEvent:#graphicsExposeX:y:width:height:final:
  3724             dispatchEvent:#graphicsExposeX:y:width:height:final:
  3681 	    arguments:(Array with:x with:y with:w with:h with:final)
  3725             arguments:(Array with:x with:y with:w with:h with:final)
  3682 
  3726 
  3683 "/        WindowEvent
  3727 "/        WindowEvent
  3684 "/            sendEvent:#graphicsExposeX:y:width:height:final:
  3728 "/            sendEvent:#graphicsExposeX:y:width:height:final:
  3685 "/            arguments:(Array with:x with:y with:w with:h with:final)
  3729 "/            arguments:(Array with:x with:y with:w with:h with:final)
  3686 "/            view:aView
  3730 "/            view:aView
  3698 
  3742 
  3699     "/
  3743     "/
  3700     "/ ctrl-Esc gives up focus
  3744     "/ ctrl-Esc gives up focus
  3701     "/
  3745     "/
  3702     untranslatedKey == #Escape ifTrue:[
  3746     untranslatedKey == #Escape ifTrue:[
  3703 	ctrlDown ifTrue:[
  3747         ctrlDown ifTrue:[
  3704 	    self ungrabPointer.
  3748             self ungrabPointer.
  3705 	    self setInputFocusTo:nil 
  3749             self setInputFocusTo:nil 
  3706 	]
  3750         ]
  3707     ].
  3751     ].
  3708 
  3752 
  3709     self modifierKeyProcessing:untranslatedKey down:true.
  3753     self modifierKeyProcessing:untranslatedKey down:true.
  3710 
  3754 
       
  3755     aView isNil ifTrue:[
       
  3756         "/ event arrived, after I destroyed it myself
       
  3757         ^ self
       
  3758     ].
  3711     (sensor := aView sensor) notNil ifTrue:[
  3759     (sensor := aView sensor) notNil ifTrue:[
  3712 	sensor keyPress:untranslatedKey x:x y:y view:aView
  3760         sensor keyPress:untranslatedKey x:x y:y view:aView
  3713     ] ifFalse:[
  3761     ] ifFalse:[
  3714 	aView shown ifTrue:[ "/ could be a late event arrival
  3762         aView shown ifTrue:[ "/ could be a late event arrival
  3715 	    "
  3763             "
  3716 	     if there is no sensor ...
  3764              if there is no sensor ...
  3717 	    "
  3765             "
  3718 	    xlatedKey := self translateKey:untranslatedKey forView:aView.
  3766             xlatedKey := self translateKey:untranslatedKey forView:aView.
  3719 	    xlatedKey notNil ifTrue:[
  3767             xlatedKey notNil ifTrue:[
  3720 		aView
  3768                 aView
  3721 		    dispatchEvent:#keyPress:x:y:
  3769                     dispatchEvent:#keyPress:x:y:
  3722 		    arguments:(Array with:xlatedKey with:x with:y)
  3770                     arguments:(Array with:xlatedKey with:x with:y)
  3723 
  3771 
  3724 "/                WindowEvent
  3772 "/                WindowEvent
  3725 "/                  sendEvent:#keyPress:x:y:
  3773 "/                  sendEvent:#keyPress:x:y:
  3726 "/                  arguments:(Array with:xlatedKey with:x with:y)
  3774 "/                  arguments:(Array with:xlatedKey with:x with:y)
  3727 "/                  view:aView
  3775 "/                  view:aView
  3728 	    ]
  3776             ]
  3729 	]
  3777         ]
  3730     ]
  3778     ]
  3731 
  3779 
  3732     "Modified: / 20.5.1998 / 22:52:36 / cg"
  3780     "Modified: / 20.5.1998 / 22:52:36 / cg"
  3733 !
  3781 !
  3734 
  3782 
  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
  3842 pointerLeave:buttonState view:aView
  3910 pointerLeave:buttonState view:aView
  3843     "forward a pointer leave for some view"
  3911     "forward a pointer leave for some view"
  3844 
  3912 
  3845     |sensor|
  3913     |sensor|
  3846 
  3914 
       
  3915     aView isNil ifTrue:[
       
  3916         "/ event arrived, after I destroyed it myself
       
  3917         ^ self
       
  3918     ].
  3847     (sensor := aView sensor) notNil ifTrue:[
  3919     (sensor := aView sensor) notNil ifTrue:[
  3848 	sensor pointerLeave:buttonState view:aView
  3920         sensor pointerLeave:buttonState view:aView
  3849     ] ifFalse:[
  3921     ] ifFalse:[
  3850 	"
  3922         "
  3851 	 if there is no sensor ...
  3923          if there is no sensor ...
  3852 	"
  3924         "
  3853 	aView
  3925         aView
  3854 	    dispatchEvent:#pointerLeave:
  3926             dispatchEvent:#pointerLeave:
  3855 	    arguments:(Array with:buttonState)
  3927             arguments:(Array with:buttonState)
  3856 
  3928 
  3857 "/        WindowEvent
  3929 "/        WindowEvent
  3858 "/            sendEvent:#pointerLeave:
  3930 "/            sendEvent:#pointerLeave:
  3859 "/            arguments:(Array with:buttonState)
  3931 "/            arguments:(Array with:buttonState)
  3860 "/            view:aView
  3932 "/            view:aView
  3866 saveAndTerminateView:aView
  3938 saveAndTerminateView:aView
  3867     "forward a saveAndTerminate event for some view"
  3939     "forward a saveAndTerminate event for some view"
  3868 
  3940 
  3869     |sensor|
  3941     |sensor|
  3870 
  3942 
       
  3943     aView isNil ifTrue:[
       
  3944         "/ event arrived, after I destroyed it myself
       
  3945         ^ self
       
  3946     ].
  3871     (sensor := aView sensor) notNil ifTrue:[
  3947     (sensor := aView sensor) notNil ifTrue:[
  3872 	sensor saveAndTerminateView:aView
  3948         sensor saveAndTerminateView:aView
  3873     ] ifFalse:[
  3949     ] ifFalse:[
  3874 	"
  3950         "
  3875 	 if there is no sensor ...
  3951          if there is no sensor ...
  3876 	"
  3952         "
  3877 	aView saveAndTerminate
  3953         aView saveAndTerminate
  3878     ]
  3954     ]
  3879 !
  3955 !
  3880 
  3956 
  3881 terminateView:aView
  3957 terminateView:aView
  3882     "forward a terminate event for some view"
  3958     "forward a terminate event for some view"
  3883 
  3959 
  3884     |sensor|
  3960     |sensor|
  3885 
  3961 
       
  3962     aView isNil ifTrue:[
       
  3963         "/ event arrived, after I destroyed it myself
       
  3964         ^ self
       
  3965     ].
  3886     (sensor := aView sensor) notNil ifTrue:[
  3966     (sensor := aView sensor) notNil ifTrue:[
  3887 	sensor terminateView:aView
  3967         sensor terminateView:aView
  3888     ] ifFalse:[
  3968     ] ifFalse:[
  3889 	"
  3969         "
  3890 	 if there is no sensor ...
  3970          if there is no sensor ...
  3891 	"
  3971         "
  3892 	aView terminate
  3972         aView terminate
  3893     ]
  3973     ]
  3894 !
  3974 !
  3895 
  3975 
  3896 unmappedView:aView
  3976 unmappedView:aView
  3897     "forward an unmapped event for some view"
  3977     "forward an unmapped event for some view"
  3898 
  3978 
  3899     |sensor|
  3979     |sensor|
  3900 
  3980 
       
  3981     aView isNil ifTrue:[
       
  3982         "/ event arrived, after I destroyed it myself
       
  3983         ^ self
       
  3984     ].
  3901     (sensor := aView sensor) notNil ifTrue:[
  3985     (sensor := aView sensor) notNil ifTrue:[
  3902 	sensor unmappedView:aView
  3986         sensor unmappedView:aView
  3903     ] ifFalse:[
  3987     ] ifFalse:[
  3904 	"
  3988         "
  3905 	 if there is no sensor ...
  3989          if there is no sensor ...
  3906 	"
  3990         "
  3907 	aView unmapped
  3991         aView unmapped
  3908     ]
  3992     ]
  3909 ! !
  3993 ! !
  3910 
  3994 
  3911 !DeviceWorkstation methodsFor:'event handling'!
  3995 !DeviceWorkstation methodsFor:'event handling'!
  3912 
  3996 
  6984 ! !
  7068 ! !
  6985 
  7069 
  6986 !DeviceWorkstation class methodsFor:'documentation'!
  7070 !DeviceWorkstation class methodsFor:'documentation'!
  6987 
  7071 
  6988 version
  7072 version
  6989     ^ '$Header: /cvs/stx/stx/libview/DeviceWorkstation.st,v 1.371 2000-07-07 13:03:58 cg Exp $'
  7073     ^ '$Header: /cvs/stx/stx/libview/DeviceWorkstation.st,v 1.372 2000-07-11 13:41:20 cg Exp $'
  6990 ! !
  7074 ! !
  6991 DeviceWorkstation initialize!
  7075 DeviceWorkstation initialize!