]>
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_
16 #pragma interface "clipbrd.h"
22 #include "wx/module.h"
23 #include "wx/dataobj.h" // for wxDataFormat
25 // These functions superceded by wxClipboard, but retained in order to
26 // implement wxClipboard, and for compatibility.
28 // open/close the clipboard
29 WXDLLEXPORT
bool wxOpenClipboard();
30 WXDLLEXPORT
bool wxIsClipboardOpened();
31 #define wxClipboardOpen wxIsClipboardOpened
32 WXDLLEXPORT
bool wxCloseClipboard();
35 WXDLLEXPORT
bool wxEmptyClipboard();
36 WXDLLEXPORT
bool wxSetClipboardData(wxDataFormat dataFormat
,
38 int width
= 0, int height
= 0);
39 WXDLLEXPORT
void* wxGetClipboardData(wxDataFormat dataFormat
,
43 WXDLLEXPORT
bool wxIsClipboardFormatAvailable(wxDataFormat dataFormat
);
44 WXDLLEXPORT wxDataFormat
wxEnumClipboardFormats(wxDataFormat dataFormat
);
45 WXDLLEXPORT
int wxRegisterClipboardFormat(wxChar
*formatName
);
46 WXDLLEXPORT
bool wxGetClipboardFormatName(wxDataFormat dataFormat
,
50 //-----------------------------------------------------------------------------
52 //-----------------------------------------------------------------------------
54 class WXDLLEXPORT wxDataObject
;
55 class WXDLLEXPORT wxClipboard
: public wxObject
57 DECLARE_DYNAMIC_CLASS(wxClipboard
)
63 // open the clipboard before SetData() and GetData()
66 // close the clipboard after SetData() and GetData()
69 // query whether the clipboard is opened
70 virtual bool IsOpened() const;
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
87 // flushes the clipboard: this means that the data which is currently on
88 // clipboard will stay available even after the application exits (possibly
89 // eating memory), otherwise the clipboard will be emptied on exit
92 // X11 has two clipboards which get selected by this call. Empty on MSW.
93 void UsePrimarySelection( bool WXUNUSED(primary
) = FALSE
) { }
100 #endif // wxUSE_CLIPBOARD