]>
git.saurik.com Git - wxWidgets.git/blob - 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
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_CLIPBRD_H_
13 #define _WX_CLIPBRD_H_
18 #include "wx/module.h"
19 #include "wx/dataobj.h" // for wxDataFormat
21 // These functions superceded by wxClipboard, but retained in order to
22 // implement wxClipboard, and for compatibility.
24 // open/close the clipboard
25 WXDLLEXPORT
bool wxOpenClipboard();
26 WXDLLEXPORT
bool wxIsClipboardOpened();
27 #define wxClipboardOpen wxIsClipboardOpened
28 WXDLLEXPORT
bool wxCloseClipboard();
31 WXDLLEXPORT
bool wxEmptyClipboard();
32 WXDLLEXPORT
bool wxSetClipboardData(wxDataFormat dataFormat
,
34 int width
= 0, int height
= 0);
35 WXDLLEXPORT
void* wxGetClipboardData(wxDataFormat dataFormat
,
39 WXDLLEXPORT
bool wxIsClipboardFormatAvailable(wxDataFormat dataFormat
);
40 WXDLLEXPORT wxDataFormat
wxEnumClipboardFormats(wxDataFormat dataFormat
);
41 WXDLLEXPORT
int wxRegisterClipboardFormat(wxChar
*formatName
);
42 WXDLLEXPORT
bool wxGetClipboardFormatName(wxDataFormat dataFormat
,
46 //-----------------------------------------------------------------------------
48 //-----------------------------------------------------------------------------
50 class WXDLLEXPORT wxDataObject
;
51 class WXDLLEXPORT wxClipboard
: public wxClipboardBase
53 DECLARE_DYNAMIC_CLASS(wxClipboard
)
57 virtual ~wxClipboard();
59 // open the clipboard before SetData() and GetData()
62 // close the clipboard after SetData() and GetData()
65 // query whether the clipboard is opened
66 virtual bool IsOpened() const;
68 // set the clipboard data. all other formats will be deleted.
69 virtual bool SetData( wxDataObject
*data
);
71 // add to the clipboard data.
72 virtual bool AddData( wxDataObject
*data
);
74 // ask if data in correct format is available
75 virtual bool IsSupported( const wxDataFormat
& format
);
77 // fill data with data on the clipboard (if available)
78 virtual bool GetData( wxDataObject
& data
);
80 // clears wxTheClipboard and the system's clipboard if possible
83 // flushes the clipboard: this means that the data which is currently on
84 // clipboard will stay available even after the application exits (possibly
85 // eating memory), otherwise the clipboard will be emptied on exit
89 IDataObject
*m_lastDataObject
;
93 #endif // wxUSE_CLIPBOARD
95 #endif // _WX_CLIPBRD_H_