]>
Commit | Line | Data |
---|---|---|
9b6dbb09 | 1 | ///////////////////////////////////////////////////////////////////////////// |
925f7740 | 2 | // Name: wx/motif/clipbrd.h |
9b6dbb09 | 3 | // Purpose: Clipboard functionality. |
9b6dbb09 JS |
4 | // Author: Julian Smart |
5 | // Modified by: | |
6 | // Created: 17/09/98 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) Julian Smart | |
65571936 | 9 | // Licence: wxWindows licence |
9b6dbb09 JS |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
12 | #ifndef _WX_CLIPBRD_H_ | |
13 | #define _WX_CLIPBRD_H_ | |
14 | ||
dfe1eee3 | 15 | #if wxUSE_CLIPBOARD |
9b6dbb09 | 16 | |
b5dbe15d | 17 | class WXDLLIMPEXP_FWD_CORE wxDataObject; |
47be989f | 18 | struct wxDataIdToDataObject; |
fd304d98 | 19 | |
12db77ca | 20 | #include "wx/list.h" |
47be989f | 21 | |
fd304d98 | 22 | WX_DECLARE_LIST(wxDataObject, wxDataObjectList); |
47be989f | 23 | WX_DECLARE_LIST(wxDataIdToDataObject, wxDataIdToDataObjectList); |
9b6dbb09 | 24 | |
d41ef7b5 VZ |
25 | WXDLLEXPORT bool wxOpenClipboard(); |
26 | WXDLLEXPORT bool wxClipboardOpen(); | |
27 | WXDLLEXPORT bool wxCloseClipboard(); | |
28 | WXDLLEXPORT bool wxEmptyClipboard(); | |
29 | WXDLLEXPORT bool wxIsClipboardFormatAvailable(wxDataFormat dataFormat); | |
30 | WXDLLEXPORT bool wxSetClipboardData(wxDataFormat dataFormat, wxObject *obj, int width = 0, int height = 0); | |
31 | WXDLLEXPORT wxObject* wxGetClipboardData(wxDataFormat dataFormat, long *len = NULL); | |
32 | WXDLLEXPORT wxDataFormat wxEnumClipboardFormats(wxDataFormat dataFormat); | |
33 | WXDLLEXPORT wxDataFormat wxRegisterClipboardFormat(char *formatName); | |
34 | WXDLLEXPORT bool wxGetClipboardFormatName(wxDataFormat dataFormat, char *formatName, int maxCount); | |
2d120f83 JS |
35 | |
36 | //----------------------------------------------------------------------------- | |
37 | // wxClipboard | |
38 | //----------------------------------------------------------------------------- | |
39 | ||
94c7b088 | 40 | class WXDLLIMPEXP_CORE wxClipboard : public wxClipboardBase |
2d120f83 | 41 | { |
2d120f83 | 42 | public: |
e1ee679c | 43 | wxClipboard(); |
d3c7fc99 | 44 | virtual ~wxClipboard(); |
925f7740 | 45 | |
e1ee679c VZ |
46 | // open the clipboard before SetData() and GetData() |
47 | virtual bool Open(); | |
925f7740 | 48 | |
e1ee679c VZ |
49 | // close the clipboard after SetData() and GetData() |
50 | virtual void Close(); | |
925f7740 | 51 | |
12db77ca VZ |
52 | // opened? |
53 | virtual bool IsOpened() const { return m_open; } | |
925f7740 | 54 | |
12db77ca | 55 | // replaces the data on the clipboard with data |
e1ee679c | 56 | virtual bool SetData( wxDataObject *data ); |
925f7740 | 57 | |
12db77ca VZ |
58 | // adds data to the clipboard |
59 | virtual bool AddData( wxDataObject *data ); | |
925f7740 | 60 | |
e1ee679c | 61 | // format available on the clipboard ? |
12db77ca | 62 | virtual bool IsSupported( const wxDataFormat& format ); |
925f7740 | 63 | |
e1ee679c | 64 | // fill data with data on the clipboard (if available) |
12db77ca | 65 | virtual bool GetData( wxDataObject& data ); |
925f7740 | 66 | |
e1ee679c VZ |
67 | // clears wxTheClipboard and the system's clipboard if possible |
68 | virtual void Clear(); | |
925f7740 | 69 | |
e1ee679c | 70 | // implementation from now on |
e1ee679c | 71 | bool m_open; |
fd304d98 | 72 | wxDataObjectList m_data; |
47be989f MB |
73 | wxDataIdToDataObjectList m_idToObject; |
74 | ||
e1ee679c VZ |
75 | private: |
76 | DECLARE_DYNAMIC_CLASS(wxClipboard) | |
2d120f83 JS |
77 | }; |
78 | ||
dfe1eee3 VZ |
79 | #endif // wxUSE_CLIPBOARD |
80 | ||
9005f2ed | 81 | #endif // _WX_CLIPBRD_H_ |