]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/motif/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"
24 WX_DECLARE_LIST(wxDataObject
, wxDataObjectList
);
26 bool WXDLLEXPORT
wxOpenClipboard();
27 bool WXDLLEXPORT
wxClipboardOpen();
28 bool WXDLLEXPORT
wxCloseClipboard();
29 bool WXDLLEXPORT
wxEmptyClipboard();
30 bool WXDLLEXPORT
wxIsClipboardFormatAvailable(wxDataFormat dataFormat
);
31 bool WXDLLEXPORT
wxSetClipboardData(wxDataFormat dataFormat
, wxObject
*obj
, int width
= 0, int height
= 0);
32 wxObject
* WXDLLEXPORT
wxGetClipboardData(wxDataFormat dataFormat
, long *len
= NULL
);
33 wxDataFormat WXDLLEXPORT
wxEnumClipboardFormats(wxDataFormat dataFormat
);
34 wxDataFormat WXDLLEXPORT
wxRegisterClipboardFormat(char *formatName
);
35 bool WXDLLEXPORT
wxGetClipboardFormatName(wxDataFormat dataFormat
, char *formatName
, int maxCount
);
37 //-----------------------------------------------------------------------------
39 //-----------------------------------------------------------------------------
41 class wxClipboard
: public wxClipboardBase
47 // open the clipboard before SetData() and GetData()
50 // close the clipboard after SetData() and GetData()
54 virtual bool IsOpened() const { return m_open
; }
56 // replaces the data on the clipboard with data
57 virtual bool SetData( wxDataObject
*data
);
59 // adds data to the clipboard
60 virtual bool AddData( wxDataObject
*data
);
62 // format available on the clipboard ?
63 virtual bool IsSupported( const wxDataFormat
& format
);
65 // fill data with data on the clipboard (if available)
66 virtual bool GetData( wxDataObject
& data
);
68 // clears wxTheClipboard and the system's clipboard if possible
71 virtual void UsePrimarySelection(bool primary
= TRUE
)
72 { m_usePrimary
= primary
; }
74 // implementation from now on
77 wxDataObjectList m_data
;
81 DECLARE_DYNAMIC_CLASS(wxClipboard
)
84 #endif // wxUSE_CLIPBOARD