// Purpose: interface of wxClipboard
// Author: wxWidgets team
// RCS-ID: $Id$
-// Licence: wxWindows license
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
/**
// Write some text to the clipboard
if (wxTheClipboard->Open())
{
- // This data objects are held by the clipboard,
+ // This data objects are held by the clipboard,
// so do not delete them in the app.
wxTheClipboard->SetData( new wxTextDataObject("Some text") );
wxTheClipboard->Close();
wxTextDataObject data;
wxTheClipboard->GetData( data );
wxMessageBox( data.GetText() );
- }
+ }
wxTheClipboard->Close();
}
@endcode
(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.
+
@return @false if the operation is unsuccessful for any reason.
*/
virtual bool Flush();
normal clipboard contents with the currently selected text on the other
platforms.
*/
- void UsePrimarySelection(bool primary = true);
+ virtual void UsePrimarySelection(bool primary = false);
+
+ /**
+ Returns the global instance (wxTheClipboard) of the clipboard object.
+ */
+ static wxClipboard *Get();
+
};