+ // 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
+ virtual bool Flush() { return false; }
+
+ // this allows to choose whether we work with CLIPBOARD (default) or
+ // PRIMARY selection on X11-based systems
+ //
+ // on the other ones, working with primary selection does nothing: this
+ // allows to write code which sets the primary selection when something is
+ // selected without any ill effects (i.e. without overwriting the
+ // clipboard which would be wrong on the platforms without X11 PRIMARY)
+ virtual void UsePrimarySelection(bool usePrimary = false)
+ {
+ m_usePrimary = usePrimary;
+ }
+
+ // return true if we're using primary selection
+ bool IsUsingPrimarySelection() const { return m_usePrimary; }
+
+ // Returns global instance (wxTheClipboard) of the object:
+ static wxClipboard *Get();
+
+
+ // don't use this directly, it is public for compatibility with some ports
+ // (wxX11, wxMotif, ...) only
+ bool m_usePrimary;
+};
+
+// ----------------------------------------------------------------------------
+// globals
+// ----------------------------------------------------------------------------
+
+// The global clipboard object - backward compatible access macro:
+#define wxTheClipboard (wxClipboard::Get())
+
+// ----------------------------------------------------------------------------
+// include platform-specific class declaration
+// ----------------------------------------------------------------------------
+
+#if defined(__WXMSW__)
+ #include "wx/msw/clipbrd.h"
+#elif defined(__WXMOTIF__)
+ #include "wx/motif/clipbrd.h"
+#elif defined(__WXGTK20__)
+ #include "wx/gtk/clipbrd.h"
+#elif defined(__WXGTK__)
+ #include "wx/gtk1/clipbrd.h"
+#elif defined(__WXX11__)
+ #include "wx/x11/clipbrd.h"
+#elif defined(__WXMGL__)
+ #include "wx/mgl/clipbrd.h"
+#elif defined(__WXMAC__)
+ #include "wx/mac/clipbrd.h"
+#elif defined(__WXCOCOA__)
+ #include "wx/cocoa/clipbrd.h"
+#elif defined(__WXPM__)
+ #include "wx/os2/clipbrd.h"