8 Contributors: |
8 Contributors: |
9 --> |
9 --> |
10 <!DOCTYPE concept |
10 <!DOCTYPE concept |
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
12 <concept id="GUID-BBBA5C6C-4E8B-513A-8FA1-C7A04C54C140" xml:lang="en"><title>Clipboard</title><prolog><metadata><keywords/></metadata></prolog><conbody> |
12 <concept id="GUID-BBBA5C6C-4E8B-513A-8FA1-C7A04C54C140" xml:lang="en"><title>Clipboard</title><prolog><metadata><keywords/></metadata></prolog><conbody> |
13 <p>Symbian platform supports the concept of cut, copy and paste by providing |
13 <p>The Symbian platform supports the concept of cut, copy and |
14 a clipboard. An application can copy data to the clipboard and the same data |
14 paste by providing a clipboard. An application can copy data to the clipboard |
15 can then be pasted in by the same application or by any other application. </p> |
15 and the same data can then be pasted in by the same application or by any |
|
16 other application. </p> |
16 <p>The clipboard is a resource which is shared by all applications. An application |
17 <p>The clipboard is a resource which is shared by all applications. An application |
17 must, therefore, hold the clipboard for the minimum time possible. </p> |
18 must, therefore, hold the clipboard for the minimum time possible. </p> |
18 <section><title>Cut, copy and paste</title> <p>The clipboard is encapsulated |
19 <section id="GUID-848D26F4-3875-4BF7-AAEC-476F709B9E6E"><title>Cut, copy and paste</title> <p>The clipboard is encapsulated |
19 by the <codeph>CClipboard</codeph> class. Applications use this class when |
20 by the <codeph>CClipboard</codeph> class. Applications use this class when |
20 they place data on, or retrieve data from the clipboard. </p> <p>It is implemented |
21 they place data on, or retrieve data from the clipboard. </p> <p>It is implemented |
21 as a direct file store. When the data is placed on the clipboard, it is stored |
22 as a direct file store. When the data is placed on the clipboard, it is stored |
22 in the clipboard's store as a stream or a network of streams. Every data type |
23 in the clipboard's store as a stream or a network of streams. Every data type |
23 placed on the clipboard is identified by a UID. This allows a pasting application |
24 placed on the clipboard is identified by a UID. This allows a pasting application |
24 to identify the required data. </p> <p>It uses a stream dictionary to maintain |
25 to identify the required data. </p> <p>It uses a stream dictionary to maintain |
25 UID and stream ID pairs, and always makes the stream dictionary the root stream |
26 UID and stream ID pairs, and always makes the stream dictionary the root stream |
26 of the store. </p> <p>The essential features of the <codeph>CClipboard</codeph> class |
27 of the store. </p> <p>The essential features of the <codeph>CClipboard</codeph> class |
27 are shown in the following diagram: </p> <fig id="GUID-22419444-933C-5431-9717-CD332A17FCF2"> |
28 are shown in the following diagram: </p> <fig id="GUID-22419444-933C-5431-9717-CD332A17FCF2"> |
28 <title> Clipboard class structure </title> |
29 <title> Clipboard class structure </title> |
29 <image href="GUID-15591211-58D3-56B6-868F-D34C30ED7A7A_d0e194125_href.png" placement="inline"/> |
30 <image href="GUID-15591211-58D3-56B6-868F-D34C30ED7A7A_d0e221809_href.png" placement="inline"/> |
30 </fig> <p>Any type of data can be placed on the clipboard. When retrieving |
31 </fig> <p>Any type of data can be placed on the clipboard. When retrieving |
31 data, applications check the UID in the stream dictionary to determine whether |
32 data, applications check the UID in the stream dictionary to determine whether |
32 there is any data relevant to them. The following diagram illustrates a typical |
33 there is any data relevant to them. The following diagram illustrates a typical |
33 situation: </p> <fig id="GUID-3ABDDCDD-DBC9-5BD5-8448-8249F535FB06"> |
34 situation: </p> <fig id="GUID-3ABDDCDD-DBC9-5BD5-8448-8249F535FB06"> |
34 <title> Clipboard store </title> |
35 <title> Clipboard store </title> |
35 <image href="GUID-F5B58B20-B85C-5BCD-B1EB-69CCE42DE6BB_d0e194136_href.png" placement="inline"/> |
36 <image href="GUID-F5B58B20-B85C-5BCD-B1EB-69CCE42DE6BB_d0e221820_href.png" placement="inline"/> |
36 </fig> </section> |
37 </fig> </section> |
37 </conbody><related-links> |
38 </conbody><related-links> |
38 <link href="GUID-8C94EE15-82EA-4A95-9044-C3404F95BD51.dita"><linktext>Using |
39 <link href="GUID-8C94EE15-82EA-4A95-9044-C3404F95BD51.dita"><linktext>Using Clipboard</linktext> |
39 Clipboard</linktext></link> |
40 </link> |
40 <link href="GUID-B683496C-652E-5F48-924E-52D2FF3A78A7.dita"><linktext>Direct file |
41 <link href="GUID-B683496C-652E-5F48-924E-52D2FF3A78A7.dita"><linktext>Direct file |
41 stores</linktext></link> |
42 stores</linktext></link> |
42 <link href="GUID-79F39C97-75E8-5DB1-B976-8FE76E6E60C9.dita"><linktext>Dictionary |
43 <link href="GUID-79F39C97-75E8-5DB1-B976-8FE76E6E60C9.dita"><linktext>Dictionary |
43 stores</linktext></link> |
44 stores</linktext></link> |
44 <link href="GUID-AB705D21-87A3-5F32-A4B9-17B7593DD5C3.dita"><linktext>UID manipulation</linktext> |
45 <link href="GUID-AB705D21-87A3-5F32-A4B9-17B7593DD5C3.dita"><linktext>UID manipulation</linktext> |