1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: Clipboard functionality
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_CLIPBRD_H_
13 #define _WX_CLIPBRD_H_
16 #pragma interface "clipbrd.h"
26 // These functions superceded by wxClipboard, but retained in order to implement
27 // wxClipboard, and for compatibility.
28 WXDLLEXPORT
bool wxOpenClipboard(void);
29 WXDLLEXPORT
bool wxClipboardOpen(void);
30 WXDLLEXPORT
bool wxCloseClipboard(void);
31 WXDLLEXPORT
bool wxEmptyClipboard(void);
32 WXDLLEXPORT
bool wxIsClipboardFormatAvailable(wxDataFormat dataFormat
);
33 WXDLLEXPORT
bool wxSetClipboardData(wxDataFormat dataFormat
, wxObject
*obj
, int width
= 0, int height
= 0);
34 WXDLLEXPORT wxObject
* wxGetClipboardData(wxDataFormat dataFormat
, long *len
= NULL
);
35 WXDLLEXPORT wxDataFormat
wxEnumClipboardFormats(wxDataFormat dataFormat
);
36 WXDLLEXPORT
int wxRegisterClipboardFormat(char *formatName
);
37 WXDLLEXPORT
bool wxGetClipboardFormatName(wxDataFormat dataFormat
, char *formatName
, int maxCount
);
39 //-----------------------------------------------------------------------------
41 //-----------------------------------------------------------------------------
43 class WXDLLEXPORT wxDataObject
;
44 class WXDLLEXPORT wxClipboard
: public wxObject
46 DECLARE_DYNAMIC_CLASS(wxClipboard
)
53 // open the clipboard before SetData() and GetData()
56 // close the clipboard after SetData() and GetData()
59 // can be called several times
60 virtual bool SetData( wxDataObject
*data
);
62 // format available on the clipboard ?
63 // supply ID if private format, the same as wxPrivateDataObject::SetId()
64 virtual bool IsSupportedFormat( wxDataFormat format
, const wxString
&id
= wxEmptyString
);
66 // fill data with data on the clipboard (if available)
67 virtual bool GetData( wxDataObject
*data
);
69 // clears wxTheClipboard and the system's clipboard if possible
78 // WXDLLEXPORT_DATA(extern wxClipboard*) wxTheClipboard;
80 #endif // wxUSE_CLIPBOARD