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. More...

Clears the global clipboard object and the system's clipboard if possible.

virtual void wxClipboard::Close

(

)

virtual

Call this function to close the clipboard, having opened it with Open().

virtual bool wxClipboard::Flush

(

)

virtual

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.

Currently this method is not implemented in X11-based ports, i.e. wxGTK, wxX11 and wxMotif and always returns false there.

The new data object replaces any previously set one, so if the application wants to provide clipboard data in several different formats, it must use a composite data object supporting all of the formats instead of calling this function several times with different data objects as this would only leave data from the last one in the clipboard.

After this function has been called, the clipboard owns the data, so do not delete the data explicitly.

When this function is called with true, all subsequent clipboard operations will use PRIMARY selection until this function is called again with false.

On the other platforms, there is no PRIMARY selection and so all clipboard operations will fail. This allows to implement the standard X11 handling of the clipboard which consists in copying data to the CLIPBOARD selection only when the user explicitly requests it (i.e. by selecting the "Copy" menu command) but putting the currently selected text into the PRIMARY selection automatically, without overwriting the normal clipboard contents with the currently selected text on the other platforms.