Method.st
changeset 3243 b67d9d90ea1f
parent 3224 eeabf30b8961
child 3247 e3a32bf4472c
--- a/Method.st	Thu Jan 29 13:33:55 1998 +0100
+++ b/Method.st	Thu Jan 29 13:58:07 1998 +0100
@@ -267,19 +267,77 @@
 !Method class methodsFor:'resources'!
 
 canvasIcon
+    "Generated by the Image Editor"
+    "
+    ImageEditor openOnClass:self andSelector:#canvasIcon
+    "
 
     <resource: #image>
-    ^(Depth2Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 42 170 168 0 42 170 168 0 0 0 0 0 63 255 252 0 63 255 252 0 63 255 252 0 63 255 252 0 63 255 252 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]) ; colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color black)); at:3 put:((Color red:68.2353 green:85.4902 blue:90.1961)); at:4 put:((Color white)); yourself)); mask:((ImageMask new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 255 240 255 240 255 240 255 240 255 240 255 240 255 240 255 240 255 240 255 240 0 0 0 0 0 0]) ; yourself); yourself!
+
+    ^Icon
+        constantNamed:#'Method canvasIcon'
+        ifAbsentPut:[(Depth2Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@B***@@*** @@@@@@C???@@???0@O??<@C???@@???0@@@@@@@@@@@@@@@@@@@@@@@@a'); colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color black)); at:3 put:((Color red:68.2353 green:85.4902 blue:90.1961)); at:4 put:((Color white)); yourself)); mask:((ImageMask new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@??C?<O?0??C?<O?0??C?<O?0??@@@@@@@@@b'); yourself); yourself]!
+
+hierarchicalListIcon
+    "Generated by the Image Editor"
+    "
+    ImageEditor openOnClass:self andSelector:#hierarchicalListIcon
+    "
+
+    <resource: #image>
+
+    ^Icon
+        constantNamed:#'Method hierarchicalListIcon'
+        ifAbsentPut:[(Depth1Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@A?8D? XFA/8FA [>A XG? @@@@@@@@@@@b'); colorMap:((OrderedCollection new add:(Color black); add:(Color white); yourself)); mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@??C?<O?0??C?<O?0??C?<O?0??@@@@@@@@@b'); yourself); yourself]!
 
 imageFileIcon
+    "Generated by the Image Editor"
+    "
+    ImageEditor openOnClass:self andSelector:#imageFileIcon
+    "
 
     <resource: #image>
-    ^(Depth4Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 68 68 68 68 68 64 0 4 68 68 51 51 68 64 0 4 68 67 51 51 52 64 0 4 68 68 51 51 68 64 0 4 68 68 66 68 68 64 0 4 68 68 66 68 68 64 0 1 20 17 18 17 68 64 0 1 17 17 17 17 17 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]) ; colorMap:((OrderedCollection new add:(Color black); add:(Color red:0.0 green:53.7255 blue:0.0); add:(Color red:52.1569 green:23.5279 blue:14.1161); add:(Color red:0.0 green:80.7828 blue:0.0); add:(Color red:68.2353 green:85.4902 blue:90.1961); add:(Color black); add:(Color white); add:(Color red:100.0 green:0.0 blue:0.0); add:(Color red:0.0 green:100.0 blue:0.0); add:(Color red:0.0 green:0.0 blue:100.0); add:(Color red:0.0 green:100.0 blue:100.0); add:(Color red:100.0 green:100.0 blue:0.0); add:(Color red:100.0 green:0.0 blue:100.0); add:(Color red:49.9977 green:0.0 blue:0.0); add:(Color red:0.0 green:49.9977 blue:0.0); add:(Color red:0.0 green:0.0 blue:49.9977); yourself)); mask:((ImageMask new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 255 252 255 252 255 252 255 252 255 252 255 252 255 252 255 252 255 252 255 252 0 0 0 0 0 0]) ; yourself); yourself!
+
+    ^Icon
+        constantNamed:#'Method imageFileIcon'
+        ifAbsentPut:[(Depth4Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@DQDQDQDQ@@@QDQCL3QD@@ADQCL3L4P@@DQDP3L4Q@@@QDQDIDQD@@ADQDP$QDP@@AEADRDTQ@@@DQDQDQDQ@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b'); colorMap:((OrderedCollection new add:(Color black); add:(Color red:0.0 green:53.7255 blue:0.0); add:(Color red:52.1569 green:23.5279 blue:14.1146); add:(Color red:0.0 green:80.7828 blue:0.0); add:(Color red:68.2353 green:85.4902 blue:90.1961); add:(Color black); add:(Color white); add:(Color red:100.0 green:0.0 blue:0.0); add:(Color red:0.0 green:100.0 blue:0.0); add:(Color red:0.0 green:0.0 blue:100.0); add:(Color red:0.0 green:100.0 blue:100.0); add:(Color red:100.0 green:100.0 blue:0.0); add:(Color red:100.0 green:0.0 blue:100.0); add:(Color red:49.9962 green:0.0 blue:0.0); add:(Color red:0.0 green:49.9962 blue:0.0); add:(Color red:0.0 green:0.0 blue:49.9962); yourself)); mask:((ImageMask new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@??3??O?<??3??O?<??3??O?<??0@@@@@@@@b'); yourself); yourself]!
 
 menuIcon
+    "Generated by the Image Editor"
+    "
+    ImageEditor openOnClass:self andSelector:#menuIcon
+    "
 
     <resource: #image>
-    ^(Depth1Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 0 0 127 224 127 224 0 0 127 224 127 224 0 0 127 224 127 224 0 0 0 0 0 0 0 0]) ; colorMap:((OrderedCollection new add:(Color black); add:(Color white); yourself)); mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 255 240 255 240 255 240 255 240 255 240 255 240 255 240 255 240 255 240 255 240 0 0 0 0 0 0]) ; yourself); yourself! !
+
+    ^Icon
+        constantNamed:#'Method menuIcon'
+        ifAbsentPut:[(Depth1Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@A?8G? @@A?8G? @@A?8G? @@@@@@@@@@@b'); colorMap:((OrderedCollection new add:(Color black); add:(Color white); yourself)); mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@??C?<O?0??C?<O?0??C?<O?0??@@@@@@@@@b'); yourself); yourself]!
+
+resourceTypes
+
+    ^#(
+        canvas
+        menu
+        image
+        fileImage
+        hierarchicalList
+        tabList
+    )
+
+!
+
+tabListIcon
+    "Generated by the Image Editor"
+    "
+    ImageEditor openOnClass:self andSelector:#tabListIcon
+    "
+
+    <resource: #image>
+
+    ^Icon
+        constantNamed:#'Method tabListIcon'
+        ifAbsentPut:[(Depth1Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@A- F@@_>A?8G? _>A?8G? @@@@@@@@@@@b'); colorMap:((OrderedCollection new add:(Color black); add:(Color white); yourself)); mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@?<C?0O?0??C?<O?0??C?<O?0??@@@@@@@@@b'); yourself); yourself]! !
 
 !Method class methodsFor:'special'!
 
@@ -2148,26 +2206,15 @@
 resourceType
     "ST-80 compatibility:
      return the methods first resource specs key; either nil, 
-     or a single symbol such as #canvas, #menu etc.
-     Since VW programs do not expect the additional ST/X resources,
-     these are ignored here - therefore only one of
-     #canvas, #menu, #image #fileImage or nil are returned (for now)"
+     or a single symbol containing in Method>>resourceTypes."
 
     self hasResource ifFalse:[^ nil].
     self resources keysAndValuesDo:[:key :val |
-					(#(
-					    canvas
-					    image
-					    fileImage
-					    menu
-					) includes:key) ifTrue:[
-					    ^ key
-					]
-				   ].
+                                        (self class resourceTypes includes:key) ifTrue:[
+                                            ^ key
+                                        ]
+                                   ].
     ^ nil
-
-    "Created: / 27.10.1997 / 14:10:58 / cg"
-    "Modified: / 28.10.1997 / 13:24:18 / cg"
 !
 
 resources
@@ -2562,6 +2609,6 @@
 !Method class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Method.st,v 1.150 1998-01-26 14:06:42 tz Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Method.st,v 1.151 1998-01-29 12:58:07 tz Exp $'
 ! !
 Method initialize!