1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
11 #ifndef __GTKCLIPBOARDH__
12 #define __GTKCLIPBOARDH__
22 #include "wx/object.h"
24 #include "wx/dataobj.h"
25 #include "wx/control.h"
26 #include "wx/module.h"
28 //-----------------------------------------------------------------------------
30 //-----------------------------------------------------------------------------
33 class wxClipboardModule
;
35 //-----------------------------------------------------------------------------
37 //-----------------------------------------------------------------------------
39 extern wxClipboard
* wxTheClipboard
;
41 //-----------------------------------------------------------------------------
43 //-----------------------------------------------------------------------------
45 class wxClipboard
: public wxObject
47 DECLARE_DYNAMIC_CLASS(wxClipboard
)
54 // open the clipboard before SetData() and GetData()
57 // close the clipboard after SetData() and GetData()
60 // can be called several times
61 virtual bool SetData( wxDataObject
*data
);
63 // format available on the clipboard ?
64 // supply ID if private format, the same as wxPrivateDataObject::SetId()
65 virtual bool IsSupportedFormat( wxDataFormat format
, const wxString
&id
= "" );
67 // fill data with data on the clipboard (if available)
68 virtual bool GetData( wxDataObject
*data
);
70 // clears wxTheClipboard and the system's clipboard if possible
75 GdkAtom
GetTargetAtom( wxDataFormat format
, const wxString
&id
= "" );
80 bool m_ownsPrimarySelection
;
83 GtkWidget
*m_clipboardWidget
;
85 bool m_formatSupported
;
86 GdkAtom m_targetRequested
;
88 wxDataObject
*m_receivedData
;
91 //-----------------------------------------------------------------------------
93 //-----------------------------------------------------------------------------
95 class wxClipboardModule
: public wxModule
97 DECLARE_DYNAMIC_CLASS(wxClipboardModule
)
100 wxClipboardModule() {}