UIPainter.st
changeset 778 a4b931b2aff6
parent 774 5ca0853de0bc
child 785 35ad7901368c
--- a/UIPainter.st	Tue Apr 14 13:35:47 1998 +0200
+++ b/UIPainter.st	Wed Apr 15 12:46:40 1998 +0200
@@ -352,7 +352,7 @@
     "This resource specification was automatically generated
      by the ImageEditor of ST/X."
 
-    "Do not manually edit this!!!! If it is corrupted,
+    "Do not manually edit this!! If it is corrupted,
      the ImageEditor may not be able to read the specification."
 
     "
@@ -363,13 +363,14 @@
 
     ^Icon
         constantNamed:#'UIPainter iconAlignB'
-        ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@E@@@@@@@G@@@@@@@G@E@@@@@G@G@@@@@G@G@@@@@G@G@@@E@G@G@@@G@G@G@K@G@G@G@@@G@G@G@A@G@G@G@@@G@G@G@K@@@@@@@@B*****(@B*****(@@@@@@@@@@@@@@@@@@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 0 0 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@G C@G @@G'' @G'' @G'' @G'' G'''' G'''' G'''' G''''!!G'''' G'''' G'''' G'''' O??0O??0@@@@@@@C@@@@') ; yourself); yourself]!
+        ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@E@@@@@@@G@@@@@@@G@E@@@@@G@G@@@@@G@G@@@@@G@G@@@E@G@G@@@G@G@G@K@G@G@G@@@G@G@G@A@G@G@G@@@G@G@G@K@@@@@@@@B*****(@B*****(@@@@@@@@@@@@@@@@@@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 0 0 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@G C@G @@G'' @G'' @G'' @G'' G'''' G'''' G'''' G''''!!G'''' G'''' G'''' G'''' O??0O??0@@@@@@@C@@@@') ; yourself); yourself]
+!
 
 iconAlignL
     "This resource specification was automatically generated
      by the ImageEditor of ST/X."
 
-    "Do not manually edit this!!!! If it is corrupted,
+    "Do not manually edit this!! If it is corrupted,
      the ImageEditor may not be able to read the specification."
 
     "
@@ -380,7 +381,8 @@
 
     ^Icon
         constantNamed:#'UIPainter iconAlignL'
-        ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@(@@@@@@@(@@@@@@@(UUUP@I@(_??0@@@(@@@@@@@(@@@@@@@(@@@@@@@(@@@@@@@(UUUU@@@(_???@@@(@@@@@E@(@@@@@@@(@@@@@@@(@@@@@@@(UU@@@@@(_?@@@@@(@@@@@@@(@@@@@@@@@@@@@E@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 0 0 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@F@@@G?>@G?>@G?>@G?>@F@@@F@@@G?? G?? G?? G?? F@@@F@@@G? @G? @G? @G? @F@@@@@@@@@@@') ; yourself); yourself]!
+        ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@(@@@@@@@(@@@@@@@(UUUP@I@(_??0@@@(@@@@@@@(@@@@@@@(@@@@@@@(@@@@@@@(UUUU@@@(_???@@@(@@@@@E@(@@@@@@@(@@@@@@@(@@@@@@@(UU@@@@@(_?@@@@@(@@@@@@@(@@@@@@@@@@@@@E@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 0 0 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@F@@@G?>@G?>@G?>@G?>@F@@@F@@@G?? G?? G?? G?? F@@@F@@@G? @G? @G? @G? @F@@@@@@@@@@@') ; yourself); yourself]
+!
 
 iconAlignLR
     "This resource specification was automatically generated
@@ -403,7 +405,7 @@
     "This resource specification was automatically generated
      by the ImageEditor of ST/X."
 
-    "Do not manually edit this!!!! If it is corrupted,
+    "Do not manually edit this!! If it is corrupted,
      the ImageEditor may not be able to read the specification."
 
     "
@@ -420,7 +422,7 @@
     "This resource specification was automatically generated
      by the ImageEditor of ST/X."
 
-    "Do not manually edit this!!!! If it is corrupted,
+    "Do not manually edit this!! If it is corrupted,
      the ImageEditor may not be able to read the specification."
 
     "
@@ -431,13 +433,14 @@
 
     ^Icon
         constantNamed:#'UIPainter iconAlignT'
-        ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@B*****(@B*****(@@@@@@@@@@E@E@E@K@G@G@G@@@G@G@G@A@G@G@G@@@G@G@G@K@G@G@G@@@@@G@G@@@@@G@G@@@@@G@G@@@@@G@G@@@@@G@@@@@@@G@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 0 0 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@C@@@@O??0O??0G'''' G'''' G'''' G'''' G''''!!G'''' G'''' G'''' @G'' @G'' @G'' @G'' @G @@G C@@@@@@@@@@@@') ; yourself); yourself]!
+        ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@B*****(@B*****(@@@@@@@@@@E@E@E@K@G@G@G@@@G@G@G@A@G@G@G@@@G@G@G@K@G@G@G@@@@@G@G@@@@@G@G@@@@@G@G@@@@@G@G@@@@@G@@@@@@@G@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 0 0 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@C@@@@O??0O??0G'''' G'''' G'''' G'''' G''''!!G'''' G'''' G'''' @G'' @G'' @G'' @G'' @G @@G C@@@@@@@@@@@@') ; yourself); yourself]
+!
 
 iconAlignTB
     "This resource specification was automatically generated
      by the ImageEditor of ST/X."
 
-    "Do not manually edit this!!!! If it is corrupted,
+    "Do not manually edit this!! If it is corrupted,
      the ImageEditor may not be able to read the specification."
 
     "
@@ -448,7 +451,8 @@
 
     ^Icon
         constantNamed:#'UIPainter iconAlignTB'
-        ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@A@@@@@@@@@@@@@@@@B*****(@B*****(@@@@@@@@@@E@E@E@G@G@G@G@@@G@G@G@@@G@G@G@@@G@G@G@H@G@G@G@@@G@G@G@A@G@G@G@@@G@G@G@@@G@G@D@@@@@@@@@@B*****(@B*****(@@@@@@@@@@@@@@@@H@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 0 0 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@C@@@@O??0O??0G'''' G''''!!G'''' G'''' G'''' G'''' G'''' G'''' G''''!!G''''!!G''& G'''' O??0O??2@@@@@@@@@@@@') ; yourself); yourself]! !
+        ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@A@@@@@@@@@@@@@@@@B*****(@B*****(@@@@@@@@@@E@E@E@G@G@G@G@@@G@G@G@@@G@G@G@@@G@G@G@H@G@G@G@@@G@G@G@A@G@G@G@@@G@G@G@@@G@G@D@@@@@@@@@@B*****(@B*****(@@@@@@@@@@@@@@@@H@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 0 0 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@C@@@@O??0O??0G'''' G''''!!G'''' G'''' G'''' G'''' G'''' G'''' G''''!!G''''!!G''& G'''' O??0O??2@@@@@@@@@@@@') ; yourself); yourself]
+! !
 
 !UIPainter class methodsFor:'interface specs'!
 
@@ -1107,7 +1111,7 @@
     "This resource specification was automatically generated
      by the MenuEditor of ST/X."
 
-    "Do not manually edit this. If it is corrupted,
+    "Do not manually edit this!! If it is corrupted,
      the MenuEditor may not be able to read the specification."
 
     "
@@ -1443,7 +1447,7 @@
     "This resource specification was automatically generated
      by the MenuEditor of ST/X."
 
-    "Do not manually edit this. If it is corrupted,
+    "Do not manually edit this!! If it is corrupted,
      the MenuEditor may not be able to read the specification."
 
     "
@@ -1581,7 +1585,7 @@
     "This resource specification was automatically generated
      by the MenuEditor of ST/X."
 
-    "Do not manually edit this. If it is corrupted,
+    "Do not manually edit this!! If it is corrupted,
      the MenuEditor may not be able to read the specification."
 
     "
@@ -1950,6 +1954,7 @@
 
     editor := TabListEditor new.
     editor masterApplication:self.
+    selector isArray ifTrue: [^self warn: 'Cannot open the Tab List Editor on an array!!!!'].
     editor openModalOnClass:specClass andSelector:selector.
 
     editor specSelector ~= selector ifTrue:[
@@ -3577,30 +3582,24 @@
     [:aNode|
         |specClass|       
         (specClass := aNode contents spec) isNil 
-        ifTrue:  
-        [
-            WindowSpec icon
-        ]
-        ifFalse:
-        [
-            ((selection size > 1) and: [(listOfNodes at:selection first) == aNode])
-            ifTrue: 
-            [
-                specClass class icon copyWithColorMapProcessing:[:clr | clr blendWith:Color red]
-            ] 
-            ifFalse:
-            [
-                specClass class icon
-            ]
-        ]. 
+            ifTrue: [WindowSpec icon]
+            ifFalse:[specClass class icon]
     ].
 
     self model labelAction: 
     [:aNode|
         |spec|
         (spec := aNode contents spec) notNil
-            ifTrue:  [self nameForSpecInList:spec] 
-            ifFalse: [aNode name]
+        ifTrue:  
+        [   
+            ((selection size > 1) and: [(listOfNodes at:selection first) == aNode])
+                ifTrue: [(Text string:'M' foregroundColor:Color black backgroundColor:Color red), ' ',(self nameForSpecInList:spec)] 
+                ifFalse:[self nameForSpecInList:spec]
+        ] 
+        ifFalse: 
+        [
+            aNode name
+        ]
     ]
 ! !
 
@@ -3630,14 +3629,21 @@
             ]
         ].
         self canvas updateSelectionFromModel:sel
-    ].
+    ].             
     size = 1 ifTrue:[
-        oldSelection size = 2 ifTrue: [
-        self redrawLine: (lastDrawnMaster := selection first)]
+        oldSelection size > 1 ifTrue: [
+            (listOfNodes at:lastDrawnMaster) retrieveLabel.
+            self redrawLine: lastDrawnMaster. 
+            lastDrawnMaster := selection first
+        ]
     ].
     size > 1 ifTrue:[
         selection first ~~ lastDrawnMaster ifTrue: [
-        self redrawLine: (lastDrawnMaster := selection first)]
+            (listOfNodes at:selection first) retrieveLabel.
+            lastDrawnMaster notNil ifTrue: [(listOfNodes at:lastDrawnMaster) retrieveLabel].
+            self redrawLine: lastDrawnMaster. 
+            self redrawLine: (lastDrawnMaster := selection first)
+        ]
     ]
     ifFalse: [
         lastDrawnMaster := nil