The Symbian platform supports the concept of cut, copy, and paste by providing a clipboard. An application can copy data to the clipboard and the same data can then be pasted in by the same application or by any other application.
The clipboard is encapsulated by the CClipboard
class.
Applications use this class when they place data on, or retrieve data from the
clipboard.
The clipboard is a resource which is shared by all applications. An application should, therefore, hold the clipboard for the minimum time possible.
The clipboard is implemented as a direct file store. When data is put onto the clipboard, it is stored into the clipboard's store as a stream or a network of streams. Every data type put onto the clipboard is identified by a UID: this allows a pasting application to identify data which may be of interest to it.
The clipboard uses a stream dictionary to maintain UID and streamid pairs and always makes the stream dictionary the root stream of the store.
The essential features of the CClipboard
class are shown
in the following diagram.
Clipboard class structure
Any type of data can be put onto the clipboard. When retrieving data, applications check the UID in the stream dictionary to see whether there is any data relevant to them. The following diagram shows a typical situation.
Clipboard store