Manipulate Tk clipboard


(clipboard option ?arg arg ...?)


This procedure provides a STk interface to the Tk clipboard, which stores data for later retrieval using the selection mechanism. In order to copy data into the clipboard, clipboard clear must be called, followed by a sequence of one or more calls to clipboard append. To ensure that the clipboard is updated atomically, all appends should be completed before returning to the event loop.

The first argument to clipboard determines the format of the rest of the arguments and the behavior of the procedure. The following forms are currently supported:

(clipboard 'clear)
(clipboard 'clear ?:display-of window?)
Claims ownership of the clipboard on window's display and removes any previous contents. Window defaults to *root*. Returns an empty list.

(clipboard 'append ?:display-of window? ?:format format? ?:type type? {? B:|- R?} { Idata R)}
Appends data to the clipboard on window's display in the form given by type with the representation given by format and claims ownership of the clipboard on window's display.



Back to the STk main page