--- a/SimpleView.st Tue Dec 10 12:51:14 2019 +0100
+++ b/SimpleView.st Wed Dec 11 00:24:00 2019 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
@@ -1605,12 +1607,27 @@
!
displayOn:aGCOrStream
- "ST-80 compatibility: (re-)display myself"
+ "redefined to also give a hint of where I am"
+ "also: ST-80 compatibility: (re-)display myself"
+
+ |topView|
"/ what a kludge - Dolphin and Squeak mean: printOn:;
"/ old ST80 means: draw-yourself on a GC.
(aGCOrStream isStream) ifTrue:[
- ^ super displayOn:aGCOrStream
+ super displayOn:aGCOrStream.
+ (topView := self topView) notNil ifTrue:[
+ (topView ~~ self) ifTrue:[
+ aGCOrStream nextPutAll:' [in '.
+ topView application notNil ifTrue:[
+ topView application displayOn:aGCOrStream
+ ] ifFalse:[
+ topView displayOn:aGCOrStream
+ ].
+ aGCOrStream nextPutAll:']'.
+ ].
+ ].
+ ^ self.
].
self redraw
@@ -3514,6 +3531,22 @@
"Modified: 22.8.1996 / 13:41:47 / cg"
!
+preferredHeightIncludingBorder
+ "return my preferred height including border
+ (this is my preferred height as seen from the outside view;
+ while #preferredHeight returns the height as seen by myself)"
+
+ ^ self preferredHeight + (2*self borderWidth)
+!
+
+preferredWidthIncludingBorder
+ "return my preferred width including border
+ (this is my preferred width as seen from the outside view;
+ while #preferredWidth returns the width as seen by myself)"
+
+ ^ self preferredWidth + (2*self borderWidth)
+!
+
relativeCorner
"return the relative corner or nil"