Scroll to navigation

Clipboard(3U) InterViews Reference Manual Clipboard(3U)

NAME

Clipboard - manages a list of graphical component subjects

SYNOPSIS

#include <Unidraw/clipboard.h>

DESCRIPTION

A Clipboard maintains a list of GraphicComp objects and provides operations for manipulating the list. Catalog and Command classes use clipboards to store graphical components they affect.

PUBLIC OPERATIONS

Construct a new clipboard object, optionally with a GraphicComp that should appear initially on the list.
Delete the clipboard. Deleting the clipboard does not delete the GraphicComp objects it contains.
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.
Remove all GraphicComp objects from the clipboard. The objects are not deleted.
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.
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.
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.
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.
Return whether or not the clipboard is empty or whether it includes the given GraphicComp object.
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.

PROTECTED OPERATIONS

The Clipboard class stores its GraphicComp objects in a UList. These convenience functions convert an iterator into a UList element and dereference a UList element to obtain a GraphicComp object, respectively.

SEE ALSO

Catalog(3U), Command(3U), GraphicComp(3U), Iterator(3U), Selection(3U), UList(3U)

12 June 1990 Unidraw