--- a/UIPainter.st Tue May 08 11:26:59 2001 +0200
+++ b/UIPainter.st Tue May 08 11:34:29 2001 +0200
@@ -22,7 +22,7 @@
!
SelectionInTreeView subclass:#TreeView
- instanceVariableNames:'lastDrawnMaster cvsEventsDisabled windowSpec'
+ instanceVariableNames:'lastDrawnMaster cvsEventsDisabled windowSpec windowSpecClass'
classVariableNames:''
poolDictionaries:''
privateIn:UIPainter
@@ -2317,6 +2317,10 @@
^ Image fromFile:'bitmaps/xpmBitmaps/misc_tools/setup_windows.xpm'
"Created: / 13.8.1998 / 20:33:05 / cg"
+!
+
+defaultWindowSpecClass
+ ^ WindowSpec
! !
!UIPainter methodsFor:'event handling'!
@@ -2903,13 +2907,14 @@
"/ the canvas ...
treeView := TreeView new.
+ treeView windowSpecClass:(self defaultWindowSpecClass).
painterView := StandardSystemView new.
name := name ? UIPainter defaultNameOfCanvas.
painterView name: name.
painterView label: name.
- painterView extent:300@300.
+ painterView extent:(treeView windowSpecClass defaultExtentInUIPainter). "/ 300@300.
painter := UIPainterView in:painterView.
painter layout:(0.0 @ 0.0 corner:1.0 @ 1.0) asLayout.
@@ -3686,7 +3691,7 @@
|spec list key block cls canvas modelBlock|
- spec := WindowSpec new.
+ spec := self windowSpecClass new.
canvas := self canvas.
spec fromView:(canvas topView) callBack:nil.
@@ -3707,10 +3712,13 @@
]
].
- self propertiesDo:[:aProp| |aspect entry|
+ self propertiesDo:[:aProp|
+ |propsSpec|
+
spec exportedAspectsAddKey:(aProp model) type:nil.
- aProp spec aspectSelectors do:[:aKey|spec exportedAspectsAddKey:aKey type:nil].
- aProp spec actionSelectors do:[:aKey|spec exportedAspectsAddKey:aKey type:#action].
+ propsSpec := aProp spec.
+ propsSpec aspectSelectors do:[:aKey|spec exportedAspectsAddKey:aKey type:nil].
+ propsSpec actionSelectors do:[:aKey|spec exportedAspectsAddKey:aKey type:#action].
].
^ spec
!
@@ -3755,6 +3763,18 @@
^ lastDrawnMaster
+!
+
+windowSpecClass
+ "returns the default windowSpecClass (WindowSpec)"
+
+ ^ windowSpecClass ? WindowSpec
+!
+
+windowSpecClass:aClass
+ "set the default windowSpecClass"
+
+ ^ windowSpecClass := aClass
! !
!UIPainter::TreeView methodsFor:'accessing property'!
@@ -3864,7 +3884,7 @@
|name canvasView builder|
- windowSpec := WindowSpec new copyValuesFromSpec:aWindowSpec.
+ windowSpec := (self windowSpecClass) new copyValuesFromSpec:aWindowSpec.
canvasView := self canvas.
builder := UIBuilder new isEditing:true.