only init once
authorClaus Gittinger <cg@exept.de>
Sun, 02 Jul 2000 14:54:33 +0200
changeset 3213 78add46c0f4b
parent 3212 bdefd01df684
child 3214 359316f51b9f
only init once
Color.st
Cursor.st
Font.st
--- a/Color.st	Sun Jul 02 14:52:38 2000 +0200
+++ b/Color.st	Sun Jul 02 14:54:33 2000 +0200
@@ -10,6 +10,8 @@
  hereby transferred.
 "
 
+"{ Package: 'stx:libview' }"
+
 Object subclass:#Color
 	instanceVariableNames:'red green blue device colorId ditherForm replacementColor
 		writable'
@@ -506,18 +508,18 @@
         InvalidColorNameSignal := ColorErrorSignal newSignalMayProceed:true.
         InvalidColorNameSignal nameClass:self message:#invalidColorNameSignal.
         InvalidColorNameSignal notifierString:'invalid color name'.
+
+        MaxValue := 16rFFFF.
+
+        "want to be informed when returning from snapshot"
+        ObjectMemory addDependent:self.
+
+        RetryAllocation := true.
+
+        DitherBits := self ditherBits.
+        self initializeStandardColorNames.
     ].
 
-    MaxValue := 16rFFFF.
-
-    "want to be informed when returning from snapshot"
-    ObjectMemory addDependent:self.
-
-    RetryAllocation := true.
-
-    DitherBits := self ditherBits.
-    self initializeStandardColorNames.
-
     "
      Color initialize
     "
@@ -5103,6 +5105,6 @@
 !Color class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/Color.st,v 1.155 2000-01-17 11:25:19 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/Color.st,v 1.156 2000-07-02 12:54:33 cg Exp $'
 ! !
 Color initialize!
--- a/Cursor.st	Sun Jul 02 14:52:38 2000 +0200
+++ b/Cursor.st	Sun Jul 02 14:54:33 2000 +0200
@@ -404,6 +404,8 @@
 
     |device builtIn bits isWindows|
 
+    HandCursor notNil ifTrue:[^ self].
+
     device := Display.
     device isNil ifTrue:[
         isWindows := OperatingSystem isMSWINDOWSlike.
@@ -3306,6 +3308,6 @@
 !Cursor class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/Cursor.st,v 1.88 2000-05-23 07:48:58 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/Cursor.st,v 1.89 2000-07-02 12:54:02 cg Exp $'
 ! !
 Cursor initialize!
--- a/Font.st	Sun Jul 02 14:52:38 2000 +0200
+++ b/Font.st	Sun Jul 02 14:54:33 2000 +0200
@@ -10,6 +10,8 @@
  hereby transferred.
 "
 
+"{ Package: 'stx:libview' }"
+
 FontDescription subclass:#Font
 	instanceVariableNames:'device fontId replacementFont ascent descent width isFixedWidth
 		minWidth maxWidth maxAscent maxDescent'
@@ -205,16 +207,18 @@
     "
      replacement handling is not yet finished
     "
-    Replacements := Dictionary new.
+    Replacements isNil ifTrue:[
+        Replacements := Dictionary new.
 
-    Replacements at:'clean'                  put:'courier'.
-    Replacements at:'fixed'                  put:'courier'.
-    Replacements at:'new century schoolbook' put:'times'.
-    Replacements at:'lucida'                 put:'helvetica'.
-    Replacements at:'lucidabright'           put:'helvetica'.
-    Replacements at:'lucidatypewriter'       put:'courier'.
-    Replacements at:'charter'                put:'times'.
-    Replacements at:'terminal'               put:'courier'.
+        Replacements at:'clean'                  put:'courier'.
+        Replacements at:'fixed'                  put:'courier'.
+        Replacements at:'new century schoolbook' put:'times'.
+        Replacements at:'lucida'                 put:'helvetica'.
+        Replacements at:'lucidabright'           put:'helvetica'.
+        Replacements at:'lucidatypewriter'       put:'courier'.
+        Replacements at:'charter'                put:'times'.
+        Replacements at:'terminal'               put:'courier'.
+    ]
 ! !
 
 !Font class methodsFor:'instance creation'!
@@ -1110,6 +1114,6 @@
 !Font class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/Font.st,v 1.75 1999-12-02 16:08:33 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/Font.st,v 1.76 2000-07-02 12:53:08 cg Exp $'
 ! !
 Font initialize!