Clipboard

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 a resource which is shared by all applications. An application must, therefore, hold the clipboard for the minimum time possible.

Cut, copy and paste

The clipboard is encapsulated by the CClipboard class. Applications use this class when they place data on, or retrieve data from the clipboard.

It is implemented as a direct file store. When the data is placed on the clipboard, it is stored in the clipboard's store as a stream or a network of streams. Every data type placed on the clipboard is identified by a UID. This allows a pasting application to identify the required data.

It uses a stream dictionary to maintain UID and stream ID 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:

Figure: Clipboard class structure

Any type of data can be placed on the clipboard. When retrieving data, applications check the UID in the stream dictionary to determine whether there is any data relevant to them. The following diagram illustrates a typical situation:

Figure: Clipboard store

Related concepts

Related tasks