]> git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/clipbrd.h
Bring AddActionTrigger() doc string up to date with the interface
[wxWidgets.git] / include / wx / msw / clipbrd.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/clipbrd.h
3 // Purpose: wxClipboad class and clipboard functions for MSW
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 01/02/97
7 // RCS-ID: $Id$
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_CLIPBRD_H_
13 #define _WX_CLIPBRD_H_
14
15 #if wxUSE_CLIPBOARD
16
17 // These functions superceded by wxClipboard, but retained in order to
18 // implement wxClipboard, and for compatibility.
19
20 // open/close the clipboard
21 WXDLLIMPEXP_CORE bool wxOpenClipboard();
22 WXDLLIMPEXP_CORE bool wxIsClipboardOpened();
23 #define wxClipboardOpen wxIsClipboardOpened
24 WXDLLIMPEXP_CORE bool wxCloseClipboard();
25
26 // get/set data
27 WXDLLIMPEXP_CORE bool wxEmptyClipboard();
28 WXDLLIMPEXP_CORE bool wxSetClipboardData(wxDataFormat dataFormat,
29 const void *data,
30 int width = 0, int height = 0);
31 WXDLLIMPEXP_CORE void* wxGetClipboardData(wxDataFormat dataFormat,
32 long *len = NULL);
33
34 // clipboard formats
35 WXDLLIMPEXP_CORE bool wxIsClipboardFormatAvailable(wxDataFormat dataFormat);
36 WXDLLIMPEXP_CORE wxDataFormat wxEnumClipboardFormats(wxDataFormat dataFormat);
37 WXDLLIMPEXP_CORE int wxRegisterClipboardFormat(wxChar *formatName);
38 WXDLLIMPEXP_CORE bool wxGetClipboardFormatName(wxDataFormat dataFormat,
39 wxChar *formatName,
40 int maxCount);
41
42 //-----------------------------------------------------------------------------
43 // wxClipboard
44 //-----------------------------------------------------------------------------
45
46 class WXDLLIMPEXP_CORE wxClipboard : public wxClipboardBase
47 {
48 public:
49 wxClipboard();
50 virtual ~wxClipboard();
51
52 // open the clipboard before SetData() and GetData()
53 virtual bool Open();
54
55 // close the clipboard after SetData() and GetData()
56 virtual void Close();
57
58 // query whether the clipboard is opened
59 virtual bool IsOpened() const;
60
61 // set the clipboard data. all other formats will be deleted.
62 virtual bool SetData( wxDataObject *data );
63
64 // add to the clipboard data.
65 virtual bool AddData( wxDataObject *data );
66
67 // ask if data in correct format is available
68 virtual bool IsSupported( const wxDataFormat& format );
69
70 // fill data with data on the clipboard (if available)
71 virtual bool GetData( wxDataObject& data );
72
73 // clears wxTheClipboard and the system's clipboard if possible
74 virtual void Clear();
75
76 // flushes the clipboard: this means that the data which is currently on
77 // clipboard will stay available even after the application exits (possibly
78 // eating memory), otherwise the clipboard will be emptied on exit
79 virtual bool Flush();
80
81 private:
82 IDataObject *m_lastDataObject;
83 bool m_isOpened;
84
85 DECLARE_DYNAMIC_CLASS(wxClipboard)
86 };
87
88 #endif // wxUSE_CLIPBOARD
89
90 #endif // _WX_CLIPBRD_H_