Clipboard

The clipboard provides a temporary storage area for a piece of text, a bitmap or a metafile. It enables the user to move data within a single application or exchange data among applications. Typically, a user selects data in the application using the mouse or keyboard, then initiates a cut or copy operation on that selection. Using the paste command the user can insert this data into another place in the same application or in another application. All these operations are performed by applications.

Generally an application should first verify that no other applications are trying to retrieve or set clipboard data. Finally, when the application finishes its access to the clipboard data, it releases the clipboard so that other applications can use it.

These operations are described below:

Operation

Cut Copy Paste

The clipboard is a small amount of system memory for user-driven data exchange. The clipboard only stores pointers to data. A set of API functions enables the application to move and exchange data. Figure "Clipboard Copy from an OS/2 Window into an OS/2 PM Editor" is an example of copying data from one application and pasting it to another, by way of the clipboard.

The data in the clipboard is maintained in memory only. Clipboard data is lost when the computer is turned off.


[Back: Icons]
[Next: Shared Memory and the Clipboard]