]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/motif/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.
7 // Author: Julian Smart
11 // Copyright: (c) Julian Smart
12 // Licence: wxWindows licence
13 /////////////////////////////////////////////////////////////////////////////
15 #ifndef _WX_CLIPBRD_H_
16 #define _WX_CLIPBRD_H_
19 #pragma interface "clipbrd.h"
24 #include "wx/dataobj.h"
26 #include "wx/module.h"
28 bool WXDLLEXPORT
wxOpenClipboard();
29 bool WXDLLEXPORT
wxClipboardOpen();
30 bool WXDLLEXPORT
wxCloseClipboard();
31 bool WXDLLEXPORT
wxEmptyClipboard();
32 bool WXDLLEXPORT
wxIsClipboardFormatAvailable(wxDataFormat dataFormat
);
33 bool WXDLLEXPORT
wxSetClipboardData(wxDataFormat dataFormat
, wxObject
*obj
, int width
= 0, int height
= 0);
34 wxObject
* WXDLLEXPORT
wxGetClipboardData(wxDataFormat dataFormat
, long *len
= NULL
);
35 wxDataFormat WXDLLEXPORT
wxEnumClipboardFormats(wxDataFormat dataFormat
);
36 wxDataFormat WXDLLEXPORT
wxRegisterClipboardFormat(char *formatName
);
37 bool WXDLLEXPORT
wxGetClipboardFormatName(wxDataFormat dataFormat
, char *formatName
, int maxCount
);
39 //-----------------------------------------------------------------------------
41 //-----------------------------------------------------------------------------
43 class wxClipboard
: public wxClipboardBase
49 // open the clipboard before SetData() and GetData()
52 // close the clipboard after SetData() and GetData()
55 // can be called several times
56 virtual bool SetData( wxDataObject
*data
);
58 // format available on the clipboard ?
59 // supply ID if private format, the same as wxPrivateDataObject::SetId()
60 virtual bool IsSupported( wxDataFormat format
);
62 // fill data with data on the clipboard (if available)
63 virtual bool GetData( wxDataObject
*data
);
65 // clears wxTheClipboard and the system's clipboard if possible
68 // implementation from now on
75 DECLARE_DYNAMIC_CLASS(wxClipboard
)
79 WXDLLEXPORT_DATA(extern wxClipboard
*) wxTheClipboard
;
81 #endif // wxUSE_CLIPBOARD