#OTHER by stefan
authorStefan Vogel <sv@exept.de>
Wed, 20 Jul 2016 11:35:43 +0200
changeset 7427 90bf8cf72b75
parent 7426 f8ae781a4a5f
child 7428 f065b77917fc
#OTHER by stefan use #blackColor and #whiteColor form device instead of (Color black) and (Color white)
Form.st
--- a/Form.st	Wed Jul 20 11:35:23 2016 +0200
+++ b/Form.st	Wed Jul 20 11:35:43 2016 +0200
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 1989 by Claus Gittinger
 	      All Rights Reserved
@@ -9,8 +11,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-'From Smalltalk/X, Version:7.1.0.0 on 15-07-2016 at 17:51:57'                   !
-
 "{ Package: 'stx:libview' }"
 
 "{ NameSpace: Smalltalk }"
@@ -1163,63 +1163,7 @@
     "Modified: 23.4.1996 / 10:12:48 / cg"
 ! !
 
-!Form methodsFor:'binary storage'!
 
-readBinaryContentsFrom: stream manager: manager
-    "tell the newly restored Form about restoration"
-
-    width := manager nextObject.
-    height := manager nextObject.
-    depth := manager nextObject.
-    offset := manager nextObject.
-    data := manager nextObject.
-
-"/    super readBinaryContentsFrom: stream manager: manager.
-"/    device := nil. "/ Screen current.
-
-    self restored.
-"/    self recreate.
-"/    Lobby register:self.
-
-    "
-     |f|
-
-     f := Form fromFile:'bitmaps/SBrowser.xbm'.
-     f storeBinaryOn:'foo.bos'.
-
-     (Form readBinaryFrom:'foo.bos') inspect
-    "
-!
-
-storeBinaryDefinitionOn: stream manager: manager
-    "store a binary representation of the receiver on stream.
-     This is an internal interface for binary storage mechanism.
-     Redefined to store the actual bits, even if I have been loaded 
-     from a file, and to ommit all device related stuff."
-
-    |bits|
-
-    manager putIdOfClass:(self class) on:stream.
-    manager putIdOf:width on:stream.
-    manager putIdOf:height on:stream.
-    manager putIdOf:depth on:stream.
-    manager putIdOf:offset on:stream.
-    (bits := data) isNil ifTrue:[
-        bits := self bits.
-    ].
-    manager putIdOf:bits on:stream.
-
-"/    savedDevice := device.
-"/    (savedData := data) isNil ifTrue:[
-"/        data := self bits.
-"/    ].
-"/    device := nil.
-"/    super storeBinaryDefinitionOn:stream manager:manager.
-"/    data := savedData.
-"/    device := savedDevice.
-
-    "Modified: 23.4.1996 / 09:30:47 / cg"
-! !
 
 !Form methodsFor:'converting'!
 
@@ -1687,14 +1631,6 @@
     self setDevice:nil id:nil gcId:nil
 ! !
 
-!Form methodsFor:'misc ui support'!
-
-inspectorClass
-    "redefined to launch an ImageInspector
-     (instead of the default InspectorView)."
-
-    ^ ImageInspectorView
-! !
 
 !Form methodsFor:'printing & storing'!
 
@@ -1775,23 +1711,23 @@
      Return nil (after raising a notification) if the allocation failed"
 
     ((w == 0) or:[h == 0]) ifTrue:[
-	self error:'invalid form extent'.
+        self error:'invalid form extent'.
     ].
     width := w.
     height := h.
     offset := 0@0.
     depth := d.
     depth == 1 ifTrue:[
-	localColorMap isNil ifTrue:[
-	    BlackAndWhiteColorMap isNil ifTrue:[
-		BlackAndWhiteColorMap := Array with:(Color white) with:(Color black)
-	    ].
-	    localColorMap := BlackAndWhiteColorMap.
-	].
+        localColorMap isNil ifTrue:[
+            BlackAndWhiteColorMap isNil ifTrue:[
+                BlackAndWhiteColorMap := Array with:(Color white) with:(Color black)
+            ].
+            localColorMap := BlackAndWhiteColorMap.
+        ].
     ].
     device notNil ifTrue:[
-	(gc createPixmapWidth:w height:h depth:d) isNil ifTrue:[^nil].
-	realized := gc drawableId notNil.
+        (gc createPixmapWidth:w height:h depth:d) isNil ifTrue:[^nil].
+        realized := gc drawableId notNil.
     ].
 !