]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/mac/clipbrd.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: Clipboard functionality.
4 // Note: this functionality is under review, and
5 // is derived from wxWindows 1.xx code. Please contact
6 // the wxWindows developers for further information.
11 // Copyright: (c) AUTHOR
12 // Licence: wxWindows licence
13 /////////////////////////////////////////////////////////////////////////////
15 #ifndef _WX_CLIPBRD_H_
16 #define _WX_CLIPBRD_H_
19 #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(wxChar
*formatName
);
49 WXDLLEXPORT
bool wxGetClipboardFormatName(wxDataFormat dataFormat
,
53 //-----------------------------------------------------------------------------
55 //-----------------------------------------------------------------------------
57 class WXDLLEXPORT wxDataObject
;
58 class WXDLLEXPORT wxClipboard
: public wxClipboardBase
60 DECLARE_DYNAMIC_CLASS(wxClipboard
)
66 // open the clipboard before SetData() and GetData()
69 // close the clipboard after SetData() and GetData()
72 // query whether the clipboard is opened
73 virtual bool IsOpened() const;
75 // set the clipboard data. all other formats will be deleted.
76 virtual bool SetData( wxDataObject
*data
);
78 // add to the clipboard data.
79 virtual bool AddData( wxDataObject
*data
);
81 // ask if data in correct format is available
82 virtual bool IsSupported( const wxDataFormat
& format
);
84 // fill data with data on the clipboard (if available)
85 virtual bool GetData( wxDataObject
& data
);
87 // clears wxTheClipboard and the system's clipboard if possible
90 // flushes the clipboard: this means that the data which is currently on
91 // clipboard will stay available even after the application exits (possibly
92 // eating memory), otherwise the clipboard will be emptied on exit
95 // X11 has two clipboards which get selected by this call. Empty on MSW.
96 void UsePrimarySelection( bool WXUNUSED(primary
) = FALSE
) { }
102 #endif // wxUSE_CLIPBOARD