378 ! |
378 ! |
379 |
379 |
380 pasteSpecifications:aSpecificationOrList into:aContainerOrNil beforeIndex:anIndexOrNil keepLayout:keepLayout keepPosition:keepPosition at:aPointOrNilOrKeep |
380 pasteSpecifications:aSpecificationOrList into:aContainerOrNil beforeIndex:anIndexOrNil keepLayout:keepLayout keepPosition:keepPosition at:aPointOrNilOrKeep |
381 "add the specs to the object view; returns list of pasted widgets" |
381 "add the specs to the object view; returns list of pasted widgets" |
382 |
382 |
383 |specsToPaste pasteOffset builder newSel |
383 |sensor specsToPaste pasteOffset builder newSel |
384 bounds containerToPasteInto pastePoint beforeIndex| |
384 bounds containerToPasteInto pastePoint beforeIndex| |
385 |
385 |
386 treeView askForSelectionChangeAllowed ifFalse:[^ nil]. |
386 treeView askForSelectionChangeAllowed ifFalse:[^ nil]. |
387 |
387 |
|
388 sensor := self window sensor. |
|
389 |
388 containerToPasteInto := aContainerOrNil. |
390 containerToPasteInto := aContainerOrNil. |
389 |
391 |
390 (aPointOrNilOrKeep == #keep |
392 (aPointOrNilOrKeep == #keep |
391 or:[ self window sensor shiftDown |
393 or:[ sensor shiftDown |
392 or:[ self window sensor ctrlDown ]]) ifTrue:[ |
394 or:[ sensor ctrlDown ]]) ifTrue:[ |
393 "/ paste into the selection |
395 "/ paste into the selection |
394 containerToPasteInto isNil ifTrue:[ |
396 containerToPasteInto isNil ifTrue:[ |
395 containerToPasteInto := self singleSelection. |
397 containerToPasteInto := self singleSelection. |
396 ]. |
398 ]. |
397 ] ifFalse:[ |
399 ] ifFalse:[ |
398 "/ ignore the selection and paste where we drop!! |
400 "/ ignore the selection and paste where we drop!! |
399 pastePoint := aPointOrNilOrKeep. |
401 pastePoint := aPointOrNilOrKeep. |
400 pastePoint isNil ifTrue:[ |
402 pastePoint isNil ifTrue:[ |
401 pastePoint := device |
403 pastePoint := device |
402 translatePoint:(self sensor mousePoint) |
404 translatePoint:(sensor mousePoint) |
403 fromView:nil |
405 fromView:nil |
404 toView:self. |
406 toView:self. |
405 ]. |
407 ]. |
406 containerToPasteInto isNil ifTrue:[ |
408 containerToPasteInto isNil ifTrue:[ |
407 containerToPasteInto := self findObjectAt:pastePoint. |
409 containerToPasteInto := self findObjectAt:pastePoint. |