]> git.saurik.com Git - wxWidgets.git/blob - include/wx/mgl/clipbrd.h
add a header placeholder
[wxWidgets.git] / include / wx / mgl / clipbrd.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: clipboard.h
3 // Purpose:
4 // Author: Vaclav Slavik
5 // Id: $Id$
6 // Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com)
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
9
10 #ifndef __WX_CLIPBOARD_H__
11 #define __WX_CLIPBOARD_H__
12
13 #if wxUSE_CLIPBOARD
14
15 #include "wx/object.h"
16 #include "wx/list.h"
17 #include "wx/dataobj.h"
18 #include "wx/control.h"
19 #include "wx/module.h"
20
21 // ----------------------------------------------------------------------------
22 // wxClipboard
23 // ----------------------------------------------------------------------------
24
25 class WXDLLEXPORT wxClipboard : public wxClipboardBase
26 {
27 public:
28 wxClipboard() {}
29 virtual ~wxClipboard() {}
30
31 // open the clipboard before SetData() and GetData()
32 virtual bool Open() {}
33
34 // close the clipboard after SetData() and GetData()
35 virtual void Close() {}
36
37 // query whether the clipboard is opened
38 virtual bool IsOpened() const {}
39
40 // set the clipboard data. all other formats will be deleted.
41 virtual bool SetData( wxDataObject *data ) {}
42
43 // add to the clipboard data.
44 virtual bool AddData( wxDataObject *data ) {}
45
46 // ask if data in correct format is available
47 virtual bool IsSupported( const wxDataFormat& format ) {}
48
49 // fill data with data on the clipboard (if available)
50 virtual bool GetData( wxDataObject& data ) {}
51
52 // clears wxTheClipboard and the system's clipboard if possible
53 virtual void Clear() {}
54
55 // If primary == TRUE, use primary selection in all further ops,
56 // primary == FALSE resets it.
57 virtual void UsePrimarySelection(bool primary = TRUE)
58 { m_usePrimary = primary; }
59
60 // implementation from now on
61 bool m_open;
62 bool m_ownsClipboard;
63 bool m_ownsPrimarySelection;
64 wxDataObject *m_data;
65
66 GtkWidget *m_clipboardWidget; /* for getting and offering data */
67 GtkWidget *m_targetsWidget; /* for getting list of supported formats */
68 bool m_waiting; /* querying data or formats is asynchronous */
69
70 bool m_formatSupported;
71 GdkAtom m_targetRequested;
72 bool m_usePrimary;
73 wxDataObject *m_receivedData;
74
75 private:
76 DECLARE_DYNAMIC_CLASS(wxClipboard)
77 };
78
79 #endif
80 // wxUSE_CLIPBOARD
81
82 #endif
83 // __WX_CLIPBOARD_H__