1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk1/clipbrd.h
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
11 #ifndef __GTKCLIPBOARDH__
12 #define __GTKCLIPBOARDH__
16 #include "wx/object.h"
18 #include "wx/dataobj.h"
19 #include "wx/control.h"
20 #include "wx/module.h"
22 // ----------------------------------------------------------------------------
24 // ----------------------------------------------------------------------------
26 class WXDLLIMPEXP_CORE wxClipboard
: public wxClipboardBase
30 virtual ~wxClipboard();
32 // open the clipboard before SetData() and GetData()
35 // close the clipboard after SetData() and GetData()
38 // query whether the clipboard is opened
39 virtual bool IsOpened() const;
41 // set the clipboard data. all other formats will be deleted.
42 virtual bool SetData( wxDataObject
*data
);
44 // add to the clipboard data.
45 virtual bool AddData( wxDataObject
*data
);
47 // ask if data in correct format is available
48 virtual bool IsSupported( const wxDataFormat
& format
);
50 // fill data with data on the clipboard (if available)
51 virtual bool GetData( wxDataObject
& data
);
53 // clears wxTheClipboard and the system's clipboard if possible
56 // implementation from now on
59 bool m_ownsPrimarySelection
;
62 GtkWidget
*m_clipboardWidget
; /* for getting and offering data */
63 GtkWidget
*m_targetsWidget
; /* for getting list of supported formats */
64 bool m_waiting
; /* querying data or formats is asynchronous */
66 bool m_formatSupported
;
67 GdkAtom m_targetRequested
;
68 wxDataObject
*m_receivedData
;
71 DECLARE_DYNAMIC_CLASS(wxClipboard
)