--- a/SubCanvas.st Wed Nov 22 15:35:57 2000 +0100
+++ b/SubCanvas.st Wed Nov 22 16:35:55 2000 +0100
@@ -67,12 +67,14 @@
builder
"return the value of the instance variable 'builder' (automatically generated)"
- ^ builder!
+ ^ builder
+!
client
"return the value of the instance variable 'client' (automatically generated)"
- ^ client!
+ ^ client
+!
client:anApplication spec:aWindowSpecOrSpecSymbol builder:aBuilder
"release existing components and generate new components from
@@ -109,7 +111,7 @@
aBoolean ~~ clientViewIsScrolled ifTrue:[
clientView isNil ifTrue:[
- clientView := View new.
+ clientView := ApplicationSubView new.
].
aBoolean ifTrue:[
self scrolledView:(vs := ViewScroller new).
@@ -132,7 +134,8 @@
spec
"return the value of the instance variable 'spec' (automatically generated)"
- ^ spec!
+ ^ spec
+!
spec:something
"set the value of the instance variable 'spec' (automatically generated)"
@@ -167,6 +170,14 @@
self updateFromChannels
!
+clientView:aView
+
+ clientView notNil ifTrue:[
+ clientView destroy
+ ].
+ clientView := aView
+!
+
specHolder
^ specHolder
!
@@ -265,7 +276,7 @@
rebuild
"rebuild
"
- |v subSpec savedView builderClass|
+ |v subSpec savedView savedBuilder builderClass|
"/ if the superView is not yet created,
"/ we MUST delay building... (sigh)
@@ -275,7 +286,7 @@
].
clientView notNil ifTrue:[
- clientView destroySubViews
+ clientView destroySubViews.
].
spec notNil ifTrue:[
@@ -308,15 +319,33 @@
"/ new (let app know (somehow) that this is a build
"/ for a subcanvas (i.e. it can redefine the buildSubCanvas-method):
+ (clientView notNil and:[clientView application ~~ client]) ifTrue:[
+ clientView destroy.
+ clientView := nil.
+ ].
+
+ clientView isNil ifTrue:[
+ clientView := ApplicationSubView new.
+ clientView application:client.
+ ].
+
savedView := builder window.
+ savedBuilder := client builder.
builder window:clientView.
+ client builder:builder.
[
client buildSubCanvas:subSpec withBuilder:builder.
+
+ self scrolledView:clientView.
] valueNowOrOnUnwindDo:[
savedView notNil ifTrue:[
builder window:savedView.
+ ].
+ savedBuilder notNil ifTrue:[
+ client builder:savedBuilder.
]
].
+
clientViewIsScrolled ifTrue:[
clientView extent:((subSpec window layout) ? (subSpec window bounds)) extent.
].
@@ -406,7 +435,7 @@
initialize
super initialize.
- self scrolledView:(clientView := View new).
+"/ self scrolledView:(clientView := ApplicationSubView new).
clientViewIsScrolled := false.
spec := #windowSpec.
@@ -450,5 +479,5 @@
!SubCanvas class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg2/SubCanvas.st,v 1.28 2000-09-28 18:37:23 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg2/SubCanvas.st,v 1.29 2000-11-22 15:35:55 tm Exp $'
! !