1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
10 #ifndef _WX_GTK_CLIPBOARD_H_
11 #define _WX_GTK_CLIPBOARD_H_
13 // ----------------------------------------------------------------------------
15 // ----------------------------------------------------------------------------
17 class WXDLLIMPEXP_CORE wxClipboard
: public wxClipboardBase
21 virtual ~wxClipboard();
23 // open the clipboard before SetData() and GetData()
26 // close the clipboard after SetData() and GetData()
29 // query whether the clipboard is opened
30 virtual bool IsOpened() const;
32 // set the clipboard data. all other formats will be deleted.
33 virtual bool SetData( wxDataObject
*data
);
35 // add to the clipboard data.
36 virtual bool AddData( wxDataObject
*data
);
38 // ask if data in correct format is available
39 virtual bool IsSupported( const wxDataFormat
& format
);
41 // fill data with data on the clipboard (if available)
42 virtual bool GetData( wxDataObject
& data
);
44 // clears wxTheClipboard and the system's clipboard if possible
47 // If primary == TRUE, use primary selection in all further ops,
48 // primary == FALSE resets it.
49 virtual void UsePrimarySelection(bool primary
= TRUE
)
50 { m_usePrimary
= primary
; }
53 // implementation from now on
54 // --------------------------
58 bool m_ownsPrimarySelection
;
61 GtkWidget
*m_clipboardWidget
; /* for getting and offering data */
62 GtkWidget
*m_targetsWidget
; /* for getting list of supported formats */
64 bool m_formatSupported
;
65 GdkAtom m_targetRequested
;
67 wxDataObject
*m_receivedData
;
70 DECLARE_DYNAMIC_CLASS(wxClipboard
)
73 #endif // _WX_GTK_CLIPBOARD_H_