1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
11 #ifndef __GTKCLIPBOARDH__
12 #define __GTKCLIPBOARDH__
19 #include "wx/object.h"
21 #include "wx/dataobj.h"
22 #include "wx/control.h"
23 #include "wx/module.h"
25 //-----------------------------------------------------------------------------
27 //-----------------------------------------------------------------------------
30 class wxClipboardModule
;
32 //-----------------------------------------------------------------------------
34 //-----------------------------------------------------------------------------
36 extern wxClipboard
* wxTheClipboard
;
38 //-----------------------------------------------------------------------------
40 //-----------------------------------------------------------------------------
42 class wxClipboard
: public wxObject
44 DECLARE_DYNAMIC_CLASS(wxClipboard
)
51 // open the clipboard before SetData() and GetData()
54 // close the clipboard after SetData() and GetData()
57 // can be called several times
58 virtual bool SetData( wxDataObject
*data
);
60 // format available on the clipboard ?
61 // supply ID if private format, the same as wxPrivateDataObject::SetId()
62 virtual bool IsSupportedFormat( wxDataFormat format
, const wxString
&id
= "" );
64 // fill data with data on the clipboard (if available)
65 virtual bool GetData( wxDataObject
*data
);
67 // clears wxTheClipboard and the system's clipboard if possible
72 GdkAtom
GetTargetAtom( wxDataFormat format
, const wxString
&id
= "" );
79 void *m_receivedTargets
;
80 GtkWidget
*m_clipboardWidget
;
82 bool m_formatSupported
;
83 GdkAtom m_targetRequested
;
85 wxDataObject
*m_receivedData
;
88 //-----------------------------------------------------------------------------
90 //-----------------------------------------------------------------------------
92 class wxClipboardModule
: public wxModule
94 DECLARE_DYNAMIC_CLASS(wxClipboardModule
)
97 wxClipboardModule() {}