--- a/UIPainter.st Sat Mar 14 12:12:53 1998 +0100
+++ b/UIPainter.st Sat Mar 14 12:17:03 1998 +0100
@@ -333,6 +333,80 @@
"Modified: / 1.2.1998 / 14:42:56 / cg"
! !
+!UIPainter class methodsFor:'image specs'!
+
+iconAlignB
+ "Generated by the Image Editor"
+ "
+ ImageEditor openOnClass:self andSelector:#iconAlignB
+ "
+
+ <resource: #image>
+
+ ^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]!
+
+iconAlignL
+ "Generated by the Image Editor"
+ "
+ ImageEditor openOnClass:self andSelector:#iconAlignL
+ "
+
+ <resource: #image>
+
+ ^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]!
+
+iconAlignLR
+ "Generated by the Image Editor"
+ "
+ ImageEditor openOnClass:self andSelector:#iconAlignLR
+ "
+
+ <resource: #image>
+
+ ^Icon
+ constantNamed:#'UIPainter iconAlignLR'
+ ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@(@@@B @@(@@@B @@(UUUR I@(_??2 @@(@@@B @@(@@@B @@(@@@B @@(@@@B @@(UUUR @@(_??2 @@(@@@B E@(@@@B @@(@@@B @@(@@@B @@(UUUR @@(_??B @@(@@@B @@(@@@B @@@@@@@@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@A G?? G?? G?? G?? F@A F@A G?? G?? G?? G?? F@A F@A G?? G?? G?; G?? F@A @@@@@@@@') ; yourself); yourself]!
+
+iconAlignR
+ "Generated by the Image Editor"
+ "
+ ImageEditor openOnClass:self andSelector:#iconAlignR
+ "
+
+ <resource: #image>
+
+ ^Icon
+ constantNamed:#'UIPainter iconAlignR'
+ ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@B @@@@@@B @@@UUUR I@@_??2 @@@@@@B @@@@@@B @@@@@@B @@@@@@B @@EUUUR @@G???2 @@@@@@B E@@@@@B @@@@@@B @@@@@@B @@@@EUR @@@@G?2 @@@@@@B @@@@@@B @@@@@@@@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:'@@@@@@@@@@A A?? A?? A?? A?? @@A @@A G?? G?? G?? G?? @@A @@A @G? @G? @G? @G? @@A @@@@@@@@') ; yourself); yourself]!
+
+iconAlignT
+ "Generated by the Image Editor"
+ "
+ ImageEditor openOnClass:self andSelector:#iconAlignT
+ "
+
+ <resource: #image>
+
+ ^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]!
+
+iconAlignTB
+ "Generated by the Image Editor"
+ "
+ ImageEditor openOnClass:self andSelector:#iconAlignTB
+ "
+
+ <resource: #image>
+
+ ^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]! !
+
!UIPainter class methodsFor:'interface specs'!
gridParametersSpec
@@ -539,11 +613,11 @@
#window:
#(#WindowSpec
#name: 'GUI Painter'
- #layout: #(#LayoutFrame 282 0 281 0 834 0 818 0)
+ #layout: #(#LayoutFrame 453 0 344 0 1005 0 881 0)
#label: 'GUI Painter'
#min: #(#Point 10 10)
#max: #(#Point 1160 870)
- #bounds: #(#Rectangle 282 281 835 819)
+ #bounds: #(#Rectangle 453 344 1006 882)
#menu: #menu
#usePreferredExtent: false
)
@@ -669,7 +743,7 @@
#tabable: true
#model: #cancel
#enableChannel: #modifiedChannel
- #extent: #(#Point 183 24)
+ #extent: #(#Point 182 24)
)
#(#ActionButtonSpec
#name: 'acceptButton'
@@ -1500,86 +1574,6 @@
)
! !
-!UIPainter class methodsFor:'resources'!
-
-iconAlignB
- "Generated by the Image Editor"
- "
- ImageEditor openOnClass:self andSelector:#iconAlignB
- "
-
- <resource: #image>
-
- ^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]
-!
-
-iconAlignL
- "Generated by the Image Editor"
- "
- ImageEditor openOnClass:self andSelector:#iconAlignL
- "
-
- <resource: #image>
-
- ^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]
-!
-
-iconAlignLR
- "Generated by the Image Editor"
- "
- ImageEditor openOnClass:self andSelector:#iconAlignLR
- "
-
- <resource: #image>
-
- ^Icon
- constantNamed:#'UIPainter iconAlignLR'
- ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@(@@@B @@(@@@B @@(UUUR I@(_??2 @@(@@@B @@(@@@B @@(@@@B @@(@@@B @@(UUUR @@(_??2 @@(@@@B E@(@@@B @@(@@@B @@(@@@B @@(UUUR @@(_??B @@(@@@B @@(@@@B @@@@@@@@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@A G?? G?? G?? G?? F@A F@A G?? G?? G?? G?? F@A F@A G?? G?? G?; G?? F@A @@@@@@@@') ; yourself); yourself]
-!
-
-iconAlignR
- "Generated by the Image Editor"
- "
- ImageEditor openOnClass:self andSelector:#iconAlignR
- "
-
- <resource: #image>
-
- ^Icon
- constantNamed:#'UIPainter iconAlignR'
- ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@B @@@@@@B @@@UUUR I@@_??2 @@@@@@B @@@@@@B @@@@@@B @@@@@@B @@EUUUR @@G???2 @@@@@@B E@@@@@B @@@@@@B @@@@@@B @@@@EUR @@@@G?2 @@@@@@B @@@@@@B @@@@@@@@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:'@@@@@@@@@@A A?? A?? A?? A?? @@A @@A G?? G?? G?? G?? @@A @@A @G? @G? @G? @G? @@A @@@@@@@@') ; yourself); yourself]
-!
-
-iconAlignT
- "Generated by the Image Editor"
- "
- ImageEditor openOnClass:self andSelector:#iconAlignT
- "
-
- <resource: #image>
-
- ^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]
-!
-
-iconAlignTB
- "Generated by the Image Editor"
- "
- ImageEditor openOnClass:self andSelector:#iconAlignTB
- "
-
- <resource: #image>
-
- ^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]
-! !
-
!UIPainter methodsFor:'actions'!
accept
@@ -1945,9 +1939,9 @@
ifFalse: [editor openModalOnMenu:selectorOrMenu].
self helpTool updateList.
- editor selectorName ~= selectorOrMenu ifTrue:[
- editor didInstall ifTrue:[
- self specTool specification menuSelector:editor selectorName asSymbol.
+ editor specSelector ~= selectorOrMenu ifTrue:[
+ editor hasSaved ifTrue:[
+ self specTool specification menuSelector:editor specSelector.
self modifiedChannel value:true.
self accept
]
@@ -1970,26 +1964,15 @@
(aspect := self specTool specification hierarchicalList) notNil ifTrue:[
aspect := aspect asSymbol
- ] ifFalse:[
- "/ cg: q&d hack ...
-
- aspect := treeView propertySelected.
- aspect notNil ifTrue:[
- Object errorSignal handle:[:ex |
- aspect := nil.
- ] do:[
- aspect := aspect view asMenu.
- ]
- ].
].
-
+
editor := HierarchicalListEditor new.
editor masterApplication:self.
editor openModalOnClass:cls andSelector:aspect.
- editor selectorName ~= aspect ifTrue:[
- editor didInstall ifTrue:[
- self specTool specification hierarchicalList:editor selectorName asSymbol.
+ editor specSelector ~= aspect ifTrue:[
+ editor hasSaved ifTrue:[
+ self specTool specification hierarchicalList:editor specSelector.
self modifiedChannel value:true.
self accept
]
@@ -2649,8 +2632,12 @@
painter := self painter.
self setClass:aClass selector:aSelector.
(aClass respondsTo:aSelector) ifTrue:[
- painter setupFromSpec:(aClass perform:aSelector).
- treeView selection: #(1).
+ "take care for those who do close very quickly"
+ Object errorSignal handle: [:ex|] do:
+ [
+ painter setupFromSpec:(aClass perform:aSelector).
+ treeView selection: #(1)
+ ].
]
]
@@ -2770,7 +2757,7 @@
request: 'Load Window Spec From Class'
onSuperclass: nil
andClass: specClass
- andSelector: specSelector
+ andSelector: specSelector ? #windowSpec
withResourceTypes: #(canvas))
!
@@ -2925,7 +2912,7 @@
self treeSelection. "ask for modification"
(resourceMessage := ResourceSelectionBrowser
- request: 'Save In Class'
+ request: 'Save Window Spec In Class'
onSuperclass: #Object
andClass: specClass ? #ApplicationModel
andSelector: specSelector ? #windowSpec