Merge jv
authorHG Automerge
Wed, 25 Jan 2017 17:40:20 +0000
branchjv
changeset 6085 4ecbe3a93aec
parent 6064 613a55d2067a (current diff)
parent 6061 b93fe69702df (diff)
child 6086 58d88b144b2b
Merge
EditTextView.st
GenericToolbarIconLibrary.st
Label.st
ListView.st
Make.proto
Make.spec
SelectionInListView.st
TextView.st
WorkspaceCompletionSupport.st
bc.mak
libInit.cc
stx_libwidg.st
--- a/.hgtags	Mon Jan 16 19:58:26 2017 +0000
+++ b/.hgtags	Wed Jan 25 17:40:20 2017 +0000
@@ -47,9 +47,9 @@
 76de19bec54bfa87495522090f7c89f854136bba release
 7800380ae0dcefa3e4aad5e68d5b19f3e9701063 expecco_1_5_0
 7b9d701d947b79d0fcadb309d60624561f4761c6 stable
-8934110278a30020baf8b0f089334f88a6438674 expecco_2_10_0
-8934110278a30020baf8b0f089334f88a6438674 expecco_2_10_1
 898390ffc60246027be514e931aaa1f684dec8a3 balla
+92827801f6ede2af0c85809fc6082e0a82abddaa expecco_2_10_0
+92827801f6ede2af0c85809fc6082e0a82abddaa expecco_2_11_0
 966270358179746c40739275e562ec92e93112cb expecco_1_7_0b1
 966270358179746c40739275e562ec92e93112cb expecco_1_7_0b2
 966270358179746c40739275e562ec92e93112cb expecco_1_7_0b3
--- a/ArrowButton.st	Mon Jan 16 19:58:26 2017 +0000
+++ b/ArrowButton.st	Wed Jan 25 17:40:20 2017 +0000
@@ -954,8 +954,8 @@
      cache the result for later drawing operations.
     "
     logo notNil ifTrue:[
-        self paint:bg.
-        self fillRectangleX:0 y:0 width:width height:height.
+        gc paint:bg.
+        gc fillRectangleX:0 y:0 width:width height:height.
 
         shadowColor := shadowColor onDevice:device.
         lightColor := lightColor onDevice:device.
@@ -1002,7 +1002,7 @@
             orgX := (width - labelOriginX) // 4 - 1.
         ].
 
-        self paint:topLeft.
+        gc paint:topLeft.
         #(-1 0 -1) with:#(-1 -1 0) do:[:dX :dY |
             |x y|
 
@@ -1010,13 +1010,13 @@
             y := orgY + dY.
 
             isString ifTrue:[
-                self displayString:logo x:x y:y.
+                gc displayString:logo x:x y:y.
             ] ifFalse:[
-                self displayForm:logo x:x y:y.
+                gc displayForm:logo x:x y:y.
             ]    
         ].
 
-        self paint:botRight.
+        gc paint:botRight.
         #(1 1 0) with:#(0 1 1) do:[:dX :dY |
             |x y|
 
@@ -1024,20 +1024,20 @@
             y := orgY + dY.
 
             isString ifTrue:[
-                self displayString:logo x:x y:y.
+                gc displayString:logo x:x y:y.
             ] ifFalse:[
-                self displayForm:logo x:x y:y.
+                gc displayForm:logo x:x y:y.
             ]    
         ].
 
         "
          finally, the form itself
         "
-        self paint:fg.
+        gc paint:fg.
         isString ifTrue:[
-            self displayString:logo x:orgX y:orgY.
+            gc displayString:logo x:orgX y:orgY.
         ] ifFalse:[
-            self displayForm:logo x:orgX y:orgY.
+            gc displayForm:logo x:orgX y:orgY.
         ]    
     ]
 
--- a/CheckToggle.st	Mon Jan 16 19:58:26 2017 +0000
+++ b/CheckToggle.st	Wed Jan 25 17:40:20 2017 +0000
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 1991 by Claus Gittinger
 	      All Rights Reserved
@@ -730,7 +728,7 @@
     ].
     LabelOverMargin ifTrue:[
         (logo isNil or:[logo isImageOrForm not]) ifTrue:[
-            self deviceClippingRectangle:nil.
+            self deviceClippingBounds:nil.
             self clearRectangleX:0 y:0 width:width height:height.
         ].
     ].
@@ -776,9 +774,9 @@
     LabelOverMargin ifTrue:[
         (logo notNil and:[logo isImageOrForm]) ifTrue:[
             self paint:fgColor on:bgColor.
-            self clippingRectangle:nil.
+            self clippingBounds:nil.
             self displayForm:logo x:labelOriginX y:labelOriginY.
-            self deviceClippingRectangle:innerClipRect
+            self deviceClippingBounds:innerClipRect
        ]
     ].
 
--- a/DialogBox.st	Mon Jan 16 19:58:26 2017 +0000
+++ b/DialogBox.st	Wed Jan 25 17:40:20 2017 +0000
@@ -6296,13 +6296,13 @@
     optOutHolder1 := false asValue.
     optOutHolder2 := false asValue.
     [
-        Dialog aboutToOpenBoxNotificationSignal handle:[:ex |
-            |box|
-
-            box := ex box.
-            box verticalPanel add:((CheckBox label:labelString1) model:optOutHolder1).
-            box verticalPanel add:((CheckBox label:labelString2) model:optOutHolder2).
-        ] do:boxOpeningBlock.
+        self 
+            modifyingBoxWith:[:box |
+                box verticalPanel 
+                    add:((CheckBox label:labelString1) model:optOutHolder1);
+                    add:((CheckBox label:labelString2) model:optOutHolder2).
+            ] 
+            do:boxOpeningBlock
     ] ensure:[
         optOutHolder1 value ifTrue:[ optOutAction1 value ].
         optOutHolder2 value ifTrue:[ optOutAction2 value ].
@@ -6328,12 +6328,11 @@
 
     holder := false asValue.
     [
-        Dialog aboutToOpenBoxNotificationSignal handle:[:ex |
-            |box|
-
-            box := ex box.
-            box verticalPanel add:((CheckBox label:labelString) model:holder).
-        ] do:boxOpeningBlock.
+        self 
+            modifyingBoxWith:[:box |
+                box verticalPanel add:((CheckBox label:labelString) model:holder).
+            ] 
+            do:boxOpeningBlock.
     ] ensure:[
         holder value ifTrue:[optOutAction value]
     ]
@@ -10280,6 +10279,16 @@
     preferredExtent := nil.
 !
 
+forceResize
+    "force a recomputation of my size.
+     Cann this, when elements where added to a subcomponent, 
+     of which I cannot know. 
+     Eg. when someone gets the buttonPanel and adds an element to it"
+     
+    needResize := true.
+    self resize
+!
+
 hideAndEvaluate:aBlock
     "if I am modal, make myself invisible and evaluate aBlock.
      If nonModal, stay up, but also evaluate the block."
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/DragRectangleController.st	Wed Jan 25 17:40:20 2017 +0000
@@ -0,0 +1,172 @@
+"
+ COPYRIGHT (c) 2017 by eXept Software AG
+              All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice.   This software may not
+ be provided or otherwise made available to, or used by, any
+ other person.  No title to or ownership of the software is
+ hereby transferred.
+"
+"{ Package: 'stx:libwidg' }"
+
+"{ NameSpace: Smalltalk }"
+
+ButtonController subclass:#DragRectangleController
+	instanceVariableNames:'action startPoint lastX lastY'
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Interface-Support-Controllers'
+!
+
+!DragRectangleController class methodsFor:'documentation'!
+
+copyright
+"
+ COPYRIGHT (c) 2017 by eXept Software AG
+              All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice.   This software may not
+ be provided or otherwise made available to, or used by, any
+ other person.  No title to or ownership of the software is
+ hereby transferred.
+"
+!
+
+documentation
+"
+    drags a rectangle
+"
+!
+
+examples
+"
+    |v c|
+
+    v := View new openAndWait.
+    c := DragRectangleController new.
+    c action:[:rect | Transcript showCR:rect ].
+    v openAndWait.
+    
+    v controller:c.
+"
+! !
+
+!DragRectangleController class methodsFor:'utilities'!
+
+dragRectangleIn:aView thenDo:action
+    "drag a rectangle in aView"
+    
+    |dragController oldController oldCursor|
+    
+    dragController := DragRectangleController new.
+    dragController view:aView.
+    oldController := aView controller.
+    oldCursor := aView cursor.
+
+    aView cursor:Cursor origin.
+    dragController action:[:rectOrNil |
+        |image|
+
+        aView controller:oldController.
+        aView cursor:oldCursor.
+        action value:rectOrNil.
+    ].
+    
+    aView controller:dragController.
+! !
+
+!DragRectangleController methodsFor:'accessing'!
+
+action:aBlock
+    "set the block which will be called when the rectangle drag is finished.
+     The block will be called with a nil arg, if escape is pressed"
+     
+    action := aBlock
+!
+
+lastMousePoint
+    lastX isNil ifTrue:[^ nil].
+    ^ lastX @ lastY
+!
+
+startPoint
+    ^ startPoint
+! !
+
+!DragRectangleController methodsFor:'event handling'!
+
+buttonMotion:buttonState x:x y:y
+    (buttonState == 0 or:[startPoint isNil]) ifTrue:[
+        super buttonMotion:buttonState x:x y:y.
+        ^ self
+    ].
+    
+    lastX notNil ifTrue:[
+        view xoring:[
+            view displayRectangle:(startPoint corner:(lastX@lastY))
+        ].
+    ].
+    
+    lastX := x.
+    lastY := y.
+
+    startPoint ~= (x@y) ifTrue:[
+        view xoring:[
+            view displayRectangle:(startPoint corner:(lastX@lastY))
+        ].
+    ].
+!
+
+buttonPress:button x:x y:y
+    startPoint := x@y.
+    view cursor:(Cursor corner).
+!
+
+buttonRelease:button x:x y:y
+    |rect|
+    
+    startPoint isNil ifTrue:[
+        super buttonRelease:button x:x y:y.
+        ^ self
+    ].
+
+    lastX notNil ifTrue:[
+        view xoring:[
+            view displayRectangle:(startPoint corner:(lastX@lastY))
+        ].
+    ].
+    rect := startPoint corner:(lastX@lastY).
+    startPoint := lastX := lastY := nil.
+    action value:rect.
+!
+
+keyPress:key x:x y:y
+    startPoint isNil ifTrue:[
+        super keyPress:key x:x y:y.
+        ^ self
+    ].
+
+    lastX notNil ifTrue:[
+        view xoring:[
+            view displayRectangle:(startPoint corner:(lastX@lastY))
+        ].
+    ].
+
+    startPoint := nil.
+    action value:nil.
+! !
+
+!DragRectangleController class methodsFor:'documentation'!
+
+version
+    ^ '$Header$'
+!
+
+version_CVS
+    ^ '$Header$'
+! !
+
--- a/EditTextView.st	Mon Jan 16 19:58:26 2017 +0000
+++ b/EditTextView.st	Wed Jan 25 17:40:20 2017 +0000
@@ -2640,8 +2640,8 @@
         x1 := x - w.
         x2 := x + w.
 
-        oldClip := self clippingRectangleOrNil.
-        self clippingRectangle:(margin@margin extent:(width-margin) @ (height-margin)).
+        oldClip := self clippingBoundsOrNil.
+        self clippingBounds:(margin@margin extent:(width-margin) @ (height-margin)).
 
         cursorType == #caret ifTrue:[
             self lineWidth:2.
@@ -2655,7 +2655,7 @@
                                     with:(x2 @ y2))
         ].
 
-        self clippingRectangle:oldClip
+        self clippingBounds:oldClip
     ].
     self paint:oldPaint.
 
@@ -2913,12 +2913,12 @@
         line := self visibleAt:cursorVisibleLine.
         (line notNil and:[line isText]) ifTrue:[
             cursorCol > 1 ifTrue:[
-                oldClip := self clippingRectangleOrNil.
+                oldClip := self clippingBoundsOrNil.
                 x := (self xOfCol:cursorCol inVisibleLine:cursorVisibleLine) - viewOrigin x.
                 y := self yOfVisibleLine:cursorVisibleLine.
-                self clippingRectangle:(x@y extent:((gc font width * 2) @ fontHeight)).
+                self clippingBounds:(x@y extent:((gc font width * 2) @ fontHeight)).
                 super redrawVisibleLine:cursorVisibleLine from:cursorCol-1 to:cursorCol.
-                self clippingRectangle:oldClip.
+                self clippingBounds:oldClip.
                 ^ self.
             ].
         ].
@@ -3365,6 +3365,8 @@
 
     |soCol wasOn lineNrAboveCursor ln originalLine prevTab|
 
+    list isEmptyOrNil ifTrue:[^ self]. "/ there is nothing to delete.
+    
     wasOn := self hideCursor.
 
     "JV@2012-01-06: Do not play with autoindent iff cursor is at the very beginning of the line"
@@ -3391,7 +3393,8 @@
                         "/ not allow a cursor position beyond the end of line,
                         "/ so avoid that cursorLine:col: will force us to the beginning of the line
                         originalLine size < prevTab ifTrue:[
-                            self at:cursorLine put:ln
+                            self checkForExistingLine:cursorLine.
+                            self basicListAt:cursorLine put:ln
                         ]
                     ].
                     self cursorLine:cursorLine col:prevTab.
@@ -4800,7 +4803,7 @@
         (newLine notNil and:[newLine isText]) ifTrue:[
             colNr > 1 ifTrue:[
                 cursorVisibleLine notNil ifTrue:[
-                    oldClip := self clippingRectangleOrNil.
+                    oldClip := self clippingBoundsOrNil.
                     x := (self xOfCol:colNr-1 inVisibleLine:cursorVisibleLine) - viewOrigin x.
                     y := self yOfVisibleLine:cursorVisibleLine.
 
@@ -4808,13 +4811,13 @@
                         self invalidateLine:lineNr.
                     ] ifFalse:[
                         drawCharacterOnly ifTrue:[
-                            self clippingRectangle:(x@y extent:((gc font width * 2) @ fontHeight)).
+                            self clippingBounds:(x@y extent:((gc font width * 2) @ fontHeight)).
                             self redrawLine:lineNr from:colNr-1 to:colNr
                         ] ifFalse:[
-                            self clippingRectangle:(x@y extent:((width - x) @ fontHeight)).
+                            self clippingBounds:(x@y extent:((width - x) @ fontHeight)).
                             self redrawLine:lineNr from:colNr-1
                         ].
-                        self clippingRectangle:oldClip.
+                        self clippingBounds:oldClip.
                     ].
                 ].
                 ^ self.
--- a/GenericToolbarIconLibrary.st	Mon Jan 16 19:58:26 2017 +0000
+++ b/GenericToolbarIconLibrary.st	Wed Jan 25 17:40:20 2017 +0000
@@ -259,6 +259,28 @@
 QVE**71&QS-0G AST5MST5MSQTT9DJ@@T5MST5MST5MST5MST5MST5MST5MST5MST5MST5MS') ; colorMapFromArray:#[254 201 107 255 238 154 231 208 160 194 135 4 196 136 7 255 255 199 209 157 23 209 166 33 255 242 193 217 175 45 217 158 32 217 165 32 201 152 48 248 240 224 255 255 238 231 172 54 209 168 80 255 242 119 255 221 103 251 230 118 255 254 147 255 212 110 255 201 106 255 252 167 238 221 165 255 251 187 191 130 2 197 139 10 255 233 177 203 146 20 239 224 192 247 238 206 222 173 41 222 177 44 213 165 49 239 239 231 255 255 237 213 174 74 235 177 62 255 252 128 255 255 136 255 202 86 218 184 112 255 224 122 230 206 136 255 225 139 255 217 142 191 131 2 196 138 8 198 140 12 202 144 16 213 167 32 202 143 11 217 176 45 226 197 61 222 159 31 213 174 59 192 136 16 241 240 236 205 160 64 255 255 248 248 183 66 222 189 103 255 198 83 122 152 175 255 252 150 255 255 159 234 213 147 255 255 176 189 129 1 192 131 3 242 230 186 255 255 202 204 147 20 204 151 25 247 237 204 251 244 211 255 255 222 255 242 213 255 255 230 238 209 79 238 199 71 242 198 74 255 255 255 255 251 127 255 229 108 255 204 88 255 191 80 255 206 103 255 238 140 238 217 147 255 252 173 238 222 173 193 135 4 198 140 11 201 144 16 204 146 19 242 230 193 247 237 203 217 154 26 251 247 217 230 196 63 197 138 6 241 242 237 217 175 68 247 238 109 242 191 74 251 216 94 242 187 79 247 188 80 255 206 95 255 238 135 222 192 127 234 209 143 238 222 156 255 255 189 194 136 6 251 242 188 201 143 14 203 146 19 202 147 21 255 255 213 213 154 28 222 166 36 213 156 24 255 255 229 234 187 59 238 197 70 252 248 240 247 202 80 255 255 129 255 230 109 255 213 96 255 212 94 238 211 121 230 203 129 255 246 158 255 255 172 255 238 167 192 132 4 197 138 9 201 142 13 203 145 18 202 151 29 202 146 13 213 173 46 213 159 38 235 216 176 217 169 52 238 222 89 217 173 66 240 244 246 247 209 86 0 0 0 213 176 96 255 206 89 255 189 76 248 194 95 136 162 181 247 238 154 227 200 144 255 252 181 191 130 1 191 129 1 255 254 196 255 238 187 255 255 206 255 255 212 247 238 207 243 232 208 202 144 11 226 169 41 240 240 233 213 173 70 238 181 57 251 247 119 255 238 116 255 222 103 255 199 84 226 197 119 255 254 154 237 237 237 167 167 167 151 151 151 229 229 229 175 175 175 252 252 252 150 150 150 250 250 250 244 244 244 207 207 207 193 193 193 242 242 242 154 154 154 244 244 244 216 216 216 205 205 205 163 163 163 239 239 239 245 245 245 166 166 166 248 248 248 244 244 244 246 246 246 210 210 210 240 240 240 225 225 225 150 150 150 147 147 147 145 145 145 142 142 142 199 199 199 139 139 139 140 140 140 143 143 143 214 214 214 204 204 204 178 178 178 195 195 195 199 199 199 214 214 214 186 186 186]; mask:((ImageMask new) width:18; height:18; bits:(ByteArray fromPackedString:'@@@@_@@@??0@??0@??0@???@???@???@??>@??>@??>@??<@??<@??8@??0@?<@@>@@@@@@@') ; yourself); yourself]
 !
 
+editOverlay
+    "This resource specification was automatically generated
+     by the ImageEditor of ST/X."
+
+    "Do not manually edit this!! If it is corrupted,
+     the ImageEditor may not be able to read the specification."
+
+    "
+     self editOverlay inspect
+     ImageEditor openOnClass:self andSelector:#editOverlay
+     Icon flushCachedIcons
+    "
+
+    <resource: #image>
+
+    ^Icon
+        constantNamed:'GenericToolbarIconLibrary class editOverlay'
+        ifAbsentPut:[(Depth4Image width:11 height:13) bits:(ByteArray fromPackedString:'@@@@@J.0@@@@@K-P@@@@B;UP@@@@.5UP@@@K-UU0@@B;UU]@@@,%UWZ @@H%U6* @KH"I@* @BH''\@* BR]0@@* A$@@@@* @@@@@@* ')
+            colorMapFromArray:#[0 0 0 255 255 255 255 220 168 220 220 220 64 0 0 255 128 0 48 48 48 192 88 0 195 195 195 88 88 88 160 160 160 255 168 88]
+            mask:((ImageMask width:11 height:13) bits:(ByteArray fromPackedString:'@F@@8@G @>@G8@? G<@_ C<@O A8@F@@@@@b'); yourself); yourself]
+!
+
 onOffSliderIconOff
     "This resource specification was automatically generated
      by the ImageEditor of ST/X."
--- a/Label.st	Mon Jan 16 19:58:26 2017 +0000
+++ b/Label.st	Wed Jan 25 17:40:20 2017 +0000
@@ -1880,29 +1880,27 @@
     mustClear := true.
 
     (logo notNil and:[logo isImageOrForm]) ifTrue:[
-	(labelOriginX == 0 and:[labelOriginY == 0]) ifTrue:[
-	    logo width >= (width - cutOff) ifTrue:[
-		logo height >= (height - cutOff) ifTrue:[
-		    "no need to clear before - avoid flicker"
-		    mustClear := false
-		]
-	    ]
-	].
+        (labelOriginX == 0 and:[labelOriginY == 0]) ifTrue:[
+            logo width >= (width - cutOff) ifTrue:[
+                logo height >= (height - cutOff) ifTrue:[
+                    "no need to clear before - avoid flicker"
+                    mustClear := false
+                ]
+            ]
+        ].
     ].
 
     mustClear ifTrue:[
-	self paint:bg.
-	self fillRectangleX:margin y:margin
-		      width:(width - cutOff)
-		     height:(height - cutOff).
+        gc paint:bg.
+        gc fillRectangleX:margin y:margin width:(width - cutOff) height:(height - cutOff).
     ].
 !
 
 drawImageLogo:imageOrForm x:x y:y opaque:opaque
     (opaque not or:[imageOrForm mask notNil]) ifTrue:[
-        self displayForm:imageOrForm x:x y:y 
+        gc displayForm:imageOrForm x:x y:y 
     ] ifFalse:[
-        self displayOpaqueForm:imageOrForm x:x y:y 
+        gc displayOpaqueForm:imageOrForm x:x y:y 
     ]
 !
 
@@ -1911,7 +1909,7 @@
 !
 
 drawStringLogo:aString x:x y:y
-    self displayString:aString x:x y:y
+    gc displayString:aString x:x y:y
 !
 
 drawWin95FocusFrame
@@ -1945,7 +1943,7 @@
 
     doClear ifTrue:[self clearInsideWith:bg].
 
-    self paint:fg on:bg.
+    gc paint:fg on:bg.
     logo notNil ifTrue:[
         m2 := margin * 2.
         hSep := hSpace*2.
@@ -2024,9 +2022,9 @@
 "/                    self displayString:logo x:x y:y
 "/                ]
                 etchedFg notNil ifTrue:[
-                    self paint:etchedFg.
+                    gc paint:etchedFg.
                     self drawStringLogo:logo x:x+1 y:y+1.
-                    self paint:fg.
+                    gc paint:fg.
                 ].
                 self drawStringLogo:logo x:x y:y
             ] ifFalse:[
@@ -2045,9 +2043,9 @@
 "/                            self displayString:str x:x y:y.
 "/                        ].
                         etchedFg notNil ifTrue:[
-                            self paint:etchedFg.
+                            gc paint:etchedFg.
                             self drawStringLogo:str x:x+1 y:y+1.
-                            self paint:fg.
+                            gc paint:fg.
                         ].
                         self drawStringLogo:str x:x y:y.
                         y := y + (gc font height)
--- a/ListView.st	Mon Jan 16 19:58:26 2017 +0000
+++ b/ListView.st	Wed Jan 25 17:40:20 2017 +0000
@@ -1942,11 +1942,10 @@
     sH := lineSpacing // 2.
 
     backgroundAlreadyClearedColor == bg ifFalse:[
-        self paint:bg.
-        self fillRectangleX:margin
-                          y:y-sH
-                      width:(width - (margin * 2))
-                     height:(endVisLineNr - startVisLineNr + 1) * fontHeight + (lineSpacing - sH).
+        gc paint:bg.
+        gc fillRectangleX:margin y:y-sH
+           width:(width - (margin * 2))
+           height:(endVisLineNr - startVisLineNr + 1) * fontHeight + (lineSpacing - sH).
     ].
     list isNil ifTrue:[^ self].
 
@@ -1968,14 +1967,14 @@
 
     (startLine <= e) ifTrue:[
         x := textStartLeft - viewOrigin x.
-        self paint:fg on:bg.
+        gc paint:fg on:bg.
         "/ don't use list from:to:do:, to allow for subclasses to redefine the enumeration (TableView)
         self from:startLine to:e do:[:line |
             line notNil ifTrue:[
                 "/ remove line's color emphasis, to enforce color.
                 "/ otherwise blue text is not visible if selection-bg is blue
                 l := self withoutColorEmphasis:line ifFg:fg andBg:bg.
-                self displayOpaqueString:l x:x y:y.
+                gc displayOpaqueString:l x:x y:y.
                 
                 checkedLinesForWidthOfContentsComputation == 0 ifTrue:[
                     self updateWidthOfWidestLineFor:l
@@ -2003,12 +2002,12 @@
         self highlightLineSpacing ifTrue:[
             extraBelow := halfSpacing.
         ].
-        self fillRectangleX:margin y:y - halfSpacing
-                      width:(width - (2 * margin))
-                     height:fontHeight+extraBelow.
+        gc fillRectangleX:margin y:y - halfSpacing
+           width:(width - (2 * margin))
+           height:fontHeight+extraBelow.
     ].
     line notNil ifTrue:[
-        self paint:fg on:bg.
+        gc paint:fg on:bg.
 
         "/ remove lines color emphasis, to enforce color.
         "/ otherwise blue text is not visible if selection-bg is blue.
@@ -2018,7 +2017,7 @@
         ] ifFalse:[
             l := line
         ].
-        self displayOpaqueString:l x:x y:(y + fontAscent).
+        gc displayOpaqueString:l x:x y:(y + fontAscent).
         
         checkedLinesForWidthOfContentsComputation == 0 ifTrue:[
             self updateWidthOfWidestLineFor:l
@@ -2037,12 +2036,12 @@
 
     y := self yOfVisibleLine:visLineNr.
     line notNil ifTrue:[
-        self paint:fg on:bg.
+        gc paint:fg on:bg.
 
         "/ remove lines color emphasis, to enforce color.
         "/ otherwise blue text is not visible if selection-bg is blue
         l := self withoutColorEmphasis:line ifFg:fg andBg:bg.
-        self displayOpaqueString:l x:x y:(y + fontAscent).
+        gc displayOpaqueString:l x:x y:(y + fontAscent).
         
         checkedLinesForWidthOfContentsComputation == 0 ifTrue:[
             self updateWidthOfWidestLineFor:l
@@ -2064,14 +2063,14 @@
     y := self yOfVisibleLine:visLineNr.
     yf := y - (lineSpacing // 2).
 
-    self paint:bg.
+    gc paint:bg.
 
     (lineString notNil and:[lineString isString not]) ifTrue:[
         w := lineString widthFrom:col to:(col min:len) on:self.
         w <= 0 ifTrue:[
             w := gc font width.
-            self fillRectangleX:x y:yf width:w height:fontHeight.
-            self paint:fg
+            gc fillRectangleX:x y:yf width:w height:fontHeight.
+            gc paint:fg
         ].
         self clippedTo:(Rectangle left:x top:yf width:w height:fontHeight) do:[
             self drawVisibleLine:visLineNr with:fg and:bg
@@ -2080,8 +2079,8 @@
     ].
 
     (lineString isNil or:[col > len]) ifTrue:[
-        self fillRectangleX:x y:yf width:(gc font width) height:fontHeight.
-        self paint:fg
+        gc fillRectangleX:x y:yf width:(gc font width) height:fontHeight.
+        gc paint:fg
     ] ifFalse:[
         characterString := lineString copyFrom:col to:col.
 
@@ -2090,10 +2089,10 @@
         characterString := self withoutColorEmphasis:characterString ifFg:fg andBg:bg.
         w := characterString widthOn:self.
 
-        self fillRectangleX:x y:yf width:w height:fontHeight.
-        self paint:fg.
+        gc fillRectangleX:x y:yf width:w height:fontHeight.
+        gc paint:fg.
         self clippedTo:(Rectangle left:x top:yf width:w height:fontHeight) do:[
-            self displayString:characterString x:x y:(y + fontAscent)
+            gc displayString:characterString x:x y:(y + fontAscent)
         ].
 
         checkedLinesForWidthOfContentsComputation == 0 ifTrue:[
@@ -2130,12 +2129,12 @@
                 ] ifFalse:[
                     numExtraCols := (endCol - len" + 1").
                 ].
-                self paint:bg.
-                self fillRectangleX:x+w y:yf width:(numExtraCols * fontWidth) height:fontHeight.
+                gc paint:bg.
+                gc fillRectangleX:x+w y:yf width:(numExtraCols * fontWidth) height:fontHeight.
             ].
             w > 0 ifTrue:[
                 self clippedTo:(Rectangle left:x top:yf width:w height:fontHeight) do:[
-                    self drawVisibleLine:visLineNr with:fg and:bg.
+                    gc drawVisibleLine:visLineNr with:fg and:bg.
                 ].
                 checkedLinesForWidthOfContentsComputation == 0 ifTrue:[
                     self updateWidthOfWidestLineFor:characterString
@@ -2147,8 +2146,8 @@
         (sCol > len) ifTrue:[
             backgroundAlreadyClearedColor == bg ifFalse:[
                 len := endCol - sCol + 1.
-                self paint:bg.
-                self fillRectangleX:x y:yf
+                gc paint:bg.
+                gc fillRectangleX:x y:yf
                                width:(fontWidth * len)
                               height:fontHeight
             ]
@@ -2178,21 +2177,19 @@
                 ] ifFalse:[
                     w := lineString widthFrom:sCol to:endCol on:self
                 ].
-                self paint:bg.
-                self fillRectangleX:x y:yf
-                              width:w
-                              height:fontHeight.
+                gc paint:bg.
+                gc fillRectangleX:x y:yf width:w height:fontHeight.
             ].
-            self paint:fg on:bg.
+            gc paint:fg on:bg.
             w notNil ifTrue:[
                 "/ clip req'd for VISTAs new font rendering (which seems to shoot over the compute
                 self clippedTo:(Rectangle left:x top:yf width:w height:fontHeight) do:[
                     "/ self displayOpaqueString:lineString from:sCol to:eCol x:x y:(y + fontAscent)
-                    self displayString:lineString from:sCol to:eCol x:x y:(y + fontAscent)
+                    gc displayString:lineString from:sCol to:eCol x:x y:(y + fontAscent)
                 ]
             ] ifFalse:[
                 "/ self displayOpaqueString:lineString from:sCol to:eCol x:x y:(y + fontAscent)
-                self displayString:lineString from:sCol to:eCol x:x y:(y + fontAscent) opaque:false maxWidth:self width
+                gc displayString:lineString from:sCol to:eCol x:x y:(y + fontAscent) opaque:false maxWidth:self width
             ].
             checkedLinesForWidthOfContentsComputation == 0 ifTrue:[
                 self updateWidthOfWidestLineFor:lineString
@@ -2216,10 +2213,9 @@
     y := self yOfVisibleLine:visLineNr.
     x := (self xOfCol:index1 inVisibleLine:visLineNr) - viewOrigin x.
     backgroundAlreadyClearedColor == bg ifFalse:[
-        self paint:bg.
-        self fillRectangleX:x y:y - (lineSpacing // 2)
-                      width:(width + viewOrigin x - x)
-                     height:fontHeight.
+        gc paint:bg.
+        gc fillRectangleX:x y:y - (lineSpacing // 2)
+           width:(width + viewOrigin x - x) height:fontHeight.
     ].
     lineString notNil ifTrue:[
         lineString isString ifFalse:[
@@ -2231,7 +2227,7 @@
             (index1 <= index2) ifTrue:[
                 self paint:fg on:bg.
                 "/ self displayOpaqueString:lineWithoutColor from:index1 to:index2 x:x y:(y + fontAscent)
-                self displayString:lineWithoutColor from:index1 to:index2 x:x y:(y + fontAscent).
+                gc displayString:lineWithoutColor from:index1 to:index2 x:x y:(y + fontAscent).
 
                 checkedLinesForWidthOfContentsComputation == 0 ifTrue:[
                     self updateWidthOfWidestLineFor:lineWithoutColor
@@ -2450,49 +2446,49 @@
     stopLine := self visibleLineOfY:(y + h).
 
     saveClip := gc clippingBoundsOrNil.
-    self clippingRectangle:(Rectangle left:x top:y width:w height:h).
-    self paint:bgColor.
-    self fillRectangleX:x y:y width:w height:h.
+    self clippingBounds:(Rectangle left:x top:y width:w height:h).
+    gc paint:bgColor.
+    gc fillRectangleX:x y:y width:w height:h.
     backgroundAlreadyClearedColor := bgColor.
 
     (includesNonStrings or:[w > (width // 4 * 3)]) ifTrue:[
-	"includes non strings or area is big enough: redraw whole lines"
-	self redrawFromVisibleLine:startLine to:stopLine
+        "includes non strings or area is big enough: redraw whole lines"
+        self redrawFromVisibleLine:startLine to:stopLine
     ] ifFalse:[
-	line := self visibleAt:startLine.
-
-	(fontIsFixedWidth and:[line isSingleByteString]) ifFalse:[
-	    "start/end col has to be computed for each line"
-
-	    startLine to:stopLine do:[:i |
-		startCol := self colOfX:x inVisibleLine:i.
-		endCol := self colOfX:(x + w) inVisibleLine:i.
-		startCol > 0 ifTrue:[
-		    endCol > 0 ifTrue:[
-			self redrawVisibleLine:i from:startCol to:endCol
-		    ]
-		]
-	    ]
-	] ifTrue:[
-	    "start/end col is the same for all lines"
-	    startCol := self colOfX:x inVisibleLine:startLine.
-	    endCol := self colOfX:(x + w) inVisibleLine:startLine.
-	    startCol > 0 ifTrue:[
-		endCol > 0 ifTrue:[
-		    startLine to:stopLine do:[:i |
-			line := self visibleAt:i.
-			(line isSingleByteString) ifTrue:[
-			    self redrawVisibleLine:i from:startCol to:endCol
-			] ifFalse:[
-			    self redrawVisibleLine:i
-			]
-		    ]
-		]
-	    ]
-	]
+        line := self visibleAt:startLine.
+
+        (fontIsFixedWidth and:[line isSingleByteString]) ifFalse:[
+            "start/end col has to be computed for each line"
+
+            startLine to:stopLine do:[:i |
+                startCol := self colOfX:x inVisibleLine:i.
+                endCol := self colOfX:(x + w) inVisibleLine:i.
+                startCol > 0 ifTrue:[
+                    endCol > 0 ifTrue:[
+                        self redrawVisibleLine:i from:startCol to:endCol
+                    ]
+                ]
+            ]
+        ] ifTrue:[
+            "start/end col is the same for all lines"
+            startCol := self colOfX:x inVisibleLine:startLine.
+            endCol := self colOfX:(x + w) inVisibleLine:startLine.
+            startCol > 0 ifTrue:[
+                endCol > 0 ifTrue:[
+                    startLine to:stopLine do:[:i |
+                        line := self visibleAt:i.
+                        (line isSingleByteString) ifTrue:[
+                            self redrawVisibleLine:i from:startCol to:endCol
+                        ] ifFalse:[
+                            self redrawVisibleLine:i
+                        ]
+                    ]
+                ]
+            ]
+        ]
     ].
     backgroundAlreadyClearedColor := nil.
-    self clippingRectangle:saveClip.
+    self clippingBounds:saveClip.
 !
 
 sizeChanged:how
--- a/Make.proto	Mon Jan 16 19:58:26 2017 +0000
+++ b/Make.proto	Wed Jan 25 17:40:20 2017 +0000
@@ -148,6 +148,7 @@
 $(OUTDIR)stx_libwidg.$(O) stx_libwidg.$(C) stx_libwidg.$(H): stx_libwidg.st $(INCLUDE_TOP)/stx/libbasic/LibraryDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/ProjectDefinition.$(H) $(STCHDR)
 $(OUTDIR)Button.$(O) Button.$(C) Button.$(H): Button.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/DisplaySurface.$(H) $(INCLUDE_TOP)/stx/libview/GraphicsMedium.$(H) $(INCLUDE_TOP)/stx/libview/SimpleView.$(H) $(INCLUDE_TOP)/stx/libview/View.$(H) $(INCLUDE_TOP)/stx/libwidg/Label.$(H) $(STCHDR)
 $(OUTDIR)CheckLabel.$(O) CheckLabel.$(C) CheckLabel.$(H): CheckLabel.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/DisplaySurface.$(H) $(INCLUDE_TOP)/stx/libview/GraphicsMedium.$(H) $(INCLUDE_TOP)/stx/libview/SimpleView.$(H) $(INCLUDE_TOP)/stx/libview/View.$(H) $(INCLUDE_TOP)/stx/libwidg/Label.$(H) $(STCHDR)
+$(OUTDIR)DragRectangleController.$(O) DragRectangleController.$(C) DragRectangleController.$(H): DragRectangleController.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/Controller.$(H) $(INCLUDE_TOP)/stx/libwidg/ButtonController.$(H) $(STCHDR)
 $(OUTDIR)EnterBox.$(O) EnterBox.$(C) EnterBox.$(H): EnterBox.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/DisplaySurface.$(H) $(INCLUDE_TOP)/stx/libview/GraphicsMedium.$(H) $(INCLUDE_TOP)/stx/libview/ModalBox.$(H) $(INCLUDE_TOP)/stx/libview/SimpleView.$(H) $(INCLUDE_TOP)/stx/libview/StandardSystemView.$(H) $(INCLUDE_TOP)/stx/libview/TopView.$(H) $(INCLUDE_TOP)/stx/libview/View.$(H) $(INCLUDE_TOP)/stx/libwidg/DialogBox.$(H) $(STCHDR)
 $(OUTDIR)FontPanel.$(O) FontPanel.$(C) FontPanel.$(H): FontPanel.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/DisplaySurface.$(H) $(INCLUDE_TOP)/stx/libview/GraphicsMedium.$(H) $(INCLUDE_TOP)/stx/libview/ModalBox.$(H) $(INCLUDE_TOP)/stx/libview/SimpleView.$(H) $(INCLUDE_TOP)/stx/libview/StandardSystemView.$(H) $(INCLUDE_TOP)/stx/libview/TopView.$(H) $(INCLUDE_TOP)/stx/libview/View.$(H) $(INCLUDE_TOP)/stx/libwidg/DialogBox.$(H) $(STCHDR)
 $(OUTDIR)HVScrollableView.$(O) HVScrollableView.$(C) HVScrollableView.$(H): HVScrollableView.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/DisplaySurface.$(H) $(INCLUDE_TOP)/stx/libview/GraphicsMedium.$(H) $(INCLUDE_TOP)/stx/libview/SimpleView.$(H) $(INCLUDE_TOP)/stx/libwidg/ScrollableView.$(H) $(STCHDR)
--- a/Make.spec	Mon Jan 16 19:58:26 2017 +0000
+++ b/Make.spec	Wed Jan 25 17:40:20 2017 +0000
@@ -75,6 +75,7 @@
 	stx_libwidg \
 	Button \
 	CheckLabel \
+	DragRectangleController \
 	EnterBox \
 	FontPanel \
 	HVScrollableView \
@@ -153,6 +154,7 @@
     $(OUTDIR_SLASH)stx_libwidg.$(O) \
     $(OUTDIR_SLASH)Button.$(O) \
     $(OUTDIR_SLASH)CheckLabel.$(O) \
+    $(OUTDIR_SLASH)DragRectangleController.$(O) \
     $(OUTDIR_SLASH)EnterBox.$(O) \
     $(OUTDIR_SLASH)FontPanel.$(O) \
     $(OUTDIR_SLASH)HVScrollableView.$(O) \
--- a/MenuView.st	Mon Jan 16 19:58:26 2017 +0000
+++ b/MenuView.st	Wed Jan 25 17:40:20 2017 +0000
@@ -1619,8 +1619,8 @@
     x := (self xOfCol:markIndex inVisibleLine:visLineNr) - viewOrigin x.
     y := (self yOfVisibleLine:visLineNr) - (lineSpacing//2).
 
-    self paint:bg.
-    self fillRectangleX:margin y:y width:(width-(margin*2)) height:fontHeight.
+    gc paint:bg.
+    gc fillRectangleX:margin y:y width:(width-(margin*2)) height:fontHeight.
     markIndex ~~ 1 ifTrue:[
         super drawVisibleLine:visLineNr from:1 to:(markIndex-1) with:fg and:bg.
     ].
@@ -1648,30 +1648,30 @@
     ].
 
     self drawLine:(line copyFrom:markIndex+2) fromX:x+w inVisible:visLineNr with:fg and:bg.
-    self paint:(check ifTrue:[checkColor == bg ifTrue:[fg] ifFalse:[checkColor]] ifFalse:[fg]).
+    gc paint:(check ifTrue:[checkColor == bg ifTrue:[fg] ifFalse:[checkColor]] ifFalse:[fg]).
 
     h := gc font ascent.
-    y := y + (gc font height - h // 2).
+    y := y + ((gc font height - h) // 2).
     yB := y + h - 1.
 
     form notNil ifTrue:[
-        self displayForm:form x:x y:y
+        gc displayForm:form x:x y:y
     ] ifFalse:[
         (markType == $c) ifTrue:[
             check ifTrue:[
                 xR := x + (w // 3).
-                self displayLineFromX:x y:(y + (h // 2)) toX:xR y:yB.
-                self displayLineFromX:xR y:yB toX:(x + w - 1) y:y
+                gc displayLineFromX:x y:(y + (h // 2)) toX:xR y:yB.
+                gc displayLineFromX:xR y:yB toX:(x + w - 1) y:y
             ]
         ] ifFalse:[
             (markType == $b) ifTrue:[
                 check ifTrue:[
                     xR := x + w - 2.
-                    self displayLineFromX:x y:y toX:xR y:yB.
-                    self displayLineFromX:xR y:y toX:x y:yB.
+                    gc displayLineFromX:x y:y toX:xR y:yB.
+                    gc displayLineFromX:xR y:y toX:x y:yB.
                 ].
-                self paint:fg.
-                self displayRectangleX:x y:y width:h height:h.
+                gc paint:fg.
+                gc displayRectangleX:x y:y width:h height:h.
             ]
         ].
     ].
@@ -1727,7 +1727,7 @@
 
 
     hilightStyle ~~ #openwin ifTrue:[
-	^ super drawVisibleLineSelected:visLineNr with:fg and:bg.
+        ^ super drawVisibleLineSelected:visLineNr with:fg and:bg.
     ].
 
     "
@@ -1736,66 +1736,66 @@
     listLine := self visibleLineToListLine:visLineNr.
     listLine notNil ifTrue:[
 
-	self drawVisibleLine:visLineNr with:fg and:bg.
-
-	y := (self yOfVisibleLine:visLineNr)  - (lineSpacing//2).
-	y2 := y + fontHeight - 1.
-	r2 := fontHeight.
-	radius := r2 // 2.
-	rI := 0. "/ 2.
-	lI := 1. "/ 2.
-
-	"
-	 refill with normal bg, where arcs will be drawn below
-	"
-	self paint:bgColor.
-	self fillRectangleX:margin y:y width:radius height:fontHeight.
-	self fillRectangleX:width-radius-margin y:y width:radius height:fontHeight.
-	"
-	 fill the arcs
-	"
-	self paint:hilightBgColor.
-	self fillArcX:margin+lI            y:y width:r2 height:r2+rI from:90 angle:180. 
-	self fillArcX:width-r2-rI-margin-1 y:y width:r2 height:r2+rI from:270 angle:180. 
-
-	"
-	 a highlight-border around
-	"
-	hilightFrameColor notNil ifTrue:[
-	    self paint:hilightFrameColor.
-	    self displayLineFromX:radius+2 y:y toX:width-radius-3 y:y.
-	    self displayLineFromX:radius+2 y:y2 toX:width-radius-3 y:y2.
-
-	    self displayArcX:margin+lI y:y width:r2 height:r2+rI from:90 angle:180. 
-	    self displayArcX:width-r2-rI-margin-1 y:y width:r2 height:r2+rI from:270 angle:180. 
-	    ^ self
-	].
-
-	"
-	 an edge around
-	"
-	(hilightLevel ~~ 0) ifTrue:[
-	    (hilightLevel < 0) ifTrue:[
-		topLeftColor := shadowColor.
-		botRightColor := lightColor.
-	    ] ifFalse:[
-		topLeftColor := lightColor.
-		botRightColor := shadowColor.
-	    ].
-
-	    self paint:topLeftColor.
-	    self displayLineFromX:radius+2 y:y toX:width-radius-3 y:y.
-
-	    self displayArcX:margin+lI y:y width:r2 height:r2+rI-1 from:90 angle:125. 
-	    self displayArcX:width-r2-rI-margin-1 y:y width:r2 height:r2+rI-1 from:270+125 angle:55. 
-
-	    self paint:botRightColor.
-
-	    self displayLineFromX:radius+2 y:y2 toX:width-radius-3 y:y2.
-	    self displayArcX:margin+lI y:y width:r2 height:r2+rI-1 from:90+125 angle:55. 
-	    self displayArcX:width-r2-rI-margin-1 y:y width:r2 height:r2+rI-1 from:270 angle:125. 
-	].
-	^ self
+        self drawVisibleLine:visLineNr with:fg and:bg.
+
+        y := (self yOfVisibleLine:visLineNr)  - (lineSpacing//2).
+        y2 := y + fontHeight - 1.
+        r2 := fontHeight.
+        radius := r2 // 2.
+        rI := 0. "/ 2.
+        lI := 1. "/ 2.
+
+        "
+         refill with normal bg, where arcs will be drawn below
+        "
+        gc paint:bgColor.
+        gc fillRectangleX:margin y:y width:radius height:fontHeight.
+        gc fillRectangleX:width-radius-margin y:y width:radius height:fontHeight.
+        "
+         fill the arcs
+        "
+        gc paint:hilightBgColor.
+        gc fillArcX:margin+lI            y:y width:r2 height:r2+rI from:90 angle:180. 
+        gc fillArcX:width-r2-rI-margin-1 y:y width:r2 height:r2+rI from:270 angle:180. 
+
+        "
+         a highlight-border around
+        "
+        hilightFrameColor notNil ifTrue:[
+            gc paint:hilightFrameColor.
+            gc displayLineFromX:radius+2 y:y toX:width-radius-3 y:y.
+            gc displayLineFromX:radius+2 y:y2 toX:width-radius-3 y:y2.
+
+            gc displayArcX:margin+lI y:y width:r2 height:r2+rI from:90 angle:180. 
+            gc displayArcX:width-r2-rI-margin-1 y:y width:r2 height:r2+rI from:270 angle:180. 
+            ^ self
+        ].
+
+        "
+         an edge around
+        "
+        (hilightLevel ~~ 0) ifTrue:[
+            (hilightLevel < 0) ifTrue:[
+                topLeftColor := shadowColor.
+                botRightColor := lightColor.
+            ] ifFalse:[
+                topLeftColor := lightColor.
+                botRightColor := shadowColor.
+            ].
+
+            gc paint:topLeftColor.
+            gc displayLineFromX:radius+2 y:y toX:width-radius-3 y:y.
+
+            gc displayArcX:margin+lI y:y width:r2 height:r2+rI-1 from:90 angle:125. 
+            gc displayArcX:width-r2-rI-margin-1 y:y width:r2 height:r2+rI-1 from:270+125 angle:55. 
+
+            gc paint:botRightColor.
+
+            gc displayLineFromX:radius+2 y:y2 toX:width-radius-3 y:y2.
+            gc displayArcX:margin+lI y:y width:r2 height:r2+rI-1 from:90+125 angle:55. 
+            gc displayArcX:width-r2-rI-margin-1 y:y width:r2 height:r2+rI-1 from:270 angle:125. 
+        ].
+        ^ self
     ].
     ^ super drawVisibleLine:visLineNr with:fg and:bg
 
@@ -2748,8 +2748,8 @@
 
     y := self yOfVisibleLine:visLineNr.
 
-    self paint:bgColor.
-    self fillRectangleX:0 y:y width:width height:fontHeight.
+    gc paint:bgColor.
+    gc fillRectangleX:0 y:y width:width height:fontHeight.
 
     isSeparatingLine ifTrue:[
         y := y + (fontHeight // 2).
@@ -2760,11 +2760,11 @@
         right := width - 1 - lineInset.
 
         lineLevel == 0 ifTrue:[
-            self paint:fgColor.
-            self displayLineFromX:lineInset y:y toX:right y:y.
+            gc paint:fgColor.
+            gc displayLineFromX:lineInset y:y toX:right y:y.
             isDoubleLine ifTrue:[
                 y := y + (fontHeight // 4).
-                self displayLineFromX:lineInset y:y toX:right y:y
+                gc displayLineFromX:lineInset y:y toX:right y:y
             ]
         ] ifFalse:[
             "the inset on each side"
@@ -2777,17 +2777,17 @@
                 clr2 := shadowColor.
             ].
 
-            self paint:clr1.
-            self displayLineFromX:lineInset y:y toX:right y:y.
-            self paint:clr2.
+            gc paint:clr1.
+            gc displayLineFromX:lineInset y:y toX:right y:y.
+            gc paint:clr2.
             y := y + 1.
-            self displayLineFromX:lineInset y:y toX:right y:y.
+            gc displayLineFromX:lineInset y:y toX:right y:y.
             isDoubleLine ifTrue:[
                 y := y + (fontHeight // 4).
-                self displayLineFromX:lineInset y:y toX:right y:y.
+                gc displayLineFromX:lineInset y:y toX:right y:y.
                 y := y - 1.
-                self paint:clr1.
-                self displayLineFromX:lineInset y:y toX:right y:y.
+                gc paint:clr1.
+                gc displayLineFromX:lineInset y:y toX:right y:y.
             ]
         ]
     ]
--- a/ObjectView.st	Mon Jan 16 19:58:26 2017 +0000
+++ b/ObjectView.st	Wed Jan 25 17:40:20 2017 +0000
@@ -1138,16 +1138,16 @@
      Extracted into a separate method to allow easier redefinition
      (different lineWidth etc)"
 
-    self clippedByChildren:false.
-
-    self xoring:[
-        self lineWidth:0. 
+    gc clippedByChildren:false.
+
+    gc xoring:[
+        gc lineWidth:0. 
 "/        self lineStyle:#dashed.
-        self displayRectangle:dragObject.
+        gc displayRectangle:dragObject.
 "/        self lineStyle:#solid.
     ].
 
-    self clippedByChildren:true.
+    gc clippedByChildren:true.
 
     "Modified: 3.6.1996 / 10:02:22 / cg"
 !
@@ -1202,11 +1202,11 @@
         oldClip notNil ifTrue:[
             vis := vis intersect:oldClip
         ].
-        self clippingRectangle:vis.
+        self clippingBounds:vis.
 
         self redrawObjectsAbove:anObject intersecting:vis.
 
-        self clippingRectangle:oldClip
+        self clippingBounds:oldClip
     ]
 
     "Modified: 28.5.1996 / 19:57:06 / cg"
@@ -1225,11 +1225,11 @@
         oldClip notNil ifTrue:[
             vis := vis intersect:oldClip
         ].
-        self clippingRectangle:vis.
+        self clippingBounds:vis.
 
         self redrawObjectsAbove:anObject intersectingVisible:vis.
 
-        self clippingRectangle:oldClip
+        self clippingBounds:oldClip
     ]
 
     "Modified: 28.5.1996 / 19:56:44 / cg"
@@ -1270,12 +1270,12 @@
         oldClip notNil ifTrue:[
             visRect := visRect intersect:oldClip
         ].
-        self clippingRectangle:visRect.
+        self clippingBounds:visRect.
 
         self clearRectangle:visRect.
         self redrawObjectsIntersecting:visRect.
 
-        self clippingRectangle:oldClip
+        self clippingBounds:oldClip
     ]
 
     "Modified: 28.5.1996 / 19:56:20 / cg"
@@ -1301,14 +1301,14 @@
 "/            ]
         ].
 
-        self clippingRectangle:vis.
+        self clippingBounds:vis.
 
         "/ no clear background; already done in redrawX:y:width:height:
         "/ self clearRectangle:vis.
 
         self redrawObjectsIntersecting:vis.
 
-        self clippingRectangle:oldClip
+        self clippingBounds:oldClip
     ]
 
     "Modified: 28.5.1996 / 19:55:47 / cg"
@@ -2808,10 +2808,8 @@
 
     hsize := self handleSize.
     halfSize := hsize // 2.
-    self fillRectangleX:(aPoint x - halfSize)
-		      y:(aPoint y - halfSize)
-		  width:hsize 
-		 height:hsize
+    gc fillRectangleX:(aPoint x - halfSize) y:(aPoint y - halfSize)
+       width:hsize height:hsize
 !
 
 drawHandlesFor:anObject
@@ -2820,10 +2818,8 @@
     hsize := self handleSize.
     halfSize := hsize // 2.
     self handlesOf:anObject do:[:handlePoint |
-        self fillRectangleX:(handlePoint x - halfSize)
-                          y:(handlePoint y - halfSize)
-                      width:hsize 
-                     height:hsize
+        gc fillRectangleX:(handlePoint x - halfSize) y:(handlePoint y - halfSize)
+           width:hsize height:hsize
     ]
 !
 
--- a/PullDownMenu.st	Mon Jan 16 19:58:26 2017 +0000
+++ b/PullDownMenu.st	Wed Jan 25 17:40:20 2017 +0000
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 1989 by Claus Gittinger
 	      All Rights Reserved
@@ -946,8 +944,8 @@
     ].
     w := w + (wSpace * 2).
 
-    self paint:bg.
-    self fillRectangleX:x y:0 width:w height:height.
+    gc paint:bg.
+    gc fillRectangleX:x y:0 width:w height:height.
 
     self is3D ifTrue:[
         self drawEdgesForX:x y:0
@@ -955,10 +953,10 @@
                     height:height
                      level:(selected ifTrue:[onLevel] ifFalse:[offLevel])
     ].
-    self paint:fg on:bg.
+    gc paint:fg on:bg.
     x := x + wSpace.
     stringOrImage isString ifTrue:[
-        self displayOpaqueString:stringOrImage x:x y:y
+        gc displayOpaqueString:stringOrImage x:x y:y
     ] ifFalse:[
         stringOrImage isImageOrForm ifTrue:[
             stringOrImage depth == 1 ifTrue:[
@@ -966,12 +964,12 @@
                     map at:1 put:((map at:1) onDevice:device).
                     map at:2 put:((map at:2) onDevice:device).
 
-                    self paint:(map at:2) on:(map at:1).
-                    self displayOpaqueForm:stringOrImage x:x y:y.
+                    gc paint:(map at:2) on:(map at:1).
+                    gc displayOpaqueForm:stringOrImage x:x y:y.
                     ^ self
                 ]
             ].
-            self displayForm:stringOrImage x:x y:y
+            gc displayForm:stringOrImage x:x y:y
         ] ifFalse:[
             stringOrImage displayOn:self x:x y:y
         ]
@@ -1009,15 +1007,15 @@
         x := x + wSpace + wSpace.
         showSeparatingLines ifTrue:[
             self is3D ifTrue:[
-                self paint:shadowColor.
-                self displayLineFromX:x y:0 toX:x y:y.
+                gc paint:shadowColor.
+                gc displayLineFromX:x y:0 toX:x y:y.
                 x := x + 1.
                 clr := lightColor.
             ] ifFalse:[
                 clr := fgColor.
             ].
-            self paint:clr.
-            self displayLineFromX:x y:0 toX:x y:y.
+            gc paint:clr.
+            gc displayLineFromX:x y:0 toX:x y:y.
             x := x + 1
         ].
         index := index + 1
--- a/Scroller.st	Mon Jan 16 19:58:26 2017 +0000
+++ b/Scroller.st	Wed Jan 25 17:40:20 2017 +0000
@@ -1095,16 +1095,16 @@
     self paint:color1.
     x1 = x2 ifTrue:[
         "/ vertical
-        self displayLineFromX:x1 y:y1-dl toX:x2 y:y2-dl.
-        self paint:color2.
+        gc displayLineFromX:x1 y:y1-dl toX:x2 y:y2-dl.
+        gc paint:color2.
         x := x1 + 1.
-        self displayLineFromX:x y:y1 toX:x y:y2.
+        gc displayLineFromX:x y:y1 toX:x y:y2.
     ] ifFalse:[
         "/ horizontal
-        self displayLineFromX:x1-dl y:y1 toX:x2-dl y:y2.
-        self paint:color2.
+        gc displayLineFromX:x1-dl y:y1 toX:x2-dl y:y2.
+        gc paint:color2.
         y := y1 + 1.
-        self displayLineFromX:x1 y:y toX:x2 y:y.
+        gc displayLineFromX:x1 y:y toX:x2 y:y.
     ].
 !
 
@@ -1113,12 +1113,12 @@
 
     thumbShadowColor := thumbShadowColor onDevice:device.
 
-    self paint:thumbShadowColor.
-    self displayForm:shadowForm x:x y:y.
+    gc paint:thumbShadowColor.
+    gc displayForm:shadowForm x:x y:y.
     lightForm notNil ifTrue:[
         thumbLightColor := thumbLightColor onDevice:device.
-        self paint:thumbLightColor.
-        self displayForm:lightForm x:x y:y.
+        gc paint:thumbLightColor.
+        gc displayForm:lightForm x:x y:y.
     ].
 
     "Modified: / 19.5.1998 / 16:26:49 / cg"
@@ -1294,21 +1294,21 @@
                         ].
                     ].
                 ].
-                self paint:(clr2 mixed:m with:clr).
+                gc paint:(clr2 mixed:m with:clr).
                 (orientation == #vertical) ifTrue:[
-                    self displayLineFromX:(l+i-1) y:t+1 toX:(l+i-1) y:(t+h-2)
+                    gc displayLineFromX:(l+i-1) y:t+1 toX:(l+i-1) y:(t+h-2)
                 ] ifFalse:[
-                    self displayLineFromX:(l+1) y:(t+i-1) toX:(l+w-2) y:(t+i-1)
+                    gc displayLineFromX:(l+1) y:(t+i-1) toX:(l+w-2) y:(t+i-1)
                 ].
             ].
         ] ifFalse:[
-            self paint:clr.
+            gc paint:clr.
             (xpStyle and:[self isMiniScroller not]) ifTrue:[
                 "/ hack for xp
                 (orientation == #vertical) ifTrue:[
-                    self fillRectangleX:l y:t+1 width:w-2 height:h-4.
+                    gc fillRectangleX:l y:t+1 width:w-2 height:h-4.
                 ] ifFalse:[
-                    self fillRectangleX:l+1 y:t width:w-4 height:h-2.
+                    gc fillRectangleX:l+1 y:t width:w-4 height:h-2.
                 ]
             ] ifFalse:[
                 (styleSheet at:#'scroller.roundStyle' default:false) ifTrue:[
@@ -1320,11 +1320,11 @@
                             left := l+i-1.
                             right := l+w-i+1.
                             yLine := t+3-i.
-                            self displayLineFromX:left y:yLine toX:right y:yLine.    
+                            gc displayLineFromX:left y:yLine toX:right y:yLine.    
                             yLine := t+h-3-1+i. 
-                            self displayLineFromX:left y:yLine toX:right y:yLine.    
+                            gc displayLineFromX:left y:yLine toX:right y:yLine.    
                         ].
-                        self fillRectangleX:l y:t+3 width:w height:h-6.
+                        gc fillRectangleX:l y:t+3 width:w height:h-6.
                     ] ifFalse:[
                         1 to:3 do:[:i |
                             |xLine top bot|
@@ -1332,14 +1332,14 @@
                             top := t+i-1.
                             bot := t+h-i+1.
                             xLine := l+3-i.
-                            self displayLineFromX:xLine y:top toX:xLine y:bot.    
+                            gc displayLineFromX:xLine y:top toX:xLine y:bot.    
                             xLine := l+w-3-1+i. 
-                            self displayLineFromX:xLine y:top toX:xLine y:bot.    
+                            gc displayLineFromX:xLine y:top toX:xLine y:bot.    
                         ].
-                        self fillRectangleX:l+3 y:t width:w-6 height:h.
+                        gc fillRectangleX:l+3 y:t width:w-6 height:h.
                     ].
                 ] ifFalse:[
-                    self fillRectangleX:l y:t width:w height:h.
+                    gc fillRectangleX:l y:t width:w height:h.
                 ].
             ].
         ].
@@ -1368,42 +1368,42 @@
     thumbFrameColor notNil ifTrue:[
         clr2 := styleSheet colorAt:#'scroller.thumbFrameColor2'.
         clr2 notNil ifTrue:[
-            self paint:clr2.
+            gc paint:clr2.
             (orientation == #vertical) ifTrue:[
-                self displayLineFromX:l+w-2 y:t+1 toX:l+w-2 y:t+h-3.
-                self displayLineFromX:l y:t+h-3 toX:l+w-2 y:t+h-3.
+                gc displayLineFromX:l+w-2 y:t+1 toX:l+w-2 y:t+h-3.
+                gc displayLineFromX:l y:t+h-3 toX:l+w-2 y:t+h-3.
             ] ifFalse:[
-                self displayLineFromX:l+2 y:t+h-2 toX:l+w-3 y:t+h-2.
-                self displayLineFromX:l+w-3 y:t toX:l+w-3 y:t+h-2. 
+                gc displayLineFromX:l+2 y:t+h-2 toX:l+w-3 y:t+h-2.
+                gc displayLineFromX:l+w-3 y:t toX:l+w-3 y:t+h-2. 
             ].
         ].
 
         vistaStyle ifTrue:[
-            self paint:clr slightlyDarkened.
+            gc paint:clr slightlyDarkened.
         ] ifFalse:[
-            self paint:thumbFrameColor.
+            gc paint:thumbFrameColor.
         ].
         xpStyle ifTrue:[
             (orientation == #vertical) ifTrue:[
-                self displayLineFromX:l+w-1 y:t+1 toX:l+w-1 y:t+h-3.
-                self displayLineFromX:l+1 y:t+h-2 toX:l+w-2 y:t+h-2.
-                self displayLineFromX:l+w-2 y:t+h-3 toX:l+w-2 y:t+h-3.
+                gc displayLineFromX:l+w-1 y:t+1 toX:l+w-1 y:t+h-3.
+                gc displayLineFromX:l+1 y:t+h-2 toX:l+w-2 y:t+h-2.
+                gc displayLineFromX:l+w-2 y:t+h-3 toX:l+w-2 y:t+h-3.
                 "/ self displayLineFromX:l-2 y:t+h-3 toX:l-2 y:t+h-3.
             ] ifFalse:[
-                self displayLineFromX:l+2 y:t+h-1 toX:l+w-3 y:t+h-1.
-                self displayLineFromX:l+w-2 y:t+1 toX:l+w-2 y:t+h-2. 
-                self displayLineFromX:l+w-3 y:t+h-2 toX:l+w-3 y:t+h-2.
+                gc displayLineFromX:l+2 y:t+h-1 toX:l+w-3 y:t+h-1.
+                gc displayLineFromX:l+w-2 y:t+1 toX:l+w-2 y:t+h-2. 
+                gc displayLineFromX:l+w-3 y:t+h-2 toX:l+w-3 y:t+h-2.
             ].
         ] ifFalse:[
             h := h - 1.
-            self displayRectangleX:l y:t width:w height:h.
+            gc displayRectangleX:l y:t width:w height:h.
         ].
         vistaStyle ifTrue:[
-            self paint:clr lightened.
-            self displayPointX:l y:t.
-            self displayPointX:l+w-1 y:t.
-            self displayPointX:l y:t+h-1.
-            self displayPointX:l+w-1 y:t+h-1.
+            gc paint:clr lightened.
+            gc displayPointX:l y:t.
+            gc displayPointX:l+w-1 y:t.
+            gc displayPointX:l y:t+h-1.
+            gc displayPointX:l+w-1 y:t+h-1.
         ].
     ].
 
@@ -1435,18 +1435,18 @@
     |oldClip gX gY gW gH|
 
     shown ifTrue:[
-        oldClip := self clippingRectangleOrNil.
-        self clippingRectangle:(Rectangle left:x top:y width:w height:h).
-        self clearDeviceRectangleX:x y:y width:w height:h.
+        oldClip := self clippingBoundsOrNil.
+        self clippingBounds:(Rectangle left:x top:y width:w height:h).
+        gc clearDeviceRectangleX:x y:y width:w height:h.
 
         styleSheet name == #winVista ifTrue:[
-            self paint:(Color greyByte:16rE3).
+            gc paint:(Color greyByte:16rE3).
             (orientation == #vertical) ifTrue:[
-                self displayLineFromX:0 y:0 toX:0 y:height-1.
-                self displayLineFromX:1 y:0 toX:1 y:height-1.
+                gc displayLineFromX:0 y:0 toX:0 y:height-1.
+                gc displayLineFromX:1 y:0 toX:1 y:height-1.
             ] ifFalse:[
-                self displayLineFromX:0 y:0 toX:width-1 y:0.
-                self displayLineFromX:0 y:1 toX:width-1 y:1.
+                gc displayLineFromX:0 y:0 toX:width-1 y:0.
+                gc displayLineFromX:0 y:1 toX:width-1 y:1.
             ].
         ].
 
@@ -1461,20 +1461,20 @@
                     gH := frameBeforeMove height.
                 
                     ghostColor notNil ifTrue:[
-                        self paint:ghostColor.
-                        self fillRectangle:frameBeforeMove.
+                        gc paint:ghostColor.
+                        gc fillRectangle:frameBeforeMove.
                     ].
                     (ghostLevel ~~ 0) ifTrue:[
                         self drawEdgesForX:gX y:gY width:gW height:gH level:ghostLevel
                     ].
                     ghostFrameColor notNil ifTrue:[
-                        self paint:ghostFrameColor.
-                        self displayRectangleX:gX y:gY width:gW height:gH
+                        gc paint:ghostFrameColor.
+                        gc displayRectangleX:gX y:gY width:gW height:gH
                     ].
                 ]
             ]
         ].
-        self clippingRectangle:oldClip
+        self clippingBounds:oldClip
     ]
 
     "Modified: / 4.5.1999 / 18:51:53 / cg"
--- a/SelectionInListView.st	Mon Jan 16 19:58:26 2017 +0000
+++ b/SelectionInListView.st	Wed Jan 25 17:40:20 2017 +0000
@@ -1493,10 +1493,9 @@
 
     (shown and:[hilightLevel ~~ 0]) ifTrue:[
         selection == firstLineShown ifTrue:[
-           self paint:bgColor.
-           self fillRectangleX:margin y:margin
-                          width:(width - (margin * 2)) 
-                         height:(hilightLevel abs).
+           gc paint:bgColor.
+           gc fillRectangleX:margin y:margin
+              width:(width - (margin * 2)) height:(hilightLevel abs).
         ].
     ].
 
@@ -2072,25 +2071,25 @@
             "
              a line above and below
             "
-            self paint:hilightFrameColor.
-            self displayLineFromX:0 y:y toX:width y:y.
+            gc paint:hilightFrameColor.
+            gc displayLineFromX:0 y:y toX:width y:y.
             y2 := y + fontHeight - 1.
-            self displayLineFromX:0 y:y2 toX:width y:y2.
+            gc displayLineFromX:0 y:y2 toX:width y:y2.
             ^ self
         ]
     ] ifFalse:[
         hilightStyle == #motif ifTrue:[
             "/ an additional line, inset by one pixel
-            self paint:fg.
-            self displayLineFromX:0 y:y+1 toX:width y:y+1.
+            gc paint:fg.
+            gc displayLineFromX:0 y:y+1 toX:width y:y+1.
             y2 := y + fontHeight - 1 - 1.
-            self displayLineFromX:0 y:y2 toX:width y:y2.
+            gc displayLineFromX:0 y:y2 toX:width y:y2.
         ] ifFalse:[
             hilightStyle == #macosx ifTrue:[
                 "/ an additional line, at the bottom
-                self paint:viewBackground.
+                gc paint:viewBackground.
                 y2 := y + fontHeight - 1.
-                self displayLineFromX:0 y:y2 toX:width y:y2.
+                gc displayLineFromX:0 y:y2 toX:width y:y2.
             ]
         ].
     ].
@@ -2150,14 +2149,14 @@
     "/ if an explicit drawing block has been defined - let it do it.
     selectedVisualBlock notNil ifTrue:[
         backgroundAlreadyClearedColor == bg ifFalse:[
-            self paint:bg.
-            self fillRectangleX:margin y:y - (lineSpacing//2)
+            gc paint:bg.
+            gc fillRectangleX:margin y:y - (lineSpacing//2)
                           width:(width - (2 * margin)) 
                          height:fontHeight.
         ].
 
         dObj := selectedVisualBlock value:self value:listLine.
-        self paint:fg on:bg.
+        gc paint:fg on:bg.
         dObj displayOn:self x:(textStartLeft-viewOrigin x) y:y + gc font ascent opaque:true.
         
         self drawSelectionHighlightFrameForItemAtY:y with:fg.
@@ -2167,9 +2166,9 @@
     strikeOut ifTrue:[
         self drawVisibleLine:visLineNr with:fgColor and:bgColor.
 
-        self paint:fgColor.
+        gc paint:fgColor.
         y := y + (fontHeight // 2).
-        self displayLineFromX:0 y:y toX:width y:y.
+        gc displayLineFromX:0 y:y toX:width y:y.
         ^ self
     ].
 
@@ -3478,14 +3477,14 @@
             y := self yOfVisibleLine:visLineNr.
 
             backgroundAlreadyClearedColor == bg ifFalse:[
-                self paint:bg.
-                self fillRectangleX:margin y:y - (lineSpacing//2)
+                gc paint:bg.
+                gc fillRectangleX:margin y:y - (lineSpacing//2)
                               width:(width - (2 * margin)) 
                              height:fontHeight.
             ].
 
             dObj := visualBlock value:self value:listLine.
-            self paint:fg on:bg.
+            gc paint:fg on:bg.
             dObj displayOn:self x:(textStartLeft - viewOrigin) x y:y + gc font ascent opaque:true.
             ^ self
         ].
--- a/TextView.st	Mon Jan 16 19:58:26 2017 +0000
+++ b/TextView.st	Wed Jan 25 17:40:20 2017 +0000
@@ -3139,11 +3139,9 @@
 
     (leftMargin ~~ 0) ifTrue:[
 	viewOrigin x <= margin ifTrue:[
-	    self paint:color.
-	    self fillRectangleX:margin-viewOrigin x
-			      y:(self yOfVisibleLine:visLine)- (lineSpacing//2)
-			  width:leftMargin
-			 height:fontHeight
+            gc paint:color.
+            gc fillRectangleX:(margin-viewOrigin) x y:(self yOfVisibleLine:visLine)- (lineSpacing//2)
+               width:leftMargin height:fontHeight
 	]
     ]
 
--- a/Toggle.st	Mon Jan 16 19:58:26 2017 +0000
+++ b/Toggle.st	Wed Jan 25 17:40:20 2017 +0000
@@ -609,9 +609,9 @@
         ] ifFalse:[
             clr := bgColor.
         ].
-        self paint:clr.
+        gc paint:clr.
         l2 := LampInset*2.
-        self 
+        gc
             fillRectangleX:x+LampInset y:y+LampInset 
             width:(self lampImageWidth) - l2 
             height:(self lampImageHeight) - l2
@@ -626,6 +626,7 @@
      drawing of the lamp is done here."
 
     shown ifFalse:[^ self].
+    
     super drawWith:fg and:bg.   "this draws the text"
 
     self drawToggleImage.
--- a/VariablePanel.st	Mon Jan 16 19:58:26 2017 +0000
+++ b/VariablePanel.st	Wed Jan 25 17:40:20 2017 +0000
@@ -1439,13 +1439,11 @@
         ]
     ].
 
-    self paint:viewBackground.
-    self lineStyle:#solid.
+    gc paint:viewBackground.
+    gc lineStyle:#solid.
 
     orientation == #vertical ifTrue:[
-        self fillRectangleX:mar y:hy 
-                      width:(width - mar - mar) 
-                     height:barHeightInt.
+        gc fillRectangleX:mar y:hy width:(width - mar - mar) height:barHeightInt.
         (handleStyle notNil
         and:[handleStyle ~~ #none]) ifTrue:[
             (handleStyle ~~ #normal 
@@ -1457,22 +1455,20 @@
                     y := hy + (barHeightInt // 2).   "/ center of the bar
 
                     separatingLine ifTrue:[
-                        self paint:shadowColor.
-                        self displayLineFromX:mar y:y toX:(width - mar) y:y.
+                        gc paint:shadowColor.
+                        gc displayLineFromX:mar y:y toX:(width - mar) y:y.
                         y := y + 1.
-                        self paint:lightColor.
-                        self displayLineFromX:mar y:y toX:(width - mar) y:y.
-                        self paint:viewBackground.
+                        gc paint:lightColor.
+                        gc displayLineFromX:mar y:y toX:(width - mar) y:y.
+                        gc paint:viewBackground.
                     ].
 
-                    self fillRectangleX:(hx - barWidthInt) 
-                                      y:hy 
-                                  width:(barWidthInt + barWidthInt) 
-                                 height:h.
+                    gc fillRectangleX:(hx - barWidthInt) y:hy 
+                       width:(barWidthInt + barWidthInt) height:h.
 
                     handleStyle == #line ifTrue:[
-                        self paint:handleColor.
-                        self displayLineFromX:hx - barWidthInt y:y toX:hx + barWidthInt y:y
+                        gc paint:handleColor.
+                        gc displayLineFromX:hx - barWidthInt y:y toX:hx + barWidthInt y:y
                     ] ifFalse:[
                         y := hy.   
                         handleStyle == #st80 ifTrue:[
@@ -1504,11 +1500,9 @@
                             ].
 
                             handleStyle == #iris ifTrue:[
-                                self paint:handleColor.
-                                self fillDeviceRectangleX:(hx - barWidthInt + 2)
-                                                        y:(ym + 2)
-                                                    width:(barWidthInt + barWidthInt - 4)
-                                                   height:h - 4
+                                gc paint:handleColor.
+                                gc fillDeviceRectangleX:(hx - barWidthInt + 2) y:(ym + 2)
+                                   width:(barWidthInt + barWidthInt - 4) height:h - 4
                             ]
                         ]
                     ].
@@ -1521,30 +1515,30 @@
 
                 handleStyle == #st80 ifTrue:[
                     y := hy - 1.
-                    self paint:lightColor.
-                    self displayLineFromX:mar y:y toX:(width - mar - mar - 1) y:y.
-                    self displayLineFromX:0 y:hy toX:0 y:(hy + knobHeight - 1).
+                    gc paint:lightColor.
+                    gc displayLineFromX:mar y:y toX:(width - mar - mar - 1) y:y.
+                    gc displayLineFromX:0 y:hy toX:0 y:(hy + knobHeight - 1).
                     y := hy + knobHeight - 2.
-                    self paint:shadowColor.
-                    self displayLineFromX:mar y:y toX:(width - mar) y:y.
+                    gc paint:shadowColor.
+                    gc displayLineFromX:mar y:y toX:(width - mar) y:y.
                         "uncomment the -1 if you don't like the notch at the right end"
                         "                            VVV"
-                    self displayLineFromX:width-1 y:hy" "-1" " toX:width-1 y:(hy + knobHeight - 1 - 1).
+                    gc displayLineFromX:width-1 y:hy" "-1" " toX:width-1 y:(hy + knobHeight - 1 - 1).
                 ].
             ] ifFalse:[
                 y := hy + barHeightInt - 1.
-                self paint:handleColor.
+                gc paint:handleColor.
                 separatingLine ifTrue:[
-                    self displayLineFromX:0 y:hy+1 toX:width y:hy+1.
-                    self displayLineFromX:0 y:y toX:width y:y.
+                    gc displayLineFromX:0 y:hy+1 toX:width y:hy+1.
+                    gc displayLineFromX:0 y:y toX:width y:y.
                 ].
-                self fillRectangleX:hx y:hy width:barWidthInt height:barHeightInt.
+                gc fillRectangleX:hx y:hy width:barWidthInt height:barHeightInt.
             ].
         ].
         lbl := self handleLabelAt:hIndex.
         lbl notNil ifTrue:[
             hIndex ~~ 1 ifTrue:[
-                self paint:self blackColor.
+                gc paint:self blackColor.
                 lbl displayOn:self x:mar y:hy + (lbl ascentOn:self)
 "/                lbl isImageOrForm ifTrue:[
 "/                    lbl displayOn:self x:mar y:hy
@@ -1555,33 +1549,30 @@
         ].
 
     ] ifFalse:[
-        self fillRectangleX:hx y:mar 
-                      width:barHeightInt
-                     height:(height - mar - mar).
+        gc fillRectangleX:hx y:mar width:barHeightInt height:(height - mar - mar).
 
         (handleStyle notNil
         and:[handleStyle ~~ #none]) ifTrue:[
             (handleStyle ~~ #normal
             and:[handleStyle ~~ #mswindows]) ifTrue:[
-                 m := (barHeightInt - w) // 2.
+                "/ m := (barHeightInt - w) // 2.
                 m := (maxKnob - w) // 2.
-                 shadowForm isNil ifTrue:[
+                shadowForm isNil ifTrue:[
                     x := hx + (barHeightInt // 2).
                     separatingLine ifTrue:[
-                        self paint:shadowColor.
-                        self displayLineFromX:x y:mar toX:x y:(height - mar).
+                        gc paint:shadowColor.
+                        gc displayLineFromX:x y:mar toX:x y:(height - mar).
                         x := x + 1.
-                        self paint:lightColor.
-                        self displayLineFromX:x y:mar toX:x y:(height - mar).
-                        self paint:viewBackground.
+                        gc paint:lightColor.
+                        gc displayLineFromX:x y:mar toX:x y:(height - mar).
+                        gc paint:viewBackground.
                     ].
-                    self fillRectangleX:hx y:(hy - barWidthInt) 
-                                  width:w 
-                                 height:(barWidthInt + barWidthInt).
+                    gc fillRectangleX:hx y:(hy - barWidthInt) 
+                       width:w height:(barWidthInt + barWidthInt).
 
                     handleStyle == #line ifTrue:[
-                        self paint:handleColor.
-                        self displayLineFromX:x y:hy - barWidthInt toX:x y:hy + barWidthInt.
+                        gc paint:handleColor.
+                        gc displayLineFromX:x y:hy - barWidthInt toX:x y:hy + barWidthInt.
                     ] ifFalse:[
                         x := hx.
                         handleStyle == #st80 ifTrue:[
@@ -1604,18 +1595,14 @@
                             ]
                         ] ifFalse:[
                             handleLevel ~~ 0 ifTrue:[
-                                self drawEdgesForX:xm
-                                                 y:(hy - barWidthInt)
-                                             width:w 
-                                            height:(barWidthInt + barWidthInt)
-                                             level:handleLevel.
+                                self drawEdgesForX:xm y:(hy - barWidthInt)
+                                     width:w height:(barWidthInt + barWidthInt)
+                                     level:handleLevel.
                             ].
                             handleStyle == #iris ifTrue:[
-                                self paint:handleColor.
-                                self fillDeviceRectangleX:(xm + 2)
-                                                        y:(hy - barWidthInt + 2)
-                                                    width:w - 4
-                                                   height:(barWidthInt + barWidthInt - 4)
+                                gc paint:handleColor.
+                                gc fillDeviceRectangleX:(xm + 2) y:(hy - barWidthInt + 2)
+                                   width:w - 4 height:(barWidthInt + barWidthInt - 4)
                             ].
                         ].
                     ]
@@ -1627,24 +1614,24 @@
                 ].
                 handleStyle == #st80 ifTrue:[
                     x := hx - 1.
-                    self paint:lightColor.
-                    self displayLineFromX:x y:mar toX:x y:(height - mar).
-                    self displayLineFromX:hx y:0 toX:(hx + barHeightInt - 1) y:0.
+                    gc paint:lightColor.
+                    gc displayLineFromX:x y:mar toX:x y:(height - mar).
+                    gc displayLineFromX:hx y:0 toX:(hx + barHeightInt - 1) y:0.
                     x := hx + barHeightInt - 2.
-                    self paint:shadowColor.
-                    self displayLineFromX:x y:mar toX:x y:(height - mar).
+                    gc paint:shadowColor.
+                    gc displayLineFromX:x y:mar toX:x y:(height - mar).
                         "uncomment the -1 if you dont like the notch at the bottom end"
                         "                   VVV"
-                    self displayLineFromX:hx" "-1" " y:height-1 toX:(hx + barHeightInt - 1) y:height-1.
+                    gc displayLineFromX:hx" "-1" " y:height-1 toX:(hx + barHeightInt - 1) y:height-1.
                 ].
             ] ifFalse:[
                 x := hx + barHeightInt - 1.
-                self paint:handleColor.
+                gc paint:handleColor.
                 separatingLine ifTrue:[
-                    self displayLineFromX:hx+1 y:0 toX:hx+1 y:height.
-                    self displayLineFromX:x y:0 toX:x y:height.
+                    gc displayLineFromX:hx+1 y:0 toX:hx+1 y:height.
+                    gc displayLineFromX:x y:0 toX:x y:height.
                 ].
-                self fillRectangleX:hx y:hy width:barHeightInt height:barWidthInt
+                gc fillRectangleX:hx y:hy width:barHeightInt height:barWidthInt
             ]
         ]
     ].
@@ -1653,17 +1640,17 @@
 !
 
 drawHandleFormAtX:hx y:hy
-    "draw a handles bitmap at hx/hy"
+    "draw a handle's bitmap at hx/hy"
 
     shadowForm notNil ifTrue:[
-        self paint:shadowColor.
-        self displayForm:shadowForm x:hx y:hy.
+        gc paint:shadowColor.
+        gc displayForm:shadowForm x:hx y:hy.
     ].
     lightForm notNil ifTrue:[
-        self paint:lightColor.
-        self displayForm:lightForm x:hx y:hy.
+        gc paint:lightColor.
+        gc displayForm:lightForm x:hx y:hy.
     ].
-    self paint:viewBackground
+    gc paint:viewBackground
 
     "Modified: 7.11.1996 / 20:25:33 / cg"
 !
@@ -1707,12 +1694,12 @@
         paint := viewBackground.
     ].
 
-    self paint:paint.
+    gc paint:paint.
 
 "/    level == 0 ifTrue:[
 "/    ].
 
-    self fillRectangleX:left+1 y:top+1 width:width-2 height:height-2.
+    gc fillRectangleX:left+1 y:top+1 width:width-2 height:height-2.
 
     level ~~ 0 ifTrue:[
         leftEdge := left + 1.
@@ -1790,15 +1777,15 @@
 
     trackLine == #dashedLine ifTrue:[
         oldStyle := gc lineStyle.
-        self lineStyle:#dashed.
+        gc lineStyle:#dashed.
     ] ifFalse:[
         trackLine == #dottedLine ifTrue:[
             oldStyle := gc lineStyle.
-            self lineStyle:#dotted.
+            gc lineStyle:#dotted.
         ]
     ].
 
-    self clippedByChildren:false.
+    gc clippedByChildren:false.
 
     self xoring:[
         |yL xL halfHeight|
@@ -1808,23 +1795,23 @@
         orientation == #vertical ifTrue:[
             yL := hy + halfHeight.
             doLine ifTrue:[
-                self displayLineFromX:0 y:yL toX:width y:yL.
+                gc displayLineFromX:0 y:yL toX:width y:yL.
             ] ifFalse:[
-                self fillRectangleX:0 y:hy width:width height:barHeight
+                gc fillRectangleX:0 y:hy width:width height:barHeight
             ]
         ] ifFalse:[
             xL := hx + halfHeight.
             doLine ifTrue:[
-                self displayLineFromX:xL y:0 toX:xL y:height.
+                gc displayLineFromX:xL y:0 toX:xL y:height.
             ] ifFalse:[
-                self fillRectangleX:hx y:0 width:barHeight height:height
+                gc fillRectangleX:hx y:0 width:barHeight height:height
             ]
         ].
     ].
-    self clippedByChildren:true.
+    gc clippedByChildren:true.
 
     oldStyle notNil ifTrue:[
-        self lineStyle:oldStyle.
+        gc lineStyle:oldStyle.
     ].
 
     "Modified: / 28.4.1997 / 14:56:26 / dq"
--- a/Windows8ToolbarIconLibrary.st	Mon Jan 16 19:58:26 2017 +0000
+++ b/Windows8ToolbarIconLibrary.st	Wed Jan 25 17:40:20 2017 +0000
@@ -1,5 +1,18 @@
+"
+ COPYRIGHT (c) 2013 by eXept Software AG
+              All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice.   This software may not
+ be provided or otherwise made available to, or used by, any
+ other person.  No title to or ownership of the software is
+ hereby transferred.
+"
 "{ Package: 'stx:libwidg' }"
 
+"{ NameSpace: Smalltalk }"
+
 VistaToolbarIconLibrary subclass:#Windows8ToolbarIconLibrary
 	instanceVariableNames:''
 	classVariableNames:''
@@ -9,6 +22,20 @@
 
 !Windows8ToolbarIconLibrary class methodsFor:'documentation'!
 
+copyright
+"
+ COPYRIGHT (c) 2013 by eXept Software AG
+              All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice.   This software may not
+ be provided or otherwise made available to, or used by, any
+ other person.  No title to or ownership of the software is
+ hereby transferred.
+"
+!
+
 documentation
 "
     ToolbarIconLibrary := Windows8ToolbarIconLibrary
@@ -95,10 +122,10 @@
 !Windows8ToolbarIconLibrary class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/Windows8ToolbarIconLibrary.st,v 1.4 2014-11-23 13:56:45 cg Exp $'
+    ^ '$Header$'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libwidg/Windows8ToolbarIconLibrary.st,v 1.4 2014-11-23 13:56:45 cg Exp $'
+    ^ '$Header$'
 ! !
 
--- a/WorkspaceCompletionSupport.st	Mon Jan 16 19:58:26 2017 +0000
+++ b/WorkspaceCompletionSupport.st	Wed Jan 25 17:40:20 2017 +0000
@@ -1,3 +1,14 @@
+"
+ COPYRIGHT (c) 2013 by eXept Software AG
+              All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice.   This software may not
+ be provided or otherwise made available to, or used by, any
+ other person.  No title to or ownership of the software is
+ hereby transferred.
+"
 "{ Package: 'stx:libwidg' }"
 
 "{ NameSpace: Smalltalk }"
@@ -11,6 +22,20 @@
 
 !WorkspaceCompletionSupport class methodsFor:'documentation'!
 
+copyright
+"
+ COPYRIGHT (c) 2013 by eXept Software AG
+              All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice.   This software may not
+ be provided or otherwise made available to, or used by, any
+ other person.  No title to or ownership of the software is
+ hereby transferred.
+"
+!
+
 documentation
 "
     A completion support using DWIM to complete code for Smalltalk (and JavaScript)
--- a/abbrev.stc	Mon Jan 16 19:58:26 2017 +0000
+++ b/abbrev.stc	Wed Jan 25 17:40:20 2017 +0000
@@ -25,6 +25,7 @@
 stx_libwidg stx_libwidg stx:libwidg '* Projects & Packages *' 3
 Button Button stx:libwidg 'Views-Interactors' 2
 CheckLabel CheckLabel stx:libwidg 'Views-Layout' 2
+DragRectangleController DragRectangleController stx:libwidg 'Interface-Support-Controllers' 0
 EnterBox EnterBox stx:libwidg 'Views-DialogBoxes' 2
 FontPanel FontPanel stx:libwidg 'Views-DialogBoxes' 2
 HVScrollableView HVScrollableView stx:libwidg 'Views-Basic' 2
--- a/bc.mak	Mon Jan 16 19:58:26 2017 +0000
+++ b/bc.mak	Wed Jan 25 17:40:20 2017 +0000
@@ -98,6 +98,7 @@
 $(OUTDIR)stx_libwidg.$(O) stx_libwidg.$(C) stx_libwidg.$(H): stx_libwidg.st $(INCLUDE_TOP)\stx\libbasic\LibraryDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\ProjectDefinition.$(H) $(STCHDR)
 $(OUTDIR)Button.$(O) Button.$(C) Button.$(H): Button.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\DisplaySurface.$(H) $(INCLUDE_TOP)\stx\libview\GraphicsMedium.$(H) $(INCLUDE_TOP)\stx\libview\SimpleView.$(H) $(INCLUDE_TOP)\stx\libview\View.$(H) $(INCLUDE_TOP)\stx\libwidg\Label.$(H) $(STCHDR)
 $(OUTDIR)CheckLabel.$(O) CheckLabel.$(C) CheckLabel.$(H): CheckLabel.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\DisplaySurface.$(H) $(INCLUDE_TOP)\stx\libview\GraphicsMedium.$(H) $(INCLUDE_TOP)\stx\libview\SimpleView.$(H) $(INCLUDE_TOP)\stx\libview\View.$(H) $(INCLUDE_TOP)\stx\libwidg\Label.$(H) $(STCHDR)
+$(OUTDIR)DragRectangleController.$(O) DragRectangleController.$(C) DragRectangleController.$(H): DragRectangleController.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\Controller.$(H) $(INCLUDE_TOP)\stx\libwidg\ButtonController.$(H) $(STCHDR)
 $(OUTDIR)EnterBox.$(O) EnterBox.$(C) EnterBox.$(H): EnterBox.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\DisplaySurface.$(H) $(INCLUDE_TOP)\stx\libview\GraphicsMedium.$(H) $(INCLUDE_TOP)\stx\libview\ModalBox.$(H) $(INCLUDE_TOP)\stx\libview\SimpleView.$(H) $(INCLUDE_TOP)\stx\libview\StandardSystemView.$(H) $(INCLUDE_TOP)\stx\libview\TopView.$(H) $(INCLUDE_TOP)\stx\libview\View.$(H) $(INCLUDE_TOP)\stx\libwidg\DialogBox.$(H) $(STCHDR)
 $(OUTDIR)FontPanel.$(O) FontPanel.$(C) FontPanel.$(H): FontPanel.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\DisplaySurface.$(H) $(INCLUDE_TOP)\stx\libview\GraphicsMedium.$(H) $(INCLUDE_TOP)\stx\libview\ModalBox.$(H) $(INCLUDE_TOP)\stx\libview\SimpleView.$(H) $(INCLUDE_TOP)\stx\libview\StandardSystemView.$(H) $(INCLUDE_TOP)\stx\libview\TopView.$(H) $(INCLUDE_TOP)\stx\libview\View.$(H) $(INCLUDE_TOP)\stx\libwidg\DialogBox.$(H) $(STCHDR)
 $(OUTDIR)HVScrollableView.$(O) HVScrollableView.$(C) HVScrollableView.$(H): HVScrollableView.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\DisplaySurface.$(H) $(INCLUDE_TOP)\stx\libview\GraphicsMedium.$(H) $(INCLUDE_TOP)\stx\libview\SimpleView.$(H) $(INCLUDE_TOP)\stx\libwidg\ScrollableView.$(H) $(STCHDR)
--- a/libInit.cc	Mon Jan 16 19:58:26 2017 +0000
+++ b/libInit.cc	Wed Jan 25 17:40:20 2017 +0000
@@ -40,6 +40,7 @@
 extern void _stx_137libwidg_Init(int pass, struct __vmData__ *__pRT__, OBJ snd);
 extern void _Button_Init(int pass, struct __vmData__ *__pRT__, OBJ snd);
 extern void _CheckLabel_Init(int pass, struct __vmData__ *__pRT__, OBJ snd);
+extern void _DragRectangleController_Init(int pass, struct __vmData__ *__pRT__, OBJ snd);
 extern void _EnterBox_Init(int pass, struct __vmData__ *__pRT__, OBJ snd);
 extern void _FontPanel_Init(int pass, struct __vmData__ *__pRT__, OBJ snd);
 extern void _HVScrollableView_Init(int pass, struct __vmData__ *__pRT__, OBJ snd);
@@ -126,6 +127,7 @@
     _stx_137libwidg_Init(pass,__pRT__,snd);
     _Button_Init(pass,__pRT__,snd);
     _CheckLabel_Init(pass,__pRT__,snd);
+    _DragRectangleController_Init(pass,__pRT__,snd);
     _EnterBox_Init(pass,__pRT__,snd);
     _FontPanel_Init(pass,__pRT__,snd);
     _HVScrollableView_Init(pass,__pRT__,snd);
--- a/stx_libwidg.st	Mon Jan 16 19:58:26 2017 +0000
+++ b/stx_libwidg.st	Wed Jan 25 17:40:20 2017 +0000
@@ -218,6 +218,7 @@
         #'stx_libwidg'
         Button
         CheckLabel
+        DragRectangleController
         EnterBox
         FontPanel
         HVScrollableView
--- a/stx_libwidgWINrc.rc	Mon Jan 16 19:58:26 2017 +0000
+++ b/stx_libwidgWINrc.rc	Wed Jan 25 17:40:20 2017 +0000
@@ -3,7 +3,7 @@
 // automagically generated from the projectDefinition: stx_libwidg.
 //
 VS_VERSION_INFO VERSIONINFO
-  FILEVERSION     7,1,1,46
+  FILEVERSION     7,1,1,50
   PRODUCTVERSION  7,1,0,0
 #if (__BORLANDC__)
   FILEFLAGSMASK   VS_FF_DEBUG | VS_FF_PRERELEASE
@@ -18,14 +18,14 @@
   BEGIN
     BLOCK "040904E4"
     BEGIN
-      VALUE "CompanyName", "eXept Software AG\0"
+      VALUE "CompanyName", "Claus Gittinger / eXept Software AG\0"
       VALUE "FileDescription", "Smalltalk/X Elementary Widgets (LIB)\0"
-      VALUE "FileVersion", "7.1.1.46\0"
+      VALUE "FileVersion", "7.1.1.50\0"
       VALUE "InternalName", "stx:libwidg\0"
-      VALUE "LegalCopyright", "Copyright Claus Gittinger 1988-2012\nCopyright eXept Software AG 2012\0"
+      VALUE "LegalCopyright", "Copyright Claus Gittinger 1988\nCopyright eXept Software AG 2012\0"
       VALUE "ProductName", "Smalltalk/X\0"
       VALUE "ProductVersion", "7.1.0.0\0"
-      VALUE "ProductDate", "Wed, 20 Jul 2016 16:31:41 GMT\0"
+      VALUE "ProductDate", "Mon, 23 Jan 2017 10:01:33 GMT\0"
     END
 
   END