--- a/View.st Tue Feb 07 16:31:23 1995 +0100
+++ b/View.st Wed Feb 08 04:18:36 1995 +0100
@@ -45,7 +45,7 @@
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libview/View.st,v 1.26 1995-02-06 00:38:04 claus Exp $
+$Header: /cvs/stx/stx/libview/View.st,v 1.27 1995-02-08 03:18:36 claus Exp $
'!
"this flag controls (globally) how views look - it will vanish"
@@ -70,7 +70,7 @@
version
"
-$Header: /cvs/stx/stx/libview/View.st,v 1.26 1995-02-06 00:38:04 claus Exp $
+$Header: /cvs/stx/stx/libview/View.st,v 1.27 1995-02-08 03:18:36 claus Exp $
"
!
@@ -2412,11 +2412,15 @@
newWidth := extent x.
newHeight := extent y.
- newWidth < 0 ifTrue:[
- newWidth := 0.
+ "
+ X complains badly if you try to create/resize a view with
+ a dimension <= 0 ... (although I think that 0 maks sense ...)
+ "
+ newWidth < 1 ifTrue:[
+ newWidth := 1.
].
- newHeight < 0 ifTrue:[
- newHeight := 0
+ newHeight < 1 ifTrue:[
+ newHeight := 1
].
((newWidth == width) and:[newHeight == height]) ifTrue:[
@@ -2962,86 +2966,75 @@
realizing is done very late (after layout is fixed) to avoid
visible rearranging of windows on the screen"
+ self realizeLeavingGroup:false
+!
+
+realizeInGroup
+ "special realize - leave windowgroup as is;
+ This allows a view to be realized in any windowgroup;
+ for special applications, like the kill button in the Filebrowser which has
+ another windowGroup as its superview and is handled as a separate process."
+
+ self realizeLeavingGroup:true
+!
+
+realizeLeavingGroup:leaveGroupAsIs
+ "common helper for realize and realizeInGroup"
+
|superGroup groupChange|
drawableId isNil ifTrue:[
self create.
].
- "
- put myself into superviews windowgroup if there is a superview
- "
- groupChange := false.
- superView notNil ifTrue:[
- windowGroup notNil ifTrue:[
-"/ 'oops - wgroup change on realize' printNewline.
- windowGroup removeView:self.
- windowGroup := nil
- ].
- superGroup := superView windowGroup.
- superGroup ~~ windowGroup ifTrue:[
- groupChange := true.
- windowGroup := superGroup.
- windowGroup notNil ifTrue:[
- windowGroup addView:self.
- ]
- ]
- ].
-
- hidden ifTrue:[
- ^ self
- ].
-
-"/ realized ifFalse:[
- (originChanged or:[extentChanged]) ifTrue:[self fixSize].
-
- (realized not or:[groupChange]) ifTrue:[
- subViews notNil ifTrue:[
- subViews do:[:subView |
- subView realize
+ leaveGroupAsIs ifFalse:[
+ "
+ put myself into superviews windowgroup if there is a superview
+ "
+ groupChange := false.
+ superView notNil ifTrue:[
+ superGroup := superView windowGroup.
+ (windowGroup notNil and:[superGroup ~~ windowGroup]) ifTrue:[
+ "
+ mhmh - seems that the windowgroup has changed ....
+ "
+"/ 'oops - wgroup change on realize' printNewline.
+ windowGroup removeView:self.
+ windowGroup := nil
+ ].
+ superGroup ~~ windowGroup ifTrue:[
+ groupChange := true.
+ windowGroup := superGroup.
+ windowGroup notNil ifTrue:[
+ windowGroup addView:self.
+ ]
]
].
].
- self setInnerClip.
-
- realized ifFalse:[
- "
- now, make the view visible
- "
- device mapWindow:drawableId.
- realized := true
- ]
-!
-
-realizeInGroup
- "special realize - leave windowgroup as is; for special applications"
-
- drawableId isNil ifTrue:[
- self create.
+
+ hidden ifFalse:[
+ (originChanged or:[extentChanged]) ifTrue:[self fixSize].
+
+ (realized not or:[groupChange]) ifTrue:[
+ subViews notNil ifTrue:[
+ subViews do:[:subView |
+ subView realize
+ ]
+ ].
+ ].
+ self setInnerClip.
+
+ realized ifFalse:[
+ "
+ now, make the view visible
+ "
+ device mapWindow:drawableId.
+ realized := true
+ ]
].
- hidden ifTrue:[
- ^ self
- ].
-
-"/ realized ifFalse:[
- (originChanged or:[extentChanged]) ifTrue:[self fixSize].
-
- (realized not) ifTrue:[
- subViews notNil ifTrue:[
- subViews do:[:subView |
- subView realize
- ]
- ].
- ].
- self setInnerClip.
-
- realized ifFalse:[
- "
- now, make the view visible
- "
- device mapWindow:drawableId.
- realized := true
+ controller notNil ifTrue:[
+ controller startUp
]
!