Name: | Clipboard |
Version: | 1.0 |
ID: | ID_CLIPBOARD |
Status: | Stable |
Category: | I/O |
Date: | November 2003 |
Author: | Rocklyte Systems |
Copyright: | Rocklyte Systems (c) 2001-2003. All rights reserved. |
Short: | The Clipboard class manages cut, copy and paste operations. |
The Clipboard class manages data transfer between applications on behalf of the user. It holds a data cache of clipped items that originate from source applications, and these can be retrieved and 'pasted' into target applications. The Clipboard class is provided for the primary purpose of allowing applications to implement the traditional 'cut', 'copy' and 'paste' actions.
Only one clipboard object is allowed in the system at any time per user. This object is given a standardised, global name of "SystemClipboard" and is typically created at startup as part of the boot process. The object is shared and available to all applications. Items that are passed to the clipboard object are stored in the user directory "temp:clipboard/". Clipped items are persistent, so if the machine is turned off, all currently clipped items will still be accessible on the next restart. There is a limit on the amount of clipped items that can be stored in the clipboard object. Only 1 of each datatype is permitted (for example, only one 'image' clip may exist at any time) and there is a preset limitation on the total number of clips that can be stored in the history cache.
NOTE: When using a clipboard for copy and paste operations, it is wise to keep the object locked for the entire duration, releasing it only when you are finished with the use of its files. Failure to do so will cause issues in the event that a secondary task uses the clipboard while you are using clipboard file data. It is considered to be good form if you always lock the clipboard object when you use it, rather than messaging instructions to the clipboard.
The Clipboard class supports the following actions:
Clear Destroys all cached data that is stored in the clipboard. DataChannel This action can be used to place data in a clipboard. GetUnlistedField Special field types are suppored via unlisted fields.
The Clipboard class implements the following methods:
AddClipboardFiles Add files to the clipboard. AddClipboardObject Extract data from an object and add it to the clipboard. AddClipboardObjects Extract data from objects and add it all to the clipboard. AddClipboardText Adds a block of text to the clipboard. DeleteClip Retrieve the most recently clipped data as a list of files. GetClipboardFiles Retrieve the most recently clipped data as a list of files. PasteClipboardFiles Performs the 'paste' operation on file items.
Action: | GetUnlistedField | |
Short: | Special field types are suppored via unlisted fields. | |
|
Method: | AddClipboardFiles() | |||||||||||||||||||||||||||
Short: | Add files to the clipboard. | |||||||||||||||||||||||||||
Arguments: |
| |||||||||||||||||||||||||||
|
Method: | AddClipboardObject() | |||||||
Short: | Extract data from an object and add it to the clipboard. | |||||||
Arguments: |
| |||||||
|
Method: | AddClipboardObjects() | |||||||
Short: | Extract data from objects and add it all to the clipboard. | |||||||
Arguments: |
| |||||||
|
Method: | AddClipboardText() | |||||||||
Short: | Adds a block of text to the clipboard. | |||||||||
Arguments: |
| |||||||||
|
Method: | DeleteClip() | |||||||
Short: | Retrieve the most recently clipped data as a list of files. | |||||||
Arguments: |
| |||||||
|
Method: | GetClipboardFiles() | |||||||||||
Short: | Retrieve the most recently clipped data as a list of files. | |||||||||||
Arguments: |
| |||||||||||
|
Method: | PasteClipboardFiles() | |||||||||
Synonym: | PasteFiles | |||||||||
Short: | Performs the 'paste' operation on file items. | |||||||||
Arguments: |
| |||||||||
|