]>
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"
26 #include "wx/dataobj.h" // for wxDataFormat
28 // These functions superceded by wxClipboard, but retained in order to
29 // implement wxClipboard, and for compatibility.
31 // open/close the clipboard
32 WXDLLEXPORT
bool wxOpenClipboard();
33 WXDLLEXPORT
bool wxIsClipboardOpened();
34 #define wxClipboardOpen wxIsClipboardOpened
35 WXDLLEXPORT
bool wxCloseClipboard();
38 WXDLLEXPORT
bool wxEmptyClipboard();
39 WXDLLEXPORT
bool wxSetClipboardData(wxDataFormat dataFormat
,
41 int width
= 0, int height
= 0);
42 WXDLLEXPORT
void* wxGetClipboardData(wxDataFormat dataFormat
,
46 WXDLLEXPORT
bool wxIsClipboardFormatAvailable(wxDataFormat dataFormat
);
47 WXDLLEXPORT wxDataFormat
wxEnumClipboardFormats(wxDataFormat dataFormat
);
48 WXDLLEXPORT
int wxRegisterClipboardFormat(char *formatName
);
49 WXDLLEXPORT
bool wxGetClipboardFormatName(wxDataFormat dataFormat
,
53 //-----------------------------------------------------------------------------
55 //-----------------------------------------------------------------------------
57 class WXDLLEXPORT wxDataObject
;
58 class WXDLLEXPORT wxClipboard
: public wxObject
60 DECLARE_DYNAMIC_CLASS(wxClipboard
)
66 // open the clipboard before SetData() and GetData()
69 // close the clipboard after SetData() and GetData()
72 // set the clipboard data. all other formats will be deleted.
73 virtual bool SetData( wxDataObject
*data
);
75 // add to the clipboard data.
76 virtual bool AddData( wxDataObject
*data
);
78 // ask if data in correct format is available
79 virtual bool IsSupported( wxDataFormat format
);
81 // fill data with data on the clipboard (if available)
82 virtual bool GetData( wxDataObject
*data
);
84 // clears wxTheClipboard and the system's clipboard if possible
88 // The global clipboard object
89 WXDLLEXPORT_DATA(extern wxClipboard
*) wxTheClipboard
;
91 //-----------------------------------------------------------------------------
92 // wxClipboardModule: module responsible for initializing the global clipboard
94 //-----------------------------------------------------------------------------
96 class wxClipboardModule
: public wxModule
98 DECLARE_DYNAMIC_CLASS(wxClipboardModule
)
101 wxClipboardModule() { }
107 #endif // wxUSE_CLIPBOARD