]>
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"
23 bool WXDLLEXPORT
wxOpenClipboard();
24 bool WXDLLEXPORT
wxClipboardOpen();
25 bool WXDLLEXPORT
wxCloseClipboard();
26 bool WXDLLEXPORT
wxEmptyClipboard();
27 bool WXDLLEXPORT
wxIsClipboardFormatAvailable(wxDataFormat dataFormat
);
28 bool WXDLLEXPORT
wxSetClipboardData(wxDataFormat dataFormat
, wxObject
*obj
, int width
= 0, int height
= 0);
29 wxObject
* WXDLLEXPORT
wxGetClipboardData(wxDataFormat dataFormat
, long *len
= NULL
);
30 wxDataFormat WXDLLEXPORT
wxEnumClipboardFormats(wxDataFormat dataFormat
);
31 wxDataFormat WXDLLEXPORT
wxRegisterClipboardFormat(char *formatName
);
32 bool WXDLLEXPORT
wxGetClipboardFormatName(wxDataFormat dataFormat
, char *formatName
, int maxCount
);
34 //-----------------------------------------------------------------------------
36 //-----------------------------------------------------------------------------
38 class wxClipboard
: public wxClipboardBase
44 // open the clipboard before SetData() and GetData()
47 // close the clipboard after SetData() and GetData()
51 virtual bool IsOpened() const { return m_open
; }
53 // replaces the data on the clipboard with data
54 virtual bool SetData( wxDataObject
*data
);
56 // adds data to the clipboard
57 virtual bool AddData( wxDataObject
*data
);
59 // format available on the clipboard ?
60 virtual bool IsSupported( const 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 virtual void UsePrimarySelection(bool primary
= TRUE
)
69 { m_usePrimary
= primary
; }
71 // implementation from now on
78 DECLARE_DYNAMIC_CLASS(wxClipboard
)
81 #endif // wxUSE_CLIPBOARD