InputView.st
author Claus Gittinger <cg@exept.de>
Tue, 03 Sep 2013 17:23:55 +0200
changeset 3228 187a4158a51a
parent 2775 3d2b7f1ffc9b
child 3772 18f86fffbd1c
permissions -rw-r--r--
class: FlyByHelp changed: #initiateHelpFor:at:now: #showHelp:for: changed the flyBy suppression slightly: if the same text is to be shown again, do not show it except if the help is for another widget. (used to check for the text only previously)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
3f9277473954 Initial revision
claus
parents:
diff changeset
     1
"
6
4ac87e6bf82f *** empty log message ***
claus
parents: 5
diff changeset
     2
 COPYRIGHT (c) 1990 by Claus Gittinger
99
claus
parents: 96
diff changeset
     3
	      All Rights Reserved
0
3f9277473954 Initial revision
claus
parents:
diff changeset
     4
3f9277473954 Initial revision
claus
parents:
diff changeset
     5
 This software is furnished under a license and may be used
3f9277473954 Initial revision
claus
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
3f9277473954 Initial revision
claus
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
3f9277473954 Initial revision
claus
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
3f9277473954 Initial revision
claus
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
3f9277473954 Initial revision
claus
parents:
diff changeset
    10
 hereby transferred.
3f9277473954 Initial revision
claus
parents:
diff changeset
    11
"
2250
77b78d1ca422 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 1241
diff changeset
    12
"{ Package: 'stx:libview2' }"
0
3f9277473954 Initial revision
claus
parents:
diff changeset
    13
65
claus
parents: 23
diff changeset
    14
SimpleView subclass:#InputView
225
7c62c2ffb363 documentation
Claus Gittinger <cg@exept.de>
parents: 130
diff changeset
    15
	instanceVariableNames:'eventReceiver'
7c62c2ffb363 documentation
Claus Gittinger <cg@exept.de>
parents: 130
diff changeset
    16
	classVariableNames:''
7c62c2ffb363 documentation
Claus Gittinger <cg@exept.de>
parents: 130
diff changeset
    17
	poolDictionaries:''
235
236f3222fa88 class category changes
Claus Gittinger <cg@exept.de>
parents: 225
diff changeset
    18
	category:'Views-Special'
0
3f9277473954 Initial revision
claus
parents:
diff changeset
    19
!
3f9277473954 Initial revision
claus
parents:
diff changeset
    20
449
9d18c9a66b59 delegate drop
ca
parents: 327
diff changeset
    21
!InputView class methodsFor:'documentation'!
21
66b31c91177f *** empty log message ***
claus
parents: 6
diff changeset
    22
66b31c91177f *** empty log message ***
claus
parents: 6
diff changeset
    23
copyright
66b31c91177f *** empty log message ***
claus
parents: 6
diff changeset
    24
"
66b31c91177f *** empty log message ***
claus
parents: 6
diff changeset
    25
 COPYRIGHT (c) 1990 by Claus Gittinger
99
claus
parents: 96
diff changeset
    26
	      All Rights Reserved
0
3f9277473954 Initial revision
claus
parents:
diff changeset
    27
21
66b31c91177f *** empty log message ***
claus
parents: 6
diff changeset
    28
 This software is furnished under a license and may be used
66b31c91177f *** empty log message ***
claus
parents: 6
diff changeset
    29
 only in accordance with the terms of that license and with the
66b31c91177f *** empty log message ***
claus
parents: 6
diff changeset
    30
 inclusion of the above copyright notice.   This software may not
66b31c91177f *** empty log message ***
claus
parents: 6
diff changeset
    31
 be provided or otherwise made available to, or used by, any
66b31c91177f *** empty log message ***
claus
parents: 6
diff changeset
    32
 other person.  No title to or ownership of the software is
66b31c91177f *** empty log message ***
claus
parents: 6
diff changeset
    33
 hereby transferred.
66b31c91177f *** empty log message ***
claus
parents: 6
diff changeset
    34
"
66b31c91177f *** empty log message ***
claus
parents: 6
diff changeset
    35
!
0
3f9277473954 Initial revision
claus
parents:
diff changeset
    36
21
66b31c91177f *** empty log message ***
claus
parents: 6
diff changeset
    37
documentation
66b31c91177f *** empty log message ***
claus
parents: 6
diff changeset
    38
"
66b31c91177f *** empty log message ***
claus
parents: 6
diff changeset
    39
    a view for input only - forwarding all events to another object.
66b31c91177f *** empty log message ***
claus
parents: 6
diff changeset
    40
    This kind of view can be used to be laid ontop of another view to catch all
66b31c91177f *** empty log message ***
claus
parents: 6
diff changeset
    41
    input. (Interface builder)
66b31c91177f *** empty log message ***
claus
parents: 6
diff changeset
    42
    NOTICE: the event forwarding is a leftover from times when not delegation mechanism
225
7c62c2ffb363 documentation
Claus Gittinger <cg@exept.de>
parents: 130
diff changeset
    43
            existed - it will vanish - use delegates for new code.
7c62c2ffb363 documentation
Claus Gittinger <cg@exept.de>
parents: 130
diff changeset
    44
7c62c2ffb363 documentation
Claus Gittinger <cg@exept.de>
parents: 130
diff changeset
    45
    [author:]
7c62c2ffb363 documentation
Claus Gittinger <cg@exept.de>
parents: 130
diff changeset
    46
        Claus Gittinger
21
66b31c91177f *** empty log message ***
claus
parents: 6
diff changeset
    47
"
66b31c91177f *** empty log message ***
claus
parents: 6
diff changeset
    48
! !
0
3f9277473954 Initial revision
claus
parents:
diff changeset
    49
130
ddb0e9c49fc8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
    50
!InputView methodsFor:'accessing'!
0
3f9277473954 Initial revision
claus
parents:
diff changeset
    51
130
ddb0e9c49fc8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
    52
eventReceiver:aView
1241
414114cfc5cc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1185
diff changeset
    53
    "set the view to which input events are forwarded"
414114cfc5cc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1185
diff changeset
    54
130
ddb0e9c49fc8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
    55
    eventReceiver := aView
ddb0e9c49fc8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
    56
!
0
3f9277473954 Initial revision
claus
parents:
diff changeset
    57
286
b7f2e2aefae1 renamed #inputOnly to #isInputOnly
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
    58
isInputOnly
1241
414114cfc5cc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1185
diff changeset
    59
    "return true, since this is a transparent input-only view"
286
b7f2e2aefae1 renamed #inputOnly to #isInputOnly
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
    60
0
3f9277473954 Initial revision
claus
parents:
diff changeset
    61
    ^ true
286
b7f2e2aefae1 renamed #inputOnly to #isInputOnly
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
    62
b7f2e2aefae1 renamed #inputOnly to #isInputOnly
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
    63
    "Created: 1.6.1996 / 13:22:31 / cg"
21
66b31c91177f *** empty log message ***
claus
parents: 6
diff changeset
    64
! !
66b31c91177f *** empty log message ***
claus
parents: 6
diff changeset
    65
449
9d18c9a66b59 delegate drop
ca
parents: 327
diff changeset
    66
!InputView methodsFor:'drag & drop'!
9d18c9a66b59 delegate drop
ca
parents: 327
diff changeset
    67
2257
1e9572bb7ccd drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2250
diff changeset
    68
canDrop:aDropContext 
1e9572bb7ccd drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2250
diff changeset
    69
    "return true, if aCollectionOfDropObjects can be dropped here.
1e9572bb7ccd drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2250
diff changeset
    70
     Delegated to my eventReceiving view"
1e9572bb7ccd drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2250
diff changeset
    71
1e9572bb7ccd drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2250
diff changeset
    72
    ^ eventReceiver notNil
1e9572bb7ccd drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2250
diff changeset
    73
      and:[ eventReceiver canDrop:aDropContext ]
1e9572bb7ccd drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2250
diff changeset
    74
1e9572bb7ccd drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2250
diff changeset
    75
    "Created: / 13-10-2006 / 12:35:07 / cg"
1e9572bb7ccd drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2250
diff changeset
    76
    "Modified: / 13-10-2006 / 16:02:45 / cg"
1e9572bb7ccd drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2250
diff changeset
    77
!
1e9572bb7ccd drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2250
diff changeset
    78
1e9572bb7ccd drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2250
diff changeset
    79
canDrop:aDropContext at:aPoint
1241
414114cfc5cc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1185
diff changeset
    80
    "return true, if aCollectionOfDropObjects can be dropped here.
414114cfc5cc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1185
diff changeset
    81
     Delegated to my eventReceiving view"
414114cfc5cc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1185
diff changeset
    82
2257
1e9572bb7ccd drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2250
diff changeset
    83
    ^ eventReceiver notNil
1e9572bb7ccd drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2250
diff changeset
    84
      and:[ eventReceiver canDrop:aDropContext at:aPoint ]
449
9d18c9a66b59 delegate drop
ca
parents: 327
diff changeset
    85
2257
1e9572bb7ccd drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2250
diff changeset
    86
    "Created: / 13-10-2006 / 12:35:07 / cg"
1e9572bb7ccd drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2250
diff changeset
    87
    "Modified: / 13-10-2006 / 16:02:37 / cg"
449
9d18c9a66b59 delegate drop
ca
parents: 327
diff changeset
    88
!
9d18c9a66b59 delegate drop
ca
parents: 327
diff changeset
    89
2257
1e9572bb7ccd drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2250
diff changeset
    90
canDropObjects:aCollectionOfDropObjects
1e9572bb7ccd drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2250
diff changeset
    91
    "return true, if aCollectionOfDropObjects can be dropped here.
1e9572bb7ccd drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2250
diff changeset
    92
     Delegated to my eventReceiving view"
1e9572bb7ccd drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2250
diff changeset
    93
1e9572bb7ccd drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2250
diff changeset
    94
    ^ eventReceiver notNil 
1e9572bb7ccd drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2250
diff changeset
    95
      and:[ eventReceiver canDropObjects:aCollectionOfDropObjects ]
1e9572bb7ccd drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2250
diff changeset
    96
1e9572bb7ccd drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2250
diff changeset
    97
    "Created: / 13-10-2006 / 16:01:58 / cg"
1e9572bb7ccd drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2250
diff changeset
    98
!
1e9572bb7ccd drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2250
diff changeset
    99
1e9572bb7ccd drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2250
diff changeset
   100
canDropObjects:aCollectionOfDropObjects at:aPoint
2250
77b78d1ca422 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 1241
diff changeset
   101
    "return true, if aCollectionOfDropObjects can be dropped here.
77b78d1ca422 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 1241
diff changeset
   102
     Delegated to my eventReceiving view"
77b78d1ca422 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 1241
diff changeset
   103
2257
1e9572bb7ccd drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2250
diff changeset
   104
    ^ eventReceiver notNil 
1e9572bb7ccd drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2250
diff changeset
   105
      and:[ eventReceiver canDropObjects:aCollectionOfDropObjects at:aPoint]
2250
77b78d1ca422 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 1241
diff changeset
   106
2257
1e9572bb7ccd drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2250
diff changeset
   107
    "Created: / 13-10-2006 / 16:02:13 / cg"
2250
77b78d1ca422 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 1241
diff changeset
   108
!
77b78d1ca422 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 1241
diff changeset
   109
2257
1e9572bb7ccd drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2250
diff changeset
   110
drop:aDropContext
1e9572bb7ccd drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2250
diff changeset
   111
    "drop aCollectionOfDropObjects here.
1e9572bb7ccd drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2250
diff changeset
   112
     Delegated to my eventReceiving view"
1e9572bb7ccd drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2250
diff changeset
   113
1e9572bb7ccd drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2250
diff changeset
   114
    eventReceiver drop:aDropContext
1e9572bb7ccd drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2250
diff changeset
   115
1e9572bb7ccd drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2250
diff changeset
   116
    "Modified: / 13-10-2006 / 16:03:32 / cg"
1e9572bb7ccd drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2250
diff changeset
   117
!
1e9572bb7ccd drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2250
diff changeset
   118
1e9572bb7ccd drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2250
diff changeset
   119
drop:aDropContext at:aPoint
2250
77b78d1ca422 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 1241
diff changeset
   120
    "drop aCollectionOfDropObjects here.
77b78d1ca422 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 1241
diff changeset
   121
     Delegated to my eventReceiving view"
77b78d1ca422 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 1241
diff changeset
   122
2257
1e9572bb7ccd drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2250
diff changeset
   123
    eventReceiver drop:aDropContext at:aPoint
2250
77b78d1ca422 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 1241
diff changeset
   124
2257
1e9572bb7ccd drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2250
diff changeset
   125
    "Modified: / 13-10-2006 / 16:03:27 / cg"
2250
77b78d1ca422 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 1241
diff changeset
   126
!
77b78d1ca422 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 1241
diff changeset
   127
2257
1e9572bb7ccd drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2250
diff changeset
   128
dropObjects:aCollectionOfDropObjects
1241
414114cfc5cc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1185
diff changeset
   129
    "drop aCollectionOfDropObjects here.
414114cfc5cc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1185
diff changeset
   130
     Delegated to my eventReceiving view"
414114cfc5cc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1185
diff changeset
   131
2257
1e9572bb7ccd drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2250
diff changeset
   132
    eventReceiver dropObjects:aCollectionOfDropObjects
1e9572bb7ccd drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2250
diff changeset
   133
1e9572bb7ccd drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2250
diff changeset
   134
    "Created: / 13-10-2006 / 16:03:05 / cg"
1e9572bb7ccd drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2250
diff changeset
   135
!
449
9d18c9a66b59 delegate drop
ca
parents: 327
diff changeset
   136
2257
1e9572bb7ccd drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2250
diff changeset
   137
dropObjects:aCollectionOfDropObjects at:aPoint
1e9572bb7ccd drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2250
diff changeset
   138
    "drop aCollectionOfDropObjects here.
1e9572bb7ccd drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2250
diff changeset
   139
     Delegated to my eventReceiving view"
1e9572bb7ccd drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2250
diff changeset
   140
1e9572bb7ccd drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2250
diff changeset
   141
    eventReceiver dropObjects:aCollectionOfDropObjects at:aPoint
1e9572bb7ccd drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2250
diff changeset
   142
1e9572bb7ccd drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2250
diff changeset
   143
    "Created: / 13-10-2006 / 16:03:12 / cg"
449
9d18c9a66b59 delegate drop
ca
parents: 327
diff changeset
   144
! !
9d18c9a66b59 delegate drop
ca
parents: 327
diff changeset
   145
0
3f9277473954 Initial revision
claus
parents:
diff changeset
   146
!InputView methodsFor:'event handling'!
3f9277473954 Initial revision
claus
parents:
diff changeset
   147
130
ddb0e9c49fc8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   148
buttonMotion:state x:x y:y
1241
414114cfc5cc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1185
diff changeset
   149
    "redefined to forward the event to my eventReceiver"
21
66b31c91177f *** empty log message ***
claus
parents: 6
diff changeset
   150
0
3f9277473954 Initial revision
claus
parents:
diff changeset
   151
    eventReceiver notNil ifTrue:[
1185
522d9c84f0a9 fix: if no delegate, perform normal (superclass)
Claus Gittinger <cg@exept.de>
parents: 521
diff changeset
   152
        eventReceiver buttonMotion:state x:x y:y
522d9c84f0a9 fix: if no delegate, perform normal (superclass)
Claus Gittinger <cg@exept.de>
parents: 521
diff changeset
   153
    ] ifFalse:[
522d9c84f0a9 fix: if no delegate, perform normal (superclass)
Claus Gittinger <cg@exept.de>
parents: 521
diff changeset
   154
        super buttonMotion:state x:x y:y
0
3f9277473954 Initial revision
claus
parents:
diff changeset
   155
    ]
3f9277473954 Initial revision
claus
parents:
diff changeset
   156
!
3f9277473954 Initial revision
claus
parents:
diff changeset
   157
3f9277473954 Initial revision
claus
parents:
diff changeset
   158
buttonPress:button x:x y:y
1241
414114cfc5cc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1185
diff changeset
   159
    "redefined to forward the event to my eventReceiver"
21
66b31c91177f *** empty log message ***
claus
parents: 6
diff changeset
   160
0
3f9277473954 Initial revision
claus
parents:
diff changeset
   161
    eventReceiver notNil ifTrue:[
1185
522d9c84f0a9 fix: if no delegate, perform normal (superclass)
Claus Gittinger <cg@exept.de>
parents: 521
diff changeset
   162
        eventReceiver buttonPress:button x:x y:y
522d9c84f0a9 fix: if no delegate, perform normal (superclass)
Claus Gittinger <cg@exept.de>
parents: 521
diff changeset
   163
    ] ifFalse:[
522d9c84f0a9 fix: if no delegate, perform normal (superclass)
Claus Gittinger <cg@exept.de>
parents: 521
diff changeset
   164
        super buttonPress:button x:x y:y
0
3f9277473954 Initial revision
claus
parents:
diff changeset
   165
    ]
3f9277473954 Initial revision
claus
parents:
diff changeset
   166
!
3f9277473954 Initial revision
claus
parents:
diff changeset
   167
3f9277473954 Initial revision
claus
parents:
diff changeset
   168
buttonRelease:button x:x y:y
1241
414114cfc5cc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1185
diff changeset
   169
    "redefined to forward the event to my eventReceiver"
21
66b31c91177f *** empty log message ***
claus
parents: 6
diff changeset
   170
0
3f9277473954 Initial revision
claus
parents:
diff changeset
   171
    eventReceiver notNil ifTrue:[
1185
522d9c84f0a9 fix: if no delegate, perform normal (superclass)
Claus Gittinger <cg@exept.de>
parents: 521
diff changeset
   172
        eventReceiver buttonRelease:button x:x y:y
522d9c84f0a9 fix: if no delegate, perform normal (superclass)
Claus Gittinger <cg@exept.de>
parents: 521
diff changeset
   173
    ] ifFalse:[
522d9c84f0a9 fix: if no delegate, perform normal (superclass)
Claus Gittinger <cg@exept.de>
parents: 521
diff changeset
   174
        super buttonRelease:button x:x y:y
0
3f9277473954 Initial revision
claus
parents:
diff changeset
   175
    ]
3f9277473954 Initial revision
claus
parents:
diff changeset
   176
!
3f9277473954 Initial revision
claus
parents:
diff changeset
   177
130
ddb0e9c49fc8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   178
exposeX:x y:y width:w height:h
1241
414114cfc5cc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1185
diff changeset
   179
    "dummy - will never be received"
414114cfc5cc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1185
diff changeset
   180
130
ddb0e9c49fc8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   181
    ^ self
ddb0e9c49fc8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   182
!
ddb0e9c49fc8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   183
0
3f9277473954 Initial revision
claus
parents:
diff changeset
   184
focusIn
1241
414114cfc5cc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1185
diff changeset
   185
    "redefined to forward the event to my eventReceiver"
21
66b31c91177f *** empty log message ***
claus
parents: 6
diff changeset
   186
0
3f9277473954 Initial revision
claus
parents:
diff changeset
   187
    eventReceiver notNil ifTrue:[
1241
414114cfc5cc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1185
diff changeset
   188
        eventReceiver focusIn
0
3f9277473954 Initial revision
claus
parents:
diff changeset
   189
    ]
3f9277473954 Initial revision
claus
parents:
diff changeset
   190
!
3f9277473954 Initial revision
claus
parents:
diff changeset
   191
3f9277473954 Initial revision
claus
parents:
diff changeset
   192
focusOut
1241
414114cfc5cc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1185
diff changeset
   193
    "redefined to forward the event to my eventReceiver"
21
66b31c91177f *** empty log message ***
claus
parents: 6
diff changeset
   194
0
3f9277473954 Initial revision
claus
parents:
diff changeset
   195
    eventReceiver notNil ifTrue:[
1241
414114cfc5cc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1185
diff changeset
   196
        eventReceiver focusOut
0
3f9277473954 Initial revision
claus
parents:
diff changeset
   197
    ]
3f9277473954 Initial revision
claus
parents:
diff changeset
   198
!
3f9277473954 Initial revision
claus
parents:
diff changeset
   199
130
ddb0e9c49fc8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   200
keyPress:key x:x y:y
1241
414114cfc5cc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1185
diff changeset
   201
    "redefined to forward the event to my eventReceiver"
130
ddb0e9c49fc8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   202
ddb0e9c49fc8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   203
    eventReceiver notNil ifTrue:[
1185
522d9c84f0a9 fix: if no delegate, perform normal (superclass)
Claus Gittinger <cg@exept.de>
parents: 521
diff changeset
   204
        eventReceiver keyPress:key x:x y:y
522d9c84f0a9 fix: if no delegate, perform normal (superclass)
Claus Gittinger <cg@exept.de>
parents: 521
diff changeset
   205
    ] ifFalse:[
522d9c84f0a9 fix: if no delegate, perform normal (superclass)
Claus Gittinger <cg@exept.de>
parents: 521
diff changeset
   206
        super keyPress:key x:x y:y
130
ddb0e9c49fc8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   207
    ]
ddb0e9c49fc8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   208
!
ddb0e9c49fc8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   209
ddb0e9c49fc8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   210
keyRelease:key x:x y:y
1241
414114cfc5cc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1185
diff changeset
   211
    "redefined to forward the event to my eventReceiver"
130
ddb0e9c49fc8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   212
ddb0e9c49fc8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   213
    eventReceiver notNil ifTrue:[
1185
522d9c84f0a9 fix: if no delegate, perform normal (superclass)
Claus Gittinger <cg@exept.de>
parents: 521
diff changeset
   214
        eventReceiver keyRelease:key x:x y:y
522d9c84f0a9 fix: if no delegate, perform normal (superclass)
Claus Gittinger <cg@exept.de>
parents: 521
diff changeset
   215
    ] ifFalse:[
522d9c84f0a9 fix: if no delegate, perform normal (superclass)
Claus Gittinger <cg@exept.de>
parents: 521
diff changeset
   216
        super keyRelease:key x:x y:y
130
ddb0e9c49fc8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   217
    ]
ddb0e9c49fc8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   218
!
ddb0e9c49fc8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   219
0
3f9277473954 Initial revision
claus
parents:
diff changeset
   220
pointerEnter:state x:x y:y
1241
414114cfc5cc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1185
diff changeset
   221
    "redefined to forward the event to my eventReceiver"
21
66b31c91177f *** empty log message ***
claus
parents: 6
diff changeset
   222
0
3f9277473954 Initial revision
claus
parents:
diff changeset
   223
    eventReceiver notNil ifTrue:[
1241
414114cfc5cc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1185
diff changeset
   224
        eventReceiver pointerEnter:state x:x y:y
0
3f9277473954 Initial revision
claus
parents:
diff changeset
   225
    ]
3f9277473954 Initial revision
claus
parents:
diff changeset
   226
!
3f9277473954 Initial revision
claus
parents:
diff changeset
   227
3f9277473954 Initial revision
claus
parents:
diff changeset
   228
pointerLeave:state
1241
414114cfc5cc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1185
diff changeset
   229
    "redefined to forward the event to my eventReceiver"
21
66b31c91177f *** empty log message ***
claus
parents: 6
diff changeset
   230
0
3f9277473954 Initial revision
claus
parents:
diff changeset
   231
    eventReceiver notNil ifTrue:[
1241
414114cfc5cc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1185
diff changeset
   232
        eventReceiver pointerLeave:state
0
3f9277473954 Initial revision
claus
parents:
diff changeset
   233
    ]
3f9277473954 Initial revision
claus
parents:
diff changeset
   234
! !
130
ddb0e9c49fc8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   235
ddb0e9c49fc8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   236
!InputView methodsFor:'initialization'!
ddb0e9c49fc8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   237
ddb0e9c49fc8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   238
initialize
ddb0e9c49fc8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   239
    super initialize.
2775
3d2b7f1ffc9b border handling
Claus Gittinger <cg@exept.de>
parents: 2772
diff changeset
   240
    self borderWidth:0
130
ddb0e9c49fc8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   241
! !
ddb0e9c49fc8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   242
ddb0e9c49fc8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   243
!InputView methodsFor:'redefined dummy'!
ddb0e9c49fc8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   244
ddb0e9c49fc8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   245
setViewBackground
1241
414114cfc5cc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1185
diff changeset
   246
    "dummy - inputviews have no background"
130
ddb0e9c49fc8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   247
ddb0e9c49fc8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   248
    ^ self
ddb0e9c49fc8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   249
! !
ddb0e9c49fc8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   250
449
9d18c9a66b59 delegate drop
ca
parents: 327
diff changeset
   251
!InputView class methodsFor:'documentation'!
130
ddb0e9c49fc8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   252
ddb0e9c49fc8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   253
version
2775
3d2b7f1ffc9b border handling
Claus Gittinger <cg@exept.de>
parents: 2772
diff changeset
   254
    ^ '$Header: /cvs/stx/stx/libview2/InputView.st,v 1.22 2009-10-24 14:00:59 cg Exp $'
2772
71336ba2fc96 no more direct accesses to borderWidth and borderColor
Claus Gittinger <cg@exept.de>
parents: 2257
diff changeset
   255
!
71336ba2fc96 no more direct accesses to borderWidth and borderColor
Claus Gittinger <cg@exept.de>
parents: 2257
diff changeset
   256
71336ba2fc96 no more direct accesses to borderWidth and borderColor
Claus Gittinger <cg@exept.de>
parents: 2257
diff changeset
   257
version_CVS
2775
3d2b7f1ffc9b border handling
Claus Gittinger <cg@exept.de>
parents: 2772
diff changeset
   258
    ^ '$Header: /cvs/stx/stx/libview2/InputView.st,v 1.22 2009-10-24 14:00:59 cg Exp $'
130
ddb0e9c49fc8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   259
! !