Clipboard(GraphicComp*=nil)
Construct a new clipboard object, optionally with a GraphicComp that should appear initially on
the list.
virtual~Clipboard()
Delete the clipboard. Deleting the clipboard does not delete the GraphicComp objects it contains.
voidInit(Selection*)voidCopyInit(Selection*)
Init initializes the clipboard with the subjects belonging to the graphical views in the given
selection object. CopyInit initializes it with copies of the subjects.
voidClear()
Remove all GraphicComp objects from the clipboard. The objects are not deleted.
voidDeleteComps()
Delete each GraphicComp in the clipboard. This operation does not delete the list itself; thus it
will still be possible to iterate through the list afterwards. DeleteComps is generally called
just before the clipboard is destroyed.
voidAppend(GraphicComp*)voidPrepend(GraphicComp*)voidInsertAfter(Iterator,GraphicComp*)voidInsertBefore(Iterator,GraphicComp*)voidRemove(GraphicComp*)voidRemove(Iterator&)
Operations for adding and removing GraphicComp objects from the clipboard. InsertAfter and
InsertBefore take an iterator that specifies the point before or after which the given GraphicComp
should be inserted. Remove(Iterator&) removes the GraphicComp to which the iterator refers and
increments the iterator to point to the following GraphicComp.
GraphicComp*GetComp(Iterator)voidSetComp(GraphicComp*,Iterator&)
GetComp effectively dereferences an iterator, returning the GraphicComp to which it points.
SetComp initializes an iterator to point to the given GraphicComp object, assuming the object is
in the clipboard.
voidFirst(Iterator&)voidLast(Iterator&)voidNext(Iterator&)voidPrev(Iterator&)booleanDone(Iterator&)
Operations for iterating through the GraphicComps in the clipboard. First and Last modify the
iterator to point to the first and last GraphicComp objects. Next and Prev make the iterator
point to the succeeding and preceding GraphicComp objects. Done returns whether the iterator
points to the sentinel object on the list, which marks the beginning and the end of list.
booleanIsEmpty()booleanIncludes(GraphicComp*)
Return whether or not the clipboard is empty or whether it includes the given GraphicComp object.
virtualClipboard*Copy()virtualClipboard*DeepCopy()
Copy creates a new clipboard with a list of the same GraphicComp objects as this. DeepCopy
creates a new clipboard containing copies of the objects in this.