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.
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:
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:
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License v1.0.