--- a/StrokeWrpr.st Mon May 20 11:55:16 1996 +0200
+++ b/StrokeWrpr.st Sun May 26 13:09:58 1996 +0200
@@ -66,7 +66,7 @@
[exBegin]
|v e component|
- v := (View extent:250@250) openAndWait.
+ v := (StandardSystemView extent:250@250) openAndWait.
e := EllipticalArc boundingBox:(10@10 corner:90@90)
startAngle:0
@@ -82,8 +82,7 @@
[exBegin]
|v e component|
- v := View new.
- v extent:250@250.
+ v := StandardSystemView extent:250@250.
e := Rectangle origin:10@10 corner:90@90.
component := FillingWrapper on:e.
@@ -103,11 +102,11 @@
v open
[exEnd]
with lineWidth & style:
- (notice, that no automatic redraw is performed):
+ (notice, that the redraw is automatic):
[exBegin]
|v e|
- v := View extent:250@250.
+ v := StandardSystemView extent:250@250.
e := EllipticalArc boundingBox:(10@10 corner:90@90)
startAngle:0
@@ -128,6 +127,36 @@
v open.
[exEnd]
+ scrolling:
+ [exBegin]
+ |t s v e component|
+
+ t := StandardSystemView extent:250@200.
+ s := HVScrollableView for:View miniScroller:true in:t.
+ s origin:0.0@0.0 corner:1.0@1.0.
+ v := s scrolledView.
+
+ e := Rectangle origin:10@10 corner:90@90.
+ component := FillingWrapper on:e.
+ component foregroundColor:Color red.
+ v addComponent:component.
+
+ e := EllipticalArc boundingBox:(10@10 corner:90@90)
+ startAngle:0 sweepAngle:360.
+ component := StrokingWrapper on:e.
+ component lineWidth:5.
+ v addComponent:component.
+
+ e := Arrow from:100@100 to:150@250.
+ component := StrokingWrapper on:e.
+ component lineWidth:2.
+ v addComponent:component.
+
+ v addComponent:(Button label:'hello').
+
+ t open
+ [exEnd]
+
"
! !
@@ -136,10 +165,10 @@
bounds
"return the boundary rectangle - here, must take care of the lineWidth"
- ^ component bounds + (lineWidth - 1)
+ ^ component bounds insetBy:(lineWidth // 2 + 1) negated
"Created: 8.5.1996 / 23:22:43 / cg"
- "Modified: 9.5.1996 / 00:09:06 / cg"
+ "Modified: 26.5.1996 / 13:03:50 / cg"
!
capStyle
@@ -271,5 +300,5 @@
!StrokingWrapper class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview2/Attic/StrokeWrpr.st,v 1.8 1996-05-13 08:50:20 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview2/Attic/StrokeWrpr.st,v 1.9 1996-05-26 11:09:58 cg Exp $'
! !
--- a/StrokingWrapper.st Mon May 20 11:55:16 1996 +0200
+++ b/StrokingWrapper.st Sun May 26 13:09:58 1996 +0200
@@ -66,7 +66,7 @@
[exBegin]
|v e component|
- v := (View extent:250@250) openAndWait.
+ v := (StandardSystemView extent:250@250) openAndWait.
e := EllipticalArc boundingBox:(10@10 corner:90@90)
startAngle:0
@@ -82,8 +82,7 @@
[exBegin]
|v e component|
- v := View new.
- v extent:250@250.
+ v := StandardSystemView extent:250@250.
e := Rectangle origin:10@10 corner:90@90.
component := FillingWrapper on:e.
@@ -103,11 +102,11 @@
v open
[exEnd]
with lineWidth & style:
- (notice, that no automatic redraw is performed):
+ (notice, that the redraw is automatic):
[exBegin]
|v e|
- v := View extent:250@250.
+ v := StandardSystemView extent:250@250.
e := EllipticalArc boundingBox:(10@10 corner:90@90)
startAngle:0
@@ -128,6 +127,36 @@
v open.
[exEnd]
+ scrolling:
+ [exBegin]
+ |t s v e component|
+
+ t := StandardSystemView extent:250@200.
+ s := HVScrollableView for:View miniScroller:true in:t.
+ s origin:0.0@0.0 corner:1.0@1.0.
+ v := s scrolledView.
+
+ e := Rectangle origin:10@10 corner:90@90.
+ component := FillingWrapper on:e.
+ component foregroundColor:Color red.
+ v addComponent:component.
+
+ e := EllipticalArc boundingBox:(10@10 corner:90@90)
+ startAngle:0 sweepAngle:360.
+ component := StrokingWrapper on:e.
+ component lineWidth:5.
+ v addComponent:component.
+
+ e := Arrow from:100@100 to:150@250.
+ component := StrokingWrapper on:e.
+ component lineWidth:2.
+ v addComponent:component.
+
+ v addComponent:(Button label:'hello').
+
+ t open
+ [exEnd]
+
"
! !
@@ -136,10 +165,10 @@
bounds
"return the boundary rectangle - here, must take care of the lineWidth"
- ^ component bounds + (lineWidth - 1)
+ ^ component bounds insetBy:(lineWidth // 2 + 1) negated
"Created: 8.5.1996 / 23:22:43 / cg"
- "Modified: 9.5.1996 / 00:09:06 / cg"
+ "Modified: 26.5.1996 / 13:03:50 / cg"
!
capStyle
@@ -271,5 +300,5 @@
!StrokingWrapper class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview2/StrokingWrapper.st,v 1.8 1996-05-13 08:50:20 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview2/StrokingWrapper.st,v 1.9 1996-05-26 11:09:58 cg Exp $'
! !