commentary
authorClaus Gittinger <cg@exept.de>
Tue, 23 Apr 1996 11:41:47 +0200
changeset 193 daaaf4594c9e
parent 192 947cc10f86dc
child 194 d4ecb23d7163
commentary
Icon.st
--- a/Icon.st	Mon Apr 22 19:39:03 1996 +0200
+++ b/Icon.st	Tue Apr 23 11:41:47 1996 +0200
@@ -35,19 +35,32 @@
 
 documentation
 "
-    ST-80 Compatibility mimicri for Icon.
-    Implements the #constantNamed: message which is used by some ST-80 PD
-    classes and returns corresponding ST/X icons.
+    The Icon class keeps track of already loaded Images and caches
+    them for later reuse.
+    Icons are accessed by a symbolic name, so there is no need to
+    remember their names (they must have been remembered under that name
+    before - of course).
+
+    Icon was mostly added for ST-80 Compatibility:
+    Images are returned via the #constantNamed: message which is used by 
+    some ST-80 PD classes and returns corresponding ST/X icons.
+    Notice, that ST/X does not provide Icon instances - Icon only consists
+    of class mimicri protocol, to make your life easier.
 
-    If you like the original ST-80 icons, install the xbm files in the bitmap
-    directory under a name foo.xbm, where foo corresponds to the icons
-    name symbol (i.e. for Icon constantNamed:#foo, a 'foo.xbm' file is required).
-    You can grab those icons from manchester or from the PrimeTime Freeware CD.
-    A copy of the PTF-CD is also in goodies/bitmaps/st80bitmaps.
-    Then, change the replacementName method to return an empty array.
+    If you like the original ST-80 icons, install the image files in the `bitmap'
+    directory under a name foo.xbm, where `foo' corresponds to the icons
+    name symbol 
+    (i.e. for the `Icon constantNamed:#foo', a 'foo.xbm' file is required).
 
-    Caveat:
-	masks are not yet implemented
+    You can grab those icons from manchester or from the PrimeTime Freeware 
+    (PTF) CD. A copy of those bitmaps (from the PTF-CD) is found in 
+    goodies/bitmaps/st80bitmaps.
+
+    CAVEAT:
+        masks are not yet implemented
+
+    [See also:]
+        Image Form ImageReader
 "
 ! !
 
@@ -91,9 +104,11 @@
        )
 ! !
 
-!Icon class methodsFor:'instance creation'!
+!Icon class methodsFor:'accessing'!
 
 constantNamed:aName
+    "return the image registered under aName."
+
     |icon nm|
 
     icon := KnownIcons at:aName ifAbsent:[].
@@ -128,16 +143,20 @@
      Icon constantNamed:#SBrowser     
     "
 
-    "Modified: 7.3.1996 / 19:17:15 / cg"
+    "Modified: 23.4.1996 / 11:40:24 / cg"
 !
 
-constantNamed:aName put:anIcon
-    KnownIcons at:aName put:anIcon
+constantNamed:aName put:anImage
+    "register anImage under aName."
+
+    KnownIcons at:aName put:anImage
+
+    "Modified: 23.4.1996 / 11:40:51 / cg"
 ! !
 
 !Icon class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview2/Icon.st,v 1.8 1996-03-26 15:11:57 ca Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/Icon.st,v 1.9 1996-04-23 09:41:47 cg Exp $'
 ! !
 Icon initialize!