► |  | GUI: PLT Graphics Toolkit

1 | Overview
2 | Reference
3 | Configuration
4 | Dynamic Loading
| Bibliography
| Index

► | 2 | Reference

2.1 | Windowing Classes
2.2 | Windowing Functions
2.3 | Drawing Classes
2.4 | Drawing Functions
2.5 | Editor Classes
2.6 | Editor Functions
2.7 | WXME Decoding

▼ | 2.1 | Windowing Classes

2.1.1 | area<%>
2.1.2 | area-container<%>
2.1.3 | area-container-window<%>
2.1.4 | button%
2.1.5 | canvas<%>
2.1.6 | canvas%
2.1.7 | check-box%
2.1.8 | checkable-menu-item%
2.1.9 | choice%
2.1.10 | clipboard-client%
2.1.11 | clipboard<%>
2.1.12 | combo-field%
2.1.13 | control<%>
2.1.14 | control-event%
2.1.15 | cursor%
2.1.16 | dialog%
2.1.17 | event%
2.1.18 | frame%
2.1.19 | gauge%
2.1.20 | group-box-panel%
2.1.21 | grow-box-spacer-pane%
2.1.22 | horizontal-pane%
2.1.23 | horizontal-panel%
2.1.24 | key-event%
2.1.25 | labelled-menu-item<%>
2.1.26 | list-box%
2.1.27 | list-control<%>
2.1.28 | menu%
2.1.29 | menu-bar%
2.1.30 | menu-item<%>
2.1.31 | menu-item%
2.1.32 | menu-item-container<%>
2.1.33 | message%
2.1.34 | mouse-event%
2.1.35 | pane%
2.1.36 | panel%
2.1.37 | popup-menu%
2.1.38 | radio-box%
2.1.39 | selectable-menu-item<%>
2.1.40 | separator-menu-item%
2.1.41 | scroll-event%
2.1.42 | slider%
2.1.43 | subarea<%>
2.1.44 | subwindow<%>
2.1.45 | tab-panel%
2.1.46 | text-field%
2.1.47 | timer%
2.1.48 | top-level-window<%>
2.1.49 | vertical-pane%
2.1.50 | vertical-panel%
2.1.51 | window<%>

On this page:

get-clipboard-bitmap
get-clipboard-data
get-clipboard-string
set-clipboard-bitmap
set-clipboard-client
set-clipboard-string

Version: 4.1.4
top← prev up next →

clipboard<%> : interface?

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)
→ (or/c (is-a?/c bitmap%) false/c)
time : (and/c exact? integer?)

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.

(send a-clipboard get-clipboard-data |  | format |
|  | time) |

→ (or/c byte string false/c)
format : string
time : (and/c exact? integer?)

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)
→ (or/c string false/c)
time : (and/c exact? integer?)

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.

(send a-clipboard set-clipboard-bitmap |  | new-bitmap |  |  |  |
|  | time) |  | → |  | void?

new-bitmap : (is-a?/c bitmap%)
time : (and/c exact? integer?)

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.

(send a-clipboard set-clipboard-client |  | new-owner |  |  |  |
|  | time) |  | → |  | void?

new-owner : (is-a?/c clipboard-client%)
time : (and/c exact? integer?)

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.

(send a-clipboard set-clipboard-string |  | new-text |  |  |  |
|  | time) |  | → |  | void?

new-text : string
time : (and/c exact? integer?)

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.

top← prev up next →