-/* ONE instance of this class: */
-class WXDLLEXPORT wxClipboard : public wxObject
-{
- DECLARE_DYNAMIC_CLASS(wxClipboard)
-
- public:
- wxClipboardClient *clipOwner;
- char *cbString, *sentString, *receivedString;
- void *receivedTargets;
- long receivedLength;
-#ifdef __XVIEW__
- long sel_owner;
-#endif
-
- wxClipboard();
- ~wxClipboard();
-
- /* Set the clipboard data owner. "time" comes from the event record. */
- void SetClipboardClient(wxClipboardClient *, long time);
-
- /* Set the clipboard string; does not require a client. */
- void SetClipboardString(char *, long time);
-
- /* Get data from the clipboard in the format "TEXT". */
- char *GetClipboardString(long time);
-
- /* Get data from the clipboard */
- char *GetClipboardData(char *format, long *length, long time);
-
- /* Get the clipboard client directly. Will be NULL if clipboard data
- is a string, or if some other application owns the clipboard.
- This can be useful for shortcutting data translation, if the
- clipboard user can check for a specific client. (This is used
- by the wxMediaEdit class.) */
- wxClipboardClient *GetClipboardClient(void);
-};
+ // open the clipboard before SetData() and GetData()
+ virtual bool Open();
+
+ // close the clipboard after SetData() and GetData()
+ virtual void Close();
+
+ // query whether the clipboard is opened
+ virtual bool IsOpened() const;
+
+ // set the clipboard data. all other formats will be deleted.
+ virtual bool SetData( wxDataObject *data );