*** empty log message ***
authorclaus
Mon, 17 Jan 1994 10:16:37 +0100
changeset 32 bbfe290be580
parent 31 168c08a3435b
child 33 d2408af7851d
*** empty log message ***
Image.st
View.st
--- a/Image.st	Sun Jan 16 04:55:25 1994 +0100
+++ b/Image.st	Mon Jan 17 10:16:37 1994 +0100
@@ -28,7 +28,7 @@
 COPYRIGHT (c) 1991 by Claus Gittinger
               All Rights Reserved
 
-$Header: /cvs/stx/stx/libview/Image.st,v 1.7 1994-01-08 17:15:47 claus Exp $
+$Header: /cvs/stx/stx/libview/Image.st,v 1.8 1994-01-17 09:16:32 claus Exp $
 written Summer 91 by claus
 '!
 
@@ -1211,8 +1211,14 @@
         nColors := (1 bitShift:pictureDepth).
         colorMap := Array new:nColors.
         range := 100 / (nColors - 1) asFloat.
-        1 to:nColors do:[:i |
-            colorMap at:i put:(Color grey:(i - 1) * range).
+	photometric == #blackIs0 ifTrue:[
+            1 to:nColors do:[:i |
+                colorMap at:i put:(Color grey:(i - 1) * range).
+            ].
+	] ifFalse:[
+            1 to:nColors do:[:i |
+                colorMap at:(nColors - i + 1) put:(Color grey:(i - 1) * range).
+            ].
         ].
     ].
 
--- a/View.st	Sun Jan 16 04:55:25 1994 +0100
+++ b/View.st	Mon Jan 17 10:16:37 1994 +0100
@@ -42,7 +42,7 @@
 COPYRIGHT (c) 1989 by Claus Gittinger
               All Rights Reserved
 
-$Header: /cvs/stx/stx/libview/View.st,v 1.10 1994-01-12 20:22:44 claus Exp $
+$Header: /cvs/stx/stx/libview/View.st,v 1.11 1994-01-17 09:16:37 claus Exp $
 
 written spring/summer 89 by claus
 3D effects summer 90 by claus
@@ -2794,14 +2794,44 @@
 !View methodsFor:'events'!
 
 destroyed
-    "view has been destroyed by someone else"
+    "view has been destroyed by someone else (usually window system)"
 
     shown := false.
     super destroyed
 !
 
+saveTerminate
+    "smalltalk itself wants to shut down this view (see Launcher). 
+     - view should ask and save if the contents has been modified.
+     Nothing done here, but redefinable in subvies."
+
+    ^ self
+!
+
+terminate
+    "window manager wants me to go away;
+     - notice, that not all window managers are nice enough to 
+       send this event, but simply destroy the view instead.
+     Can be redefined in subclasses to do whatever cleanup is 
+     required."
+
+    ^ self destroy
+!
+
+saveAndTerminate
+    "window manager wants me to save and go away; 
+     - notice, that not all window managers are nice enough to 
+       send this event, but simply destroy the view instead.
+     Can be redefined in subclasses to do whatever is required
+     to prepare for restart."
+
+    ^ self destroy
+!
+
 sizeChanged:how
-    "tell subviews if I change size"
+    "tell subviews if I change size.
+     How is either #smaller, #larger or nil, and controls the order,
+     in which subviews are notified (possibly reducing redraw activity)"
 
     transformation := nil.  "transformation becomes void"
     subViews notNil ifTrue:[
@@ -3112,16 +3142,4 @@
         ]
     ].
     super buttonPress:button x:x y:y
-!
-
-terminate
-    "window manager wants me to go away"
-
-    ^ self destroy
-!
-
-saveAndTerminate
-    "window manager wants me to save and go away"
-
-    ^ self destroy
 ! !