--- a/Button.st Wed Feb 25 17:14:23 2004 +0100
+++ b/Button.st Thu Feb 26 13:20:04 2004 +0100
@@ -1197,9 +1197,7 @@
and:[controller pressed]) ifTrue:[
self level:onLevel.
margin := onLevel abs max:offLevel abs.
- shown ifTrue:[
- self invalidate. "/ redraw
- ]
+ self invalidate.
]
].
@@ -1470,9 +1468,7 @@
and:[controller pressed not]) ifTrue:[
self level:offLevel.
margin := onLevel abs max:offLevel abs.
- shown ifTrue:[
- self invalidate.
- ]
+ self invalidate.
]
]
@@ -1544,9 +1540,7 @@
controller active:false.
level := offLevel.
margin := level abs.
- shown ifTrue:[
- self invalidate
- ]
+ self invalidate
]
"Modified: 8.2.1997 / 15:21:44 / cg"
@@ -1563,9 +1557,7 @@
self logo:passiveLogo
].
self turnOffWithoutRedraw.
- shown ifTrue:[
- self invalidate
- ]
+ self invalidate
]
"Created: 15.11.1995 / 16:55:37 / cg"
@@ -1604,9 +1596,7 @@
level := onLevel.
margin := level abs.
- shown ifTrue:[
- self invalidate
- ]
+ self invalidate
]
"Created: 14.11.1995 / 22:00:45 / cg"
@@ -1624,9 +1614,7 @@
self logo:activeLogo
].
self turnOnWithoutRedraw.
- shown ifTrue:[
- self invalidate
- ]
+ self invalidate
]
"Created: 15.11.1995 / 16:55:56 / cg"
@@ -1660,12 +1648,13 @@
focusLogo notNil ifTrue:[
self enabled ifTrue:[
logo := focusLogo.
- ^ self invalidate.
-"/ ^ self redraw
+ self invalidate.
+ ^ self.
]
].
(styleSheet at:#'focus.showBorder' default:true) ifFalse:[
- ^ self invalidate.
+ self invalidate.
+ ^ self.
].
super showFocus:explicit
@@ -1688,11 +1677,12 @@
] ifFalse:[
logo := passiveLogo
].
- ^ self invalidate.
-"/ ^ self redraw
+ self invalidate.
+ ^ self
].
(styleSheet at:#'focus.showBorder' default:true) ifFalse:[
- ^ self invalidate.
+ self invalidate.
+ ^ self
].
super showNoFocus:explicit
@@ -2315,5 +2305,5 @@
!Button class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/Button.st,v 1.128 2004-02-19 00:33:04 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/Button.st,v 1.129 2004-02-26 12:20:04 cg Exp $'
! !
--- a/FileSelectionList.st Wed Feb 25 17:14:23 2004 +0100
+++ b/FileSelectionList.st Thu Feb 26 13:20:04 2004 +0100
@@ -787,7 +787,7 @@
"redraw marks if any"
super sizeChanged:how.
- (shown and:[markDirectories]) ifTrue:[
+ markDirectories ifTrue:[
self invalidate
]
@@ -1079,5 +1079,5 @@
!FileSelectionList class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/FileSelectionList.st,v 1.52 2004-01-07 15:43:33 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/FileSelectionList.st,v 1.53 2004-02-26 12:19:59 cg Exp $'
! !
--- a/FramedBox.st Wed Feb 25 17:14:23 2004 +0100
+++ b/FramedBox.st Thu Feb 26 13:20:04 2004 +0100
@@ -283,9 +283,7 @@
(font ~= aFont) ifTrue:[
super font:aFont.
- shown ifTrue:[
- self invalidate
- ]
+ self invalidate
]
"Modified: / 6.6.1998 / 20:05:05 / cg"
@@ -302,9 +300,7 @@
aColor ~= fgColor ifTrue:[
fgColor := aColor.
- shown ifTrue:[
- self invalidateRepairNow:true
- ]
+ self invalidateRepairNow:true
]
"Modified: / 6.6.1998 / 19:23:14 / cg"
@@ -370,9 +366,7 @@
] ifFalse:[
label := aStringOrImage.
].
- shown ifTrue:[
- self invalidateRepairNow:true
- ]
+ self invalidateRepairNow:true
]
"Modified: / 5.9.1995 / 17:20:05 / claus"
@@ -394,9 +388,7 @@
labelPosition ~~ aSymbol ifTrue:[
labelPosition := aSymbol.
- shown ifTrue:[
- self invalidate
- ]
+ self invalidate
]
"Modified: / 6.6.1998 / 20:04:22 / cg"
@@ -450,9 +442,7 @@
aBoolean ~~ showFrame ifTrue:[
showFrame := aBoolean.
- shown ifTrue:[
- self invalidate
- ]
+ self invalidate
]
"Modified: / 6.6.1998 / 20:03:50 / cg"
@@ -644,9 +634,7 @@
!FramedBox methodsFor:'event handling'!
sizeChanged:how
- shown ifTrue:[
- self invalidate.
- ].
+ self invalidate.
super sizeChanged:how
"Modified: 8.2.1997 / 15:19:52 / cg"
@@ -771,5 +759,5 @@
!FramedBox class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/FramedBox.st,v 1.45 2002-09-12 13:58:54 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/FramedBox.st,v 1.46 2004-02-26 12:19:52 cg Exp $'
! !
--- a/Label.st Wed Feb 25 17:14:23 2004 +0100
+++ b/Label.st Thu Feb 26 13:20:04 2004 +0100
@@ -927,9 +927,7 @@
self class == Label ifTrue:[
super viewBackground:bgColor
].
- shown ifTrue:[
- self invalidateRepairNow:true
- ]
+ self invalidateRepairNow:true
]
"Modified: / 15.1.1998 / 00:14:10 / stefan"
@@ -950,9 +948,7 @@
etchedFgColor notNil ifTrue:[
etchedFgColor := etchedFgColor onDevice:device.
].
- shown ifTrue:[
- self invalidateRepairNow:true
- ]
+ self invalidateRepairNow:true
].
!
@@ -967,9 +963,7 @@
aColor ~~ fgColor ifTrue:[
fgColor := aColor onDevice:device.
- shown ifTrue:[
- self invalidateRepairNow:true
- ]
+ self invalidateRepairNow:true
].
"Modified: / 15.1.1998 / 00:14:22 / stefan"
@@ -985,9 +979,7 @@
self class == Label ifTrue:[
super viewBackground:bgColor
].
- shown ifTrue:[
- self invalidateRepairNow:true
- ]
+ self invalidateRepairNow:true
].
"Modified: / 15.1.1998 / 00:14:36 / stefan"
@@ -1038,9 +1030,7 @@
logo isImageOrForm ifTrue:[
logo extent = aStringOrFormOrImage extent ifTrue:[
logo := aStringOrFormOrImage.
- shown ifTrue:[
- self invalidateRepairNow:true
- ].
+ self invalidateRepairNow:true.
^ self
]
]
@@ -1557,9 +1547,7 @@
self resize
].
self computeLabelOrigin.
- shown ifTrue:[
- self invalidateRepairNow:false
- ]
+ self invalidate
"Modified: / 6.6.1998 / 19:23:45 / cg"
! !
@@ -1839,5 +1827,5 @@
!Label class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/Label.st,v 1.122 2003-05-07 14:59:32 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/Label.st,v 1.123 2004-02-26 12:19:37 cg Exp $'
! !
--- a/ListView.st Wed Feb 25 17:14:23 2004 +0100
+++ b/ListView.st Thu Feb 26 13:20:04 2004 +0100
@@ -1247,11 +1247,9 @@
"set the background color of the contents"
bgColor ~~ aColor ifTrue:[
- bgColor := aColor.
- self viewBackground:bgColor.
- shown ifTrue:[
- self invalidate "/ clear; redraw
- ]
+ bgColor := aColor.
+ self viewBackground:bgColor.
+ self invalidate "/ clear; redraw
]
"Modified: 3.5.1997 / 10:27:40 / cg"
@@ -1308,10 +1306,8 @@
"set the foreground color"
fgColor ~~ aColor ifTrue:[
- fgColor := aColor.
- shown ifTrue:[
- self invalidate
- ]
+ fgColor := aColor.
+ self invalidate
]
"Modified: 29.5.1996 / 16:19:02 / cg"
@@ -1321,11 +1317,9 @@
"set both foreground and background colors"
((fgColor ~~ color1) or:[bgColor ~~ color2]) ifTrue:[
- fgColor := color1.
- bgColor := color2.
- shown ifTrue:[
- self invalidate
- ]
+ fgColor := color1.
+ bgColor := color2.
+ self invalidate
]
"Modified: 29.5.1996 / 16:19:05 / cg"
@@ -4449,5 +4443,5 @@
!ListView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/ListView.st,v 1.291 2004-02-25 16:13:43 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/ListView.st,v 1.292 2004-02-26 12:19:25 cg Exp $'
! !
--- a/ObjectView.st Wed Feb 25 17:14:23 2004 +0100
+++ b/ObjectView.st Thu Feb 26 13:20:04 2004 +0100
@@ -3273,9 +3273,7 @@
gridShown ifTrue:[
self newGrid
].
- shown ifTrue:[
- self invalidate "/ clear; redraw
- ].
+ self invalidate "/ clear; redraw
"Modified: 29.5.1996 / 16:20:41 / cg"
!
@@ -3325,5 +3323,5 @@
!ObjectView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/ObjectView.st,v 1.99 2003-07-31 08:28:52 tm Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/ObjectView.st,v 1.100 2004-02-26 12:19:06 cg Exp $'
! !
--- a/PullDownMenu.st Wed Feb 25 17:14:23 2004 +0100
+++ b/PullDownMenu.st Thu Feb 26 13:20:04 2004 +0100
@@ -652,9 +652,7 @@
].
titles at:index put:e
].
- shown ifTrue:[
- self invalidate "/ clear; redraw
- ]
+ self invalidate "/ clear; redraw
"Modified: 29.5.1996 / 16:21:00 / cg"
!
@@ -1805,5 +1803,5 @@
!PullDownMenu class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/PullDownMenu.st,v 1.97 2004-01-29 23:00:26 ca Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/PullDownMenu.st,v 1.98 2004-02-26 12:19:01 cg Exp $'
! !
--- a/Scroller.st Wed Feb 25 17:14:23 2004 +0100
+++ b/Scroller.st Thu Feb 26 13:20:04 2004 +0100
@@ -578,30 +578,19 @@
nBg := nBg onDevice:device.
nBg ~~ viewBackground ifTrue:[
self viewBackground:nBg.
- shown ifTrue:[self invalidate].
+ self invalidate.
]
].
shown ifTrue:[
- "/ thumbFrame := nil.
oldFrame := thumbFrame.
self computeThumbFrame.
oldFrame ~= thumbFrame ifTrue:[
self invalidate.
]
-
-"/ self computeThumbFrame.
-"/ (fixThumbHeight or:[oldFrame ~= thumbFrame]) ifTrue:[
-"/ oldFrame notNil ifTrue:[
-"/ self drawThumbBackgroundInX:(oldFrame left)
-"/ y:(oldFrame top)
-"/ width:(oldFrame width)
-"/ height:(oldFrame height).
-"/ ].
-"/ self drawThumb
-"/ ]
] ifFalse:[
- thumbFrame := nil
+ thumbFrame := nil.
+ self invalidate.
]
]
@@ -637,155 +626,146 @@
bgLeft bgTop bgWidth bgHeight|
aNumber isNil ifTrue:[
- newOrigin := 0
+ newOrigin := 0
] ifFalse:[
- org := aNumber.
- rangeStep notNil ifTrue:[
- org := org roundTo:rangeStep.
- rangeStep isInteger ifTrue:[
- org := org asInteger
- ]
- ].
- newOrigin := (org - rangeStart) asFloat / (rangeEnd - rangeStart / 100).
+ org := aNumber.
+ rangeStep notNil ifTrue:[
+ org := org roundTo:rangeStep.
+ rangeStep isInteger ifTrue:[
+ org := org asInteger
+ ]
+ ].
+ newOrigin := (org - rangeStart) asFloat / (rangeEnd - rangeStart / 100).
].
((newOrigin + thumbHeight) > 100) ifTrue:[
- realNewOrigin := 100 - thumbHeight
+ realNewOrigin := 100 - thumbHeight
] ifFalse: [
- realNewOrigin := newOrigin
+ realNewOrigin := newOrigin
].
(realNewOrigin > 100) ifTrue:[
- realNewOrigin := 100
+ realNewOrigin := 100
] ifFalse: [
- (realNewOrigin < 0) ifTrue:[
- realNewOrigin := 0
- ]
+ (realNewOrigin < 0) ifTrue:[
+ realNewOrigin := 0
+ ]
].
((realNewOrigin ~= thumbOrigin) or:[thumbFrame isNil]) ifTrue:[
- thumbOrigin := realNewOrigin.
-
- shown ifTrue:[
- oldFrame := thumbFrame.
- self computeThumbFrame.
- (thumbHeight = 100) ifTrue:[
- "/ full: don't draw
- ^ self
- ].
-
- (thumbFrame ~= oldFrame) ifTrue:[
- oldFrame isNil ifTrue:[
- self invalidate.
- "/ self drawThumb.
- ^ self
- ].
- tH := thumbFrame height.
- tW := thumbFrame width.
-
- oldTop := oldFrame top.
- oldBot := oldTop + tH.
- oldLeft := oldFrame left.
- oldRight := oldLeft + tW.
-
- thumbTop := thumbFrame top.
- thumbBot := thumbTop + tH.
- thumbLeft := thumbFrame left.
- thumbRight := thumbLeft + tW.
-
- needFullDraw := self exposeEventPending
- or:[((orientation == #vertical) and:[oldBot >= height])
- or:[((orientation ~~ #vertical) and:[oldRight >= width])]].
-
- needFullDraw ifTrue:[
- "
- cannot copy since thumb was below the end
- or may be not available for the copy
- "
- self invalidate.
-"/ (orientation == #vertical) ifTrue:[
-"/ self drawThumbBackgroundInX:thumbLeft y:oldTop
-"/ width:tW height:(height - oldTop).
-"/ ] ifFalse:[
-"/ self drawThumbBackgroundInX:oldLeft y:thumbTop
-"/ width:(width - oldLeft) height:tH.
-"/ ].
-"/ self drawThumb.
- ^ self
- ].
-
- self catchExpose.
- "
- copy the thumbs pixels
- "
- (orientation == #vertical) ifTrue:[
- self
- copyFrom:self
- x:thumbLeft y:oldTop
- toX:thumbLeft y:thumbTop
- width:tW height:tH
- async:true.
- ] ifFalse:[
- self
- copyFrom:self
- x:oldLeft y:thumbTop
- toX:thumbLeft y:thumbTop
- width:tW height:tH
- async:true.
- ].
-
- "
- clear some of the previous thumbs area to background
- "
- (orientation == #vertical) ifTrue:[
- bgLeft := thumbLeft.
- bgWidth := tW.
- oldTop > thumbTop ifTrue:[
- delta := oldTop - thumbTop.
- oldTop > thumbBot ifTrue:[
- bgTop := oldTop.
- bgHeight := tH + 1
- ] ifFalse:[
- bgTop := thumbBot.
- bgHeight := delta
- ]
- ] ifFalse:[
- delta := thumbTop - oldTop.
- oldBot < thumbTop ifTrue:[
- bgTop := oldTop.
- bgHeight := tH + 1
- ] ifFalse:[
- bgTop := oldTop.
- bgHeight := delta
- ]
- ].
- ] ifFalse:[
- bgTop := thumbTop.
- bgHeight := tH.
- oldLeft > thumbLeft ifTrue:[
- delta := oldLeft - thumbLeft.
- oldLeft > thumbRight ifTrue:[
- bgLeft := oldLeft.
- bgWidth := tW + 1.
- ] ifFalse:[
- bgLeft := thumbRight.
- bgWidth := delta.
- ]
- ] ifFalse:[
- delta := thumbLeft - oldLeft.
- oldRight < thumbLeft ifTrue:[
- bgLeft := oldLeft.
- bgWidth := tW + 1.
- ] ifFalse:[
- bgLeft := oldLeft.
- bgWidth := delta.
- ]
- ].
- ].
- self drawThumbBackgroundInX:bgLeft y:bgTop width:bgWidth height:bgHeight.
- self waitForExpose
- ]
- ] ifFalse:[
- thumbFrame := nil
- ]
+ thumbOrigin := realNewOrigin.
+
+ shown ifTrue:[
+ oldFrame := thumbFrame.
+ self computeThumbFrame.
+ (thumbHeight = 100) ifTrue:[
+ "/ full: don't draw
+ ^ self
+ ].
+
+ (thumbFrame ~= oldFrame) ifTrue:[
+ oldFrame isNil ifTrue:[
+ self invalidate.
+ ^ self
+ ].
+ tH := thumbFrame height.
+ tW := thumbFrame width.
+
+ oldTop := oldFrame top.
+ oldBot := oldTop + tH.
+ oldLeft := oldFrame left.
+ oldRight := oldLeft + tW.
+
+ thumbTop := thumbFrame top.
+ thumbBot := thumbTop + tH.
+ thumbLeft := thumbFrame left.
+ thumbRight := thumbLeft + tW.
+
+ needFullDraw := self exposeEventPending
+ or:[((orientation == #vertical) and:[oldBot >= height])
+ or:[((orientation ~~ #vertical) and:[oldRight >= width])]].
+
+ needFullDraw ifTrue:[
+ "
+ cannot copy since thumb was below the end
+ or may be not available for the copy
+ "
+ self invalidate.
+ ^ self
+ ].
+
+ self catchExpose.
+ "
+ copy the thumbs pixels
+ "
+ (orientation == #vertical) ifTrue:[
+ self
+ copyFrom:self
+ x:thumbLeft y:oldTop
+ toX:thumbLeft y:thumbTop
+ width:tW height:tH
+ async:true.
+ ] ifFalse:[
+ self
+ copyFrom:self
+ x:oldLeft y:thumbTop
+ toX:thumbLeft y:thumbTop
+ width:tW height:tH
+ async:true.
+ ].
+
+ "
+ clear some of the previous thumbs area to background
+ "
+ (orientation == #vertical) ifTrue:[
+ bgLeft := thumbLeft.
+ bgWidth := tW.
+ oldTop > thumbTop ifTrue:[
+ delta := oldTop - thumbTop.
+ oldTop > thumbBot ifTrue:[
+ bgTop := oldTop.
+ bgHeight := tH + 1
+ ] ifFalse:[
+ bgTop := thumbBot.
+ bgHeight := delta
+ ]
+ ] ifFalse:[
+ delta := thumbTop - oldTop.
+ oldBot < thumbTop ifTrue:[
+ bgTop := oldTop.
+ bgHeight := tH + 1
+ ] ifFalse:[
+ bgTop := oldTop.
+ bgHeight := delta
+ ]
+ ].
+ ] ifFalse:[
+ bgTop := thumbTop.
+ bgHeight := tH.
+ oldLeft > thumbLeft ifTrue:[
+ delta := oldLeft - thumbLeft.
+ oldLeft > thumbRight ifTrue:[
+ bgLeft := oldLeft.
+ bgWidth := tW + 1.
+ ] ifFalse:[
+ bgLeft := thumbRight.
+ bgWidth := delta.
+ ]
+ ] ifFalse:[
+ delta := thumbLeft - oldLeft.
+ oldRight < thumbLeft ifTrue:[
+ bgLeft := oldLeft.
+ bgWidth := tW + 1.
+ ] ifFalse:[
+ bgLeft := oldLeft.
+ bgWidth := delta.
+ ]
+ ].
+ ].
+ self drawThumbBackgroundInX:bgLeft y:bgTop width:bgWidth height:bgHeight.
+ self waitForExpose
+ ]
+ ] ifFalse:[
+ thumbFrame := nil
+ ]
]
"Modified: / 4.5.1999 / 18:57:28 / cg"
@@ -841,25 +821,11 @@
nBg := nBg onDevice:device.
nBg ~~ viewBackground ifTrue:[
self viewBackground:nBg.
- shown ifTrue:[self invalidate].
]
].
- shown ifTrue:[
- thumbFrame := nil.
- self invalidate.
-
-"/ thumbFrame notNil ifTrue:[
-"/ self drawThumbBackgroundInX:(thumbFrame left)
-"/ y:(thumbFrame top)
-"/ width:(thumbFrame width)
-"/ height:(thumbFrame height).
-"/ ].
-"/ self computeThumbFrame.
-"/ self drawThumb
- ] ifFalse:[
- thumbFrame := nil
- ]
+ thumbFrame := nil.
+ self invalidate.
]
]
@@ -1715,34 +1681,36 @@
!
redrawX:x y:y width:w height:h
- shown ifTrue:[
- thumbFrame isNil ifTrue:[
- self computeThumbFrame
- ].
- self drawThumbBackgroundInX:x y:y width:w height:h.
- thumbFrame isNil ifTrue:[
- "/ thumb hidden
- ^ self
+ shown ifFalse:[
+ ^ self.
+ ].
+
+ thumbFrame isNil ifTrue:[
+ self computeThumbFrame
+ ].
+ self drawThumbBackgroundInX:x y:y width:w height:h.
+ thumbFrame isNil ifTrue:[
+ "/ thumb hidden
+ ^ self
+ ].
+
+ orientation == #vertical ifTrue:[
+ (y > thumbFrame bottom) ifTrue:[
+ ^ self
].
-
- orientation == #vertical ifTrue:[
- (y > thumbFrame bottom) ifTrue:[
- ^ self
- ].
- ((y + h) < thumbFrame top) ifTrue:[
- ^ self
- ].
- ] ifFalse:[
- (x > thumbFrame right) ifTrue:[
- ^ self
- ].
- ((x + w) < thumbFrame left) ifTrue:[
- ^ self
- ].
+ ((y + h) < thumbFrame top) ifTrue:[
+ ^ self
+ ].
+ ] ifFalse:[
+ (x > thumbFrame right) ifTrue:[
+ ^ self
].
-
- self drawThumb
- ]
+ ((x + w) < thumbFrame left) ifTrue:[
+ ^ self
+ ].
+ ].
+
+ self drawThumb
"Modified: / 29.10.1997 / 15:48:48 / cg"
!
@@ -1754,104 +1722,103 @@
oldThumbFrame := thumbFrame.
thumbFrame := nil.
- shown ifTrue:[
-"/ oldThumbFrame notNil ifTrue:[
- self computeThumbFrame.
-
- "/ any change ?
- thumbFrame = oldThumbFrame ifTrue:[
- ^ self
- ].
- thumbFrame isNil ifTrue:[
- self invalidate.
- ^ self
- ].
- oldThumbFrame isNil ifTrue:[
- self invalidate:thumbFrame.
+ shown ifFalse:[
+ thumbFrame := nil.
+ self invalidate.
+ ^ self.
+ ].
+ self computeThumbFrame.
+
+ "/ any change ?
+ thumbFrame = oldThumbFrame ifTrue:[
+ ^ self
+ ].
+ thumbFrame isNil ifTrue:[
+ self invalidate.
+ ^ self
+ ].
+ oldThumbFrame isNil ifTrue:[
+ self invalidate:thumbFrame.
+ ^ self.
+ ].
+
+ "/ try to redraw as little as possible
+
+ oldTop := oldThumbFrame top.
+ oldBot := oldThumbFrame bottom.
+ newTop := thumbFrame top.
+ newBot := thumbFrame bottom.
+ oldLeft := oldThumbFrame left.
+ oldRight := oldThumbFrame right.
+ newLeft := thumbFrame left.
+ newRight := thumbFrame right.
+
+ (orientation == #vertical
+ and:[oldLeft == newLeft
+ and:[oldRight == newRight]]) ifTrue:[
+ (oldTop == newTop) ifTrue:[
+ oldBot < newBot ifTrue:[
+ "/ thumb became larger, but origin remains
+ "/ (view became smaller)
+ self invalidate:(Rectangle
+ left:newLeft top:oldBot-thumbLevel
+ right:newRight bottom:newBot).
^ self.
].
-
- "/ try to redraw as little as possible
-
- oldTop := oldThumbFrame top.
- oldBot := oldThumbFrame bottom.
- newTop := thumbFrame top.
- newBot := thumbFrame bottom.
- oldLeft := oldThumbFrame left.
- oldRight := oldThumbFrame right.
- newLeft := thumbFrame left.
- newRight := thumbFrame right.
-
- (orientation == #vertical
- and:[oldLeft == newLeft
- and:[oldRight == newRight]]) ifTrue:[
- (oldTop == newTop) ifTrue:[
- oldBot < newBot ifTrue:[
- "/ thumb became larger, but origin remains
- "/ (view became smaller)
- self invalidate:(Rectangle
- left:newLeft top:oldBot-thumbLevel
- right:newRight bottom:newBot).
- ^ self.
- ].
- oldBot > newBot ifTrue:[
- "/ thumb became smaller, but origin remains
- "/ (view became larger)
- self invalidate:(Rectangle
- left:newLeft top:newBot-thumbLevel
- right:newRight bottom:oldBot).
- ^ self.
- ].
- ].
- (oldBot == newBot) ifTrue:[
- newTop < oldTop ifTrue:[
- "/ thumb became larger, but corner remains
- "/ (view became smaller)
- self invalidate:(Rectangle
- left:newLeft top:newTop
- right:newRight bottom:oldTop+thumbLevel).
- ^ self.
- ].
- newTop > oldTop ifTrue:[
- "/ thumb became smaller, but corner remains
- "/ (view became larger)
- self invalidate:(Rectangle
- left:newLeft top:oldTop
- right:newRight bottom:newTop+thumbLevel).
- ^ self.
- ]
- ].
+ oldBot > newBot ifTrue:[
+ "/ thumb became smaller, but origin remains
+ "/ (view became larger)
+ self invalidate:(Rectangle
+ left:newLeft top:newBot-thumbLevel
+ right:newRight bottom:oldBot).
+ ^ self.
+ ].
+ ].
+ (oldBot == newBot) ifTrue:[
+ newTop < oldTop ifTrue:[
+ "/ thumb became larger, but corner remains
+ "/ (view became smaller)
+ self invalidate:(Rectangle
+ left:newLeft top:newTop
+ right:newRight bottom:oldTop+thumbLevel).
+ ^ self.
].
-
- (orientation == #horizontal
- and:[oldTop == newTop
- and:[oldBot == newBot]]) ifTrue:[
- (oldLeft == newLeft) ifTrue:[
- oldRight < newRight ifTrue:[
- "/ thumb became larger, but origin remains
- "/ (view became smaller)
- self invalidate:(Rectangle
- left:oldRight-thumbLevel top:newTop
- right:newRight bottom:newBot).
- ^ self.
- ].
- oldRight > newRight ifTrue:[
- "/ thumb became smaller, but origin remains
- "/ (view became larger)
- self invalidate:(Rectangle
- left:newRight-thumbLevel top:newTop
- right:oldRight bottom:newBot).
- ^ self.
- ].
- ].
+ newTop > oldTop ifTrue:[
+ "/ thumb became smaller, but corner remains
+ "/ (view became larger)
+ self invalidate:(Rectangle
+ left:newLeft top:oldTop
+ right:newRight bottom:newTop+thumbLevel).
+ ^ self.
+ ]
+ ].
+ ].
+
+ (orientation == #horizontal
+ and:[oldTop == newTop
+ and:[oldBot == newBot]]) ifTrue:[
+ (oldLeft == newLeft) ifTrue:[
+ oldRight < newRight ifTrue:[
+ "/ thumb became larger, but origin remains
+ "/ (view became smaller)
+ self invalidate:(Rectangle
+ left:oldRight-thumbLevel top:newTop
+ right:newRight bottom:newBot).
+ ^ self.
].
-
- self invalidate:(oldThumbFrame merge: thumbFrame).
- ^ self.
-"/ ].
-"/ self invalidate
+ oldRight > newRight ifTrue:[
+ "/ thumb became smaller, but origin remains
+ "/ (view became larger)
+ self invalidate:(Rectangle
+ left:newRight-thumbLevel top:newTop
+ right:oldRight bottom:newBot).
+ ^ self.
+ ].
+ ].
].
+ self invalidate:(oldThumbFrame merge: thumbFrame).
+
"Modified: / 23.5.1999 / 13:50:41 / cg"
!
@@ -2599,5 +2566,5 @@
!Scroller class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/Scroller.st,v 1.165 2003-05-07 14:10:20 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/Scroller.st,v 1.166 2004-02-26 12:18:46 cg Exp $'
! !
--- a/TextView.st Wed Feb 25 17:14:23 2004 +0100
+++ b/TextView.st Thu Feb 26 13:20:04 2004 +0100
@@ -883,10 +883,8 @@
selectionFgColor := color1 onDevice:device.
selectionBgColor := color2 onDevice:device.
- shown ifTrue:[
- self hasSelection ifTrue:[
- self invalidate
- ]
+ self hasSelection ifTrue:[
+ self invalidate
]
"Modified: 29.5.1996 / 16:22:15 / cg"
@@ -3812,7 +3810,7 @@
!TextView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/TextView.st,v 1.238 2004-02-23 11:03:12 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/TextView.st,v 1.239 2004-02-26 12:18:10 cg Exp $'
! !
TextView initialize!