Difference between revisions of "ClipBoard"

From Inkscape Wiki
Jump to navigation Jump to search
 
m (link fix)
Line 1: Line 1:
I think the best way to handle the clipboard is to make it an SPDocument in its own right.  When object(s) are copied to the clipboard, we should:
I think the best way to handle the clipboard is to make it an SPDocument in its own right.  When object(s) are copied to the clipboard, we should:


1. compile a list of objects and their dependencies (eliminating duplicates -- see DependencyTracking)
1. compile a list of objects and their dependencies (eliminating duplicates -- see [[DependencyTracking]])
2. clear the clipboard SPDocument
2. clear the clipboard SPDocument
3. use some (currently unwritten) facility for bulk-copying SPObjects (see BulkObjectCopy) between documents with references intact to copy the object list to the clipboard document
3. use some (currently unwritten) facility for bulk-copying SPObjects (see [[BulkObjectCopy]]) between documents with references intact to copy the object list to the clipboard document


When pasting, we just use the same bulk object copy facility to copy from the clipboard SPDocument to the destination document (which may or may not be the origin document).
When pasting, we just use the same bulk object copy facility to copy from the clipboard SPDocument to the destination document (which may or may not be the origin document).
Line 9: Line 9:
Question: should we handle SPUse specially?
Question: should we handle SPUse specially?


Eventually, we should look at things like taking advantage of e.g. StockLibraryInterface to avoid creating unneeded duplicates of things like referenced gradients when pasting into the same document.  But that's icing.
Eventually, we should look at things like taking advantage of e.g. [[StockLibraryInterface]] to avoid creating unneeded duplicates of things like referenced gradients when pasting into the same document.  But that's icing.


-----
-----


There's a user-visible behavior page now under ClipboardBehavior
There's a user-visible behavior page now under [[ClipboardBehavior]]

Revision as of 02:32, 22 January 2006

I think the best way to handle the clipboard is to make it an SPDocument in its own right. When object(s) are copied to the clipboard, we should:

1. compile a list of objects and their dependencies (eliminating duplicates -- see DependencyTracking) 2. clear the clipboard SPDocument 3. use some (currently unwritten) facility for bulk-copying SPObjects (see BulkObjectCopy) between documents with references intact to copy the object list to the clipboard document

When pasting, we just use the same bulk object copy facility to copy from the clipboard SPDocument to the destination document (which may or may not be the origin document).

Question: should we handle SPUse specially?

Eventually, we should look at things like taking advantage of e.g. StockLibraryInterface to avoid creating unneeded duplicates of things like referenced gradients when pasting into the same document. But that's icing.


There's a user-visible behavior page now under ClipboardBehavior