UIPainter.st
changeset 565 8fdeb11c72fd
parent 564 df1f1e84d94a
child 572 ac2a1dd83d28
--- a/UIPainter.st	Tue Feb 03 13:51:57 1998 +0100
+++ b/UIPainter.st	Tue Feb 03 14:36:40 1998 +0100
@@ -503,11 +503,11 @@
           #'window:' 
            #(#WindowSpec
               #'name:' 'Tree-View'
-              #'layout:' #(#LayoutFrame 6 0 391 0 558 0 916 0)
+              #'layout:' #(#LayoutFrame 251 0 316 0 803 0 841 0)
               #'label:' 'Tree-View'
               #'min:' #(#Point 10 10)
               #'max:' #(#Point 1160 870)
-              #'bounds:' #(#Rectangle 6 391 559 917)
+              #'bounds:' #(#Rectangle 251 316 804 842)
               #'menu:' #menu
               #'usePreferredExtent:' false
           )
@@ -664,7 +664,7 @@
                                                             #'tabable:' true
                                                             #'model:' #cancel
                                                             #'enableChannel:' #modifiedChannel
-                                                            #'extent:' #(#Point 179 24)
+                                                            #'extent:' #(#Point 180 24)
                                                         )
                                                          #(#ActionButtonSpec
                                                             #'name:' 'acceptButton'
@@ -1621,7 +1621,7 @@
                 #'isButton:' true
                 #'value:' #doStepUp
                 #'activeHelpKey:' #moveSelectionUp
-                #'enabled:' #canMoveOrAlignSelection
+                #'enabled:' #canChangeOrderInContainer
                 #'labelImage:' #(#ResourceRetriever nil #upIcon)
             )
              #(#MenuItem
@@ -1629,7 +1629,7 @@
                 #'isButton:' true
                 #'value:' #doStepDown
                 #'activeHelpKey:' #moveSelectionDown
-                #'enabled:' #canMoveOrAlignSelection
+                #'enabled:' #canChangeOrderInContainer
                 #'labelImage:' #(#ResourceRetriever nil #downIcon)
             )
              #(#MenuItem
@@ -1936,6 +1936,12 @@
 
 !UIPainter methodsFor:'aspects'!
 
+canChangeOrderInContainer
+    "returns a boolean value holder which is true if the component order can be changed within their container.
+    "
+    ^ builder booleanValueAspectFor:#canChangeOrderInContainer
+!
+
 canMoveOrAlignSelection
     "returns a boolean value holder which is true in case that any selection exists
      and all widgets in the selection can change its layout through to a move or
@@ -2553,6 +2559,7 @@
         ]
     ].
     self canMoveOrAlignSelection        value:(treeView canMoveOrAlignSelection).
+    self canChangeOrderInContainer      value:(treeView canChangeOrderInContainer).
     self canMoveSelectionIntoContainer  value:(treeView canMoveSelectionIntoContainer).
     self canMoveSelectionOutOfContainer value:(treeView canMoveSelectionOutOfContainer).
     self hasOneSelectionOtherThanCanvas value:(treeView hasOneSelectionOtherThanCanvas).
@@ -3732,6 +3739,18 @@
 
 !UIPainter::TreeView methodsFor:'queries'!
 
+canChangeOrderInContainer
+    "returns true if any selection exists and all widgets in the selection
+     can change their layout through to a move or align operation.
+    "
+    |canvas|
+
+    ((selection size ~~ 1) or: [(selection at: 1) == 1]) ifTrue:[
+        ^ false
+    ].
+    ^ true
+!
+
 canMoveOrAlignSelection
     "returns true if any selection exists and all widgets in the selection
      can change their layout through to a move or align operation.