UIPainterView.st
changeset 1872 ab5cc43b193a
parent 1870 771fcc38ecb8
child 1878 6ae0cf83738f
equal deleted inserted replaced
1871:42729969c032 1872:ab5cc43b193a
   319 pasteBuffer
   319 pasteBuffer
   320     "add the objects in the paste-buffer to the object view
   320     "add the objects in the paste-buffer to the object view
   321     "
   321     "
   322     |sel|
   322     |sel|
   323 
   323 
   324     sel := self pasteSpecifications:(self getSelection) keepLayout:false.
   324     sel := self pasteSpecifications:(self getClipboardObject) keepLayout:false.
   325 
   325 
   326     sel notNil ifTrue:[
   326     sel notNil ifTrue:[
   327 	self select:sel.
   327         self select:sel.
   328     ].
   328     ].
   329 
       
   330 !
   329 !
   331 
   330 
   332 pasteKeepingPosition
   331 pasteKeepingPosition
   333     "add the objects in the paste-buffer to the object view;
   332     "add the objects in the paste-buffer to the object view;
   334      translate the layout as appropriate, to position the component
   333      translate the layout as appropriate, to position the component
   335      at the same absolute position (relative to topView) as before
   334      at the same absolute position (relative to topView) as before
   336     "
   335     "
   337     |sel|
   336     |sel|
   338 
   337 
   339     sel := self
   338     sel := self
   340 	pasteSpecifications:(self getSelection)
   339         pasteSpecifications:(self getClipboardObject)
   341 	keepLayout:true
   340         keepLayout:true
   342 	keepPosition:true
   341         keepPosition:true
   343 	at:nil.
   342         at:nil.
   344 
   343 
   345     sel notNil ifTrue:[
   344     sel notNil ifTrue:[
   346 	self select:sel.
   345         self select:sel.
   347     ].
   346     ].
   348 !
   347 !
   349 
   348 
   350 pasteSpecifications:aSpecificationOrList keepLayout:keepLayout
   349 pasteSpecifications:aSpecificationOrList keepLayout:keepLayout
   351     "add the specs to the object view; returns list of pasted components
   350     "add the specs to the object view; returns list of pasted components
   483     "add the objects in the paste-buffer to the object view; don't change the
   482     "add the objects in the paste-buffer to the object view; don't change the
   484      layout
   483      layout
   485     "
   484     "
   486     |sel|
   485     |sel|
   487 
   486 
   488     sel := self pasteSpecifications:(self getSelection) keepLayout:true.
   487     sel := self pasteSpecifications:(self getClipboardObject) keepLayout:true.
   489 
   488 
   490     sel notNil ifTrue:[
   489     sel notNil ifTrue:[
   491 	self select:sel.
   490         self select:sel.
   492     ].
   491     ].
   493 ! !
   492 ! !
   494 
   493 
   495 !UIPainterView methodsFor:'drag & drop'!
   494 !UIPainterView methodsFor:'drag & drop'!
   496 
   495 
   505 
   504 
   506 canPaste
   505 canPaste
   507     "returns true if something to be past exists and can be paste into
   506     "returns true if something to be past exists and can be paste into
   508      the selection if exists
   507      the selection if exists
   509     "
   508     "
   510     ^ self canPaste:(self getSelection)
   509     ^ self canPaste:(self getClipboardObject)
   511 !
   510 !
   512 
   511 
   513 canPaste:something
   512 canPaste:something
   514     "returns true if something could be paste
   513     "returns true if something could be paste
   515     "
   514     "