SynchronousWindowSensor.st
author Stefan Vogel <sv@exept.de>
Mon, 11 Feb 2002 20:47:07 +0100
changeset 3594 76381e75d9d2
parent 3450 4b5f22cd68e4
child 3680 4c096f11e018
permissions -rw-r--r--
Handle lastEventQuerySignal (for exclusive debugger)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
264
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     1
"
267
5728c37ff3f6 commentary
Claus Gittinger <cg@exept.de>
parents: 266
diff changeset
     2
 COPYRIGHT (c) 1995 by Claus Gittinger
2718
85d77ac33019 deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
     3
	      All Rights Reserved
264
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     4
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     5
 This software is furnished under a license and may be used
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    10
 hereby transferred.
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    11
"
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    12
3450
4b5f22cd68e4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2733
diff changeset
    13
"{ Package: 'stx:libview' }"
4b5f22cd68e4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2733
diff changeset
    14
264
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    15
WindowSensor subclass:#SynchronousWindowSensor
730
43d9c5848424 device instVar is not needed
Claus Gittinger <cg@exept.de>
parents: 615
diff changeset
    16
	instanceVariableNames:''
598
1a2339e902d4 commentary
Claus Gittinger <cg@exept.de>
parents: 267
diff changeset
    17
	classVariableNames:''
1a2339e902d4 commentary
Claus Gittinger <cg@exept.de>
parents: 267
diff changeset
    18
	poolDictionaries:''
1a2339e902d4 commentary
Claus Gittinger <cg@exept.de>
parents: 267
diff changeset
    19
	category:'Interface-Support'
264
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
!
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
1243
0c33cb7f8458 hopefully fixed the 'lost expose' bug
Claus Gittinger <cg@exept.de>
parents: 1012
diff changeset
    22
!SynchronousWindowSensor class methodsFor:'documentation'!
264
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
copyright
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
"
267
5728c37ff3f6 commentary
Claus Gittinger <cg@exept.de>
parents: 266
diff changeset
    26
 COPYRIGHT (c) 1995 by Claus Gittinger
2718
85d77ac33019 deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
    27
	      All Rights Reserved
264
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    28
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
 This software is furnished under a license and may be used
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
 only in accordance with the terms of that license and with the
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
 inclusion of the above copyright notice.   This software may not
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
 be provided or otherwise made available to, or used by, any
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
 other person.  No title to or ownership of the software is
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    34
 hereby transferred.
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    35
"
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    36
!
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    37
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    38
documentation
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    39
"
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    40
    in contrast to a regular windowSensor, instances of SynchronousWindowSensor
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    41
    do NOT put events into a queue and do NOT wakeup any windowGroup process.
266
1e234d542ef9 oops - forgot modifier key processing (altDown, shiftDown etc.)
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
    42
    Instead, the underlying view is notified synchronously (via a message send)
1e234d542ef9 oops - forgot modifier key processing (altDown, shiftDown etc.)
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
    43
    about the event.
1e234d542ef9 oops - forgot modifier key processing (altDown, shiftDown etc.)
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
    44
1e234d542ef9 oops - forgot modifier key processing (altDown, shiftDown etc.)
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
    45
    These are used for only one single situation: 
2718
85d77ac33019 deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
    46
	when a modal debugger is open
266
1e234d542ef9 oops - forgot modifier key processing (altDown, shiftDown etc.)
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
    47
    (i.e. one that is debugging the scheduler or event-dispatcher).
267
5728c37ff3f6 commentary
Claus Gittinger <cg@exept.de>
parents: 266
diff changeset
    48
264
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    49
    This debuggers windowGroup is augmented with a synchronous Sensor, in order
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    50
    to prevent the event handling code from suspending any process 
266
1e234d542ef9 oops - forgot modifier key processing (altDown, shiftDown etc.)
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
    51
    (you cannot suspend the scheduler; you should not suspend the event dispatcher).
1e234d542ef9 oops - forgot modifier key processing (altDown, shiftDown etc.)
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
    52
264
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    53
    This is pretty tricky and magic - you dont have to understand this.
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    54
    (consider this system internal code)
267
5728c37ff3f6 commentary
Claus Gittinger <cg@exept.de>
parents: 266
diff changeset
    55
    These sensors are not used with regular views.
612
8758d0c9933e documentation
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
    56
8758d0c9933e documentation
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
    57
    [author:]
2718
85d77ac33019 deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
    58
	Claus Gittinger
264
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    59
"
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    60
! !
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    61
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    62
!SynchronousWindowSensor methodsFor:'event handling'!
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    63
1299
5ebe6f8165cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1295
diff changeset
    64
addDamage:aRectangle view:aView wakeup:doWakeup
5ebe6f8165cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1295
diff changeset
    65
    "forward as an expose for some view"
5ebe6f8165cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1295
diff changeset
    66
2126
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
    67
    aView
2718
85d77ac33019 deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
    68
	dispatchEvent:#exposeX:y:width:height:
85d77ac33019 deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
    69
	arguments:(Array with:aRectangle left 
85d77ac33019 deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
    70
			 with:aRectangle top 
85d77ac33019 deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
    71
			 with:aRectangle width
85d77ac33019 deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
    72
			 with:aRectangle height)
1299
5ebe6f8165cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1295
diff changeset
    73
2126
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
    74
"/    WindowEvent
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
    75
"/        sendEvent:#exposeX:y:width:height:
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
    76
"/        arguments:(Array with:aRectangle left 
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
    77
"/                         with:aRectangle top 
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
    78
"/                         with:aRectangle width
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
    79
"/                         with:aRectangle height)
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
    80
"/        view:aView
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
    81
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
    82
    "Modified: / 20.5.1998 / 22:55:37 / cg"
1299
5ebe6f8165cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1295
diff changeset
    83
!
5ebe6f8165cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1295
diff changeset
    84
3450
4b5f22cd68e4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2733
diff changeset
    85
buttonMotion:buttonAndModifierState x:x y:y view:aView
264
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    86
    "forward a button-motion for some view"
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    87
3450
4b5f22cd68e4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2733
diff changeset
    88
    |buttonState|
4b5f22cd68e4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2733
diff changeset
    89
4b5f22cd68e4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2733
diff changeset
    90
    "/ in the following, we are only interested in the buttons (i.e. mask out the modifiers)
4b5f22cd68e4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2733
diff changeset
    91
    buttonState := buttonAndModifierState bitAnd:(aView device anyButtonStateMask).
2126
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
    92
    aView
3450
4b5f22cd68e4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2733
diff changeset
    93
        dispatchEvent:#buttonMotion:x:y:
4b5f22cd68e4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2733
diff changeset
    94
        arguments:(Array with:buttonState with:x with:y)
264
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    95
2126
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
    96
"/    WindowEvent
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
    97
"/        sendEvent:#buttonMotion:x:y:
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
    98
"/        arguments:(Array with:button with:x with:y)
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
    99
"/        view:aView
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   100
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   101
    "Created: / 24.11.1995 / 19:14:02 / cg"
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   102
    "Modified: / 20.5.1998 / 22:55:54 / cg"
264
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   103
!
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   104
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   105
buttonMultiPress:button x:x y:y view:aView
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   106
    "forward a button-multi-press event for some view"
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   107
2126
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   108
    aView
2718
85d77ac33019 deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
   109
	dispatchEvent:#buttonMultiPress:x:y:
85d77ac33019 deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
   110
	arguments:(Array with:button with:x with:y)
264
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   111
2126
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   112
"/    WindowEvent
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   113
"/        sendEvent:#buttonMultiPress:x:y:
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   114
"/        arguments:(Array with:button with:x with:y)
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   115
"/        view:aView
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   116
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   117
    "Created: / 24.11.1995 / 19:14:14 / cg"
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   118
    "Modified: / 20.5.1998 / 22:56:07 / cg"
264
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   119
!
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   120
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   121
buttonPress:button x:x y:y view:aView
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   122
    "forward a button-press event for some view"
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   123
2126
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   124
    aView
2718
85d77ac33019 deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
   125
	dispatchEvent:#buttonPress:x:y:
85d77ac33019 deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
   126
	arguments:(Array with:button with:x with:y)
264
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   127
2126
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   128
"/    WindowEvent
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   129
"/        sendEvent:#buttonPress:x:y:
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   130
"/        arguments:(Array with:button with:x with:y)
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   131
"/        view:aView
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   132
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   133
    "Created: / 24.11.1995 / 19:14:25 / cg"
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   134
    "Modified: / 20.5.1998 / 22:56:23 / cg"
264
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   135
!
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   136
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   137
buttonRelease:button x:x y:y view:aView
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   138
    "forward a button-release event for some view"
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   139
2126
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   140
    aView
2718
85d77ac33019 deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
   141
	dispatchEvent:#buttonRelease:x:y:
85d77ac33019 deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
   142
	arguments:(Array with:button with:x with:y)
264
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   143
2126
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   144
"/    WindowEvent
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   145
"/        sendEvent:#buttonRelease:x:y:
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   146
"/        arguments:(Array with:button with:x with:y)
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   147
"/        view:aView
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   148
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   149
    "Created: / 24.11.1995 / 19:14:36 / cg"
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   150
    "Modified: / 20.5.1998 / 22:56:34 / cg"
264
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   151
!
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   152
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   153
configureX:x y:y width:w height:h view:aView
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   154
    "forward a configure for some view"
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   155
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   156
    aView configureX:x y:y width:w height:h
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   157
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   158
    "Created: 24.11.1995 / 19:14:59 / cg"
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   159
!
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   160
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   161
coveredBy:otherView view:aView
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   162
    "forward a covered for some view"
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   163
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   164
    aView coveredBy:otherView
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   165
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   166
    "Created: 24.11.1995 / 19:15:11 / cg"
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   167
!
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   168
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   169
destroyedView:aView
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   170
    "forward a destroyed event for some view"
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   171
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   172
    aView destroyed
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   173
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   174
    "Created: 24.11.1995 / 19:15:22 / cg"
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   175
!
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   176
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   177
exposeX:x y:y width:w height:h view:aView
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   178
    "forward an expose for some view"
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   179
3594
76381e75d9d2 Handle lastEventQuerySignal (for exclusive debugger)
Stefan Vogel <sv@exept.de>
parents: 3450
diff changeset
   180
    ignoreExposeEvents ~~ true ifTrue:[
76381e75d9d2 Handle lastEventQuerySignal (for exclusive debugger)
Stefan Vogel <sv@exept.de>
parents: 3450
diff changeset
   181
        aView
76381e75d9d2 Handle lastEventQuerySignal (for exclusive debugger)
Stefan Vogel <sv@exept.de>
parents: 3450
diff changeset
   182
            dispatchEvent:#exposeX:y:width:height:
76381e75d9d2 Handle lastEventQuerySignal (for exclusive debugger)
Stefan Vogel <sv@exept.de>
parents: 3450
diff changeset
   183
            arguments:(Array with:x with:y with:w with:h)
76381e75d9d2 Handle lastEventQuerySignal (for exclusive debugger)
Stefan Vogel <sv@exept.de>
parents: 3450
diff changeset
   184
    ]
264
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   185
2126
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   186
"/    WindowEvent
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   187
"/        sendEvent:#exposeX:y:width:height:
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   188
"/        arguments:(Array with:x with:y with:w with:h)
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   189
"/        view:aView
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   190
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   191
    "Created: / 24.11.1995 / 19:15:54 / cg"
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   192
    "Modified: / 20.5.1998 / 22:56:49 / cg"
264
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   193
!
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   194
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   195
focusInView:aView
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   196
    "forward a focusIn event for some view"
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   197
2126
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   198
    aView
2718
85d77ac33019 deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
   199
	dispatchEvent:#focusIn
85d77ac33019 deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
   200
	arguments:nil
264
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   201
2126
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   202
"/   WindowEvent
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   203
"/        sendEvent:#focusIn
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   204
"/        arguments:nil
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   205
"/        view:aView
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   206
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   207
    "Created: / 24.11.1995 / 19:16:11 / cg"
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   208
    "Modified: / 20.5.1998 / 22:57:04 / cg"
264
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   209
!
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   210
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   211
focusOutView:aView 
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   212
    "forward a focusOut event for some view"
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   213
2126
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   214
    aView
2718
85d77ac33019 deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
   215
	dispatchEvent:#focusOut
85d77ac33019 deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
   216
	arguments:nil
264
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   217
2126
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   218
"/    WindowEvent
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   219
"/        sendEvent:#focusOut
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   220
"/        arguments:nil
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   221
"/        view:aView
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   222
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   223
    "Created: / 24.11.1995 / 19:16:24 / cg"
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   224
    "Modified: / 20.5.1998 / 22:57:16 / cg"
264
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   225
!
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   226
1295
ef93ded3c030 renamed graphicExpose -> graphicsExpose;
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
   227
graphicsExposeX:x y:y width:w height:h final:final view:aView
264
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   228
    "forward a graphic expose for some view"
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   229
1299
5ebe6f8165cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1295
diff changeset
   230
    "/ this is a possible response to a scroll operation
1244
d3182558fc9d hopefully fixed the 'lost expose' bug
Claus Gittinger <cg@exept.de>
parents: 1243
diff changeset
   231
    "/ (if an expose is pending)
d3182558fc9d hopefully fixed the 'lost expose' bug
Claus Gittinger <cg@exept.de>
parents: 1243
diff changeset
   232
1295
ef93ded3c030 renamed graphicExpose -> graphicsExpose;
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
   233
    final ifTrue:[
2718
85d77ac33019 deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
   234
	(catchExpose includes:aView) ifTrue:[
85d77ac33019 deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
   235
	    gotExpose add:aView.
85d77ac33019 deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
   236
	]
1244
d3182558fc9d hopefully fixed the 'lost expose' bug
Claus Gittinger <cg@exept.de>
parents: 1243
diff changeset
   237
    ].
d3182558fc9d hopefully fixed the 'lost expose' bug
Claus Gittinger <cg@exept.de>
parents: 1243
diff changeset
   238
2126
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   239
    aView
2718
85d77ac33019 deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
   240
	dispatchEvent:#graphicsExposeX:y:width:height:final:
85d77ac33019 deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
   241
	arguments:(Array with:x with:y with:w with:h with:final)
264
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   242
2126
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   243
"/    WindowEvent
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   244
"/        sendEvent:#graphicsExposeX:y:width:height:final:
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   245
"/        arguments:(Array with:x with:y with:w with:h with:final)
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   246
"/        view:aView
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   247
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   248
    "Created: / 24.11.1995 / 19:16:38 / cg"
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   249
    "Modified: / 20.5.1998 / 22:57:32 / cg"
264
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   250
!
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   251
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   252
keyPress:untranslatedKey x:x y:y view:aView
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   253
    "forward a key-press event for some view"
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   254
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   255
    |xlatedKey|
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   256
266
1e234d542ef9 oops - forgot modifier key processing (altDown, shiftDown etc.)
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   257
    self key:untranslatedKey state:true. 
1e234d542ef9 oops - forgot modifier key processing (altDown, shiftDown etc.)
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   258
2141
ed587c556c11 ask view for keyboardMap.
Claus Gittinger <cg@exept.de>
parents: 2126
diff changeset
   259
    xlatedKey := aView graphicsDevice translateKey:untranslatedKey forView:aView.
264
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   260
    xlatedKey notNil ifTrue:[
3594
76381e75d9d2 Handle lastEventQuerySignal (for exclusive debugger)
Stefan Vogel <sv@exept.de>
parents: 3450
diff changeset
   261
        WindowGroup lastEventQuerySignal handle:[:ex|  |ev|
76381e75d9d2 Handle lastEventQuerySignal (for exclusive debugger)
Stefan Vogel <sv@exept.de>
parents: 3450
diff changeset
   262
            ev := WindowEvent keyboardEvent
76381e75d9d2 Handle lastEventQuerySignal (for exclusive debugger)
Stefan Vogel <sv@exept.de>
parents: 3450
diff changeset
   263
                     for:aView
76381e75d9d2 Handle lastEventQuerySignal (for exclusive debugger)
Stefan Vogel <sv@exept.de>
parents: 3450
diff changeset
   264
                     type:#keyPress:x:y:
76381e75d9d2 Handle lastEventQuerySignal (for exclusive debugger)
Stefan Vogel <sv@exept.de>
parents: 3450
diff changeset
   265
                     arguments:(Array with:xlatedKey with:x with:y).
76381e75d9d2 Handle lastEventQuerySignal (for exclusive debugger)
Stefan Vogel <sv@exept.de>
parents: 3450
diff changeset
   266
            ev rawKey:untranslatedKey.
76381e75d9d2 Handle lastEventQuerySignal (for exclusive debugger)
Stefan Vogel <sv@exept.de>
parents: 3450
diff changeset
   267
            ev hasShift:shiftDown ctrl:ctrlDown alt:altDown meta:metaDown
76381e75d9d2 Handle lastEventQuerySignal (for exclusive debugger)
Stefan Vogel <sv@exept.de>
parents: 3450
diff changeset
   268
                                  button1:leftButtonDown button2:middleButtonDown button3:rightButtonDown.
76381e75d9d2 Handle lastEventQuerySignal (for exclusive debugger)
Stefan Vogel <sv@exept.de>
parents: 3450
diff changeset
   269
            ex proceedWith:ev.
76381e75d9d2 Handle lastEventQuerySignal (for exclusive debugger)
Stefan Vogel <sv@exept.de>
parents: 3450
diff changeset
   270
        ] do:[
76381e75d9d2 Handle lastEventQuerySignal (for exclusive debugger)
Stefan Vogel <sv@exept.de>
parents: 3450
diff changeset
   271
            aView
76381e75d9d2 Handle lastEventQuerySignal (for exclusive debugger)
Stefan Vogel <sv@exept.de>
parents: 3450
diff changeset
   272
                dispatchEvent:#keyPress:x:y:
76381e75d9d2 Handle lastEventQuerySignal (for exclusive debugger)
Stefan Vogel <sv@exept.de>
parents: 3450
diff changeset
   273
                arguments:(Array with:xlatedKey with:x with:y)
76381e75d9d2 Handle lastEventQuerySignal (for exclusive debugger)
Stefan Vogel <sv@exept.de>
parents: 3450
diff changeset
   274
        ].
2126
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   275
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   276
"/        WindowEvent
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   277
"/          sendEvent:#keyPress:x:y:
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   278
"/          arguments:(Array with:xlatedKey with:x with:y)
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   279
"/          view:aView
264
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   280
    ]
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   281
2126
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   282
    "Created: / 24.11.1995 / 19:17:23 / cg"
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   283
    "Modified: / 20.5.1998 / 22:57:52 / cg"
264
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   284
!
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   285
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   286
keyRelease:untranslatedKey x:x y:y view:aView
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   287
    "forward a key-release event for some view"
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   288
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   289
    |xlatedKey|
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   290
266
1e234d542ef9 oops - forgot modifier key processing (altDown, shiftDown etc.)
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   291
    self key:untranslatedKey state:false. 
1e234d542ef9 oops - forgot modifier key processing (altDown, shiftDown etc.)
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   292
2141
ed587c556c11 ask view for keyboardMap.
Claus Gittinger <cg@exept.de>
parents: 2126
diff changeset
   293
    xlatedKey := aView graphicsDevice translateKey:untranslatedKey forView:aView.
264
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   294
    xlatedKey notNil ifTrue:[
2718
85d77ac33019 deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
   295
	aView
85d77ac33019 deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
   296
	    dispatchEvent:#keyRelease:x:y:
85d77ac33019 deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
   297
	    arguments:(Array with:xlatedKey with:x with:y)
2126
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   298
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   299
"/        WindowEvent
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   300
"/            sendEvent:#keyRelease:x:y:
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   301
"/            arguments:(Array with:xlatedKey with:x with:y)
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   302
"/            view:aView
264
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   303
    ]
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   304
2126
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   305
    "Created: / 24.11.1995 / 19:17:50 / cg"
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   306
    "Modified: / 20.5.1998 / 22:58:05 / cg"
264
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   307
!
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   308
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   309
mappedView:aView
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   310
    "forward a mapped event for some view"
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   311
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   312
    aView mapped
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   313
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   314
    "Created: 24.11.1995 / 19:18:01 / cg"
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   315
!
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   316
2733
5af2417bc450 pass x/y with mouseWheel event
Claus Gittinger <cg@exept.de>
parents: 2718
diff changeset
   317
mouseWheelMotion:buttonState x:x y:y amount:amount deltaTime:dTime view:aView
2699
01594e76fc92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2141
diff changeset
   318
    "forward a wheel-motion for some view"
01594e76fc92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2141
diff changeset
   319
01594e76fc92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2141
diff changeset
   320
    aView
2733
5af2417bc450 pass x/y with mouseWheel event
Claus Gittinger <cg@exept.de>
parents: 2718
diff changeset
   321
	dispatchEvent:#mouseWheelMotion:x:y:amount:deltaTime:
5af2417bc450 pass x/y with mouseWheel event
Claus Gittinger <cg@exept.de>
parents: 2718
diff changeset
   322
	arguments:(Array with:buttonState with:x with:y with:amount with:dTime)
2699
01594e76fc92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2141
diff changeset
   323
01594e76fc92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2141
diff changeset
   324
    "Created: / 21.5.1999 / 13:07:51 / cg"
01594e76fc92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2141
diff changeset
   325
!
01594e76fc92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2141
diff changeset
   326
264
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   327
noExposeView:aView
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   328
    "forward a noExpose event for some view"
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   329
1243
0c33cb7f8458 hopefully fixed the 'lost expose' bug
Claus Gittinger <cg@exept.de>
parents: 1012
diff changeset
   330
    catchExpose isNil ifTrue:[
2718
85d77ac33019 deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
   331
	'SWSensor [info]: noExpose but not catching' infoPrintCR.
1243
0c33cb7f8458 hopefully fixed the 'lost expose' bug
Claus Gittinger <cg@exept.de>
parents: 1012
diff changeset
   332
    ].
0c33cb7f8458 hopefully fixed the 'lost expose' bug
Claus Gittinger <cg@exept.de>
parents: 1012
diff changeset
   333
1299
5ebe6f8165cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1295
diff changeset
   334
    (catchExpose includes:aView) ifTrue:[
2718
85d77ac33019 deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
   335
	gotExpose add:aView.
85d77ac33019 deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
   336
	catchExpose remove:aView.
1299
5ebe6f8165cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1295
diff changeset
   337
    ].
264
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   338
    aView noExpose.
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   339
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   340
    "Created: 24.11.1995 / 19:18:10 / cg"
1299
5ebe6f8165cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1295
diff changeset
   341
    "Modified: 29.1.1997 / 20:46:47 / cg"
264
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   342
!
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   343
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   344
pointerEnter:buttonState x:x y:y view:aView
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   345
    "forward a pointer enter for some view"
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   346
2126
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   347
    aView
2718
85d77ac33019 deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
   348
	dispatchEvent:#pointerEnter:x:y:
85d77ac33019 deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
   349
	arguments:(Array with:buttonState with:x with:y)
264
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   350
2126
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   351
"/    WindowEvent
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   352
"/        sendEvent:#pointerEnter:x:y:
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   353
"/        arguments:(Array with:buttonState with:x with:y)
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   354
"/        view:aView
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   355
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   356
    "Created: / 24.11.1995 / 19:18:20 / cg"
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   357
    "Modified: / 20.5.1998 / 22:58:20 / cg"
264
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   358
!
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   359
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   360
pointerLeave:buttonState view:aView
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   361
    "forward a pointer leave for some view"
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   362
2126
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   363
    aView
2718
85d77ac33019 deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
   364
	dispatchEvent:#pointerLeave:
85d77ac33019 deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
   365
	arguments:(Array with:buttonState)
264
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   366
2126
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   367
"/    WindowEvent
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   368
"/        sendEvent:#pointerLeave:
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   369
"/        arguments:(Array with:buttonState)
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   370
"/        view:aView
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   371
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   372
    "Created: / 24.11.1995 / 19:18:30 / cg"
1f108c76dfdb moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   373
    "Modified: / 20.5.1998 / 22:58:35 / cg"
264
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   374
!
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   375
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   376
saveAndTerminateView:aView
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   377
    "forward a saveAndTerminate event for some view"
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   378
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   379
    aView saveAndTerminate
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   380
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   381
    "Created: 24.11.1995 / 19:18:38 / cg"
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   382
!
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   383
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   384
terminateView:aView
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   385
    "forward a terminate event for some view"
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   386
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   387
    aView terminate
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   388
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   389
    "Created: 24.11.1995 / 19:18:48 / cg"
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   390
!
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   391
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   392
unmappedView:aView
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   393
    "forward an unmapped event for some view"
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   394
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   395
    aView unmapped
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   396
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   397
    "Created: 24.11.1995 / 19:18:59 / cg"
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   398
! !
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   399
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   400
!SynchronousWindowSensor methodsFor:'specials'!
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   401
1243
0c33cb7f8458 hopefully fixed the 'lost expose' bug
Claus Gittinger <cg@exept.de>
parents: 1012
diff changeset
   402
catchExposeFor:aView
264
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   403
    "start catching noExpose events (must be done BEFORE a bitblt)."
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   404
1299
5ebe6f8165cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1295
diff changeset
   405
    catchExpose notEmpty ifTrue:[
2718
85d77ac33019 deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
   406
	'SWSensor [warning]: already catching in catchExpose' errorPrintCR.
1243
0c33cb7f8458 hopefully fixed the 'lost expose' bug
Claus Gittinger <cg@exept.de>
parents: 1012
diff changeset
   407
    ].
0c33cb7f8458 hopefully fixed the 'lost expose' bug
Claus Gittinger <cg@exept.de>
parents: 1012
diff changeset
   408
1299
5ebe6f8165cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1295
diff changeset
   409
    gotOtherEvent remove:aView ifAbsent:nil.
5ebe6f8165cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1295
diff changeset
   410
    gotExpose remove:aView ifAbsent:nil.
5ebe6f8165cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1295
diff changeset
   411
    catchExpose add:aView.
264
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   412
1299
5ebe6f8165cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1295
diff changeset
   413
    "Modified: 29.1.1997 / 20:43:44 / cg"
264
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   414
!
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   415
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   416
waitForExposeFor:aView
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   417
    "wait until a graphicsExpose or a noExpose arrives (after a bitblt)."
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   418
1872
2a10e693d93f break non-windowGroup expose-poll loop after a while (10 seconds)
Claus Gittinger <cg@exept.de>
parents: 1299
diff changeset
   419
    |device windowId stopPoll endPollTime|
2a10e693d93f break non-windowGroup expose-poll loop after a while (10 seconds)
Claus Gittinger <cg@exept.de>
parents: 1299
diff changeset
   420
2a10e693d93f break non-windowGroup expose-poll loop after a while (10 seconds)
Claus Gittinger <cg@exept.de>
parents: 1299
diff changeset
   421
    device := aView graphicsDevice.
2a10e693d93f break non-windowGroup expose-poll loop after a while (10 seconds)
Claus Gittinger <cg@exept.de>
parents: 1299
diff changeset
   422
2a10e693d93f break non-windowGroup expose-poll loop after a while (10 seconds)
Claus Gittinger <cg@exept.de>
parents: 1299
diff changeset
   423
    "/ this is only needed for X ...
2a10e693d93f break non-windowGroup expose-poll loop after a while (10 seconds)
Claus Gittinger <cg@exept.de>
parents: 1299
diff changeset
   424
    device scrollsAsynchronous ifTrue:[
2718
85d77ac33019 deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
   425
	windowId := aView id.
1872
2a10e693d93f break non-windowGroup expose-poll loop after a while (10 seconds)
Claus Gittinger <cg@exept.de>
parents: 1299
diff changeset
   426
2718
85d77ac33019 deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
   427
	"/
85d77ac33019 deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
   428
	"/ cannot suspend, I am a synchronous-modal sensor
85d77ac33019 deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
   429
	"/ must poll for the event
85d77ac33019 deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
   430
	"/
85d77ac33019 deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
   431
	endPollTime := AbsoluteTime now addSeconds:10.
85d77ac33019 deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
   432
	stopPoll := false.
1872
2a10e693d93f break non-windowGroup expose-poll loop after a while (10 seconds)
Claus Gittinger <cg@exept.de>
parents: 1299
diff changeset
   433
2718
85d77ac33019 deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
   434
	[(gotExpose includes:aView) or:[stopPoll]] whileFalse:[
85d77ac33019 deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
   435
	    (device exposeEventPendingFor:windowId withSync:true) ifTrue:[
85d77ac33019 deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
   436
		device dispatchExposeEventFor:windowId.
85d77ac33019 deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
   437
	    ].
85d77ac33019 deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
   438
	    stopPoll := (AbsoluteTime now > endPollTime).
85d77ac33019 deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
   439
	    Processor yield.
85d77ac33019 deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
   440
	].
1872
2a10e693d93f break non-windowGroup expose-poll loop after a while (10 seconds)
Claus Gittinger <cg@exept.de>
parents: 1299
diff changeset
   441
2718
85d77ac33019 deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
   442
	stopPoll ifTrue:[
85d77ac33019 deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
   443
	    'SyncWindowSensor [warning]: lost expose event' errorPrintCR.
85d77ac33019 deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents: 2699
diff changeset
   444
	]
264
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   445
    ].
1872
2a10e693d93f break non-windowGroup expose-poll loop after a while (10 seconds)
Claus Gittinger <cg@exept.de>
parents: 1299
diff changeset
   446
1299
5ebe6f8165cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1295
diff changeset
   447
    catchExpose remove:aView ifAbsent:nil.
5ebe6f8165cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1295
diff changeset
   448
    gotExpose remove:aView ifAbsent:nil.
264
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   449
1872
2a10e693d93f break non-windowGroup expose-poll loop after a while (10 seconds)
Claus Gittinger <cg@exept.de>
parents: 1299
diff changeset
   450
    "Modified: 19.8.1997 / 17:25:09 / cg"
264
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   451
! !
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   452
1243
0c33cb7f8458 hopefully fixed the 'lost expose' bug
Claus Gittinger <cg@exept.de>
parents: 1012
diff changeset
   453
!SynchronousWindowSensor class methodsFor:'documentation'!
264
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   454
fc9ecf4814a0 use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   455
version
3594
76381e75d9d2 Handle lastEventQuerySignal (for exclusive debugger)
Stefan Vogel <sv@exept.de>
parents: 3450
diff changeset
   456
    ^ '$Header: /cvs/stx/stx/libview/SynchronousWindowSensor.st,v 1.22 2002-02-11 19:47:07 stefan Exp $'
615
59b046c2e44f documentation
Claus Gittinger <cg@exept.de>
parents: 612
diff changeset
   457
! !