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_
17 // These functions superceded by wxClipboard, but retained in order to
18 // implement wxClipboard, and for compatibility.
20 // open/close the clipboard
21 WXDLLIMPEXP_CORE
bool wxOpenClipboard();
22 WXDLLIMPEXP_CORE
bool wxIsClipboardOpened();
23 #define wxClipboardOpen wxIsClipboardOpened
24 WXDLLIMPEXP_CORE
bool wxCloseClipboard();
27 WXDLLIMPEXP_CORE
bool wxEmptyClipboard();
28 WXDLLIMPEXP_CORE
bool wxSetClipboardData(wxDataFormat dataFormat
,
30 int width
= 0, int height
= 0);
31 WXDLLIMPEXP_CORE
void* wxGetClipboardData(wxDataFormat dataFormat
,
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
,
42 //-----------------------------------------------------------------------------
44 //-----------------------------------------------------------------------------
46 class WXDLLIMPEXP_CORE wxClipboard
: public wxClipboardBase
50 virtual ~wxClipboard();
52 // open the clipboard before SetData() and GetData()
55 // close the clipboard after SetData() and GetData()
58 // query whether the clipboard is opened
59 virtual bool IsOpened() const;
61 // set the clipboard data. all other formats will be deleted.
62 virtual bool SetData( wxDataObject
*data
);
64 // add to the clipboard data.
65 virtual bool AddData( wxDataObject
*data
);
67 // ask if data in correct format is available
68 virtual bool IsSupported( const wxDataFormat
& format
);
70 // fill data with data on the clipboard (if available)
71 virtual bool GetData( wxDataObject
& data
);
73 // clears wxTheClipboard and the system's clipboard if possible
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
82 IDataObject
*m_lastDataObject
;
85 DECLARE_DYNAMIC_CLASS(wxClipboard
)
88 #endif // wxUSE_CLIPBOARD
90 #endif // _WX_CLIPBRD_H_