// Read some text
if (wxTheClipboard->Open())
{
- wxTextDataObject data;
- if (wxTheClipboard->IsSupported(data))
+ if (wxTheClipboard->IsSupported( "STRING" ))
{
- wxTheClipboard->GetData(data);
- wxMessageBox(data.GetText());
+ wxTextDataObject data;
+ wxTheClipboard->GetData( &data );
+ wxMessageBox( data.GetText() );
}
wxTheClipboard->Close();
}
\helpref{wxObject}{wxobject}
+\wxheading{Include files}
+
+<wx/clipbrd.h>
+
\wxheading{See also}
\helpref{Drag and drop overview}{wxdndoverview}, \helpref{wxDataObject}{wxdataobject}
\membersection{wxClipboard::GetData}\label{wxclipboardgetdata}
-\func{bool}{GetData}{\param{wxDataObject&}{ data}}
+\func{bool}{GetData}{\param{wxDataObject*}{ data}}
Call this function to fill {\it data} with data on the clipboard, if available in the required
format. Returns TRUE on success.
\membersection{wxClipboard::IsSupported}\label{wxclipboardissupported}
-\func{bool}{IsSupported}{\param{wxDataObject&}{ data}}
+\func{bool}{IsSupported}{\param{wxDataFormat}{ format}}
Returns TRUE if the format of the given data object is available on the clipboard.
clear all previous contents in the clipboard, so calling it several times
does not make any sense.
+\membersection{wxClipboard::UsePrimarySelection}\label{wxclipboarduseprimary}
+
+\func{void}{UsePrimarySelection}{\param{bool}{ primary = TRUE}}
+
+On platforms supporting it (currently only GTK), selects the so called
+PRIMARY SELECTION as the clipboard as opposed to the normal clipboard,
+if {\it primary} is TRUE.
+
+