commit buttons replaced by subSpec in ToolApplicationModel + new button icons
authortz
Mon, 19 Jan 1998 11:38:41 +0100
changeset 430 fa18d386b936
parent 429 132c3299631c
child 431 23ff7c325946
commit buttons replaced by subSpec in ToolApplicationModel + new button icons
HierarchicalListEditor.st
--- a/HierarchicalListEditor.st	Mon Jan 19 10:59:39 1998 +0100
+++ b/HierarchicalListEditor.st	Mon Jan 19 11:38:41 1998 +0100
@@ -79,11 +79,11 @@
           #'window:' 
            #(#WindowSpec
               #'name:' 'Painter'
-              #'layout:' #(#LayoutFrame 202 0 207 0 502 0 335 0)
+              #'layout:' #(#LayoutFrame 233 0 430 0 533 0 558 0)
               #'label:' 'Painter'
               #'min:' #(#Point 10 10)
               #'max:' #(#Point 1160 870)
-              #'bounds:' #(#Rectangle 202 207 503 336)
+              #'bounds:' #(#Rectangle 233 430 534 559)
               #'usePreferredExtent:' false
           )
           #'component:' 
@@ -124,34 +124,11 @@
                     #'model:' #specSelectorChannel
                     #'type:' #string
                 )
-                 #(#HorizontalPanelViewSpec
-                    #'name:' 'commitPanel'
-                    #'layout:' #(#LayoutFrame 0 0.0 -24 1.0 0 1.0 0 1.0)
-                    #'component:' 
-                     #(#SpecCollection
-                        #'collection:' 
-                         #(
-                           #(#ActionButtonSpec
-                              #'name:' 'cancel'
-                              #'label:' 'Cancel'
-                              #'tabable:' true
-                              #'model:' #cancel
-                              #'extent:' #(#Point 146 24)
-                          )
-                           #(#ActionButtonSpec
-                              #'name:' 'accept'
-                              #'label:' 'OK'
-                              #'tabable:' true
-                              #'model:' #accept
-                              #'isDefault:' true
-                              #'extent:' #(#Point 146 24)
-                          )
-                        )
-                    )
-                    #'horizontalLayout:' #fitSpace
-                    #'verticalLayout:' #fit
-                    #'horizontalSpace:' 3
-                    #'verticalSpace:' 3
+                 #(#UISubSpecification
+                    #'name:' 'SubSpecification'
+                    #'layout:' #(#LayoutFrame 0 0.0 -29 1 0 1.0 -5 1.0)
+                    #'majorKey:' #ToolApplicationModel
+                    #'minorKey:' #windowSpecForCommitWithoutChannels
                 )
               )
           )
@@ -183,7 +160,6 @@
             )
              #(#MenuItem
                 #'label:' 'File'
-                #'accessCharacterPosition:' 1
                 #'submenu:' 
                  #(#Menu
                     
@@ -230,13 +206,11 @@
             )
              #(#MenuItem
                 #'label:' 'Edit'
-                #'accessCharacterPosition:' 1
                 #'submenuChannel:' #menuEdit
             )
              #(#MenuItem
                 #'label:' 'Browse'
                 #'enabled:' #hasValidClass
-                #'accessCharacterPosition:' 1
                 #'submenu:' 
                  #(#Menu
                     
@@ -360,14 +334,14 @@
                 #'isButton:' true
                 #'value:' #doCreateChild
                 #'enabled:' #canCreateChildChannel
-                #'labelImage:' #(#ResourceRetriever #MenuEditor #submenuImage)
+                #'labelImage:' #(#ResourceRetriever nil #createChildIcon)
             )
              #(#MenuItem
                 #'label:' 'Create Sister'
                 #'isButton:' true
                 #'value:' #doCreateSister
                 #'enabled:' #canCreateSisterChannel
-                #'labelImage:' #(#ResourceRetriever #MenuEditor #menuItemImage)
+                #'labelImage:' #(#ResourceRetriever nil #createSisterIcon)
             )
              #(#MenuItem
                 #'label:' ''
@@ -424,11 +398,11 @@
           #'window:' 
            #(#WindowSpec
               #'name:' 'Painter'
-              #'layout:' #(#LayoutFrame 153 0 206 0 433 0 284 0)
+              #'layout:' #(#LayoutFrame 151 0 377 0 431 0 455 0)
               #'label:' 'Painter'
               #'min:' #(#Point 10 10)
               #'max:' #(#Point 1160 870)
-              #'bounds:' #(#Rectangle 153 206 434 285)
+              #'bounds:' #(#Rectangle 151 377 432 456)
               #'usePreferredExtent:' false
           )
           #'component:' 
@@ -449,34 +423,11 @@
                     #'model:' #specSelectorChannel
                     #'type:' #string
                 )
-                 #(#HorizontalPanelViewSpec
-                    #'name:' 'commitPanel'
-                    #'layout:' #(#LayoutFrame 0 0.0 -24 1.0 0 1.0 0 1.0)
-                    #'component:' 
-                     #(#SpecCollection
-                        #'collection:' 
-                         #(
-                           #(#ActionButtonSpec
-                              #'name:' 'cancel'
-                              #'label:' 'Cancel'
-                              #'tabable:' true
-                              #'model:' #cancel
-                              #'extent:' #(#Point 136 24)
-                          )
-                           #(#ActionButtonSpec
-                              #'name:' 'accept'
-                              #'label:' 'OK'
-                              #'tabable:' true
-                              #'model:' #accept
-                              #'isDefault:' true
-                              #'extent:' #(#Point 136 24)
-                          )
-                        )
-                    )
-                    #'horizontalLayout:' #fitSpace
-                    #'verticalLayout:' #fit
-                    #'horizontalSpace:' 3
-                    #'verticalSpace:' 3
+                 #(#UISubSpecification
+                    #'name:' 'SubSpecification'
+                    #'layout:' #(#LayoutFrame 0 0.0 -29 1 0 1.0 -5 1.0)
+                    #'majorKey:' #ToolApplicationModel
+                    #'minorKey:' #windowSpecForCommitWithoutChannels
                 )
               )
           )
@@ -652,6 +603,20 @@
     aStream cr.
 ! !
 
+!HierarchicalListEditor class methodsFor:'resources'!
+
+createChildIcon
+    "ImageEditor openOnClass:self andSelector:#createChildIcon"
+
+    <resource: #image>
+    ^(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 5 85 85 85 0 0 7 255 255 255 32 0 7 255 255 255 40 0 7 255 255 255 0 0 7 255 255 255 254 0 7 255 255 255 254 0 7 255 255 255 254 0 7 255 255 255 254 0 7 255 255 255 254 0 7 255 255 255 254 0 7 255 255 255 254 0 7 255 255 255 254 0 7 255 255 255 254 0 7 204 204 207 14 0 7 60 204 207 50 0 7 60 12 207 50 0 7 60 204 207 50 0 7 204 204 195 14 0 7 255 255 255 254 0 14 170 170 170 170 0 0 0 0 0 0 0]) ; colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color grey:49.9962)); at:4 put:((Color grey:66.9978)); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[127 255 128 127 255 192 127 255 224 127 255 240 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248]) ; yourself); yourself!
+
+createSisterIcon
+    "ImageEditor openOnClass:self andSelector:#createSisterIcon"
+
+    <resource: #image>
+    ^(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 5 85 85 85 0 0 7 255 255 255 32 0 7 255 255 255 40 0 7 255 255 255 0 0 7 255 255 255 254 0 7 255 255 255 254 0 7 255 255 255 254 0 7 195 60 63 254 0 7 63 51 255 254 0 7 207 60 240 62 0 7 243 63 63 254 0 7 15 48 255 254 0 7 255 255 255 254 0 7 3 3 15 254 0 7 207 63 51 254 0 7 207 3 15 254 0 7 207 63 51 254 0 7 207 3 51 254 0 7 255 255 255 254 0 14 170 170 170 170 0 0 0 0 0 0 0]) ; colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color grey:49.9962)); at:4 put:((Color grey:66.9978)); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[127 255 128 127 255 192 127 255 224 127 255 240 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248]) ; yourself); yourself! !
+
 !HierarchicalListEditor methodsFor:'accessing'!
 
 didInstall