1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
11 #ifndef __GTKCLIPBOARDH__
12 #define __GTKCLIPBOARDH__
20 #include "wx/object.h"
22 #include "wx/dataobj.h"
23 #include "wx/control.h"
24 #include "wx/module.h"
26 // ----------------------------------------------------------------------------
28 // ----------------------------------------------------------------------------
30 class wxClipboard
: public wxClipboardBase
36 // open the clipboard before SetData() and GetData()
39 // close the clipboard after SetData() and GetData()
42 // set the clipboard data. all other formats will be deleted.
43 virtual bool SetData( wxDataObject
*data
);
45 // add to the clipboard data.
46 virtual bool AddData( wxDataObject
*data
);
48 // ask if data in correct format is available
49 virtual bool IsSupported( const wxDataFormat
& format
);
51 // fill data with data on the clipboard (if available)
52 virtual bool GetData( wxDataObject
& data
);
54 // clears wxTheClipboard and the system's clipboard if possible
57 // If primary == TRUE, use primary selection in all further ops,
58 // primary == FALSE resets it.
59 virtual void UsePrimarySelection(bool primary
= TRUE
)
60 { m_usePrimary
= primary
; }
62 // implementation from now on
65 bool m_ownsPrimarySelection
;
68 GtkWidget
*m_clipboardWidget
; /* for getting and offering data */
69 GtkWidget
*m_targetsWidget
; /* for getting list of supported formats */
70 bool m_waiting
; /* querying data or formats is asynchronous */
72 bool m_formatSupported
;
73 GdkAtom m_targetRequested
;
75 wxDataObject
*m_receivedData
;
78 DECLARE_DYNAMIC_CLASS(wxClipboard
)