A single clipboard<%> object, the-clipboard, manages the content of the system-wide clipboard for cut and paste.
Under X, a second clipboard<%> object, the-x-selection-clipboard, manages the content of the system-wide X selection. If the 'MrEd:selectionAsClipboard preference preference (see Preferences) is set to a non-zero true value, however, then the-clipboard is always the same as the-x-selection-clipboard, and the system-wide X clipboard is not used.
Under Windows and Mac OS X, the-x-selection-clipboard is always the same as the-clipboard.
Data can be entered into a clipboard in one of two ways: by setting the current clipboard string or byte string, or by installing a clipboard-client% object. When a client is installed, requests for clipboard data are directed to the client.
Generic data is always retrieved from the clipboard as a byte string. When retrieving clipboard data, a data type string specifies the format of the data string. The availability of different clipboard formats is determined by the current clipboard owner.
(send a-clipboard get-clipboard-bitmap time) |
Gets the current clipboard contents as a bitmap (Windows, Mac OS X), returning #f if the clipboard does not contain a bitmap.
See get-clipboard-data for information on eventspaces and the current clipboard client.
See Cut and Paste Time Stamps for a discussion of the time argument. If time is outside the platform-specific range of times, an exn:fail:contract exception is raised.
| ||||||||
format : string | ||||||||
Gets the current clipboard contents in a specific format, returning #f if the clipboard does not contain data in the requested format.
If the clipboard client is associated to an eventspace that is not the current one, the data is retrieved through a callback event in the client’s eventspace. If no result is available within one second, the request is abandoned and #f is returned.
See add-type in clipboard-client% for information on format.
See Cut and Paste Time Stamps for a discussion of the time argument. If time is outside the platform-specific range of times, an exn:fail:contract exception is raised.
(send a-clipboard get-clipboard-string time) |
Gets the current clipboard contents as simple text, returning #f if the clipboard does not contain any text.
See get-clipboard-data for information on eventspaces and the current clipboard client.
See Cut and Paste Time Stamps for a discussion of the time argument. If time is outside the platform-specific range of times, an exn:fail:contract exception is raised.
| ||||||||||||||
Changes the current clipboard contents to new-bitmap (Windows, Mac OS X) and releases the current clipboard client (if any).
See Cut and Paste Time Stamps for a discussion of the time argument. If time is outside the platform-specific range of times, an exn:fail:contract exception is raised.
| ||||||||||||||
new-owner : (is-a?/c clipboard-client%) | ||||||||||||||
Changes the clipboard-owning client: sets the client to new-owner and associates new-owner with the current eventspace (as determined by current-eventspace). The eventspace association is removed when the client is no longer the current one.
See Cut and Paste Time Stamps for a discussion of the time argument. If time is outside the platform-specific range of times, an exn:fail:contract exception is raised.
| ||||||||||||||
new-text : string | ||||||||||||||
Changes the current clipboard contents to new-text, and releases the current clipboard client (if any).
See Cut and Paste Time Stamps for a discussion of the time argument. If time is outside the platform-specific range of times, an exn:fail:contract exception is raised.