WindowEvent.st
author Jan Vrany <jan.vrany@labware.com>
Mon, 21 Dec 2020 20:55:31 +0000
branchjv
changeset 9049 d0233524dfd8
parent 6312 fd183f4f73b5
permissions -rw-r--r--
Cherry-picked `Color`, `WindowEvent` and `WindowGroup` ...from branch default, commit 14b72fd3617a (eXept's code)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
26
ac9f66dc8f53 *** empty log message ***
claus
parents: 23
diff changeset
     1
"
ac9f66dc8f53 *** empty log message ***
claus
parents: 23
diff changeset
     2
 COPYRIGHT (c) 1993 by Claus Gittinger
72
3e84121988c3 *** empty log message ***
claus
parents: 54
diff changeset
     3
	      All Rights Reserved
26
ac9f66dc8f53 *** empty log message ***
claus
parents: 23
diff changeset
     4
ac9f66dc8f53 *** empty log message ***
claus
parents: 23
diff changeset
     5
 This software is furnished under a license and may be used
ac9f66dc8f53 *** empty log message ***
claus
parents: 23
diff changeset
     6
 only in accordance with the terms of that license and with the
ac9f66dc8f53 *** empty log message ***
claus
parents: 23
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
ac9f66dc8f53 *** empty log message ***
claus
parents: 23
diff changeset
     8
 be provided or otherwise made available to, or used by, any
ac9f66dc8f53 *** empty log message ***
claus
parents: 23
diff changeset
     9
 other person.  No title to or ownership of the software is
ac9f66dc8f53 *** empty log message ***
claus
parents: 23
diff changeset
    10
 hereby transferred.
ac9f66dc8f53 *** empty log message ***
claus
parents: 23
diff changeset
    11
"
3294
6bcc3e052d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3138
diff changeset
    12
"{ Package: 'stx:libview' }"
6bcc3e052d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3138
diff changeset
    13
9049
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
    14
"{ NameSpace: Smalltalk }"
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
    15
5275
3a10b5e7beef inheritance
Claus Gittinger <cg@exept.de>
parents: 5249
diff changeset
    16
Event subclass:#WindowEvent
3a10b5e7beef inheritance
Claus Gittinger <cg@exept.de>
parents: 5249
diff changeset
    17
	instanceVariableNames:'delegatedFrom consumed'
356
2f773ceb7032 new query methods
Claus Gittinger <cg@exept.de>
parents: 320
diff changeset
    18
	classVariableNames:''
2f773ceb7032 new query methods
Claus Gittinger <cg@exept.de>
parents: 320
diff changeset
    19
	poolDictionaries:''
5275
3a10b5e7beef inheritance
Claus Gittinger <cg@exept.de>
parents: 5249
diff changeset
    20
	category:'Interface-Support-UI'
11
bc3949e465a0 Initial revision
claus
parents:
diff changeset
    21
!
bc3949e465a0 Initial revision
claus
parents:
diff changeset
    22
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
    23
WindowEvent subclass:#ApplicationEvent
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
    24
	instanceVariableNames:''
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
    25
	classVariableNames:''
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
    26
	poolDictionaries:''
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
    27
	privateIn:WindowEvent
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
    28
!
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
    29
3011
e5880bb2738d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2852
diff changeset
    30
WindowEvent subclass:#InputEvent
e5880bb2738d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2852
diff changeset
    31
	instanceVariableNames:'modifierFlags'
e5880bb2738d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2852
diff changeset
    32
	classVariableNames:'F_CTRL F_ALT F_META F_SHIFT F_BUTTON1 F_BUTTON2 F_BUTTON3'
e5880bb2738d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2852
diff changeset
    33
	poolDictionaries:''
e5880bb2738d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2852
diff changeset
    34
	privateIn:WindowEvent
e5880bb2738d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2852
diff changeset
    35
!
e5880bb2738d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2852
diff changeset
    36
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
    37
WindowEvent::InputEvent subclass:#ButtonEvent
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
    38
	instanceVariableNames:''
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
    39
	classVariableNames:''
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
    40
	poolDictionaries:''
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
    41
	privateIn:WindowEvent
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
    42
!
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
    43
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
    44
WindowEvent::ButtonEvent subclass:#ButtonPressEvent
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
    45
	instanceVariableNames:''
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
    46
	classVariableNames:''
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
    47
	poolDictionaries:''
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
    48
	privateIn:WindowEvent
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
    49
!
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
    50
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
    51
WindowEvent::ButtonPressEvent subclass:#ButtonMultiPressEvent
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
    52
	instanceVariableNames:''
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
    53
	classVariableNames:''
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
    54
	poolDictionaries:''
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
    55
	privateIn:WindowEvent
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
    56
!
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
    57
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
    58
WindowEvent::ButtonEvent subclass:#ButtonReleaseEvent
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
    59
	instanceVariableNames:''
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
    60
	classVariableNames:''
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
    61
	poolDictionaries:''
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
    62
	privateIn:WindowEvent
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
    63
!
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
    64
3465
a14f06f3af91 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3376
diff changeset
    65
WindowEvent subclass:#ClientEvent
a14f06f3af91 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3376
diff changeset
    66
	instanceVariableNames:'eventData'
a14f06f3af91 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3376
diff changeset
    67
	classVariableNames:''
a14f06f3af91 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3376
diff changeset
    68
	poolDictionaries:''
a14f06f3af91 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3376
diff changeset
    69
	privateIn:WindowEvent
a14f06f3af91 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3376
diff changeset
    70
!
a14f06f3af91 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3376
diff changeset
    71
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
    72
WindowEvent subclass:#ConfigureEvent
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
    73
	instanceVariableNames:''
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
    74
	classVariableNames:''
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
    75
	poolDictionaries:''
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
    76
	privateIn:WindowEvent
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
    77
!
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
    78
3465
a14f06f3af91 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3376
diff changeset
    79
WindowEvent subclass:#DamageEvent
3297
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
    80
	instanceVariableNames:''
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
    81
	classVariableNames:''
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
    82
	poolDictionaries:''
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
    83
	privateIn:WindowEvent
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
    84
!
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
    85
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
    86
WindowEvent::InputEvent subclass:#DropEvent
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
    87
	instanceVariableNames:''
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
    88
	classVariableNames:''
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
    89
	poolDictionaries:''
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
    90
	privateIn:WindowEvent
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
    91
!
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
    92
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
    93
WindowEvent::InputEvent subclass:#EnterLeaveEvent
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
    94
	instanceVariableNames:''
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
    95
	classVariableNames:''
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
    96
	poolDictionaries:''
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
    97
	privateIn:WindowEvent
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
    98
!
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
    99
3465
a14f06f3af91 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3376
diff changeset
   100
WindowEvent::InputEvent subclass:#FocusEvent
a14f06f3af91 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3376
diff changeset
   101
	instanceVariableNames:''
a14f06f3af91 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3376
diff changeset
   102
	classVariableNames:''
a14f06f3af91 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3376
diff changeset
   103
	poolDictionaries:''
a14f06f3af91 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3376
diff changeset
   104
	privateIn:WindowEvent
a14f06f3af91 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3376
diff changeset
   105
!
a14f06f3af91 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3376
diff changeset
   106
5962
ab
parents: 5949
diff changeset
   107
WindowEvent::InputEvent subclass:#KeyboardEvent
9049
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   108
	instanceVariableNames:'untranslatedKey rawKey isDeadKey'
5962
ab
parents: 5949
diff changeset
   109
	classVariableNames:''
ab
parents: 5949
diff changeset
   110
	poolDictionaries:''
ab
parents: 5949
diff changeset
   111
	privateIn:WindowEvent
ab
parents: 5949
diff changeset
   112
!
ab
parents: 5949
diff changeset
   113
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   114
WindowEvent::ButtonEvent subclass:#ButtonMotionEvent
3294
6bcc3e052d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3138
diff changeset
   115
	instanceVariableNames:''
6bcc3e052d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3138
diff changeset
   116
	classVariableNames:''
6bcc3e052d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3138
diff changeset
   117
	poolDictionaries:''
6bcc3e052d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3138
diff changeset
   118
	privateIn:WindowEvent
6bcc3e052d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3138
diff changeset
   119
!
6bcc3e052d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3138
diff changeset
   120
5962
ab
parents: 5949
diff changeset
   121
WindowEvent::KeyboardEvent subclass:#KeyPressEvent
ab
parents: 5949
diff changeset
   122
	instanceVariableNames:''
3294
6bcc3e052d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3138
diff changeset
   123
	classVariableNames:''
6bcc3e052d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3138
diff changeset
   124
	poolDictionaries:''
6bcc3e052d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3138
diff changeset
   125
	privateIn:WindowEvent
6bcc3e052d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3138
diff changeset
   126
!
6bcc3e052d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3138
diff changeset
   127
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   128
WindowEvent::KeyboardEvent subclass:#KeyReleaseEvent
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   129
	instanceVariableNames:''
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   130
	classVariableNames:''
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   131
	poolDictionaries:''
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   132
	privateIn:WindowEvent
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   133
!
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   134
5962
ab
parents: 5949
diff changeset
   135
WindowEvent::KeyboardEvent subclass:#HotKeyEvent
ab
parents: 5949
diff changeset
   136
	instanceVariableNames:'hotkeyIdentifier'
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   137
	classVariableNames:''
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   138
	poolDictionaries:''
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   139
	privateIn:WindowEvent
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   140
!
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   141
3376
a9784be22e6a added hasKeyboardFocus event
tm
parents: 3297
diff changeset
   142
WindowEvent::InputEvent subclass:#KeyboardFocusEvent
3295
84de6d18b9d1 code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents: 3294
diff changeset
   143
	instanceVariableNames:''
84de6d18b9d1 code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents: 3294
diff changeset
   144
	classVariableNames:''
84de6d18b9d1 code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents: 3294
diff changeset
   145
	poolDictionaries:''
84de6d18b9d1 code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents: 3294
diff changeset
   146
	privateIn:WindowEvent
84de6d18b9d1 code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents: 3294
diff changeset
   147
!
84de6d18b9d1 code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents: 3294
diff changeset
   148
3465
a14f06f3af91 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3376
diff changeset
   149
WindowEvent subclass:#MessageSendEvent
9049
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   150
	instanceVariableNames:'generatedBy'
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   151
	classVariableNames:'Debug'
3376
a9784be22e6a added hasKeyboardFocus event
tm
parents: 3297
diff changeset
   152
	poolDictionaries:''
a9784be22e6a added hasKeyboardFocus event
tm
parents: 3297
diff changeset
   153
	privateIn:WindowEvent
a9784be22e6a added hasKeyboardFocus event
tm
parents: 3297
diff changeset
   154
!
a9784be22e6a added hasKeyboardFocus event
tm
parents: 3297
diff changeset
   155
4988
c4d0e91bfda5 +mouseWheelEvent
fm
parents: 4980
diff changeset
   156
WindowEvent::ButtonEvent subclass:#MouseWheelMotionEvent
9049
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   157
	instanceVariableNames:'repeatCount'
4988
c4d0e91bfda5 +mouseWheelEvent
fm
parents: 4980
diff changeset
   158
	classVariableNames:''
c4d0e91bfda5 +mouseWheelEvent
fm
parents: 4980
diff changeset
   159
	poolDictionaries:''
c4d0e91bfda5 +mouseWheelEvent
fm
parents: 4980
diff changeset
   160
	privateIn:WindowEvent
c4d0e91bfda5 +mouseWheelEvent
fm
parents: 4980
diff changeset
   161
!
c4d0e91bfda5 +mouseWheelEvent
fm
parents: 4980
diff changeset
   162
4144
42b7f6e01565 preps for native widgets
ca
parents: 4044
diff changeset
   163
WindowEvent::InputEvent subclass:#NativeWidgetCommandEvent
4233
088575f01a8a native stuff
ca
parents: 4144
diff changeset
   164
	instanceVariableNames:''
4144
42b7f6e01565 preps for native widgets
ca
parents: 4044
diff changeset
   165
	classVariableNames:''
42b7f6e01565 preps for native widgets
ca
parents: 4044
diff changeset
   166
	poolDictionaries:''
42b7f6e01565 preps for native widgets
ca
parents: 4044
diff changeset
   167
	privateIn:WindowEvent
42b7f6e01565 preps for native widgets
ca
parents: 4044
diff changeset
   168
!
42b7f6e01565 preps for native widgets
ca
parents: 4044
diff changeset
   169
4044
dc958a0211d9 newDamage
Claus Gittinger <cg@exept.de>
parents: 3936
diff changeset
   170
WindowEvent subclass:#NewDamageEvent
dc958a0211d9 newDamage
Claus Gittinger <cg@exept.de>
parents: 3936
diff changeset
   171
	instanceVariableNames:''
dc958a0211d9 newDamage
Claus Gittinger <cg@exept.de>
parents: 3936
diff changeset
   172
	classVariableNames:''
dc958a0211d9 newDamage
Claus Gittinger <cg@exept.de>
parents: 3936
diff changeset
   173
	poolDictionaries:''
dc958a0211d9 newDamage
Claus Gittinger <cg@exept.de>
parents: 3936
diff changeset
   174
	privateIn:WindowEvent
dc958a0211d9 newDamage
Claus Gittinger <cg@exept.de>
parents: 3936
diff changeset
   175
!
dc958a0211d9 newDamage
Claus Gittinger <cg@exept.de>
parents: 3936
diff changeset
   176
3758
c484f793f9b1 selection change handling
Claus Gittinger <cg@exept.de>
parents: 3686
diff changeset
   177
WindowEvent subclass:#SelectionEvent
c484f793f9b1 selection change handling
Claus Gittinger <cg@exept.de>
parents: 3686
diff changeset
   178
	instanceVariableNames:''
c484f793f9b1 selection change handling
Claus Gittinger <cg@exept.de>
parents: 3686
diff changeset
   179
	classVariableNames:''
c484f793f9b1 selection change handling
Claus Gittinger <cg@exept.de>
parents: 3686
diff changeset
   180
	poolDictionaries:''
c484f793f9b1 selection change handling
Claus Gittinger <cg@exept.de>
parents: 3686
diff changeset
   181
	privateIn:WindowEvent
c484f793f9b1 selection change handling
Claus Gittinger <cg@exept.de>
parents: 3686
diff changeset
   182
!
c484f793f9b1 selection change handling
Claus Gittinger <cg@exept.de>
parents: 3686
diff changeset
   183
c484f793f9b1 selection change handling
Claus Gittinger <cg@exept.de>
parents: 3686
diff changeset
   184
WindowEvent::SelectionEvent subclass:#SelectionClearEvent
c484f793f9b1 selection change handling
Claus Gittinger <cg@exept.de>
parents: 3686
diff changeset
   185
	instanceVariableNames:''
c484f793f9b1 selection change handling
Claus Gittinger <cg@exept.de>
parents: 3686
diff changeset
   186
	classVariableNames:''
c484f793f9b1 selection change handling
Claus Gittinger <cg@exept.de>
parents: 3686
diff changeset
   187
	poolDictionaries:''
c484f793f9b1 selection change handling
Claus Gittinger <cg@exept.de>
parents: 3686
diff changeset
   188
	privateIn:WindowEvent
c484f793f9b1 selection change handling
Claus Gittinger <cg@exept.de>
parents: 3686
diff changeset
   189
!
c484f793f9b1 selection change handling
Claus Gittinger <cg@exept.de>
parents: 3686
diff changeset
   190
3773
e2fd3df91e5c new event class for TerminateEvents
Claus Gittinger <cg@exept.de>
parents: 3758
diff changeset
   191
WindowEvent subclass:#TerminateEvent
e2fd3df91e5c new event class for TerminateEvents
Claus Gittinger <cg@exept.de>
parents: 3758
diff changeset
   192
	instanceVariableNames:''
e2fd3df91e5c new event class for TerminateEvents
Claus Gittinger <cg@exept.de>
parents: 3758
diff changeset
   193
	classVariableNames:''
e2fd3df91e5c new event class for TerminateEvents
Claus Gittinger <cg@exept.de>
parents: 3758
diff changeset
   194
	poolDictionaries:''
e2fd3df91e5c new event class for TerminateEvents
Claus Gittinger <cg@exept.de>
parents: 3758
diff changeset
   195
	privateIn:WindowEvent
e2fd3df91e5c new event class for TerminateEvents
Claus Gittinger <cg@exept.de>
parents: 3758
diff changeset
   196
!
e2fd3df91e5c new event class for TerminateEvents
Claus Gittinger <cg@exept.de>
parents: 3758
diff changeset
   197
4817
2d555a01a0fd trayEvents
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
   198
WindowEvent::InputEvent subclass:#TrayActionEvent
2d555a01a0fd trayEvents
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
   199
	instanceVariableNames:''
2d555a01a0fd trayEvents
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
   200
	classVariableNames:''
2d555a01a0fd trayEvents
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
   201
	poolDictionaries:''
2d555a01a0fd trayEvents
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
   202
	privateIn:WindowEvent
2d555a01a0fd trayEvents
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
   203
!
2d555a01a0fd trayEvents
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
   204
5838
5629e7ee01bf added: #visibilityOf:changedTo:
Claus Gittinger <cg@exept.de>
parents: 5752
diff changeset
   205
WindowEvent subclass:#VisibilityChangeEvent
5629e7ee01bf added: #visibilityOf:changedTo:
Claus Gittinger <cg@exept.de>
parents: 5752
diff changeset
   206
	instanceVariableNames:'visibility'
5629e7ee01bf added: #visibilityOf:changedTo:
Claus Gittinger <cg@exept.de>
parents: 5752
diff changeset
   207
	classVariableNames:''
5629e7ee01bf added: #visibilityOf:changedTo:
Claus Gittinger <cg@exept.de>
parents: 5752
diff changeset
   208
	poolDictionaries:''
5629e7ee01bf added: #visibilityOf:changedTo:
Claus Gittinger <cg@exept.de>
parents: 5752
diff changeset
   209
	privateIn:WindowEvent
5629e7ee01bf added: #visibilityOf:changedTo:
Claus Gittinger <cg@exept.de>
parents: 5752
diff changeset
   210
!
5629e7ee01bf added: #visibilityOf:changedTo:
Claus Gittinger <cg@exept.de>
parents: 5752
diff changeset
   211
9049
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   212
WindowEvent subclass:#WidgetSelectionEvent
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   213
	instanceVariableNames:''
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   214
	classVariableNames:''
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   215
	poolDictionaries:''
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   216
	privateIn:WindowEvent
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   217
!
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   218
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   219
WindowEvent subclass:#WindowMapUnmapEvent
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   220
	instanceVariableNames:''
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   221
	classVariableNames:''
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   222
	poolDictionaries:''
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   223
	privateIn:WindowEvent
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   224
!
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   225
46
7b331e9012fd *** empty log message ***
claus
parents: 28
diff changeset
   226
!WindowEvent class methodsFor:'documentation'!
7b331e9012fd *** empty log message ***
claus
parents: 28
diff changeset
   227
7b331e9012fd *** empty log message ***
claus
parents: 28
diff changeset
   228
copyright
7b331e9012fd *** empty log message ***
claus
parents: 28
diff changeset
   229
"
7b331e9012fd *** empty log message ***
claus
parents: 28
diff changeset
   230
 COPYRIGHT (c) 1993 by Claus Gittinger
72
3e84121988c3 *** empty log message ***
claus
parents: 54
diff changeset
   231
	      All Rights Reserved
46
7b331e9012fd *** empty log message ***
claus
parents: 28
diff changeset
   232
7b331e9012fd *** empty log message ***
claus
parents: 28
diff changeset
   233
 This software is furnished under a license and may be used
7b331e9012fd *** empty log message ***
claus
parents: 28
diff changeset
   234
 only in accordance with the terms of that license and with the
7b331e9012fd *** empty log message ***
claus
parents: 28
diff changeset
   235
 inclusion of the above copyright notice.   This software may not
7b331e9012fd *** empty log message ***
claus
parents: 28
diff changeset
   236
 be provided or otherwise made available to, or used by, any
7b331e9012fd *** empty log message ***
claus
parents: 28
diff changeset
   237
 other person.  No title to or ownership of the software is
7b331e9012fd *** empty log message ***
claus
parents: 28
diff changeset
   238
 hereby transferred.
7b331e9012fd *** empty log message ***
claus
parents: 28
diff changeset
   239
"
7b331e9012fd *** empty log message ***
claus
parents: 28
diff changeset
   240
!
7b331e9012fd *** empty log message ***
claus
parents: 28
diff changeset
   241
7b331e9012fd *** empty log message ***
claus
parents: 28
diff changeset
   242
documentation
7b331e9012fd *** empty log message ***
claus
parents: 28
diff changeset
   243
"
5752
634e5d61abea changed: #documentation
Claus Gittinger <cg@exept.de>
parents: 5751
diff changeset
   244
    Instances of WindowEvent are created for every event coming from the graphics device. 
144
claus
parents: 143
diff changeset
   245
    Usually, they are enqueued by the event dispatcher process into
9049
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   246
    a sensor's input queue, and dequeued & processed by a windowGroup process
144
claus
parents: 143
diff changeset
   247
    in its event loop.
claus
parents: 143
diff changeset
   248
claus
parents: 143
diff changeset
   249
    WindowEvents hold the event type and additional information (such as key,
claus
parents: 143
diff changeset
   250
    x/y coordinates etc). Also, windowEvents know how to send themself to some
claus
parents: 143
diff changeset
   251
    destination. To provide a common (single) place where event dispatching is
1421
0f7c6d4ba280 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1420
diff changeset
   252
    implemented, this forwarding is done by a class method here (i.e. not by the
144
claus
parents: 143
diff changeset
   253
    window group itself).
claus
parents: 143
diff changeset
   254
claus
parents: 143
diff changeset
   255
    The algorithm for event dispatching is:
claus
parents: 143
diff changeset
   256
5752
634e5d61abea changed: #documentation
Claus Gittinger <cg@exept.de>
parents: 5751
diff changeset
   257
        - if the destination view has a keyboard focus set,
634e5d61abea changed: #documentation
Claus Gittinger <cg@exept.de>
parents: 5751
diff changeset
   258
          AND the event is a keyboard event,
634e5d61abea changed: #documentation
Claus Gittinger <cg@exept.de>
parents: 5751
diff changeset
   259
          THEN recursively invoke the event dispatching method,
634e5d61abea changed: #documentation
Claus Gittinger <cg@exept.de>
parents: 5751
diff changeset
   260
               sending the event to the focus view (or its delegate, as below)
144
claus
parents: 143
diff changeset
   261
5752
634e5d61abea changed: #documentation
Claus Gittinger <cg@exept.de>
parents: 5751
diff changeset
   262
        - if the destination view has a delegate,
634e5d61abea changed: #documentation
Claus Gittinger <cg@exept.de>
parents: 5751
diff changeset
   263
          AND its a keyboard, button or pointer event,
634e5d61abea changed: #documentation
Claus Gittinger <cg@exept.de>
parents: 5751
diff changeset
   264
          AND the delegate is interested in that event 
634e5d61abea changed: #documentation
Claus Gittinger <cg@exept.de>
parents: 5751
diff changeset
   265
              (i.e. implements & responds to #handlesXXX with true)
634e5d61abea changed: #documentation
Claus Gittinger <cg@exept.de>
parents: 5751
diff changeset
   266
          THEN send the event to the delegate, passing the original view
634e5d61abea changed: #documentation
Claus Gittinger <cg@exept.de>
parents: 5751
diff changeset
   267
               as additional argument
144
claus
parents: 143
diff changeset
   268
5752
634e5d61abea changed: #documentation
Claus Gittinger <cg@exept.de>
parents: 5751
diff changeset
   269
        - if the view has a nonNil controller,
634e5d61abea changed: #documentation
Claus Gittinger <cg@exept.de>
parents: 5751
diff changeset
   270
          AND its a key, button or pointer event,
634e5d61abea changed: #documentation
Claus Gittinger <cg@exept.de>
parents: 5751
diff changeset
   271
          THEN send the event to the controller
144
claus
parents: 143
diff changeset
   272
5752
634e5d61abea changed: #documentation
Claus Gittinger <cg@exept.de>
parents: 5751
diff changeset
   273
        - otherwise send the event to the view
144
claus
parents: 143
diff changeset
   274
claus
parents: 143
diff changeset
   275
claus
parents: 143
diff changeset
   276
    If the view has a non-nil transformation, the event is sent as a
claus
parents: 143
diff changeset
   277
    #deviceXXX message, passing device coordinates. Typically, subclasses
claus
parents: 143
diff changeset
   278
    of view do not redefine this method and the inherited default method
claus
parents: 143
diff changeset
   279
    translates these device coordinates into logical coordinates and resends
claus
parents: 143
diff changeset
   280
    an XXX message.
claus
parents: 143
diff changeset
   281
    If the view has no transformation, the XXX message is directly sent here.
claus
parents: 143
diff changeset
   282
claus
parents: 143
diff changeset
   283
    For example, a 'buttonPress:button x:x y:y' event leads to sending of
claus
parents: 143
diff changeset
   284
    'aView deviceButtonPress:button x:x y:y' which resends
claus
parents: 143
diff changeset
   285
    'aView buttonPress:button x:(x-logical) y:(y-logical)'
claus
parents: 143
diff changeset
   286
320
b7b8dc88fe9f interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
   287
    This allows views which are interested in deviceCoordinates to get them
144
claus
parents: 143
diff changeset
   288
    (by redefining #deviceXXX) and other views to transparently get & use
claus
parents: 143
diff changeset
   289
    logical coordinates.
claus
parents: 143
diff changeset
   290
claus
parents: 143
diff changeset
   291
    Therefore, for a delegated keyPress messages, the flow is:
claus
parents: 143
diff changeset
   292
5752
634e5d61abea changed: #documentation
Claus Gittinger <cg@exept.de>
parents: 5751
diff changeset
   293
        sendEvent
634e5d61abea changed: #documentation
Claus Gittinger <cg@exept.de>
parents: 5751
diff changeset
   294
            view has delegate
634e5d61abea changed: #documentation
Claus Gittinger <cg@exept.de>
parents: 5751
diff changeset
   295
                ------> ask delegate via 'handlesKeyPress:key inView:view'
634e5d61abea changed: #documentation
Claus Gittinger <cg@exept.de>
parents: 5751
diff changeset
   296
                <------ returns true
634e5d61abea changed: #documentation
Claus Gittinger <cg@exept.de>
parents: 5751
diff changeset
   297
                ------> 'delegate keyPress:key x:x y:y view:view'
634e5d61abea changed: #documentation
Claus Gittinger <cg@exept.de>
parents: 5751
diff changeset
   298
                        -----> delegate does whatever it wants to do
634e5d61abea changed: #documentation
Claus Gittinger <cg@exept.de>
parents: 5751
diff changeset
   299
                               (typically sends the event to some other view)
144
claus
parents: 143
diff changeset
   300
claus
parents: 143
diff changeset
   301
    for an undelegated message:
claus
parents: 143
diff changeset
   302
5752
634e5d61abea changed: #documentation
Claus Gittinger <cg@exept.de>
parents: 5751
diff changeset
   303
        sendEvent
634e5d61abea changed: #documentation
Claus Gittinger <cg@exept.de>
parents: 5751
diff changeset
   304
            view has delegate
634e5d61abea changed: #documentation
Claus Gittinger <cg@exept.de>
parents: 5751
diff changeset
   305
                ------> ask delegate via 'handlesKeyPress:key inView:view'
634e5d61abea changed: #documentation
Claus Gittinger <cg@exept.de>
parents: 5751
diff changeset
   306
                <------ returns false
634e5d61abea changed: #documentation
Claus Gittinger <cg@exept.de>
parents: 5751
diff changeset
   307
            view has controller
634e5d61abea changed: #documentation
Claus Gittinger <cg@exept.de>
parents: 5751
diff changeset
   308
                ------> 'controller keyPress:key x:x y:y'
634e5d61abea changed: #documentation
Claus Gittinger <cg@exept.de>
parents: 5751
diff changeset
   309
            view has no controller
634e5d61abea changed: #documentation
Claus Gittinger <cg@exept.de>
parents: 5751
diff changeset
   310
                view has transformation
634e5d61abea changed: #documentation
Claus Gittinger <cg@exept.de>
parents: 5751
diff changeset
   311
                    ----> 'view deviceKeyPress:key x:x y:y'
634e5d61abea changed: #documentation
Claus Gittinger <cg@exept.de>
parents: 5751
diff changeset
   312
                          inverse transform x/y
634e5d61abea changed: #documentation
Claus Gittinger <cg@exept.de>
parents: 5751
diff changeset
   313
                          ----> 'self keyPress:key x:xLogical y:yLogical'
634e5d61abea changed: #documentation
Claus Gittinger <cg@exept.de>
parents: 5751
diff changeset
   314
                view has no transformation
634e5d61abea changed: #documentation
Claus Gittinger <cg@exept.de>
parents: 5751
diff changeset
   315
                    ----> 'view keyPress:key x:x y:y'
598
1a2339e902d4 commentary
Claus Gittinger <cg@exept.de>
parents: 511
diff changeset
   316
612
8758d0c9933e documentation
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
   317
    [author:]
5752
634e5d61abea changed: #documentation
Claus Gittinger <cg@exept.de>
parents: 5751
diff changeset
   318
        Claus Gittinger
612
8758d0c9933e documentation
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
   319
598
1a2339e902d4 commentary
Claus Gittinger <cg@exept.de>
parents: 511
diff changeset
   320
    [see also:]
5752
634e5d61abea changed: #documentation
Claus Gittinger <cg@exept.de>
parents: 5751
diff changeset
   321
        WindowGroup WindowSensor
634e5d61abea changed: #documentation
Claus Gittinger <cg@exept.de>
parents: 5751
diff changeset
   322
        DeviceWorkstation View
634e5d61abea changed: #documentation
Claus Gittinger <cg@exept.de>
parents: 5751
diff changeset
   323
        KeyboardMap KeyboardForwarder EventListener
598
1a2339e902d4 commentary
Claus Gittinger <cg@exept.de>
parents: 511
diff changeset
   324
46
7b331e9012fd *** empty log message ***
claus
parents: 28
diff changeset
   325
"
7b331e9012fd *** empty log message ***
claus
parents: 28
diff changeset
   326
! !
7b331e9012fd *** empty log message ***
claus
parents: 28
diff changeset
   327
11
bc3949e465a0 Initial revision
claus
parents:
diff changeset
   328
!WindowEvent class methodsFor:'instance creation'!
bc3949e465a0 Initial revision
claus
parents:
diff changeset
   329
4960
9c4c152bb058 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4842
diff changeset
   330
buttonMotion:buttonAndModifierState x:x y:y view:aView
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   331
    ^ (ButtonMotionEvent new)
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   332
          for:aView
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   333
          type:#buttonMotion:x:y:
4960
9c4c152bb058 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4842
diff changeset
   334
          arguments:(Array with:buttonAndModifierState with:x with:y)
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   335
!
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   336
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   337
buttonMultiPress:button x:x y:y view:aView
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   338
    ^ (ButtonMultiPressEvent new)
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   339
          for:aView
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   340
          type:#buttonMultiPress:x:y:
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   341
          arguments:(Array with:button with:x with:y)
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   342
!
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   343
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   344
buttonPress:button x:x y:y view:aView
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   345
    ^ (ButtonPressEvent new)
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   346
          for:aView
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   347
          type:#buttonPress:x:y:
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   348
          arguments:(Array with:button with:x with:y)
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   349
!
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   350
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   351
buttonRelease:button x:x y:y view:aView
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   352
    ^ (ButtonReleaseEvent new)
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   353
          for:aView
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   354
          type:#buttonRelease:x:y:
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   355
          arguments:(Array with:button with:x with:y)
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   356
!
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   357
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   358
clientMessageEvent:type format:format eventData:data view:aView
5000
e0ec909988e9 hooks for client and copyData events
Claus Gittinger <cg@exept.de>
parents: 4991
diff changeset
   359
    "this one is only used with X-Windows"
e0ec909988e9 hooks for client and copyData events
Claus Gittinger <cg@exept.de>
parents: 4991
diff changeset
   360
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   361
    ^ ClientEvent
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   362
         for:aView
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   363
         type:#clientMessage:format:eventData:
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   364
         arguments:(Array with:type with:format with:data)
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   365
!
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   366
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   367
configureX:x y:y width:w height:h view:aView
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   368
    ^ ConfigureEvent
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   369
         for:aView
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   370
         type:#configureX:y:width:height:
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   371
         arguments:(Array with:x with:y with:w with:h)
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   372
!
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   373
5020
f8ba55bc9b95 changed #copyDataEvent:eventData:view:
Claus Gittinger <cg@exept.de>
parents: 5000
diff changeset
   374
copyDataEvent:parameter eventData:data view:aView
5000
e0ec909988e9 hooks for client and copyData events
Claus Gittinger <cg@exept.de>
parents: 4991
diff changeset
   375
    "this one is only used with Win32"
e0ec909988e9 hooks for client and copyData events
Claus Gittinger <cg@exept.de>
parents: 4991
diff changeset
   376
e0ec909988e9 hooks for client and copyData events
Claus Gittinger <cg@exept.de>
parents: 4991
diff changeset
   377
    ^ ClientEvent
e0ec909988e9 hooks for client and copyData events
Claus Gittinger <cg@exept.de>
parents: 4991
diff changeset
   378
         for:aView
e0ec909988e9 hooks for client and copyData events
Claus Gittinger <cg@exept.de>
parents: 4991
diff changeset
   379
         type:#copyDataEvent:eventData:
5020
f8ba55bc9b95 changed #copyDataEvent:eventData:view:
Claus Gittinger <cg@exept.de>
parents: 5000
diff changeset
   380
         arguments:(Array with:parameter with:data)
5000
e0ec909988e9 hooks for client and copyData events
Claus Gittinger <cg@exept.de>
parents: 4991
diff changeset
   381
!
e0ec909988e9 hooks for client and copyData events
Claus Gittinger <cg@exept.de>
parents: 4991
diff changeset
   382
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   383
coveredBy:coveringSiblingView view:coveredView
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   384
    ^ (WindowEvent basicNew)
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   385
        for:coveredView 
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   386
        type:#coveredBy:
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   387
        arguments:(Array with:coveringSiblingView)
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   388
!
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   389
5751
8f2955555565 Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5275
diff changeset
   390
createWindow:view x:x y:y width:w height:h
8f2955555565 Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5275
diff changeset
   391
8f2955555565 Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5275
diff changeset
   392
    ^ (self basicNew)
8f2955555565 Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5275
diff changeset
   393
        for: view 
8f2955555565 Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5275
diff changeset
   394
        type:#createWindowX:y:width:height:
8f2955555565 Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5275
diff changeset
   395
        arguments: (Array with: x with: y with: w with: h)
8f2955555565 Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5275
diff changeset
   396
8f2955555565 Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5275
diff changeset
   397
    "Created: / 30-05-2011 / 19:04:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
8f2955555565 Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5275
diff changeset
   398
    "Modified: / 01-06-2011 / 13:05:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
8f2955555565 Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5275
diff changeset
   399
!
8f2955555565 Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5275
diff changeset
   400
244
83218faf792c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
   401
damageFor:aView rectangle:aRectangle
83218faf792c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
   402
    "create and return a new damage Event for aRectangle
83218faf792c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
   403
     in aView"
11
bc3949e465a0 Initial revision
claus
parents:
diff changeset
   404
4044
dc958a0211d9 newDamage
Claus Gittinger <cg@exept.de>
parents: 3936
diff changeset
   405
    ^ DamageEvent for:aView type:#damage arguments:aRectangle
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   406
!
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   407
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   408
destroyedView:aView
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   409
    ^ (self basicNew)
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   410
        for:aView 
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   411
        type:#destroyed
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   412
!
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   413
4459
8b13d9f5d3b5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4458
diff changeset
   414
dropFiles:files view:view position:dropPositionOrNil handle:dropHandleOrNil
4648
87368f2f69fc eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents: 4628
diff changeset
   415
    ^ self 
87368f2f69fc eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents: 4628
diff changeset
   416
        dropMessage:(self dropType_files) 
87368f2f69fc eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents: 4628
diff changeset
   417
        data:files 
87368f2f69fc eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents: 4628
diff changeset
   418
        view:view 
87368f2f69fc eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents: 4628
diff changeset
   419
        position:dropPositionOrNil 
87368f2f69fc eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents: 4628
diff changeset
   420
        handle:dropHandleOrNil
87368f2f69fc eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents: 4628
diff changeset
   421
87368f2f69fc eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents: 4628
diff changeset
   422
    "Modified: / 13-10-2006 / 10:11:47 / cg"
4456
Claus Gittinger <cg@exept.de>
parents: 4233
diff changeset
   423
!
Claus Gittinger <cg@exept.de>
parents: 4233
diff changeset
   424
4459
8b13d9f5d3b5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4458
diff changeset
   425
dropMessage:dropTypeSymbol data:dropValue view:aView position:positionOrNil handle:dropHandleOrNil
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   426
    ^ DropEvent 
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   427
          for:aView
4461
adecf2db552f drag and drop
Claus Gittinger <cg@exept.de>
parents: 4459
diff changeset
   428
          type:#dropMessage:data:position:handle:
4458
9289b34fcea3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4456
diff changeset
   429
          arguments:(Array with:dropTypeSymbol with:dropValue with:positionOrNil with:dropHandleOrNil)
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   430
!
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   431
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   432
focusInView:aView
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   433
    ^ FocusEvent 
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   434
        for:aView 
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   435
        type:#focusIn
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   436
!
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   437
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   438
focusOutView:aView
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   439
    ^ FocusEvent 
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   440
        for:aView 
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   441
        type:#focusOut
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   442
!
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   443
5962
ab
parents: 5949
diff changeset
   444
hotkeyWithId:aHotkeyId rawKey:keyWithModifier view:aView
ab
parents: 5949
diff changeset
   445
ab
parents: 5949
diff changeset
   446
    |ev|
ab
parents: 5949
diff changeset
   447
ab
parents: 5949
diff changeset
   448
     ev := (HotKeyEvent new)
9049
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   449
                for:aView
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   450
                type:#hotkeyWithId:rawKey:
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   451
                arguments:(Array with:keyWithModifier with:0 with:0).
5962
ab
parents: 5949
diff changeset
   452
     ev rawKey:keyWithModifier.
ab
parents: 5949
diff changeset
   453
     ev hotkeyIdentifier:aHotkeyId.
ab
parents: 5949
diff changeset
   454
    ^ ev
ab
parents: 5949
diff changeset
   455
!
ab
parents: 5949
diff changeset
   456
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   457
keyPress:key rawKey:untranslatedKey 
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   458
    hasShift:shiftDown ctrl:ctrlDown alt:altDown meta:metaDown
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   459
    button1:leftButtonDown button2:middleButtonDown button3:rightButtonDown
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   460
    x:x y:y view:aView
244
83218faf792c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
   461
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   462
    |ev|
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   463
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   464
    ev := self keyPress:key x:x y:y view:aView.
9049
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   465
    ev rawKey:untranslatedKey untranslatedKey:untranslatedKey.
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   466
    ev  hasShift:shiftDown ctrl:ctrlDown alt:altDown meta:metaDown
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   467
        button1:leftButtonDown button2:middleButtonDown button3:rightButtonDown.
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   468
    ^ ev
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   469
!
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   470
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   471
keyPress:key x:x y:y view:aView
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   472
    ^ (KeyPressEvent new)
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   473
          for:aView
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   474
          type:#keyPress:x:y:
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   475
          arguments:(Array with:key with:x with:y)
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   476
!
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   477
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   478
keyRelease:key rawKey:untranslatedKey 
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   479
    hasShift:shiftDown ctrl:ctrlDown alt:altDown meta:metaDown
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   480
    button1:leftButtonDown button2:middleButtonDown button3:rightButtonDown
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   481
    x:x y:y view:aView
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   482
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   483
    |ev|
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   484
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   485
    ev := self keyRelease:key x:x y:y view:aView.
9049
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   486
    ev rawKey:untranslatedKey untranslatedKey:untranslatedKey.
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   487
    ev  hasShift:shiftDown ctrl:ctrlDown alt:altDown meta:metaDown
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   488
        button1:leftButtonDown button2:middleButtonDown button3:rightButtonDown.
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   489
    ^ ev
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   490
!
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   491
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   492
keyRelease:key x:x y:y view:aView
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   493
    ^ (KeyReleaseEvent new)
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   494
          for:aView
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   495
          type:#keyRelease:x:y:
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   496
          arguments:(Array with:key with:x with:y)
46
7b331e9012fd *** empty log message ***
claus
parents: 28
diff changeset
   497
!
7b331e9012fd *** empty log message ***
claus
parents: 28
diff changeset
   498
3856
45fccc92d834 Use SynchronousWindoeSensor if no windowGroup
Stefan Vogel <sv@exept.de>
parents: 3773
diff changeset
   499
keyboardFocus:arg view:aView
45fccc92d834 Use SynchronousWindoeSensor if no windowGroup
Stefan Vogel <sv@exept.de>
parents: 3773
diff changeset
   500
45fccc92d834 Use SynchronousWindoeSensor if no windowGroup
Stefan Vogel <sv@exept.de>
parents: 3773
diff changeset
   501
    ^ KeyboardFocusEvent    
45fccc92d834 Use SynchronousWindoeSensor if no windowGroup
Stefan Vogel <sv@exept.de>
parents: 3773
diff changeset
   502
            for:aView type:#hasKeyboardFocus: arguments:(Array with:arg).
45fccc92d834 Use SynchronousWindoeSensor if no windowGroup
Stefan Vogel <sv@exept.de>
parents: 3773
diff changeset
   503
!
45fccc92d834 Use SynchronousWindoeSensor if no windowGroup
Stefan Vogel <sv@exept.de>
parents: 3773
diff changeset
   504
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   505
mappedView:aView
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   506
    ^ WindowMapUnmapEvent 
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   507
        for:aView 
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   508
        type:#mapped
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   509
!
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   510
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   511
messageSend:receiver selector:aSelector arguments:arguments
9049
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   512
    "create and return a new messageSend for sending
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   513
     aSelector-message with arguments to receiver.
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   514
     Usually, these are placed into the eventQueue, to ensure synchronized operation of change-update notifications"
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   515
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   516
    ^ MessageSendEvent for:receiver type:aSelector arguments:arguments
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   517
!
72
3e84121988c3 *** empty log message ***
claus
parents: 54
diff changeset
   518
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   519
mouseWheelMotion:state x:x y:y amount:amount deltaTime:deltaTime view:aView
4988
c4d0e91bfda5 +mouseWheelEvent
fm
parents: 4980
diff changeset
   520
    ^ MouseWheelMotionEvent
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   521
             for:aView
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   522
             type:#mouseWheelMotion:x:y:amount:deltaTime:
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   523
             arguments:(Array with:state with:x with:y with:amount with:deltaTime).
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   524
!
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   525
4233
088575f01a8a native stuff
ca
parents: 4144
diff changeset
   526
nativeWidgetCommand:command arguments:argVector view:aView
4144
42b7f6e01565 preps for native widgets
ca
parents: 4044
diff changeset
   527
    ^ (NativeWidgetCommandEvent new)
42b7f6e01565 preps for native widgets
ca
parents: 4044
diff changeset
   528
        for:aView 
4233
088575f01a8a native stuff
ca
parents: 4144
diff changeset
   529
        type:command
088575f01a8a native stuff
ca
parents: 4144
diff changeset
   530
        arguments:argVector
4144
42b7f6e01565 preps for native widgets
ca
parents: 4044
diff changeset
   531
!
42b7f6e01565 preps for native widgets
ca
parents: 4044
diff changeset
   532
4044
dc958a0211d9 newDamage
Claus Gittinger <cg@exept.de>
parents: 3936
diff changeset
   533
newDamageFor:aView
dc958a0211d9 newDamage
Claus Gittinger <cg@exept.de>
parents: 3936
diff changeset
   534
    "create and return a new damage Event for aView"
dc958a0211d9 newDamage
Claus Gittinger <cg@exept.de>
parents: 3936
diff changeset
   535
dc958a0211d9 newDamage
Claus Gittinger <cg@exept.de>
parents: 3936
diff changeset
   536
    ^ NewDamageEvent for:aView type:#newDamage
dc958a0211d9 newDamage
Claus Gittinger <cg@exept.de>
parents: 3936
diff changeset
   537
!
dc958a0211d9 newDamage
Claus Gittinger <cg@exept.de>
parents: 3936
diff changeset
   538
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   539
pasteFromClipBoard:something view:aView
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   540
    ^ (self basicNew)
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   541
        for:aView
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   542
        type:#pasteFromClipBoard:
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   543
        arguments:(Array with:something).
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   544
!
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   545
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   546
pointerEnter:state x:x y:y view:aView
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   547
    ^ EnterLeaveEvent
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   548
             for:aView
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   549
             type:#pointerEnter:x:y:
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   550
             arguments:(Array with:state with:x with:y).
72
3e84121988c3 *** empty log message ***
claus
parents: 54
diff changeset
   551
!
3e84121988c3 *** empty log message ***
claus
parents: 54
diff changeset
   552
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   553
pointerLeave:state view:aView
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   554
    ^ EnterLeaveEvent
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   555
             for:aView
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   556
             type:#pointerLeave:
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   557
             arguments:(Array with:state).
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   558
!
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   559
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   560
postViewCreateNotification:aView
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   561
    ^ (self basicNew) 
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   562
        for:aView 
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   563
        type:#postCreateView
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   564
!
28
3879ff2138f1 *** empty log message ***
claus
parents: 26
diff changeset
   565
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   566
preViewCreateNotification:aView
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   567
    ^ (self basicNew) 
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   568
        for:aView 
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   569
        type:#preCreateView
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   570
!
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   571
5751
8f2955555565 Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5275
diff changeset
   572
propertyChange:view property:propertyId state:aSymbol time:time
8f2955555565 Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5275
diff changeset
   573
    ^ (self basicNew)
8f2955555565 Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5275
diff changeset
   574
        for: view 
8f2955555565 Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5275
diff changeset
   575
        type:#propertyChange:state:
8f2955555565 Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5275
diff changeset
   576
        arguments: (Array with: propertyId with: aSymbol)
8f2955555565 Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5275
diff changeset
   577
8f2955555565 Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5275
diff changeset
   578
    "Created: / 01-06-2011 / 13:36:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
8f2955555565 Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5275
diff changeset
   579
!
8f2955555565 Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5275
diff changeset
   580
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   581
saveAndTerminateView:aView
3773
e2fd3df91e5c new event class for TerminateEvents
Claus Gittinger <cg@exept.de>
parents: 3758
diff changeset
   582
    ^ (TerminateEvent basicNew)
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   583
        for:aView 
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   584
        type:#saveAndTerminate
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   585
!
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   586
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   587
terminateView:aView
3773
e2fd3df91e5c new event class for TerminateEvents
Claus Gittinger <cg@exept.de>
parents: 3758
diff changeset
   588
    ^ (TerminateEvent basicNew)
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   589
        for:aView 
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   590
        type:#terminate
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   591
!
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   592
4817
2d555a01a0fd trayEvents
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
   593
trayAction:event arguments:argVector view:aView
2d555a01a0fd trayEvents
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
   594
    ^ (TrayActionEvent new)
2d555a01a0fd trayEvents
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
   595
        for:aView 
2d555a01a0fd trayEvents
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
   596
        type:event
2d555a01a0fd trayEvents
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
   597
        arguments:argVector
2d555a01a0fd trayEvents
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
   598
2d555a01a0fd trayEvents
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
   599
    "Created: / 31-10-2007 / 01:23:53 / cg"
2d555a01a0fd trayEvents
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
   600
!
2d555a01a0fd trayEvents
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
   601
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   602
unmappedView:aView
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   603
    ^ WindowMapUnmapEvent 
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   604
        for:aView 
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   605
        type:#unmapped
5838
5629e7ee01bf added: #visibilityOf:changedTo:
Claus Gittinger <cg@exept.de>
parents: 5752
diff changeset
   606
!
5629e7ee01bf added: #visibilityOf:changedTo:
Claus Gittinger <cg@exept.de>
parents: 5752
diff changeset
   607
5629e7ee01bf added: #visibilityOf:changedTo:
Claus Gittinger <cg@exept.de>
parents: 5752
diff changeset
   608
visibilityOf:aView changedTo:how
5629e7ee01bf added: #visibilityOf:changedTo:
Claus Gittinger <cg@exept.de>
parents: 5752
diff changeset
   609
    ^ EnterLeaveEvent
5629e7ee01bf added: #visibilityOf:changedTo:
Claus Gittinger <cg@exept.de>
parents: 5752
diff changeset
   610
             for:aView
5629e7ee01bf added: #visibilityOf:changedTo:
Claus Gittinger <cg@exept.de>
parents: 5752
diff changeset
   611
             type:#visibilityChange:
5629e7ee01bf added: #visibilityOf:changedTo:
Claus Gittinger <cg@exept.de>
parents: 5752
diff changeset
   612
             arguments:(Array with:how).
5629e7ee01bf added: #visibilityOf:changedTo:
Claus Gittinger <cg@exept.de>
parents: 5752
diff changeset
   613
5629e7ee01bf added: #visibilityOf:changedTo:
Claus Gittinger <cg@exept.de>
parents: 5752
diff changeset
   614
    "Created: / 23-01-2012 / 09:51:03 / cg"
28
3879ff2138f1 *** empty log message ***
claus
parents: 26
diff changeset
   615
! !
3879ff2138f1 *** empty log message ***
claus
parents: 26
diff changeset
   616
9049
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   617
!WindowEvent class methodsFor:'class access'!
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   618
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   619
buttonMotionEvent
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   620
    ^ ButtonMotionEvent
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   621
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   622
    "Created: / 13-02-2019 / 12:55:25 / Claus Gittinger"
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   623
!
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   624
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   625
buttonPressEvent
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   626
    ^ ButtonPressEvent
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   627
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   628
    "Created: / 13-02-2019 / 12:54:38 / Claus Gittinger"
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   629
!
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   630
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   631
buttonReleaseEvent
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   632
    ^ ButtonReleaseEvent
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   633
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   634
    "Created: / 13-02-2019 / 12:54:31 / Claus Gittinger"
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   635
! !
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   636
4648
87368f2f69fc eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents: 4628
diff changeset
   637
!WindowEvent class methodsFor:'constants'!
87368f2f69fc eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents: 4628
diff changeset
   638
87368f2f69fc eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents: 4628
diff changeset
   639
dropType_directory
87368f2f69fc eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents: 4628
diff changeset
   640
    ^ #directory
87368f2f69fc eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents: 4628
diff changeset
   641
87368f2f69fc eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents: 4628
diff changeset
   642
    "Created: / 13-10-2006 / 10:08:59 / cg"
87368f2f69fc eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents: 4628
diff changeset
   643
!
87368f2f69fc eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents: 4628
diff changeset
   644
87368f2f69fc eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents: 4628
diff changeset
   645
dropType_file
87368f2f69fc eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents: 4628
diff changeset
   646
    ^ #file
87368f2f69fc eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents: 4628
diff changeset
   647
87368f2f69fc eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents: 4628
diff changeset
   648
    "Created: / 13-10-2006 / 10:08:52 / cg"
87368f2f69fc eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents: 4628
diff changeset
   649
!
87368f2f69fc eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents: 4628
diff changeset
   650
87368f2f69fc eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents: 4628
diff changeset
   651
dropType_files
87368f2f69fc eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents: 4628
diff changeset
   652
    ^ #files
87368f2f69fc eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents: 4628
diff changeset
   653
87368f2f69fc eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents: 4628
diff changeset
   654
    "Created: / 13-10-2006 / 10:09:04 / cg"
87368f2f69fc eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents: 4628
diff changeset
   655
!
87368f2f69fc eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents: 4628
diff changeset
   656
87368f2f69fc eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents: 4628
diff changeset
   657
dropType_text
87368f2f69fc eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents: 4628
diff changeset
   658
    ^ #text
87368f2f69fc eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents: 4628
diff changeset
   659
87368f2f69fc eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents: 4628
diff changeset
   660
    "Created: / 13-10-2006 / 10:09:36 / cg"
87368f2f69fc eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents: 4628
diff changeset
   661
! !
87368f2f69fc eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents: 4628
diff changeset
   662
5929
290477171e1f comment/format in: #new
Claus Gittinger <cg@exept.de>
parents: 5925
diff changeset
   663
!WindowEvent class methodsFor:'instance creation-basic'!
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   664
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   665
for:aView type:aSymbol
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   666
    "create and return a new windowEvent for sending
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   667
     aSymbol-message with no arguments to aView"
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   668
9049
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   669
    self == WindowEvent ifTrue:[
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   670
        '----------------' errorPrint.
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   671
        'WindowEvent is abstract - use/add explicit creation message' errorPrintCR.
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   672
        thisContext fullPrintAll.
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   673
        self abstractClassInstantiationError.
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   674
    ].
3856
45fccc92d834 Use SynchronousWindoeSensor if no windowGroup
Stefan Vogel <sv@exept.de>
parents: 3773
diff changeset
   675
    ^ self new for:aView type:aSymbol
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   676
!
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   677
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   678
for:aView type:aSymbol arguments:argArray
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   679
    "create and return a new windowEvent for sending
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   680
     aSymbol-message with arguments to aView"
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   681
9049
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   682
    self == WindowEvent ifTrue:[
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   683
        '----------------' errorPrint.
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   684
        'WindowEvent is abstract - use/add explicit creation message' errorPrintCR.
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   685
        thisContext fullPrintAll.
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   686
        self abstractClassInstantiationError.
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   687
    ].
3856
45fccc92d834 Use SynchronousWindoeSensor if no windowGroup
Stefan Vogel <sv@exept.de>
parents: 3773
diff changeset
   688
    ^ self new for:aView type:aSymbol arguments:argArray
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   689
!
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   690
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   691
new
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   692
    self == WindowEvent ifTrue:[
5929
290477171e1f comment/format in: #new
Claus Gittinger <cg@exept.de>
parents: 5925
diff changeset
   693
        '----------------' errorPrint.
290477171e1f comment/format in: #new
Claus Gittinger <cg@exept.de>
parents: 5925
diff changeset
   694
        'WindowEvent is abstract - use/add explicit creation message' errorPrintCR.
290477171e1f comment/format in: #new
Claus Gittinger <cg@exept.de>
parents: 5925
diff changeset
   695
        thisContext fullPrintAll.
5949
643c67d38bdd changed: #new
Claus Gittinger <cg@exept.de>
parents: 5929
diff changeset
   696
        self abstractClassInstantiationError.
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   697
    ].
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   698
    ^ super new
5929
290477171e1f comment/format in: #new
Claus Gittinger <cg@exept.de>
parents: 5925
diff changeset
   699
290477171e1f comment/format in: #new
Claus Gittinger <cg@exept.de>
parents: 5925
diff changeset
   700
    "Modified (format): / 31-08-2012 / 19:44:41 / cg"
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   701
! !
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   702
244
83218faf792c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
   703
!WindowEvent methodsFor:'accessing'!
83218faf792c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
   704
3465
a14f06f3af91 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3376
diff changeset
   705
consumed
a14f06f3af91 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3376
diff changeset
   706
    "return the value of the instance variable 'consumed' (automatically generated)"
a14f06f3af91 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3376
diff changeset
   707
a14f06f3af91 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3376
diff changeset
   708
    ^ consumed
a14f06f3af91 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3376
diff changeset
   709
!
a14f06f3af91 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3376
diff changeset
   710
a14f06f3af91 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3376
diff changeset
   711
consumed:aBoolean
a14f06f3af91 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3376
diff changeset
   712
    "set the value of the instance variable 'consumed' (automatically generated)"
a14f06f3af91 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3376
diff changeset
   713
a14f06f3af91 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3376
diff changeset
   714
    consumed := aBoolean.
a14f06f3af91 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3376
diff changeset
   715
!
a14f06f3af91 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3376
diff changeset
   716
3089
ea806f804f5c accessors for x/y
ca
parents: 3011
diff changeset
   717
delegatedFrom
ea806f804f5c accessors for x/y
ca
parents: 3011
diff changeset
   718
    "return the value of the instance variable 'delegatedFrom' (automatically generated)"
ea806f804f5c accessors for x/y
ca
parents: 3011
diff changeset
   719
3376
a9784be22e6a added hasKeyboardFocus event
tm
parents: 3297
diff changeset
   720
    ^ delegatedFrom
a9784be22e6a added hasKeyboardFocus event
tm
parents: 3297
diff changeset
   721
!
3089
ea806f804f5c accessors for x/y
ca
parents: 3011
diff changeset
   722
9049
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   723
delegatedFrom:someOne
3089
ea806f804f5c accessors for x/y
ca
parents: 3011
diff changeset
   724
    "set the value of the instance variable 'delegatedFrom' (automatically generated)"
ea806f804f5c accessors for x/y
ca
parents: 3011
diff changeset
   725
9049
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   726
    delegatedFrom := someOne.
3376
a9784be22e6a added hasKeyboardFocus event
tm
parents: 3297
diff changeset
   727
!
3089
ea806f804f5c accessors for x/y
ca
parents: 3011
diff changeset
   728
244
83218faf792c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
   729
key
1841
3773debcc078 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1730
diff changeset
   730
    "return the key - nil is returned here.
3773debcc078 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1730
diff changeset
   731
     This is redefined in KeyboardEvent."
244
83218faf792c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
   732
83218faf792c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
   733
    ^ nil
1841
3773debcc078 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1730
diff changeset
   734
3773debcc078 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1730
diff changeset
   735
    "Created: 1.8.1997 / 13:56:21 / cg"
244
83218faf792c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
   736
!
83218faf792c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
   737
83218faf792c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
   738
rectangle
83218faf792c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
   739
    "return the damage rectangle"
83218faf792c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
   740
3295
84de6d18b9d1 code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents: 3294
diff changeset
   741
    ^ args "consider this a kludge"
84de6d18b9d1 code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents: 3294
diff changeset
   742
!
84de6d18b9d1 code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents: 3294
diff changeset
   743
244
83218faf792c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
   744
type
83218faf792c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
   745
    "return the type of the event"
83218faf792c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
   746
3295
84de6d18b9d1 code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents: 3294
diff changeset
   747
    ^ selector
244
83218faf792c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
   748
!
83218faf792c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
   749
83218faf792c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
   750
view
83218faf792c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
   751
    "return the view, for which the event is for"
83218faf792c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
   752
3295
84de6d18b9d1 code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents: 3294
diff changeset
   753
    ^ receiver
244
83218faf792c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
   754
!
83218faf792c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
   755
83218faf792c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
   756
view:aView
83218faf792c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
   757
    "set the view, for which the event is for"
83218faf792c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
   758
3295
84de6d18b9d1 code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents: 3294
diff changeset
   759
    receiver := aView
3089
ea806f804f5c accessors for x/y
ca
parents: 3011
diff changeset
   760
!
ea806f804f5c accessors for x/y
ca
parents: 3011
diff changeset
   761
ea806f804f5c accessors for x/y
ca
parents: 3011
diff changeset
   762
x
ea806f804f5c accessors for x/y
ca
parents: 3011
diff changeset
   763
    "the x coordinate - if any.
ea806f804f5c accessors for x/y
ca
parents: 3011
diff changeset
   764
     nil returned for all but button- and keyEvents"
ea806f804f5c accessors for x/y
ca
parents: 3011
diff changeset
   765
ea806f804f5c accessors for x/y
ca
parents: 3011
diff changeset
   766
    ^ nil
ea806f804f5c accessors for x/y
ca
parents: 3011
diff changeset
   767
!
ea806f804f5c accessors for x/y
ca
parents: 3011
diff changeset
   768
ea806f804f5c accessors for x/y
ca
parents: 3011
diff changeset
   769
x:ignoredInteger
3295
84de6d18b9d1 code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents: 3294
diff changeset
   770
    "set the x coordinate - ignored here.
84de6d18b9d1 code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents: 3294
diff changeset
   771
     only for button- and keyEvents"
3089
ea806f804f5c accessors for x/y
ca
parents: 3011
diff changeset
   772
!
ea806f804f5c accessors for x/y
ca
parents: 3011
diff changeset
   773
ea806f804f5c accessors for x/y
ca
parents: 3011
diff changeset
   774
y
ea806f804f5c accessors for x/y
ca
parents: 3011
diff changeset
   775
    "the y coordinate - if any.
ea806f804f5c accessors for x/y
ca
parents: 3011
diff changeset
   776
     nil returned for all but button- and keyEvents"
ea806f804f5c accessors for x/y
ca
parents: 3011
diff changeset
   777
ea806f804f5c accessors for x/y
ca
parents: 3011
diff changeset
   778
    ^ nil
ea806f804f5c accessors for x/y
ca
parents: 3011
diff changeset
   779
!
ea806f804f5c accessors for x/y
ca
parents: 3011
diff changeset
   780
ea806f804f5c accessors for x/y
ca
parents: 3011
diff changeset
   781
y:ignoredInteger
3295
84de6d18b9d1 code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents: 3294
diff changeset
   782
    "set the y coordinate - ignored here.
84de6d18b9d1 code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents: 3294
diff changeset
   783
     only for button- and keyEvents"
244
83218faf792c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
   784
! !
83218faf792c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
   785
3011
e5880bb2738d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2852
diff changeset
   786
!WindowEvent methodsFor:'dispatching'!
e5880bb2738d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2852
diff changeset
   787
e5880bb2738d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2852
diff changeset
   788
dispatchTo:anObject
e5880bb2738d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2852
diff changeset
   789
    "send this event to anObject"
e5880bb2738d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2852
diff changeset
   790
3295
84de6d18b9d1 code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents: 3294
diff changeset
   791
    ^ anObject perform:selector withArguments:args
3011
e5880bb2738d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2852
diff changeset
   792
!
e5880bb2738d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2852
diff changeset
   793
e5880bb2738d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2852
diff changeset
   794
dispatchWithViewArgumentTo:anObject
e5880bb2738d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2852
diff changeset
   795
    "send this event to anObject, and pass an additional view argument"
e5880bb2738d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2852
diff changeset
   796
9049
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   797
    args size == 0 ifTrue:[
3011
e5880bb2738d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2852
diff changeset
   798
        ^ anObject 
6312
fd183f4f73b5 class: WindowEvent
Claus Gittinger <cg@exept.de>
parents: 5962
diff changeset
   799
            perform:selector asMutator
3295
84de6d18b9d1 code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents: 3294
diff changeset
   800
            with:receiver
3011
e5880bb2738d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2852
diff changeset
   801
    ].
e5880bb2738d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2852
diff changeset
   802
e5880bb2738d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2852
diff changeset
   803
    ^ anObject 
3295
84de6d18b9d1 code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents: 3294
diff changeset
   804
        perform:(selector , 'view:') asSymbol
84de6d18b9d1 code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents: 3294
diff changeset
   805
        withArguments:(args copyWith:receiver)
3011
e5880bb2738d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2852
diff changeset
   806
! !
e5880bb2738d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2852
diff changeset
   807
511
233dabfcc81c added #displayString (for eventTracing)
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
   808
!WindowEvent methodsFor:'printing & storing'!
233dabfcc81c added #displayString (for eventTracing)
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
   809
5925
a3db9f9f6502 Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents: 5838
diff changeset
   810
displayOn:aGCOrStream
a3db9f9f6502 Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents: 5838
diff changeset
   811
    "Compatibility
9049
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   812
      append a printed desription on some stream (Dolphin,  Squeak)
5925
a3db9f9f6502 Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents: 5838
diff changeset
   813
     OR:
9049
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   814
      display the receiver in a graphicsContext at 0@0 (ST80).
5925
a3db9f9f6502 Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents: 5838
diff changeset
   815
     This method allows for any object to be displayed in some view
a3db9f9f6502 Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents: 5838
diff changeset
   816
     (although the fallBack is to display its printString ...)"
1905
5bf0b9628c80 comment
Claus Gittinger <cg@exept.de>
parents: 1886
diff changeset
   817
5925
a3db9f9f6502 Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents: 5838
diff changeset
   818
    "/ what a kludge - Dolphin and Squeak mean: printOn: a stream;
9049
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   819
    "/ old ST80 means: draw-yourself on a GC.
5925
a3db9f9f6502 Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents: 5838
diff changeset
   820
    aGCOrStream isStream ifFalse:[
a3db9f9f6502 Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents: 5838
diff changeset
   821
        ^ super displayOn:aGCOrStream.
a3db9f9f6502 Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents: 5838
diff changeset
   822
    ].
a3db9f9f6502 Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents: 5838
diff changeset
   823
a3db9f9f6502 Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents: 5838
diff changeset
   824
    aGCOrStream 
9049
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   825
        nextPutAll:self className;
5925
a3db9f9f6502 Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents: 5838
diff changeset
   826
        nextPut:$(.
a3db9f9f6502 Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents: 5838
diff changeset
   827
a3db9f9f6502 Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents: 5838
diff changeset
   828
    selector storeOn:aGCOrStream. 
a3db9f9f6502 Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents: 5838
diff changeset
   829
    aGCOrStream
a3db9f9f6502 Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents: 5838
diff changeset
   830
        nextPutAll:' view: '; 
a3db9f9f6502 Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents: 5838
diff changeset
   831
        nextPutAll:receiver class name; 
a3db9f9f6502 Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents: 5838
diff changeset
   832
        nextPutAll:' args: '.
a3db9f9f6502 Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents: 5838
diff changeset
   833
a3db9f9f6502 Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents: 5838
diff changeset
   834
    args displayOn:aGCOrStream.
a3db9f9f6502 Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents: 5838
diff changeset
   835
    aGCOrStream nextPut:$)
511
233dabfcc81c added #displayString (for eventTracing)
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
   836
9049
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   837
    "Created: / 07-03-1996 / 14:55:50 / cg"
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   838
    "Modified: / 20-09-1997 / 11:42:11 / cg"
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   839
    "Modified (comment): / 22-02-2017 / 16:53:02 / cg"
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
   840
    "Modified: / 28-06-2019 / 09:23:38 / Claus Gittinger"
511
233dabfcc81c added #displayString (for eventTracing)
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
   841
! !
233dabfcc81c added #displayString (for eventTracing)
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
   842
3879
cfb631c31105 method category rename
Claus Gittinger <cg@exept.de>
parents: 3856
diff changeset
   843
!WindowEvent methodsFor:'private-accessing'!
244
83218faf792c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
   844
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   845
for:aView type:aSymbol
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   846
    "set the instance variables of the event"
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   847
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   848
    receiver :=  aView.
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   849
    selector := aSymbol.
4991
81bcff26caf3 set timestamp in creation
fm
parents: 4988
diff changeset
   850
    args := #().
81bcff26caf3 set timestamp in creation
fm
parents: 4988
diff changeset
   851
    timeStamp := Timestamp now.
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   852
!
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   853
244
83218faf792c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
   854
for:aView type:aSymbol arguments:argArray
83218faf792c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
   855
    "set the instance variables of the event"
83218faf792c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
   856
3295
84de6d18b9d1 code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents: 3294
diff changeset
   857
    receiver :=  aView.
84de6d18b9d1 code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents: 3294
diff changeset
   858
    selector := aSymbol.
4991
81bcff26caf3 set timestamp in creation
fm
parents: 4988
diff changeset
   859
    args := argArray.
81bcff26caf3 set timestamp in creation
fm
parents: 4988
diff changeset
   860
    timeStamp := Timestamp now.
244
83218faf792c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
   861
! !
83218faf792c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
   862
83218faf792c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
   863
!WindowEvent methodsFor:'queries'!
83218faf792c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
   864
1588
8f9468059ef7 keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
   865
hasAlt
8f9468059ef7 keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
   866
    "return true, if this is a keyboard event, with ALT pressed"
8f9468059ef7 keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
   867
8f9468059ef7 keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
   868
    ^ false
8f9468059ef7 keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
   869
8f9468059ef7 keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
   870
    "Created: 12.4.1997 / 11:04:10 / cg"
8f9468059ef7 keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
   871
!
8f9468059ef7 keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
   872
8f9468059ef7 keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
   873
hasCtrl
8f9468059ef7 keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
   874
    "return true, if this is a keyboard event, with CTRL pressed"
8f9468059ef7 keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
   875
8f9468059ef7 keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
   876
    ^ false
8f9468059ef7 keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
   877
8f9468059ef7 keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
   878
    "Created: 12.4.1997 / 11:04:03 / cg"
8f9468059ef7 keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
   879
!
8f9468059ef7 keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
   880
8f9468059ef7 keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
   881
hasMeta
8f9468059ef7 keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
   882
    "return true, if this is a keyboard event, with META pressed"
8f9468059ef7 keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
   883
8f9468059ef7 keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
   884
    ^ false
8f9468059ef7 keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
   885
8f9468059ef7 keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
   886
    "Created: 12.4.1997 / 11:04:16 / cg"
8f9468059ef7 keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
   887
!
8f9468059ef7 keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
   888
1590
18ca787fd066 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1588
diff changeset
   889
hasShift
18ca787fd066 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1588
diff changeset
   890
    "return true, if this is a keyboard event, with SHIFT pressed"
18ca787fd066 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1588
diff changeset
   891
18ca787fd066 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1588
diff changeset
   892
    ^ false
18ca787fd066 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1588
diff changeset
   893
18ca787fd066 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1588
diff changeset
   894
    "Created: 12.4.1997 / 11:30:59 / cg"
18ca787fd066 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1588
diff changeset
   895
!
18ca787fd066 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1588
diff changeset
   896
5249
5e4cad201723 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5209
diff changeset
   897
targetView
5e4cad201723 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5209
diff changeset
   898
    "return the view which will eventually handle the event;
5e4cad201723 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5209
diff changeset
   899
     for most events, this is the same as the view, for which the event was
5e4cad201723 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5209
diff changeset
   900
     originally generated.
5e4cad201723 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5209
diff changeset
   901
     Except, if an explicit focus has been assigned (i.e. tabbed into a component),
5e4cad201723 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5209
diff changeset
   902
     AND the event is a keyboard event. In this case, the targetView might be different.
5e4cad201723 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5209
diff changeset
   903
     Notice: this method might return nil, for synthetic (app-related) or display screen related
5e4cad201723 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5209
diff changeset
   904
     events"
5e4cad201723 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5209
diff changeset
   905
5e4cad201723 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5209
diff changeset
   906
    ^ self view.
5e4cad201723 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5209
diff changeset
   907
! !
5e4cad201723 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5209
diff changeset
   908
5e4cad201723 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5209
diff changeset
   909
!WindowEvent methodsFor:'testing'!
5e4cad201723 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5209
diff changeset
   910
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   911
isApplicationEvent
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   912
    "return true, if this event is application related (i.e. not for a particular view)"
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   913
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   914
    ^ false
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   915
!
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   916
244
83218faf792c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
   917
isButtonEvent
83218faf792c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
   918
    "return true, if this event is a button event"
83218faf792c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
   919
3295
84de6d18b9d1 code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents: 3294
diff changeset
   920
    ^ false
244
83218faf792c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
   921
!
83218faf792c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
   922
1730
ca
parents: 1590
diff changeset
   923
isButtonMotionEvent
ca
parents: 1590
diff changeset
   924
    "return true, if this event is a buttonMotion event"
ca
parents: 1590
diff changeset
   925
3295
84de6d18b9d1 code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents: 3294
diff changeset
   926
    ^ false
1730
ca
parents: 1590
diff changeset
   927
ca
parents: 1590
diff changeset
   928
    "Created: 5.3.1997 / 12:25:43 / cg"
ca
parents: 1590
diff changeset
   929
!
ca
parents: 1590
diff changeset
   930
4628
ebdab26dea16 *** empty log message ***
fm
parents: 4461
diff changeset
   931
isButtonMultiPressEvent
ebdab26dea16 *** empty log message ***
fm
parents: 4461
diff changeset
   932
    "return true, if this event is a buttonMulti-Press event"
ebdab26dea16 *** empty log message ***
fm
parents: 4461
diff changeset
   933
ebdab26dea16 *** empty log message ***
fm
parents: 4461
diff changeset
   934
    ^ false
ebdab26dea16 *** empty log message ***
fm
parents: 4461
diff changeset
   935
ebdab26dea16 *** empty log message ***
fm
parents: 4461
diff changeset
   936
    "Created: 5.3.1997 / 12:25:43 / cg"
ebdab26dea16 *** empty log message ***
fm
parents: 4461
diff changeset
   937
!
ebdab26dea16 *** empty log message ***
fm
parents: 4461
diff changeset
   938
1420
960068850f29 more queries
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   939
isButtonPressEvent
960068850f29 more queries
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   940
    "return true, if this event is a buttonPress event"
960068850f29 more queries
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   941
3295
84de6d18b9d1 code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents: 3294
diff changeset
   942
    ^ false
1420
960068850f29 more queries
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   943
960068850f29 more queries
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   944
    "Created: 5.3.1997 / 12:25:43 / cg"
960068850f29 more queries
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   945
!
960068850f29 more queries
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   946
3011
e5880bb2738d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2852
diff changeset
   947
isButtonReleaseEvent
e5880bb2738d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2852
diff changeset
   948
    "return true, if this event is a buttonPress event"
e5880bb2738d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2852
diff changeset
   949
3295
84de6d18b9d1 code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents: 3294
diff changeset
   950
    ^ false
3011
e5880bb2738d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2852
diff changeset
   951
e5880bb2738d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2852
diff changeset
   952
    "Created: 5.3.1997 / 12:25:43 / cg"
e5880bb2738d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2852
diff changeset
   953
!
e5880bb2738d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2852
diff changeset
   954
2811
7460f7225d79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   955
isConfigureEvent
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   956
    "return true, if this is a window geometry change event"
2811
7460f7225d79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   957
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   958
    ^ false.
2811
7460f7225d79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   959
!
7460f7225d79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   960
5751
8f2955555565 Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5275
diff changeset
   961
isCreateWindowEvent
8f2955555565 Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5275
diff changeset
   962
    "return true, if this event is a CreateWindow event"
8f2955555565 Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5275
diff changeset
   963
8f2955555565 Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5275
diff changeset
   964
    ^selector == #createWindowX:y:width:height:
8f2955555565 Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5275
diff changeset
   965
8f2955555565 Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5275
diff changeset
   966
    "Created: / 01-06-2011 / 13:01:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
8f2955555565 Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5275
diff changeset
   967
!
8f2955555565 Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5275
diff changeset
   968
244
83218faf792c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
   969
isDamage
83218faf792c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
   970
    "return true, if this is a damage event"
83218faf792c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
   971
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   972
    ^ false.
244
83218faf792c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
   973
!
83218faf792c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
   974
2471
4bc7d82df319 + isDamageForView:
Claus Gittinger <cg@exept.de>
parents: 2399
diff changeset
   975
isDamageForView:aView
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   976
    "return true, if this is a damage event for a View"
2471
4bc7d82df319 + isDamageForView:
Claus Gittinger <cg@exept.de>
parents: 2399
diff changeset
   977
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
   978
    ^ false.
2471
4bc7d82df319 + isDamageForView:
Claus Gittinger <cg@exept.de>
parents: 2399
diff changeset
   979
!
4bc7d82df319 + isDamageForView:
Claus Gittinger <cg@exept.de>
parents: 2399
diff changeset
   980
5204
748c8f2954e9 fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents: 5201
diff changeset
   981
isDelegatedToFocusView
748c8f2954e9 fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents: 5201
diff changeset
   982
    "return true, if this event will be forwarded to a focusView."
748c8f2954e9 fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents: 5201
diff changeset
   983
748c8f2954e9 fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents: 5201
diff changeset
   984
    ^ false.
748c8f2954e9 fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents: 5201
diff changeset
   985
!
748c8f2954e9 fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents: 5201
diff changeset
   986
1420
960068850f29 more queries
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   987
isFocusEvent
960068850f29 more queries
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   988
    "return true, if this event is a focusIn/focusOut event"
960068850f29 more queries
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   989
3295
84de6d18b9d1 code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents: 3294
diff changeset
   990
    ^ false
1420
960068850f29 more queries
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   991
960068850f29 more queries
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   992
    "Created: 5.3.1997 / 12:12:37 / cg"
960068850f29 more queries
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   993
!
960068850f29 more queries
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   994
960068850f29 more queries
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   995
isFocusInEvent
960068850f29 more queries
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   996
    "return true, if this event is a focusIn event"
960068850f29 more queries
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   997
3295
84de6d18b9d1 code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents: 3294
diff changeset
   998
    ^ false
1420
960068850f29 more queries
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   999
960068850f29 more queries
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  1000
    "Created: 5.3.1997 / 12:18:10 / cg"
960068850f29 more queries
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  1001
!
960068850f29 more queries
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  1002
4980
b8a849eeb8ce +isFocusOutEvent
Claus Gittinger <cg@exept.de>
parents: 4960
diff changeset
  1003
isFocusOutEvent
b8a849eeb8ce +isFocusOutEvent
Claus Gittinger <cg@exept.de>
parents: 4960
diff changeset
  1004
    "return true, if this event is a focusOut event"
b8a849eeb8ce +isFocusOutEvent
Claus Gittinger <cg@exept.de>
parents: 4960
diff changeset
  1005
b8a849eeb8ce +isFocusOutEvent
Claus Gittinger <cg@exept.de>
parents: 4960
diff changeset
  1006
    ^ false
b8a849eeb8ce +isFocusOutEvent
Claus Gittinger <cg@exept.de>
parents: 4960
diff changeset
  1007
b8a849eeb8ce +isFocusOutEvent
Claus Gittinger <cg@exept.de>
parents: 4960
diff changeset
  1008
    "Created: 5.3.1997 / 12:18:10 / cg"
b8a849eeb8ce +isFocusOutEvent
Claus Gittinger <cg@exept.de>
parents: 4960
diff changeset
  1009
!
b8a849eeb8ce +isFocusOutEvent
Claus Gittinger <cg@exept.de>
parents: 4960
diff changeset
  1010
5962
ab
parents: 5949
diff changeset
  1011
isHotKeyEvent
ab
parents: 5949
diff changeset
  1012
    "return true, if this event is a hotkey event"
ab
parents: 5949
diff changeset
  1013
ab
parents: 5949
diff changeset
  1014
    ^ false
ab
parents: 5949
diff changeset
  1015
!
ab
parents: 5949
diff changeset
  1016
2707
cb775384565a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  1017
isInputEvent
cb775384565a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  1018
    "return true, if this event is an input (pointer, key or button) event"
cb775384565a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  1019
cb775384565a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  1020
    ^ false
cb775384565a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  1021
cb775384565a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  1022
    "Created: / 21.5.1999 / 19:49:42 / cg"
cb775384565a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  1023
    "Modified: / 21.5.1999 / 19:50:11 / cg"
cb775384565a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  1024
!
cb775384565a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  1025
244
83218faf792c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
  1026
isKeyEvent
83218faf792c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
  1027
    "return true, if this event is a keyboard event"
83218faf792c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
  1028
2028
9f4244301ef8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1982
diff changeset
  1029
    ^ false
9f4244301ef8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1982
diff changeset
  1030
9f4244301ef8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1982
diff changeset
  1031
    "Modified: / 28.1.1998 / 00:03:17 / cg"
244
83218faf792c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
  1032
!
83218faf792c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
  1033
83218faf792c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
  1034
isKeyPressEvent
2028
9f4244301ef8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1982
diff changeset
  1035
    "return true, if this event is a keyboard press event"
9f4244301ef8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1982
diff changeset
  1036
9f4244301ef8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1982
diff changeset
  1037
    ^ false
9f4244301ef8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1982
diff changeset
  1038
9f4244301ef8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1982
diff changeset
  1039
    "Modified: / 28.1.1998 / 00:03:24 / cg"
9f4244301ef8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1982
diff changeset
  1040
!
244
83218faf792c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
  1041
2028
9f4244301ef8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1982
diff changeset
  1042
isKeyReleaseEvent
9f4244301ef8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1982
diff changeset
  1043
    "return true, if this event is a keyboard release event"
9f4244301ef8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1982
diff changeset
  1044
9f4244301ef8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1982
diff changeset
  1045
    ^ false
9f4244301ef8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1982
diff changeset
  1046
9f4244301ef8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1982
diff changeset
  1047
    "Modified: / 28.1.1998 / 00:03:31 / cg"
356
2f773ceb7032 new query methods
Claus Gittinger <cg@exept.de>
parents: 320
diff changeset
  1048
!
2f773ceb7032 new query methods
Claus Gittinger <cg@exept.de>
parents: 320
diff changeset
  1049
3376
a9784be22e6a added hasKeyboardFocus event
tm
parents: 3297
diff changeset
  1050
isKeyboardFocusEvent
a9784be22e6a added hasKeyboardFocus event
tm
parents: 3297
diff changeset
  1051
    "return true, if this event is a keyboard focus event"
a9784be22e6a added hasKeyboardFocus event
tm
parents: 3297
diff changeset
  1052
a9784be22e6a added hasKeyboardFocus event
tm
parents: 3297
diff changeset
  1053
    ^ false
a9784be22e6a added hasKeyboardFocus event
tm
parents: 3297
diff changeset
  1054
!
a9784be22e6a added hasKeyboardFocus event
tm
parents: 3297
diff changeset
  1055
2034
9fd5b2a4d315 added isMapEvent / isUnmapEvent
Claus Gittinger <cg@exept.de>
parents: 2028
diff changeset
  1056
isMapEvent
4842
2a6305d64661 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4817
diff changeset
  1057
    "return true, if this is a map event"
2034
9fd5b2a4d315 added isMapEvent / isUnmapEvent
Claus Gittinger <cg@exept.de>
parents: 2028
diff changeset
  1058
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1059
    ^ false
2034
9fd5b2a4d315 added isMapEvent / isUnmapEvent
Claus Gittinger <cg@exept.de>
parents: 2028
diff changeset
  1060
4842
2a6305d64661 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4817
diff changeset
  1061
    "Created: / 29-01-1998 / 21:52:54 / cg"
2a6305d64661 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4817
diff changeset
  1062
    "Modified: / 09-11-2007 / 13:10:25 / cg"
2034
9fd5b2a4d315 added isMapEvent / isUnmapEvent
Claus Gittinger <cg@exept.de>
parents: 2028
diff changeset
  1063
!
9fd5b2a4d315 added isMapEvent / isUnmapEvent
Claus Gittinger <cg@exept.de>
parents: 2028
diff changeset
  1064
3297
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1065
isMessageSendEvent
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1066
    "return true, if this event is a general messageSend event"
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1067
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1068
    ^ false
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1069
!
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1070
3011
e5880bb2738d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2852
diff changeset
  1071
isMouseWheelEvent
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1072
    ^ false
3011
e5880bb2738d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2852
diff changeset
  1073
!
e5880bb2738d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2852
diff changeset
  1074
356
2f773ceb7032 new query methods
Claus Gittinger <cg@exept.de>
parents: 320
diff changeset
  1075
isPointerEnterEvent
2f773ceb7032 new query methods
Claus Gittinger <cg@exept.de>
parents: 320
diff changeset
  1076
    "return true, if this event is a pointer-enter event"
2f773ceb7032 new query methods
Claus Gittinger <cg@exept.de>
parents: 320
diff changeset
  1077
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1078
    ^ false
356
2f773ceb7032 new query methods
Claus Gittinger <cg@exept.de>
parents: 320
diff changeset
  1079
2f773ceb7032 new query methods
Claus Gittinger <cg@exept.de>
parents: 320
diff changeset
  1080
    "Created: 9.1.1996 / 15:51:24 / cg"
2f773ceb7032 new query methods
Claus Gittinger <cg@exept.de>
parents: 320
diff changeset
  1081
    "Modified: 9.1.1996 / 15:51:40 / cg"
2f773ceb7032 new query methods
Claus Gittinger <cg@exept.de>
parents: 320
diff changeset
  1082
!
2f773ceb7032 new query methods
Claus Gittinger <cg@exept.de>
parents: 320
diff changeset
  1083
2f773ceb7032 new query methods
Claus Gittinger <cg@exept.de>
parents: 320
diff changeset
  1084
isPointerEnterLeaveEvent
2f773ceb7032 new query methods
Claus Gittinger <cg@exept.de>
parents: 320
diff changeset
  1085
    "return true, if this event is a pointer-enter/leave event"
2f773ceb7032 new query methods
Claus Gittinger <cg@exept.de>
parents: 320
diff changeset
  1086
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1087
    ^ false
356
2f773ceb7032 new query methods
Claus Gittinger <cg@exept.de>
parents: 320
diff changeset
  1088
2f773ceb7032 new query methods
Claus Gittinger <cg@exept.de>
parents: 320
diff changeset
  1089
    "Created: 9.1.1996 / 15:51:18 / cg"
2f773ceb7032 new query methods
Claus Gittinger <cg@exept.de>
parents: 320
diff changeset
  1090
!
2f773ceb7032 new query methods
Claus Gittinger <cg@exept.de>
parents: 320
diff changeset
  1091
2f773ceb7032 new query methods
Claus Gittinger <cg@exept.de>
parents: 320
diff changeset
  1092
isPointerLeaveEvent
2f773ceb7032 new query methods
Claus Gittinger <cg@exept.de>
parents: 320
diff changeset
  1093
    "return true, if this event is a pointer-leave event"
2f773ceb7032 new query methods
Claus Gittinger <cg@exept.de>
parents: 320
diff changeset
  1094
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1095
    ^ false
356
2f773ceb7032 new query methods
Claus Gittinger <cg@exept.de>
parents: 320
diff changeset
  1096
2f773ceb7032 new query methods
Claus Gittinger <cg@exept.de>
parents: 320
diff changeset
  1097
    "Created: 9.1.1996 / 15:51:36 / cg"
1158
847d085a498f added #isUserEvent
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
  1098
!
847d085a498f added #isUserEvent
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
  1099
5751
8f2955555565 Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5275
diff changeset
  1100
isPropertyChangeEvent
8f2955555565 Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5275
diff changeset
  1101
    "return true, if this event is a CreateWindow event"
8f2955555565 Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5275
diff changeset
  1102
8f2955555565 Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5275
diff changeset
  1103
    ^selector == #propertyChange:state:
8f2955555565 Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5275
diff changeset
  1104
8f2955555565 Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5275
diff changeset
  1105
    "Created: / 01-06-2011 / 13:36:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
8f2955555565 Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5275
diff changeset
  1106
!
8f2955555565 Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5275
diff changeset
  1107
3773
e2fd3df91e5c new event class for TerminateEvents
Claus Gittinger <cg@exept.de>
parents: 3758
diff changeset
  1108
isTerminateEvent
e2fd3df91e5c new event class for TerminateEvents
Claus Gittinger <cg@exept.de>
parents: 3758
diff changeset
  1109
    ^ false
e2fd3df91e5c new event class for TerminateEvents
Claus Gittinger <cg@exept.de>
parents: 3758
diff changeset
  1110
!
e2fd3df91e5c new event class for TerminateEvents
Claus Gittinger <cg@exept.de>
parents: 3758
diff changeset
  1111
4842
2a6305d64661 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4817
diff changeset
  1112
isTrayEvent
2a6305d64661 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4817
diff changeset
  1113
    "return true, if this is an event from the tray (WIN32 only, for now)"
2034
9fd5b2a4d315 added isMapEvent / isUnmapEvent
Claus Gittinger <cg@exept.de>
parents: 2028
diff changeset
  1114
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1115
    ^ false
2034
9fd5b2a4d315 added isMapEvent / isUnmapEvent
Claus Gittinger <cg@exept.de>
parents: 2028
diff changeset
  1116
4842
2a6305d64661 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4817
diff changeset
  1117
    "Created: / 09-11-2007 / 13:09:29 / cg"
2a6305d64661 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4817
diff changeset
  1118
!
2a6305d64661 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4817
diff changeset
  1119
2a6305d64661 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4817
diff changeset
  1120
isUnmapEvent
2a6305d64661 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4817
diff changeset
  1121
    "return true, if this is an unmap event"
2a6305d64661 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4817
diff changeset
  1122
2a6305d64661 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4817
diff changeset
  1123
    ^ false
2a6305d64661 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4817
diff changeset
  1124
2a6305d64661 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4817
diff changeset
  1125
    "Modified: / 09-11-2007 / 13:10:07 / cg"
2034
9fd5b2a4d315 added isMapEvent / isUnmapEvent
Claus Gittinger <cg@exept.de>
parents: 2028
diff changeset
  1126
!
9fd5b2a4d315 added isMapEvent / isUnmapEvent
Claus Gittinger <cg@exept.de>
parents: 2028
diff changeset
  1127
1158
847d085a498f added #isUserEvent
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
  1128
isUserEvent
847d085a498f added #isUserEvent
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
  1129
    "return true, if this event is a user event (i.e. mouse, keyboard or button)"
847d085a498f added #isUserEvent
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
  1130
847d085a498f added #isUserEvent
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
  1131
    ^ false
847d085a498f added #isUserEvent
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
  1132
9049
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1133
    "Modified: / 05-03-1997 / 11:27:40 / cg"
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1134
    "Modified: / 16-03-2018 / 11:07:59 / stefan"
244
83218faf792c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
  1135
! !
83218faf792c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
  1136
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1137
!WindowEvent::ApplicationEvent methodsFor:'blocked'!
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1138
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1139
view
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1140
    ^ nil
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1141
! !
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1142
5249
5e4cad201723 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5209
diff changeset
  1143
!WindowEvent::ApplicationEvent methodsFor:'testing'!
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1144
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1145
isApplicationEvent
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1146
    ^ true
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1147
! !
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1148
1861
1b1e49147380 remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents: 1841
diff changeset
  1149
!WindowEvent::InputEvent class methodsFor:'class initialization'!
1b1e49147380 remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents: 1841
diff changeset
  1150
1b1e49147380 remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents: 1841
diff changeset
  1151
initialize
1862
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1152
    F_SHIFT := 16r001.
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1153
    F_CTRL  := 16r002.
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1154
    F_ALT   := 16r004.
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1155
    F_META  := 16r008.
1861
1b1e49147380 remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents: 1841
diff changeset
  1156
1862
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1157
    F_BUTTON1 := 16r100.
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1158
    F_BUTTON2 := 16r200.
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1159
    F_BUTTON3 := 16r400.
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1160
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1161
    "
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1162
     self initialize
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1163
    "
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1164
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1165
    "Modified: 13.8.1997 / 22:16:17 / cg"
1861
1b1e49147380 remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents: 1841
diff changeset
  1166
! !
1b1e49147380 remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents: 1841
diff changeset
  1167
1b1e49147380 remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents: 1841
diff changeset
  1168
!WindowEvent::InputEvent methodsFor:'accessing'!
1b1e49147380 remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents: 1841
diff changeset
  1169
1862
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1170
hasShift:shift ctrl:ctrl alt:alt meta:meta button1:b1 button2:b2 button3:b3
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1171
    |f "{ Class: SmallInteger }"|
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1172
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1173
    f := 0.
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1174
    shift ifTrue:[f := f bitOr:F_SHIFT].
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1175
    ctrl ifTrue:[f := f bitOr:F_CTRL].
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1176
    alt ifTrue:[f := f bitOr:F_ALT].
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1177
    meta ifTrue:[f := f bitOr:F_META].
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1178
    b1 ifTrue:[f := f bitOr:F_BUTTON1].
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1179
    b2 ifTrue:[f := f bitOr:F_BUTTON2].
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1180
    b3 ifTrue:[f := f bitOr:F_BUTTON3].
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1181
    modifierFlags := f.
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1182
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1183
    "Created: 13.8.1997 / 22:17:56 / cg"
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1184
!
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1185
1861
1b1e49147380 remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents: 1841
diff changeset
  1186
hasShift:shift hasCtrl:ctrl hasAlt:alt hasMeta:meta
1b1e49147380 remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents: 1841
diff changeset
  1187
    |f "{ Class: SmallInteger }"|
1b1e49147380 remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents: 1841
diff changeset
  1188
1b1e49147380 remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents: 1841
diff changeset
  1189
    f := 0.
1b1e49147380 remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents: 1841
diff changeset
  1190
    shift ifTrue:[f := f bitOr:F_SHIFT].
1b1e49147380 remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents: 1841
diff changeset
  1191
    ctrl ifTrue:[f := f bitOr:F_CTRL].
1b1e49147380 remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents: 1841
diff changeset
  1192
    alt ifTrue:[f := f bitOr:F_ALT].
1b1e49147380 remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents: 1841
diff changeset
  1193
    meta ifTrue:[f := f bitOr:F_META].
1b1e49147380 remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents: 1841
diff changeset
  1194
    modifierFlags := f.
1b1e49147380 remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents: 1841
diff changeset
  1195
1b1e49147380 remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents: 1841
diff changeset
  1196
    "Created: 13.8.1997 / 22:02:09 / cg"
1862
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1197
!
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1198
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1199
hasShift:shift hasCtrl:ctrl hasAlt:alt hasMeta:meta hasButton1:b1 hasButton2:b2 hasButton3:b3
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1200
    |f "{ Class: SmallInteger }"|
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1201
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1202
    f := 0.
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1203
    shift ifTrue:[f := f bitOr:F_SHIFT].
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1204
    ctrl ifTrue:[f := f bitOr:F_CTRL].
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1205
    alt ifTrue:[f := f bitOr:F_ALT].
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1206
    meta ifTrue:[f := f bitOr:F_META].
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1207
    b1 ifTrue:[f := f bitOr:F_BUTTON1].
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1208
    b2 ifTrue:[f := f bitOr:F_BUTTON2].
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1209
    b3 ifTrue:[f := f bitOr:F_BUTTON3].
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1210
    modifierFlags := f.
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1211
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1212
    "Created: 13.8.1997 / 22:17:25 / cg"
2761
accf9c7f470e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2707
diff changeset
  1213
!
accf9c7f470e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2707
diff changeset
  1214
accf9c7f470e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2707
diff changeset
  1215
modifierFlags
accf9c7f470e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2707
diff changeset
  1216
    ^ modifierFlags
accf9c7f470e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2707
diff changeset
  1217
!
accf9c7f470e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2707
diff changeset
  1218
accf9c7f470e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2707
diff changeset
  1219
modifierFlags:flagBits
accf9c7f470e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2707
diff changeset
  1220
    modifierFlags := flagBits
1861
1b1e49147380 remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents: 1841
diff changeset
  1221
! !
1b1e49147380 remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents: 1841
diff changeset
  1222
1b1e49147380 remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents: 1841
diff changeset
  1223
!WindowEvent::InputEvent methodsFor:'queries'!
1b1e49147380 remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents: 1841
diff changeset
  1224
1b1e49147380 remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents: 1841
diff changeset
  1225
hasAlt
1b1e49147380 remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents: 1841
diff changeset
  1226
    "return true, if this is an event, with ALT pressed"
1b1e49147380 remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents: 1841
diff changeset
  1227
1885
e1021e9ed342 care for nil modifiers
Claus Gittinger <cg@exept.de>
parents: 1863
diff changeset
  1228
    modifierFlags isNil ifTrue:[^ false].
1861
1b1e49147380 remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents: 1841
diff changeset
  1229
    ^ (modifierFlags bitAnd:F_ALT) ~~ 0
1b1e49147380 remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents: 1841
diff changeset
  1230
1b1e49147380 remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents: 1841
diff changeset
  1231
    "Created: 13.8.1997 / 22:02:23 / cg"
1885
e1021e9ed342 care for nil modifiers
Claus Gittinger <cg@exept.de>
parents: 1863
diff changeset
  1232
    "Modified: 21.8.1997 / 19:41:11 / cg"
1861
1b1e49147380 remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents: 1841
diff changeset
  1233
!
1b1e49147380 remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents: 1841
diff changeset
  1234
1862
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1235
hasButton1
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1236
    "return true, if this is an event, with the left mouse button pressed"
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1237
1885
e1021e9ed342 care for nil modifiers
Claus Gittinger <cg@exept.de>
parents: 1863
diff changeset
  1238
    modifierFlags isNil ifTrue:[^ false].
1862
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1239
    ^ (modifierFlags bitAnd:F_BUTTON1) ~~ 0
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1240
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1241
    "Created: 13.8.1997 / 22:16:35 / cg"
1885
e1021e9ed342 care for nil modifiers
Claus Gittinger <cg@exept.de>
parents: 1863
diff changeset
  1242
    "Modified: 21.8.1997 / 19:41:40 / cg"
1862
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1243
!
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1244
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1245
hasButton2
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1246
    "return true, if this is an event, with the middle mouse button pressed"
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1247
1885
e1021e9ed342 care for nil modifiers
Claus Gittinger <cg@exept.de>
parents: 1863
diff changeset
  1248
    modifierFlags isNil ifTrue:[^ false].
1862
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1249
    ^ (modifierFlags bitAnd:F_BUTTON2) ~~ 0
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1250
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1251
    "Created: 13.8.1997 / 22:16:43 / cg"
1885
e1021e9ed342 care for nil modifiers
Claus Gittinger <cg@exept.de>
parents: 1863
diff changeset
  1252
    "Modified: 21.8.1997 / 19:41:47 / cg"
1862
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1253
!
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1254
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1255
hasButton3
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1256
    "return true, if this is an event, with the right mouse button pressed"
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1257
1885
e1021e9ed342 care for nil modifiers
Claus Gittinger <cg@exept.de>
parents: 1863
diff changeset
  1258
    modifierFlags isNil ifTrue:[^ false].
1862
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1259
    ^ (modifierFlags bitAnd:F_BUTTON3) ~~ 0
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1260
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1261
    "Created: 13.8.1997 / 22:16:49 / cg"
1885
e1021e9ed342 care for nil modifiers
Claus Gittinger <cg@exept.de>
parents: 1863
diff changeset
  1262
    "Modified: 21.8.1997 / 19:41:52 / cg"
1862
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1263
!
e56d9a7389bb also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents: 1861
diff changeset
  1264
1861
1b1e49147380 remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents: 1841
diff changeset
  1265
hasCtrl
1b1e49147380 remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents: 1841
diff changeset
  1266
    "return true, if this is an event, with CTRL pressed"
1b1e49147380 remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents: 1841
diff changeset
  1267
1885
e1021e9ed342 care for nil modifiers
Claus Gittinger <cg@exept.de>
parents: 1863
diff changeset
  1268
    modifierFlags isNil ifTrue:[^ false].
1861
1b1e49147380 remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents: 1841
diff changeset
  1269
    ^ (modifierFlags bitAnd:F_CTRL) ~~ 0
1b1e49147380 remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents: 1841
diff changeset
  1270
1b1e49147380 remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents: 1841
diff changeset
  1271
    "Created: 13.8.1997 / 22:02:29 / cg"
1885
e1021e9ed342 care for nil modifiers
Claus Gittinger <cg@exept.de>
parents: 1863
diff changeset
  1272
    "Modified: 21.8.1997 / 19:41:21 / cg"
1861
1b1e49147380 remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents: 1841
diff changeset
  1273
!
1b1e49147380 remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents: 1841
diff changeset
  1274
1b1e49147380 remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents: 1841
diff changeset
  1275
hasMeta
1b1e49147380 remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents: 1841
diff changeset
  1276
    "return true, if this is an event, with META pressed"
1b1e49147380 remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents: 1841
diff changeset
  1277
1885
e1021e9ed342 care for nil modifiers
Claus Gittinger <cg@exept.de>
parents: 1863
diff changeset
  1278
    modifierFlags isNil ifTrue:[^ false].
1861
1b1e49147380 remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents: 1841
diff changeset
  1279
    ^ (modifierFlags bitAnd:F_META) ~~ 0
1b1e49147380 remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents: 1841
diff changeset
  1280
1b1e49147380 remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents: 1841
diff changeset
  1281
    "Created: 13.8.1997 / 22:02:59 / cg"
1885
e1021e9ed342 care for nil modifiers
Claus Gittinger <cg@exept.de>
parents: 1863
diff changeset
  1282
    "Modified: 21.8.1997 / 19:41:27 / cg"
1861
1b1e49147380 remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents: 1841
diff changeset
  1283
!
1b1e49147380 remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents: 1841
diff changeset
  1284
1b1e49147380 remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents: 1841
diff changeset
  1285
hasShift
1b1e49147380 remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents: 1841
diff changeset
  1286
    "return true, if this is an event, with SHIFT pressed"
1b1e49147380 remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents: 1841
diff changeset
  1287
1885
e1021e9ed342 care for nil modifiers
Claus Gittinger <cg@exept.de>
parents: 1863
diff changeset
  1288
    modifierFlags isNil ifTrue:[^ false].
1861
1b1e49147380 remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents: 1841
diff changeset
  1289
    ^ (modifierFlags bitAnd:F_SHIFT) ~~ 0
1b1e49147380 remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents: 1841
diff changeset
  1290
1b1e49147380 remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents: 1841
diff changeset
  1291
    "Created: 13.8.1997 / 22:03:09 / cg"
1885
e1021e9ed342 care for nil modifiers
Claus Gittinger <cg@exept.de>
parents: 1863
diff changeset
  1292
    "Modified: 21.8.1997 / 19:41:34 / cg"
2707
cb775384565a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  1293
!
cb775384565a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  1294
5204
748c8f2954e9 fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents: 5201
diff changeset
  1295
targetView
748c8f2954e9 fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents: 5201
diff changeset
  1296
    "return the view which will eventually handle the event;
748c8f2954e9 fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents: 5201
diff changeset
  1297
     for most events, this is the same as the view, for which the event was
748c8f2954e9 fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents: 5201
diff changeset
  1298
     originally generated.
748c8f2954e9 fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents: 5201
diff changeset
  1299
     Except, if an explicit focus has been assigned (i.e. tabbed into a component),
748c8f2954e9 fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents: 5201
diff changeset
  1300
     AND the event is a keyboard event. In this case, the targetView might be different.
748c8f2954e9 fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents: 5201
diff changeset
  1301
     Notice: this method might return nil, for synthetic (app-related) or display screen related
748c8f2954e9 fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents: 5201
diff changeset
  1302
     events"
748c8f2954e9 fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents: 5201
diff changeset
  1303
748c8f2954e9 fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents: 5201
diff changeset
  1304
    |evView group focusView|
748c8f2954e9 fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents: 5201
diff changeset
  1305
748c8f2954e9 fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents: 5201
diff changeset
  1306
    evView := self view.
748c8f2954e9 fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents: 5201
diff changeset
  1307
    self isDelegatedToFocusView ifTrue:[
748c8f2954e9 fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents: 5201
diff changeset
  1308
        evView notNil ifTrue:[
748c8f2954e9 fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents: 5201
diff changeset
  1309
            group := evView windowGroup.
748c8f2954e9 fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents: 5201
diff changeset
  1310
            group notNil ifTrue:[
748c8f2954e9 fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents: 5201
diff changeset
  1311
                focusView := group focusView.
748c8f2954e9 fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents: 5201
diff changeset
  1312
                focusView notNil ifTrue:[^ focusView].
748c8f2954e9 fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents: 5201
diff changeset
  1313
            ].
748c8f2954e9 fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents: 5201
diff changeset
  1314
        ].
748c8f2954e9 fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents: 5201
diff changeset
  1315
    ].
748c8f2954e9 fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents: 5201
diff changeset
  1316
    ^ evView
3465
a14f06f3af91 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3376
diff changeset
  1317
! !
a14f06f3af91 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3376
diff changeset
  1318
5249
5e4cad201723 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5209
diff changeset
  1319
!WindowEvent::InputEvent methodsFor:'testing'!
5e4cad201723 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5209
diff changeset
  1320
5e4cad201723 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5209
diff changeset
  1321
isInputEvent
5e4cad201723 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5209
diff changeset
  1322
    ^ true
5e4cad201723 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5209
diff changeset
  1323
5e4cad201723 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5209
diff changeset
  1324
    "Created: / 21.5.1999 / 19:49:30 / cg"
5e4cad201723 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5209
diff changeset
  1325
! !
5e4cad201723 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5209
diff changeset
  1326
3297
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1327
!WindowEvent::ButtonEvent methodsFor:'accessing'!
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1328
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1329
button
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1330
    "return the button nr of the button-event"
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1331
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1332
    ^ args at:1
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1333
!
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1334
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1335
state
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1336
    "return the button state of the button-event
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1337
     (mouse button bits at the time of the event)."
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1338
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1339
    ^ args at:1
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1340
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1341
    "Created: / 12.11.1998 / 16:21:18 / cg"
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1342
!
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1343
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1344
x
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1345
    "return the x coordinate of the button-event
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1346
     (mouse position at the time of the event)."
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1347
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1348
    ^ args at:2
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1349
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1350
    "Created: 1.8.1997 / 13:58:15 / cg"
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1351
!
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1352
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1353
x:anInteger
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1354
    "change the x coordinate of the button-event"
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1355
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1356
    args at:2 put:anInteger
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1357
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1358
    "Created: 1.8.1997 / 13:58:15 / cg"
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1359
!
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1360
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1361
y
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1362
    "return the y coordinate of the button-event
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1363
     (mouse position at the time of the event)."
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1364
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1365
    ^ args at:3
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1366
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1367
    "Created: 1.8.1997 / 13:58:07 / cg"
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1368
!
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1369
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1370
y:anInteger
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1371
    "change the y coordinate of the button-event"
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1372
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1373
    ^ args at:3 put:anInteger
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1374
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1375
    "Created: 1.8.1997 / 13:58:15 / cg"
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1376
! !
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1377
5249
5e4cad201723 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5209
diff changeset
  1378
!WindowEvent::ButtonEvent methodsFor:'testing'!
3297
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1379
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1380
isButtonEvent
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1381
    "return true, if this event is a button event"
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1382
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1383
    ^ true
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1384
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1385
    "Created: 4.4.1997 / 13:44:11 / cg"
9049
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1386
!
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1387
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1388
isUserEvent
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1389
    "return true, if this event from a user"
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1390
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1391
    ^ true
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1392
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1393
    "Created: / 16-03-2018 / 11:05:26 / stefan"
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1394
! !
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1395
5249
5e4cad201723 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5209
diff changeset
  1396
!WindowEvent::ButtonPressEvent methodsFor:'testing'!
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1397
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1398
isButtonPressEvent
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1399
    "return true, if this event is a buttonPress event"
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1400
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1401
    ^ true
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1402
! !
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1403
5249
5e4cad201723 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5209
diff changeset
  1404
!WindowEvent::ButtonMultiPressEvent methodsFor:'testing'!
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1405
4628
ebdab26dea16 *** empty log message ***
fm
parents: 4461
diff changeset
  1406
isButtonMultiPressEvent
ebdab26dea16 *** empty log message ***
fm
parents: 4461
diff changeset
  1407
    ^ true
ebdab26dea16 *** empty log message ***
fm
parents: 4461
diff changeset
  1408
!
ebdab26dea16 *** empty log message ***
fm
parents: 4461
diff changeset
  1409
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1410
isButtonPressEvent
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1411
    "/ ATTENTION: temporary for bw. compatibility, since due to a bug,
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1412
    "/ multi-presses returned false to this query
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1413
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1414
"/'----------------' errorPrint.
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1415
"/'oops multipressEvent asked for isButtonPress' errorPrintCR.
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1416
"/thisContext fullPrintAll.
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1417
    ^ false
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1418
! !
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1419
5249
5e4cad201723 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5209
diff changeset
  1420
!WindowEvent::ButtonReleaseEvent methodsFor:'testing'!
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1421
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1422
isButtonReleaseEvent
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1423
    "return true, if this event is a buttonRelease event"
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1424
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1425
    ^ true
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1426
! !
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1427
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1428
!WindowEvent::ClientEvent methodsFor:'accessing'!
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1429
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1430
eventData
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1431
    "return the value of the instance variable 'eventData' (automatically generated)"
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1432
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1433
    ^ eventData
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1434
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1435
    "Created: 4.4.1997 / 17:41:50 / cg"
3297
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1436
!
a811e83db982 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3295
diff changeset
  1437
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1438
eventData:something
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1439
    "set the value of the instance variable 'eventData' (automatically generated)"
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1440
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1441
    eventData := something.
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1442
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1443
    "Created: 4.4.1997 / 17:41:57 / cg"
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1444
! !
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1445
5249
5e4cad201723 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5209
diff changeset
  1446
!WindowEvent::ConfigureEvent methodsFor:'testing'!
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1447
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1448
isConfigureEvent
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1449
    ^ true
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1450
! !
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1451
5249
5e4cad201723 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5209
diff changeset
  1452
!WindowEvent::DamageEvent methodsFor:'testing'!
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1453
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1454
isDamage
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1455
    "return true, if this is a damage event"
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1456
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1457
    ^ true
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1458
!
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1459
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1460
isDamageForView:aView
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1461
    "return true, if this is a damage event for aView"
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1462
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1463
    ^ (receiver == aView)
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1464
! !
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1465
4988
c4d0e91bfda5 +mouseWheelEvent
fm
parents: 4980
diff changeset
  1466
!WindowEvent::EnterLeaveEvent methodsFor:'accessing'!
c4d0e91bfda5 +mouseWheelEvent
fm
parents: 4980
diff changeset
  1467
c4d0e91bfda5 +mouseWheelEvent
fm
parents: 4980
diff changeset
  1468
state
c4d0e91bfda5 +mouseWheelEvent
fm
parents: 4980
diff changeset
  1469
c4d0e91bfda5 +mouseWheelEvent
fm
parents: 4980
diff changeset
  1470
    ^ args at:1
c4d0e91bfda5 +mouseWheelEvent
fm
parents: 4980
diff changeset
  1471
!
c4d0e91bfda5 +mouseWheelEvent
fm
parents: 4980
diff changeset
  1472
c4d0e91bfda5 +mouseWheelEvent
fm
parents: 4980
diff changeset
  1473
x
c4d0e91bfda5 +mouseWheelEvent
fm
parents: 4980
diff changeset
  1474
c4d0e91bfda5 +mouseWheelEvent
fm
parents: 4980
diff changeset
  1475
    ^ args at:2 ifAbsent:nil
c4d0e91bfda5 +mouseWheelEvent
fm
parents: 4980
diff changeset
  1476
!
c4d0e91bfda5 +mouseWheelEvent
fm
parents: 4980
diff changeset
  1477
c4d0e91bfda5 +mouseWheelEvent
fm
parents: 4980
diff changeset
  1478
y
c4d0e91bfda5 +mouseWheelEvent
fm
parents: 4980
diff changeset
  1479
c4d0e91bfda5 +mouseWheelEvent
fm
parents: 4980
diff changeset
  1480
    ^ args at:3 ifAbsent:nil
c4d0e91bfda5 +mouseWheelEvent
fm
parents: 4980
diff changeset
  1481
! !
c4d0e91bfda5 +mouseWheelEvent
fm
parents: 4980
diff changeset
  1482
5249
5e4cad201723 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5209
diff changeset
  1483
!WindowEvent::EnterLeaveEvent methodsFor:'testing'!
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1484
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1485
isPointerEnterEvent
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1486
    "return true, if this event is a pointer-enter event"
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1487
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1488
    ^ (selector == #'pointerEnter:x:y:')
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1489
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1490
    "Created: 9.1.1996 / 15:51:24 / cg"
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1491
    "Modified: 9.1.1996 / 15:51:40 / cg"
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1492
!
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1493
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1494
isPointerEnterLeaveEvent
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1495
    "return true, if this event is a pointer-enter/leave event"
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1496
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1497
    ^ true
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1498
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1499
    "Created: 9.1.1996 / 15:51:18 / cg"
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1500
!
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1501
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1502
isPointerLeaveEvent
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1503
    "return true, if this event is a pointer-leave event"
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1504
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1505
    ^ selector == #'pointerLeave:'
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1506
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1507
    "Created: 9.1.1996 / 15:51:36 / cg"
9049
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1508
!
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1509
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1510
isUserEvent
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1511
    "return true, if this event from a user"
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1512
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1513
    ^ self isPointerEnterEvent
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1514
    "why not true for pointerLeave?"
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1515
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1516
    "Created: / 16-03-2018 / 11:07:04 / stefan"
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1517
! !
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1518
5249
5e4cad201723 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5209
diff changeset
  1519
!WindowEvent::FocusEvent methodsFor:'testing'!
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1520
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1521
isFocusEvent
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1522
    "return true, if this event is a focus event"
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1523
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1524
    ^ true
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1525
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1526
    "Created: / 21.5.1999 / 19:44:47 / cg"
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1527
!
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1528
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1529
isFocusInEvent
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1530
    "return true, if this event is a focusIn event"
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1531
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1532
    ^ (selector == #focusIn)
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1533
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1534
    "Created: / 21.5.1999 / 19:45:04 / cg"
4980
b8a849eeb8ce +isFocusOutEvent
Claus Gittinger <cg@exept.de>
parents: 4960
diff changeset
  1535
!
b8a849eeb8ce +isFocusOutEvent
Claus Gittinger <cg@exept.de>
parents: 4960
diff changeset
  1536
b8a849eeb8ce +isFocusOutEvent
Claus Gittinger <cg@exept.de>
parents: 4960
diff changeset
  1537
isFocusOutEvent
b8a849eeb8ce +isFocusOutEvent
Claus Gittinger <cg@exept.de>
parents: 4960
diff changeset
  1538
    "return true, if this event is a focusOut event"
b8a849eeb8ce +isFocusOutEvent
Claus Gittinger <cg@exept.de>
parents: 4960
diff changeset
  1539
b8a849eeb8ce +isFocusOutEvent
Claus Gittinger <cg@exept.de>
parents: 4960
diff changeset
  1540
    ^ (selector == #focusOut)
b8a849eeb8ce +isFocusOutEvent
Claus Gittinger <cg@exept.de>
parents: 4960
diff changeset
  1541
b8a849eeb8ce +isFocusOutEvent
Claus Gittinger <cg@exept.de>
parents: 4960
diff changeset
  1542
    "Created: / 21.5.1999 / 19:45:04 / cg"
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1543
! !
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1544
9049
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1545
!WindowEvent::KeyboardEvent class methodsFor:'documentation'!
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1546
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1547
documentation
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1548
"
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1549
    documentation to be added.
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1550
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1551
    class:
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1552
        <a short class summary here, describing what instances represent>
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1553
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1554
    responsibilities:    
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1555
        <describing what my main role is>
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1556
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1557
    collaborators:    
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1558
        <describing with whom and how I talk to>
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1559
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1560
    API:
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1561
        <public api and main messages>
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1562
        
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1563
    example:
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1564
        <a one-line examples on how to use - can also be in a separate example method>
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1565
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1566
    implementation:
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1567
        <implementation points>
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1568
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1569
    [author:]
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1570
        exept MBP
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1571
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1572
    [instance variables:]
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1573
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1574
    [class variables:]
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1575
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1576
    [see also:]
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1577
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1578
"
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1579
! !
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1580
1527
661de0f76595 started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents: 1470
diff changeset
  1581
!WindowEvent::KeyboardEvent methodsFor:'accessing'!
661de0f76595 started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents: 1470
diff changeset
  1582
9049
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1583
isDeadKey:aBoolean
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1584
    "set (by the sensor) if this is an event for a deadKey.
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1585
     Consumers may want to mark deadKeys specially 
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1586
     (eg. by highlighting it, as done in the editTextView)"
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1587
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1588
    isDeadKey := aBoolean
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1589
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1590
    "Created: 4.4.1997 / 13:47:15 / cg"
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1591
!
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1592
1841
3773debcc078 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1730
diff changeset
  1593
key
9049
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1594
    "return the (translated) key of the key-event.
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1595
     i.e. if the keyboardMap maps #Ctrlc to #Copy,
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1596
     then key will be #Copy and untranslatedKey will be #Ctrlc
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1597
     and rawKey will be $c."
1841
3773debcc078 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1730
diff changeset
  1598
3295
84de6d18b9d1 code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents: 3294
diff changeset
  1599
    ^ args at:1
1841
3773debcc078 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1730
diff changeset
  1600
3773debcc078 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1730
diff changeset
  1601
    "Created: 1.8.1997 / 13:55:19 / cg"
3773debcc078 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1730
diff changeset
  1602
!
3773debcc078 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1730
diff changeset
  1603
2852
4eb0bb90d703 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  1604
key:aCharacterOrSymbol
9049
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1605
    "set the (translated) key of the key-event.
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1606
     i.e. if the keyboardMap maps #Ctrlc to #Copy,
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1607
     then key will be #Copy and untranslatedKey will be #Ctrlc
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1608
     and rawKey will be $c."
2852
4eb0bb90d703 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  1609
3295
84de6d18b9d1 code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents: 3294
diff changeset
  1610
    args at:1 put:aCharacterOrSymbol
2852
4eb0bb90d703 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  1611
4eb0bb90d703 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  1612
    "Created: 1.8.1997 / 13:55:19 / cg"
4eb0bb90d703 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  1613
!
4eb0bb90d703 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  1614
1527
661de0f76595 started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents: 1470
diff changeset
  1615
rawKey
9049
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1616
    "return the (raw) key of the key-event.
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1617
     i.e. if the keyboardMap maps #Ctrlc to #Copy,
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1618
     then key will be #Copy and untranslatedKey will be #Ctrlc
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1619
     and rawKey will be $c."
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1620
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1621
    rawKey isNil ifTrue:[^ self key].
1527
661de0f76595 started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents: 1470
diff changeset
  1622
    ^ rawKey
661de0f76595 started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents: 1470
diff changeset
  1623
661de0f76595 started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents: 1470
diff changeset
  1624
    "Created: 4.4.1997 / 13:47:15 / cg"
661de0f76595 started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents: 1470
diff changeset
  1625
!
661de0f76595 started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents: 1470
diff changeset
  1626
661de0f76595 started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents: 1470
diff changeset
  1627
rawKey:aKey
9049
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1628
    "set the (raw) key of the key-event.
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1629
     i.e. if the keyboardMap maps #Ctrlc to #Copy,
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1630
     then key will be #Copy and untranslatedKey will be #Ctrlc
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1631
     and rawKey will be $c."
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1632
1527
661de0f76595 started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents: 1470
diff changeset
  1633
    rawKey := aKey
661de0f76595 started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents: 1470
diff changeset
  1634
661de0f76595 started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents: 1470
diff changeset
  1635
    "Created: 4.4.1997 / 13:47:10 / cg"
1841
3773debcc078 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1730
diff changeset
  1636
!
3773debcc078 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1730
diff changeset
  1637
9049
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1638
rawKey:rKey untranslatedKey:uKey
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1639
    "set the (raw) key of the key-event.
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1640
     i.e. if the keyboardMap maps #Ctrlc to #Copy,
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1641
     then key will be #Copy and untranslatedKey will be #Ctrlc
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1642
     and rawKey will be $c."
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1643
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1644
    rawKey := rKey.
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1645
    untranslatedKey := uKey.
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1646
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1647
    "Created: 4.4.1997 / 13:47:10 / cg"
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1648
!
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1649
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1650
untranslatedKey
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1651
    "return the untranslated key of the key-event;
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1652
     i.e. if the keyboardMap maps #Ctrlc to #Copy,
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1653
     then key will be #Copy and untranslatedKey will be #Ctrlc
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1654
     (and rawKey will be $c)."
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1655
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1656
    untranslatedKey isNil ifTrue:[^ self key].
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1657
    ^ untranslatedKey
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1658
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1659
    "Created: 4.4.1997 / 13:47:15 / cg"
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1660
!
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1661
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1662
untranslatedKey:aKey
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1663
    "set the untranslated key of the key-event.
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1664
     i.e. if the keyboardMap maps #Ctrlc to #Copy,
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1665
     then key will be #Copy and untranslatedKey will be #Ctrlc
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1666
     and rawKey will be $c."
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1667
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1668
    untranslatedKey := aKey
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1669
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1670
    "Created: 4.4.1997 / 13:47:10 / cg"
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1671
!
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1672
1841
3773debcc078 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1730
diff changeset
  1673
x
3773debcc078 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1730
diff changeset
  1674
    "return the x coordinate of the key-event
3773debcc078 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1730
diff changeset
  1675
     (mouse position at the time of the key-event)."
3773debcc078 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1730
diff changeset
  1676
3295
84de6d18b9d1 code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents: 3294
diff changeset
  1677
    ^ args at:2
1841
3773debcc078 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1730
diff changeset
  1678
3773debcc078 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1730
diff changeset
  1679
    "Created: 1.8.1997 / 13:57:27 / cg"
3773debcc078 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1730
diff changeset
  1680
!
3773debcc078 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1730
diff changeset
  1681
5209
sr
parents: 5205
diff changeset
  1682
x:anInteger
3089
ea806f804f5c accessors for x/y
ca
parents: 3011
diff changeset
  1683
    "change the x coordinate of the key-event"
ea806f804f5c accessors for x/y
ca
parents: 3011
diff changeset
  1684
3295
84de6d18b9d1 code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents: 3294
diff changeset
  1685
    ^ args at:2 put:anInteger
3089
ea806f804f5c accessors for x/y
ca
parents: 3011
diff changeset
  1686
!
ea806f804f5c accessors for x/y
ca
parents: 3011
diff changeset
  1687
1841
3773debcc078 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1730
diff changeset
  1688
y
3773debcc078 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1730
diff changeset
  1689
    "return the y coordinate of the key-event
3773debcc078 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1730
diff changeset
  1690
     (mouse position at the time of the key-event)."
3773debcc078 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1730
diff changeset
  1691
3295
84de6d18b9d1 code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents: 3294
diff changeset
  1692
    ^ args at:3
1841
3773debcc078 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1730
diff changeset
  1693
3773debcc078 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1730
diff changeset
  1694
    "Created: 1.8.1997 / 13:55:19 / cg"
3773debcc078 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1730
diff changeset
  1695
    "Modified: 1.8.1997 / 13:57:42 / cg"
3089
ea806f804f5c accessors for x/y
ca
parents: 3011
diff changeset
  1696
!
ea806f804f5c accessors for x/y
ca
parents: 3011
diff changeset
  1697
ea806f804f5c accessors for x/y
ca
parents: 3011
diff changeset
  1698
y:anInteger
ea806f804f5c accessors for x/y
ca
parents: 3011
diff changeset
  1699
    "change the y coordinate of the key-event"
ea806f804f5c accessors for x/y
ca
parents: 3011
diff changeset
  1700
3295
84de6d18b9d1 code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents: 3294
diff changeset
  1701
    ^ args at:3 put:anInteger
1527
661de0f76595 started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents: 1470
diff changeset
  1702
! !
661de0f76595 started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents: 1470
diff changeset
  1703
5249
5e4cad201723 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5209
diff changeset
  1704
!WindowEvent::KeyboardEvent methodsFor:'testing'!
1527
661de0f76595 started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents: 1470
diff changeset
  1705
9049
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1706
isDeadKey
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1707
    "return true, if this event is for a deadKey"
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1708
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1709
    ^ isDeadKey ? false
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1710
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1711
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1712
!
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1713
5204
748c8f2954e9 fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents: 5201
diff changeset
  1714
isDelegatedToFocusView
748c8f2954e9 fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents: 5201
diff changeset
  1715
    "return true, if this event will be forwarded to a focusView."
748c8f2954e9 fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents: 5201
diff changeset
  1716
748c8f2954e9 fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents: 5201
diff changeset
  1717
    ^ true
748c8f2954e9 fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents: 5201
diff changeset
  1718
!
748c8f2954e9 fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents: 5201
diff changeset
  1719
1527
661de0f76595 started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents: 1470
diff changeset
  1720
isKeyEvent
661de0f76595 started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents: 1470
diff changeset
  1721
    "return true, if this event is a keyboard event"
661de0f76595 started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents: 1470
diff changeset
  1722
661de0f76595 started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents: 1470
diff changeset
  1723
    ^ true
661de0f76595 started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents: 1470
diff changeset
  1724
661de0f76595 started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents: 1470
diff changeset
  1725
    "Created: 4.4.1997 / 13:39:59 / cg"
9049
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1726
!
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1727
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1728
isUserEvent
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1729
    "return true, if this event from a user"
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1730
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1731
    ^ true
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1732
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1733
    "Created: / 16-03-2018 / 11:05:50 / stefan"
3686
33158a6957a2 removed leftover debug code
Claus Gittinger <cg@exept.de>
parents: 3680
diff changeset
  1734
! !
33158a6957a2 removed leftover debug code
Claus Gittinger <cg@exept.de>
parents: 3680
diff changeset
  1735
5962
ab
parents: 5949
diff changeset
  1736
!WindowEvent::ButtonMotionEvent methodsFor:'testing'!
ab
parents: 5949
diff changeset
  1737
ab
parents: 5949
diff changeset
  1738
isButtonMotionEvent
ab
parents: 5949
diff changeset
  1739
    "return true, if this event is a buttonMotion event"
ab
parents: 5949
diff changeset
  1740
ab
parents: 5949
diff changeset
  1741
    ^ true
ab
parents: 5949
diff changeset
  1742
! !
ab
parents: 5949
diff changeset
  1743
ab
parents: 5949
diff changeset
  1744
!WindowEvent::KeyPressEvent methodsFor:'testing'!
ab
parents: 5949
diff changeset
  1745
ab
parents: 5949
diff changeset
  1746
isKeyPressEvent
ab
parents: 5949
diff changeset
  1747
    "return true, if this event is a keyboard press event"
ab
parents: 5949
diff changeset
  1748
ab
parents: 5949
diff changeset
  1749
    ^ true
ab
parents: 5949
diff changeset
  1750
! !
ab
parents: 5949
diff changeset
  1751
5249
5e4cad201723 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5209
diff changeset
  1752
!WindowEvent::KeyReleaseEvent methodsFor:'testing'!
3686
33158a6957a2 removed leftover debug code
Claus Gittinger <cg@exept.de>
parents: 3680
diff changeset
  1753
33158a6957a2 removed leftover debug code
Claus Gittinger <cg@exept.de>
parents: 3680
diff changeset
  1754
isKeyReleaseEvent
33158a6957a2 removed leftover debug code
Claus Gittinger <cg@exept.de>
parents: 3680
diff changeset
  1755
    "return true, if this event is a keyboard press event"
33158a6957a2 removed leftover debug code
Claus Gittinger <cg@exept.de>
parents: 3680
diff changeset
  1756
33158a6957a2 removed leftover debug code
Claus Gittinger <cg@exept.de>
parents: 3680
diff changeset
  1757
    ^ true
33158a6957a2 removed leftover debug code
Claus Gittinger <cg@exept.de>
parents: 3680
diff changeset
  1758
! !
33158a6957a2 removed leftover debug code
Claus Gittinger <cg@exept.de>
parents: 3680
diff changeset
  1759
5962
ab
parents: 5949
diff changeset
  1760
!WindowEvent::HotKeyEvent methodsFor:'accessing'!
ab
parents: 5949
diff changeset
  1761
ab
parents: 5949
diff changeset
  1762
hotkeyIdentifier
ab
parents: 5949
diff changeset
  1763
    ^ hotkeyIdentifier
ab
parents: 5949
diff changeset
  1764
!
2028
9f4244301ef8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1982
diff changeset
  1765
5962
ab
parents: 5949
diff changeset
  1766
hotkeyIdentifier:something
ab
parents: 5949
diff changeset
  1767
    hotkeyIdentifier := something.
ab
parents: 5949
diff changeset
  1768
! !
ab
parents: 5949
diff changeset
  1769
ab
parents: 5949
diff changeset
  1770
!WindowEvent::HotKeyEvent methodsFor:'testing'!
ab
parents: 5949
diff changeset
  1771
ab
parents: 5949
diff changeset
  1772
isHotKeyEvent
ab
parents: 5949
diff changeset
  1773
    "return true, if this event is a hotkey event"
2028
9f4244301ef8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1982
diff changeset
  1774
3686
33158a6957a2 removed leftover debug code
Claus Gittinger <cg@exept.de>
parents: 3680
diff changeset
  1775
    ^ true
1527
661de0f76595 started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents: 1470
diff changeset
  1776
! !
661de0f76595 started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents: 1470
diff changeset
  1777
4988
c4d0e91bfda5 +mouseWheelEvent
fm
parents: 4980
diff changeset
  1778
!WindowEvent::KeyboardFocusEvent methodsFor:'accessing'!
c4d0e91bfda5 +mouseWheelEvent
fm
parents: 4980
diff changeset
  1779
c4d0e91bfda5 +mouseWheelEvent
fm
parents: 4980
diff changeset
  1780
hasFocus
c4d0e91bfda5 +mouseWheelEvent
fm
parents: 4980
diff changeset
  1781
c4d0e91bfda5 +mouseWheelEvent
fm
parents: 4980
diff changeset
  1782
    ^ args at: 1
c4d0e91bfda5 +mouseWheelEvent
fm
parents: 4980
diff changeset
  1783
! !
c4d0e91bfda5 +mouseWheelEvent
fm
parents: 4980
diff changeset
  1784
5249
5e4cad201723 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5209
diff changeset
  1785
!WindowEvent::KeyboardFocusEvent methodsFor:'testing'!
3376
a9784be22e6a added hasKeyboardFocus event
tm
parents: 3297
diff changeset
  1786
a9784be22e6a added hasKeyboardFocus event
tm
parents: 3297
diff changeset
  1787
isKeyboardFocusEvent
a9784be22e6a added hasKeyboardFocus event
tm
parents: 3297
diff changeset
  1788
    "return true, if this event is a keyboard focus event"
a9784be22e6a added hasKeyboardFocus event
tm
parents: 3297
diff changeset
  1789
a9784be22e6a added hasKeyboardFocus event
tm
parents: 3297
diff changeset
  1790
    ^ true
a9784be22e6a added hasKeyboardFocus event
tm
parents: 3297
diff changeset
  1791
! !
a9784be22e6a added hasKeyboardFocus event
tm
parents: 3297
diff changeset
  1792
9049
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1793
!WindowEvent::MessageSendEvent class methodsFor:'documentation'!
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1794
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1795
documentation
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1796
"
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1797
    documentation to be added.
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1798
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1799
    class:
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1800
        <a short class summary here, describing what instances represent>
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1801
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1802
    responsibilities:    
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1803
        <describing what my main role is>
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1804
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1805
    collaborators:    
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1806
        <describing with whom and how I talk to>
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1807
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1808
    API:
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1809
        <public api and main messages>
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1810
        
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1811
    example:
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1812
        <a one-line examples on how to use - can also be in a separate example method>
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1813
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1814
    implementation:
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1815
        <implementation points>
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1816
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1817
    [author:]
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1818
        cg
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1819
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1820
    [instance variables:]
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1821
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1822
    [class variables:]
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1823
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1824
    [see also:]
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1825
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1826
"
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1827
! !
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1828
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1829
!WindowEvent::MessageSendEvent class methodsFor:'instance creation-basic'!
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1830
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1831
for:aView type:aSymbol
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1832
    "create and return a new windowEvent for sending
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1833
     aSymbol-message with no arguments to aView"
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1834
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1835
    ^ (super for:aView type:aSymbol) rememberSender
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1836
!
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1837
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1838
for:aView type:aSymbol arguments:argArray
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1839
    "create and return a new windowEvent for sending
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1840
     aSymbol-message with arguments to aView"
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1841
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1842
    ^ (super for:aView type:aSymbol arguments:argArray) rememberSender
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1843
! !
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1844
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1845
!WindowEvent::MessageSendEvent methodsFor:'accessing'!
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1846
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1847
rememberSender
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1848
    "possibly (i.e if Debug is true) remember the context where the message was generated.
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1849
     Somewhat heuristicly skip uninterresting contexts."
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1850
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1851
    |con|
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1852
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1853
    (Debug ? false) ifFalse:[^ self].
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1854
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1855
    con := thisContext sender.
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1856
    [
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1857
        con notNil 
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1858
          and:[ (con receiver == self)
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1859
                or:[(con receiver == self class)
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1860
                or:[(con receiver == WindowEvent)
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1861
                or:[(con receiver class == WindowSensor)
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1862
                or:[(con receiver class == RecursionLock)
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1863
                or:[(con receiver isBlock) 
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1864
                or:[(con selector == #enqueueMessage:for:arguments:)
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1865
                or:[(con selector == #enqueueMessage:for:)
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1866
               ]]]]]]]  
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1867
          ]
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1868
    ] whileTrue:[
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1869
        con := con sender.
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1870
    ].
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1871
    generatedBy := con.
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1872
! !
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1873
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1874
!WindowEvent::MessageSendEvent methodsFor:'blocked'!
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1875
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1876
view
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1877
    ^ nil
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1878
! !
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  1879
5249
5e4cad201723 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5209
diff changeset
  1880
!WindowEvent::MessageSendEvent methodsFor:'testing'!
3089
ea806f804f5c accessors for x/y
ca
parents: 3011
diff changeset
  1881
3465
a14f06f3af91 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3376
diff changeset
  1882
isMessageSendEvent
a14f06f3af91 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3376
diff changeset
  1883
    "return true, if this event is a general messageSend event"
3089
ea806f804f5c accessors for x/y
ca
parents: 3011
diff changeset
  1884
ea806f804f5c accessors for x/y
ca
parents: 3011
diff changeset
  1885
    ^ true
ea806f804f5c accessors for x/y
ca
parents: 3011
diff changeset
  1886
ea806f804f5c accessors for x/y
ca
parents: 3011
diff changeset
  1887
ea806f804f5c accessors for x/y
ca
parents: 3011
diff changeset
  1888
ea806f804f5c accessors for x/y
ca
parents: 3011
diff changeset
  1889
! !
ea806f804f5c accessors for x/y
ca
parents: 3011
diff changeset
  1890
9049
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1891
!WindowEvent::MouseWheelMotionEvent class methodsFor:'documentation'!
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1892
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1893
documentation
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1894
"
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1895
    documentation to be added.
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1896
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1897
    class:
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1898
        <a short class summary here, describing what instances represent>
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1899
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1900
    responsibilities:    
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1901
        <describing what my main role is>
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1902
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1903
    collaborators:    
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1904
        <describing with whom and how I talk to>
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1905
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1906
    API:
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1907
        <public api and main messages>
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1908
        
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1909
    example:
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1910
        <a one-line examples on how to use - can also be in a separate example method>
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1911
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1912
    implementation:
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1913
        <implementation points>
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1914
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1915
    [author:]
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1916
        exept MBP
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1917
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1918
    [instance variables:]
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1919
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1920
    [class variables:]
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1921
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1922
    [see also:]
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1923
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1924
"
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1925
! !
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1926
4988
c4d0e91bfda5 +mouseWheelEvent
fm
parents: 4980
diff changeset
  1927
!WindowEvent::MouseWheelMotionEvent methodsFor:'accessing'!
c4d0e91bfda5 +mouseWheelEvent
fm
parents: 4980
diff changeset
  1928
9049
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1929
addAmount:moreAmount
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1930
    "used to compress multiple mouse-wheel motions into one"
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1931
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1932
    args at:4 put:(args at:4) + moreAmount
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1933
!
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1934
4988
c4d0e91bfda5 +mouseWheelEvent
fm
parents: 4980
diff changeset
  1935
amount
c4d0e91bfda5 +mouseWheelEvent
fm
parents: 4980
diff changeset
  1936
    "return the amount of the mouse wheel motion event   "
c4d0e91bfda5 +mouseWheelEvent
fm
parents: 4980
diff changeset
  1937
c4d0e91bfda5 +mouseWheelEvent
fm
parents: 4980
diff changeset
  1938
    ^ args at:4
c4d0e91bfda5 +mouseWheelEvent
fm
parents: 4980
diff changeset
  1939
!
c4d0e91bfda5 +mouseWheelEvent
fm
parents: 4980
diff changeset
  1940
c4d0e91bfda5 +mouseWheelEvent
fm
parents: 4980
diff changeset
  1941
deltaTime
c4d0e91bfda5 +mouseWheelEvent
fm
parents: 4980
diff changeset
  1942
    "return the deltaTime of the mouse wheel motion event   "
c4d0e91bfda5 +mouseWheelEvent
fm
parents: 4980
diff changeset
  1943
c4d0e91bfda5 +mouseWheelEvent
fm
parents: 4980
diff changeset
  1944
    ^ args at:5
9049
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1945
!
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1946
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1947
incrementRepeatCount
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1948
    repeatCount := (repeatCount ? 0) + 1.
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1949
!
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1950
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1951
repeatCount
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1952
    "used to compress multiple mouse-wheel motions into one"
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1953
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1954
    ^ repeatCount ? 1
4988
c4d0e91bfda5 +mouseWheelEvent
fm
parents: 4980
diff changeset
  1955
! !
c4d0e91bfda5 +mouseWheelEvent
fm
parents: 4980
diff changeset
  1956
5249
5e4cad201723 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5209
diff changeset
  1957
!WindowEvent::MouseWheelMotionEvent methodsFor:'testing'!
5205
27605d0f1caa *** empty log message ***
sr
parents: 5204
diff changeset
  1958
27605d0f1caa *** empty log message ***
sr
parents: 5204
diff changeset
  1959
isDelegatedToFocusView
27605d0f1caa *** empty log message ***
sr
parents: 5204
diff changeset
  1960
    "return true, if this event will be forwarded to a focusView."
27605d0f1caa *** empty log message ***
sr
parents: 5204
diff changeset
  1961
27605d0f1caa *** empty log message ***
sr
parents: 5204
diff changeset
  1962
    ^ true.
27605d0f1caa *** empty log message ***
sr
parents: 5204
diff changeset
  1963
!
27605d0f1caa *** empty log message ***
sr
parents: 5204
diff changeset
  1964
27605d0f1caa *** empty log message ***
sr
parents: 5204
diff changeset
  1965
isMouseWheelEvent
27605d0f1caa *** empty log message ***
sr
parents: 5204
diff changeset
  1966
    ^ true.
27605d0f1caa *** empty log message ***
sr
parents: 5204
diff changeset
  1967
! !
27605d0f1caa *** empty log message ***
sr
parents: 5204
diff changeset
  1968
4233
088575f01a8a native stuff
ca
parents: 4144
diff changeset
  1969
!WindowEvent::NativeWidgetCommandEvent methodsFor:'accessing'!
088575f01a8a native stuff
ca
parents: 4144
diff changeset
  1970
088575f01a8a native stuff
ca
parents: 4144
diff changeset
  1971
command
088575f01a8a native stuff
ca
parents: 4144
diff changeset
  1972
    ^ selector
088575f01a8a native stuff
ca
parents: 4144
diff changeset
  1973
!
088575f01a8a native stuff
ca
parents: 4144
diff changeset
  1974
088575f01a8a native stuff
ca
parents: 4144
diff changeset
  1975
command:something
088575f01a8a native stuff
ca
parents: 4144
diff changeset
  1976
    selector := something.
088575f01a8a native stuff
ca
parents: 4144
diff changeset
  1977
! !
088575f01a8a native stuff
ca
parents: 4144
diff changeset
  1978
5249
5e4cad201723 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5209
diff changeset
  1979
!WindowEvent::NewDamageEvent methodsFor:'testing'!
4044
dc958a0211d9 newDamage
Claus Gittinger <cg@exept.de>
parents: 3936
diff changeset
  1980
dc958a0211d9 newDamage
Claus Gittinger <cg@exept.de>
parents: 3936
diff changeset
  1981
isDamage
dc958a0211d9 newDamage
Claus Gittinger <cg@exept.de>
parents: 3936
diff changeset
  1982
    "return true, if this is a damage event"
dc958a0211d9 newDamage
Claus Gittinger <cg@exept.de>
parents: 3936
diff changeset
  1983
dc958a0211d9 newDamage
Claus Gittinger <cg@exept.de>
parents: 3936
diff changeset
  1984
    ^ true
dc958a0211d9 newDamage
Claus Gittinger <cg@exept.de>
parents: 3936
diff changeset
  1985
!
dc958a0211d9 newDamage
Claus Gittinger <cg@exept.de>
parents: 3936
diff changeset
  1986
dc958a0211d9 newDamage
Claus Gittinger <cg@exept.de>
parents: 3936
diff changeset
  1987
isDamageForView:aView
dc958a0211d9 newDamage
Claus Gittinger <cg@exept.de>
parents: 3936
diff changeset
  1988
    "return true, if this is a damage event for aView"
dc958a0211d9 newDamage
Claus Gittinger <cg@exept.de>
parents: 3936
diff changeset
  1989
dc958a0211d9 newDamage
Claus Gittinger <cg@exept.de>
parents: 3936
diff changeset
  1990
    ^ (receiver == aView)
dc958a0211d9 newDamage
Claus Gittinger <cg@exept.de>
parents: 3936
diff changeset
  1991
! !
dc958a0211d9 newDamage
Claus Gittinger <cg@exept.de>
parents: 3936
diff changeset
  1992
5249
5e4cad201723 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5209
diff changeset
  1993
!WindowEvent::TerminateEvent methodsFor:'testing'!
3773
e2fd3df91e5c new event class for TerminateEvents
Claus Gittinger <cg@exept.de>
parents: 3758
diff changeset
  1994
e2fd3df91e5c new event class for TerminateEvents
Claus Gittinger <cg@exept.de>
parents: 3758
diff changeset
  1995
isTerminateEvent
e2fd3df91e5c new event class for TerminateEvents
Claus Gittinger <cg@exept.de>
parents: 3758
diff changeset
  1996
    ^ true
9049
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1997
!
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1998
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  1999
isUserEvent
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  2000
    "return true, if this event from a user"
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  2001
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  2002
    ^ true
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  2003
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  2004
    "Created: / 16-03-2018 / 11:06:05 / stefan"
3773
e2fd3df91e5c new event class for TerminateEvents
Claus Gittinger <cg@exept.de>
parents: 3758
diff changeset
  2005
! !
e2fd3df91e5c new event class for TerminateEvents
Claus Gittinger <cg@exept.de>
parents: 3758
diff changeset
  2006
4817
2d555a01a0fd trayEvents
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
  2007
!WindowEvent::TrayActionEvent methodsFor:'accessing'!
2d555a01a0fd trayEvents
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
  2008
2d555a01a0fd trayEvents
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
  2009
event
2d555a01a0fd trayEvents
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
  2010
    ^ selector
2d555a01a0fd trayEvents
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
  2011
2d555a01a0fd trayEvents
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
  2012
    "Created: / 31-10-2007 / 01:23:05 / cg"
2d555a01a0fd trayEvents
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
  2013
!
2d555a01a0fd trayEvents
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
  2014
2d555a01a0fd trayEvents
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
  2015
event:something
2d555a01a0fd trayEvents
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
  2016
    selector := something.
2d555a01a0fd trayEvents
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
  2017
2d555a01a0fd trayEvents
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
  2018
    "Created: / 31-10-2007 / 01:23:07 / cg"
2d555a01a0fd trayEvents
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
  2019
! !
2d555a01a0fd trayEvents
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
  2020
5249
5e4cad201723 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5209
diff changeset
  2021
!WindowEvent::TrayActionEvent methodsFor:'testing'!
4842
2a6305d64661 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4817
diff changeset
  2022
2a6305d64661 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4817
diff changeset
  2023
isTrayEvent
2a6305d64661 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4817
diff changeset
  2024
    ^ true
2a6305d64661 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4817
diff changeset
  2025
2a6305d64661 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4817
diff changeset
  2026
    "Created: / 09-11-2007 / 13:09:17 / cg"
2a6305d64661 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4817
diff changeset
  2027
! !
2a6305d64661 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4817
diff changeset
  2028
5838
5629e7ee01bf added: #visibilityOf:changedTo:
Claus Gittinger <cg@exept.de>
parents: 5752
diff changeset
  2029
!WindowEvent::VisibilityChangeEvent class methodsFor:'instance creation'!
5629e7ee01bf added: #visibilityOf:changedTo:
Claus Gittinger <cg@exept.de>
parents: 5752
diff changeset
  2030
5629e7ee01bf added: #visibilityOf:changedTo:
Claus Gittinger <cg@exept.de>
parents: 5752
diff changeset
  2031
for:aView visibility:how
5629e7ee01bf added: #visibilityOf:changedTo:
Claus Gittinger <cg@exept.de>
parents: 5752
diff changeset
  2032
    ^ self new
5629e7ee01bf added: #visibilityOf:changedTo:
Claus Gittinger <cg@exept.de>
parents: 5752
diff changeset
  2033
5629e7ee01bf added: #visibilityOf:changedTo:
Claus Gittinger <cg@exept.de>
parents: 5752
diff changeset
  2034
    "Created: / 23-01-2012 / 10:02:42 / cg"
5629e7ee01bf added: #visibilityOf:changedTo:
Claus Gittinger <cg@exept.de>
parents: 5752
diff changeset
  2035
! !
5629e7ee01bf added: #visibilityOf:changedTo:
Claus Gittinger <cg@exept.de>
parents: 5752
diff changeset
  2036
9049
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  2037
!WindowEvent::WidgetSelectionEvent class methodsFor:'documentation'!
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  2038
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  2039
copyright
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  2040
"
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  2041
 COPYRIGHT (c) 2008 by eXept Software AG
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  2042
              All Rights Reserved
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  2043
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  2044
 This software is furnished under a license and may be used
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  2045
 only in accordance with the terms of that license and with the
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  2046
 inclusion of the above copyright notice.   This software may not
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  2047
 be provided or otherwise made available to, or used by, any
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  2048
 other person.  No title to or ownership of the software is
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  2049
 hereby transferred.
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  2050
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  2051
"
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  2052
! !
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  2053
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  2054
!WindowEvent::WidgetSelectionEvent methodsFor:'accessing'!
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  2055
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  2056
widget:aWidget
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  2057
    selector := #'widgetSelected:'.
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  2058
    args := Array with:aWidget class name.
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  2059
    receiver := aWidget.
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  2060
    timeStamp := Timestamp now.
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  2061
!
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  2062
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  2063
widgetClassName
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  2064
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  2065
    ^ args at: 1 
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  2066
! !
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  2067
5249
5e4cad201723 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5209
diff changeset
  2068
!WindowEvent::WindowMapUnmapEvent methodsFor:'testing'!
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  2069
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  2070
isMapEvent
4842
2a6305d64661 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4817
diff changeset
  2071
    "return true, if this is a map event"
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  2072
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  2073
    ^ selector == #mapped
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  2074
4842
2a6305d64661 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4817
diff changeset
  2075
    "Created: / 29-01-1998 / 21:52:54 / cg"
2a6305d64661 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4817
diff changeset
  2076
    "Modified: / 09-11-2007 / 13:11:02 / cg"
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  2077
!
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  2078
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  2079
isUnmapEvent
4842
2a6305d64661 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4817
diff changeset
  2080
    "return true, if this is an unmap event"
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  2081
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  2082
    ^ selector == #unmapped
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  2083
4842
2a6305d64661 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4817
diff changeset
  2084
    "Modified: / 09-11-2007 / 13:11:04 / cg"
3680
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  2085
! !
4c096f11e018 more windowEvent types;
ca
parents: 3654
diff changeset
  2086
251
915de9a65169 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 244
diff changeset
  2087
!WindowEvent class methodsFor:'documentation'!
915de9a65169 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 244
diff changeset
  2088
5751
8f2955555565 Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5275
diff changeset
  2089
version_CVS
9049
d0233524dfd8 Cherry-picked `Color`, `WindowEvent` and `WindowGroup`
Jan Vrany <jan.vrany@labware.com>
parents: 6312
diff changeset
  2090
    ^ '$Header$'
5751
8f2955555565 Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5275
diff changeset
  2091
!
8f2955555565 Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5275
diff changeset
  2092
8f2955555565 Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5275
diff changeset
  2093
version_SVN
6312
fd183f4f73b5 class: WindowEvent
Claus Gittinger <cg@exept.de>
parents: 5962
diff changeset
  2094
    ^ '$ Id $'
251
915de9a65169 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 244
diff changeset
  2095
! !
3758
c484f793f9b1 selection change handling
Claus Gittinger <cg@exept.de>
parents: 3686
diff changeset
  2096
6312
fd183f4f73b5 class: WindowEvent
Claus Gittinger <cg@exept.de>
parents: 5962
diff changeset
  2097
3758
c484f793f9b1 selection change handling
Claus Gittinger <cg@exept.de>
parents: 3686
diff changeset
  2098
WindowEvent::InputEvent initialize!