--- a/UISpecificationTool.st Tue Mar 31 20:26:18 1998 +0200
+++ b/UISpecificationTool.st Wed Apr 01 11:35:57 1998 +0200
@@ -14,7 +14,8 @@
ApplicationModel subclass:#UISpecificationTool
- instanceVariableNames:'modifiedHolder aspects specification selection specChannel'
+ instanceVariableNames:'modifiedHolder aspects specification selection specChannel
+ scrolledView windowFrame'
classVariableNames:''
poolDictionaries:''
category:'Interface-UIPainter'
@@ -563,7 +564,7 @@
].
selection notNil ifTrue:[
- (builder componentAt:#Frame) destroySubViews.
+ self clearScrolledView.
selection := nil.
].
@@ -629,14 +630,13 @@
releaseResources
"release resources
"
- |frame appl|
+ |frame appl view vscroller|
- frame := builder componentAt:#Frame.
+ frame := self windowFrame.
appl := builder application.
builder := UIBuilder new.
builder application:appl.
builder componentAt:#Frame put:frame.
-
!
specificationFor:aKey
@@ -685,7 +685,7 @@
selection:something
"selection changed
"
- |slices idx spec frame|
+ |slices idx spec frame y window|
specification notNil ifTrue:[
slices := specification class slices.
@@ -697,21 +697,57 @@
].
spec ~= selection ifTrue:[
+ self releaseResources.
+ self clearScrolledView.
- self releaseResources.
- frame := builder componentAt:#Frame.
- frame destroySubViews.
+ window := self scrolledView scrolledView.
spec notNil ifTrue:[
- builder buildFromSpec:spec in:frame.
- frame allViewBackground:(frame viewBackground).
+ builder buildFromSpec:spec in:window.
+
+ window allViewBackground:(self windowFrame viewBackground).
+ window extent:1.0@(window preferredExtent y).
masterApplication updateFonts.
- frame realizeAllSubViews.
+ window realizeAllSubViews.
+ self scrolledView sizeChanged:nil.
]
].
selection := spec.
! !
+!UISpecificationTool methodsFor:'spec. window'!
+
+clearScrolledView
+
+ scrolledView isNil ifFalse:[
+ scrolledView scrolledView destroySubViews.
+ ]
+!
+
+scrolledView
+ |frame vscroller|
+
+ scrolledView isNil ifTrue:[
+ frame := self windowFrame.
+ vscroller := ScrollableView for:ViewScroller origin:0.0 @ 0.0 corner:1.0 @ 1.0 in:frame.
+ vscroller verticalScrollable:true.
+ vscroller verticalMini:true.
+ vscroller autoHideScrollBars:true.
+ scrolledView := vscroller scrolledView.
+ scrolledView scrolledView:View new.
+ frame realizeAllSubViews.
+ frame sizeChanged:nil.
+ ].
+ ^ scrolledView
+!
+
+windowFrame
+ windowFrame isNil ifTrue:[
+ windowFrame := builder componentAt:#Frame
+ ].
+ ^ windowFrame.
+! !
+
!UISpecificationTool class methodsFor:'documentation'!
version