A class for manipulating the clipboard.
Call Clipboard#open to get ownership of
the clipboard. The resulting block will be passed a Wx::Clipboard, and
you now own the clipboard. Call
Clipboard#set_data to put data on the
clipboard, or Clipboard#get_data to
retrieve data from the clipboard.
You should keep the clipboard open only momentarily. It is strongly
recommended that you use the block form of Clipboard::open as this will
ensure the clipboard is closed in a timely fashion.
For example:
Opens the clipboard and passes it to the enclosed block. Ensures that
the clipboard is closed when the block is ended.
Call this function to add the data object to the clipboard. You may call
this function repeatedly after having cleared the clipboard using Clipboard#clear.
After this function has been called, the clipboard owns the data, so do not delete
the data explicitly.
Clears the global clipboard object and the system’s clipboard if possible.
Call this function to close the clipboard, having opened it with Clipboard#open.
Flushes the clipboard: this means that the data which is currently on
clipboard will stay available even after the application exits (possibly
eating memory), otherwise the clipboard will be emptied on exit.
Returns false if the operation is unsuccessful for any reason.
Call this function to fill data with data on the clipboard, if available in the required
format. Returns true on success.
Returns true if the clipboard has been opened.
Returns true if there is data which matches the data format of the given data object currently available (IsSupported sounds like a misnomer, FIXME: better deprecate this name?) on the clipboard.
Call this function to open the clipboard before calling Clipboard#set_data
and Clipboard#get_data.
Call Clipboard#close when you have finished with the clipboard. You
should keep the clipboard open for only a very short time.
Returns true on success. This should be tested (as in the sample shown above).
Call this function to set the data object to the clipboard. This function will
clear all previous contents in the clipboard, so calling it several times
does not make any sense.
After this function has been called, the clipboard owns the data, so do not delete
the data explicitly.
On platforms supporting it (currently only GTK), selects the so called
PRIMARY SELECTION as the clipboard as opposed to the normal clipboard,
if primary is true.
[This page automatically generated from the Textile source at 2023-06-09 00:45:34 +0000]