RectanglefromUserController.st
author convert-repo
Mon, 20 Jan 2020 04:27:28 +0000
changeset 6803 ee24f1bc43ae
parent 6793 8527e1fe23c4
permissions -rw-r--r--
update tags
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6793
8527e1fe23c4 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6144
diff changeset
     1
"{ Encoding: utf8 }"
8527e1fe23c4 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6144
diff changeset
     2
6119
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     3
"
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     4
 COPYRIGHT (c) 2017 by eXept Software AG
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     5
              All Rights Reserved
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     6
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     7
 This software is furnished under a license and may be used
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     8
 only in accordance with the terms of that license and with the
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     9
 inclusion of the above copyright notice.   This software may not
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    10
 be provided or otherwise made available to, or used by, any
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    11
 other person.  No title to or ownership of the software is
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    12
 hereby transferred.
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    13
"
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    14
"{ Package: 'stx:libwidg' }"
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    15
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    16
"{ NameSpace: Smalltalk }"
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    17
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
ButtonController subclass:#RectangleFromUserController
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
	instanceVariableNames:'action startPoint lastX lastY'
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
	classVariableNames:''
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
	poolDictionaries:''
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
	category:'Interface-Support-Controllers'
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
!
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
!RectangleFromUserController class methodsFor:'documentation'!
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
copyright
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    28
"
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
 COPYRIGHT (c) 2017 by eXept Software AG
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
              All Rights Reserved
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
 This software is furnished under a license and may be used
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
 only in accordance with the terms of that license and with the
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    34
 inclusion of the above copyright notice.   This software may not
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    35
 be provided or otherwise made available to, or used by, any
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    36
 other person.  No title to or ownership of the software is
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    37
 hereby transferred.
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    38
"
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    39
!
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    40
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    41
documentation
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    42
"
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    43
    drags a rectangle.
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    44
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    45
    An instance of me can be installed temporarily as controller of any view,
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    46
    to let the user select a rectangular area from the view.
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    47
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    48
    Use the utility method:
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    49
        dragRectangleIn:aView thenDo:action
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    50
    which does exactly that for your (and cares to restore any original controller)    
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    51
    
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    52
"
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    53
!
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    54
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    55
examples
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    56
"
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    57
    |v c|
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    58
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    59
    v := View new openAndWait.
6120
37438a85b476 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6119
diff changeset
    60
    c := RectangleFromUserController new.
6119
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    61
    c action:[:rect | Transcript showCR:rect ].
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    62
    v openAndWait.
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    63
    
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    64
    v controller:c.
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    65
"
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    66
! !
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    67
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    68
!RectangleFromUserController class methodsFor:'utilities'!
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    69
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    70
dragRectangleIn:aView thenDo:action
6793
8527e1fe23c4 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6144
diff changeset
    71
    <resource: #obsolete>
6119
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    72
    "drag a rectangle in aView"
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    73
    
6793
8527e1fe23c4 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6144
diff changeset
    74
    ^ self rectangleFromUserIn:aView thenDo:action
6120
37438a85b476 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6119
diff changeset
    75
!
37438a85b476 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6119
diff changeset
    76
37438a85b476 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6119
diff changeset
    77
rectangleFromUserIn:aView thenDo:action
37438a85b476 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6119
diff changeset
    78
    "drag a rectangle in aView"
37438a85b476 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6119
diff changeset
    79
    
37438a85b476 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6119
diff changeset
    80
    |dragController oldController oldCursor|
6793
8527e1fe23c4 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6144
diff changeset
    81
8527e1fe23c4 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6144
diff changeset
    82
    [aView device anyButtonPressed] whileTrue:[ Delay waitForSeconds:0.2 ].
8527e1fe23c4 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6144
diff changeset
    83
6120
37438a85b476 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6119
diff changeset
    84
    dragController := self new.
37438a85b476 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6119
diff changeset
    85
    dragController view:aView.
37438a85b476 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6119
diff changeset
    86
    oldController := aView controller.
37438a85b476 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6119
diff changeset
    87
    oldCursor := aView cursor.
37438a85b476 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6119
diff changeset
    88
37438a85b476 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6119
diff changeset
    89
    aView cursor:Cursor origin.
37438a85b476 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6119
diff changeset
    90
    dragController action:[:rectOrNil |
37438a85b476 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6119
diff changeset
    91
        |image|
37438a85b476 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6119
diff changeset
    92
37438a85b476 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6119
diff changeset
    93
        aView controller:oldController.
37438a85b476 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6119
diff changeset
    94
        aView cursor:oldCursor.
37438a85b476 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6119
diff changeset
    95
        action value:rectOrNil.
37438a85b476 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6119
diff changeset
    96
    ].
37438a85b476 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6119
diff changeset
    97
    
37438a85b476 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6119
diff changeset
    98
    aView controller:dragController.
37438a85b476 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6119
diff changeset
    99
37438a85b476 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6119
diff changeset
   100
    "Created: / 07-03-2017 / 18:30:04 / cg"
6119
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   101
! !
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   102
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   103
!RectangleFromUserController methodsFor:'accessing'!
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   104
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   105
action:aBlock
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   106
    "set the block which will be called when the rectangle drag is finished.
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   107
     The block will be called with a nil arg, if escape is pressed"
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   108
     
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   109
    action := aBlock
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   110
!
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   111
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   112
lastMousePoint
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   113
    lastX isNil ifTrue:[^ nil].
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   114
    ^ lastX @ lastY
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   115
!
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   116
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   117
startPoint
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   118
    ^ startPoint
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   119
! !
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   120
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   121
!RectangleFromUserController methodsFor:'event handling'!
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   122
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   123
buttonMotion:buttonState x:x y:y
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   124
    (buttonState == 0 or:[startPoint isNil]) ifTrue:[
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   125
        super buttonMotion:buttonState x:x y:y.
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   126
        ^ self
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   127
    ].
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   128
    
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   129
    lastX notNil ifTrue:[
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   130
        view xoring:[
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   131
            view displayRectangle:(startPoint corner:(lastX@lastY))
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   132
        ].
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   133
    ].
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   134
    
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   135
    lastX := x.
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   136
    lastY := y.
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   137
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   138
    startPoint ~= (x@y) ifTrue:[
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   139
        view xoring:[
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   140
            view displayRectangle:(startPoint corner:(lastX@lastY))
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   141
        ].
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   142
    ].
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   143
!
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   144
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   145
buttonPress:button x:x y:y
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   146
    startPoint := x@y.
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   147
    view cursor:(Cursor corner).
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   148
!
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   149
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   150
buttonRelease:button x:x y:y
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   151
    |rect|
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   152
    
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   153
    startPoint isNil ifTrue:[
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   154
        super buttonRelease:button x:x y:y.
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   155
        ^ self
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   156
    ].
6144
b62a2aacaccb #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 6120
diff changeset
   157
    
6119
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   158
    (lastX isNil or:[lastY isNil]) ifTrue:[
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   159
        lastX := x.
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   160
        lastY := y.
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   161
    ].
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   162
    
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   163
    view xoring:[
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   164
        view displayRectangle:(startPoint corner:(lastX@lastY))
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   165
    ].
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   166
    rect := startPoint corner:(lastX@lastY).
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   167
    startPoint := lastX := lastY := nil.
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   168
    action value:rect.
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   169
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   170
    "Modified: / 09-02-2017 / 23:18:01 / cg"
6144
b62a2aacaccb #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 6120
diff changeset
   171
    "Modified (format): / 10-04-2017 / 08:39:33 / cg"
6119
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   172
!
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   173
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   174
keyPress:key x:x y:y
6144
b62a2aacaccb #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 6120
diff changeset
   175
    "actually, this is for the escape key (to abort a drag operation)"
b62a2aacaccb #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 6120
diff changeset
   176
    
6119
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   177
    startPoint isNil ifTrue:[
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   178
        super keyPress:key x:x y:y.
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   179
        ^ self
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   180
    ].
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   181
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   182
    lastX notNil ifTrue:[
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   183
        view xoring:[
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   184
            view displayRectangle:(startPoint corner:(lastX@lastY))
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   185
        ].
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   186
    ].
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   187
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   188
    startPoint := nil.
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   189
    action value:nil.
6144
b62a2aacaccb #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 6120
diff changeset
   190
b62a2aacaccb #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 6120
diff changeset
   191
    "Modified (comment): / 10-04-2017 / 08:40:57 / cg"
6119
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   192
! !
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   193
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   194
!RectangleFromUserController class methodsFor:'documentation'!
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   195
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   196
version
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   197
    ^ '$Header$'
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   198
!
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   199
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   200
version_CVS
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   201
    ^ '$Header$'
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   202
! !
ad406347b834 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   203