]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/clipbrd.h
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"
25 #include "wx/module.h"
27 // These functions superceded by wxClipboard, but retained in order to implement
28 // wxClipboard, and for compatibility.
29 WXDLLEXPORT
bool wxOpenClipboard(void);
30 WXDLLEXPORT
bool wxClipboardOpen(void);
31 WXDLLEXPORT
bool wxCloseClipboard(void);
32 WXDLLEXPORT
bool wxEmptyClipboard(void);
33 WXDLLEXPORT
bool wxIsClipboardFormatAvailable(wxDataFormat dataFormat
);
34 WXDLLEXPORT
bool wxSetClipboardData(wxDataFormat dataFormat
, wxObject
*obj
, int width
= 0, int height
= 0);
35 WXDLLEXPORT wxObject
* wxGetClipboardData(wxDataFormat dataFormat
, long *len
= NULL
);
36 WXDLLEXPORT wxDataFormat
wxEnumClipboardFormats(wxDataFormat dataFormat
);
37 WXDLLEXPORT
int wxRegisterClipboardFormat(char *formatName
);
38 WXDLLEXPORT
bool wxGetClipboardFormatName(wxDataFormat dataFormat
, char *formatName
, int maxCount
);
40 //-----------------------------------------------------------------------------
42 //-----------------------------------------------------------------------------
44 class WXDLLEXPORT wxDataObject
;
45 class WXDLLEXPORT wxClipboard
: public wxObject
47 DECLARE_DYNAMIC_CLASS(wxClipboard
)
54 // open the clipboard before SetData() and GetData()
57 // close the clipboard after SetData() and GetData()
60 // can be called several times
61 virtual bool SetData( wxDataObject
*data
);
63 // format available on the clipboard ?
64 // supply ID if private format, the same as wxPrivateDataObject::SetId()
65 virtual bool IsSupportedFormat( wxDataFormat format
, const wxString
&id
= wxEmptyString
);
67 // fill data with data on the clipboard (if available)
68 virtual bool GetData( wxDataObject
*data
);
70 // clears wxTheClipboard and the system's clipboard if possible
80 WXDLLEXPORT_DATA(extern wxClipboard
*) wxTheClipboard
;
82 //-----------------------------------------------------------------------------
84 //-----------------------------------------------------------------------------
86 class wxClipboardModule
: public wxModule
88 DECLARE_DYNAMIC_CLASS(wxClipboardModule
)
91 wxClipboardModule() {}
96 #endif // wxUSE_CLIPBOARD