diff -r 9f95bababe1b -r 6b958036f5c4 UIPainter.st --- a/UIPainter.st Sun May 31 20:26:37 2009 +0200 +++ b/UIPainter.st Mon Jun 01 08:36:33 2009 +0200 @@ -2966,7 +2966,7 @@ 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 + and all widgets in the selection can change their layout through to a move or align operation" ^ builder booleanValueAspectFor:#canMoveOrAlignSelection @@ -2981,14 +2981,14 @@ ! canMoveSelectionIntoContainer - "returns true in case that one widget is selected and can change its container + "returns true in case that at least one widget is selected and can change its container widget to an element below" ^ builder booleanValueAspectFor:#canMoveSelectionIntoContainer ! canMoveSelectionOutOfContainer - "returns a boolean value holder which is true in case that one widget is selected + "returns a boolean value holder which is true in case that at least one widget is selected which is contained within another component" ^ builder booleanValueAspectFor:#canMoveSelectionOutOfContainer @@ -3012,6 +3012,13 @@ ^ true ! +canResizeSelection + "returns a boolean value holder which is true in case that any selection exists + and all widgets in the selection can be resized" + + ^ builder booleanValueAspectFor:#canResizeSelection +! + editToolBarVisibleHolder |holder| @@ -3511,6 +3518,7 @@ |canCutOrCopy| self canMoveOrAlignSelection value:(treeView canMoveOrAlignSelection). + self canResizeSelection value:(treeView canResizeSelection). self canExchangeSelectionLayouts value:(treeView canExchangeSelectionLayouts). self canChangeOrderInContainer value:(treeView canChangeOrderInContainer). self canMoveSelectionIntoContainer value:(treeView canMoveSelectionIntoContainer). @@ -6053,7 +6061,9 @@ (size := sel size) ~~ 0 ifTrue:[ list := OrderedCollection new:size. - sel do:[:aView||item| + sel do:[:aView| + |item| + (item := self itemOfView:aView) notNil ifTrue:[ list add:item. model doMakeVisible:item. @@ -6095,6 +6105,17 @@ self removeFromSelection:index. self selectionChangedFrom:oldSel. ]. +! + +selectedViews + ^ self selection + collect:[:index | + |node view| + + node := listOfNodes at:index. + view := node contents view. + view + ] ! ! !UIPainter::TreeView methodsFor:'change & update'! @@ -6468,6 +6489,13 @@ ^ false ! +canResizeSelection + "returns true if all selected widgets can be resized" + + selection isEmptyOrNil ifTrue:[ ^ false ]. + ^ self canvas canResize:(self selectedViews) +! + hasOneSelectionOtherThanCanvas "returns true in case that one selection exists other than the canvas"