]> git.saurik.com Git - wxWidgets.git/blob - include/wx/mac/carbon/clipbrd.h
Source cleaning: whitespaces, -1/wxID_ANY/wxNOT_FOUND, TRUE/true, FALSE/false.
[wxWidgets.git] / include / wx / mac / carbon / clipbrd.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: clipbrd.h
3 // Purpose: Clipboard functionality.
4 // Note: this functionality is under review, and
5 // is derived from wxWidgets 1.xx code. Please contact
6 // the wxWidgets developers for further information.
7 // Author: Stefan Csomor
8 // Modified by:
9 // Created: 1998-01-01
10 // RCS-ID: $Id$
11 // Copyright: (c) Stefan Csomor
12 // Licence: wxWindows licence
13 /////////////////////////////////////////////////////////////////////////////
14
15 #ifndef _WX_CLIPBRD_H_
16 #define _WX_CLIPBRD_H_
17
18 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
19 #pragma interface "clipbrd.h"
20 #endif
21
22 #if wxUSE_CLIPBOARD
23
24 #include "wx/list.h"
25 #include "wx/module.h"
26 #include "wx/dataobj.h" // for wxDataFormat
27
28 //-----------------------------------------------------------------------------
29 // wxClipboard
30 //-----------------------------------------------------------------------------
31
32 class WXDLLEXPORT wxDataObject;
33 class WXDLLEXPORT wxClipboard : public wxClipboardBase
34 {
35 DECLARE_DYNAMIC_CLASS(wxClipboard)
36
37 public:
38 wxClipboard();
39 ~wxClipboard();
40
41 // open the clipboard before SetData() and GetData()
42 virtual bool Open();
43
44 // close the clipboard after SetData() and GetData()
45 virtual void Close();
46
47 // query whether the clipboard is opened
48 virtual bool IsOpened() const;
49
50 // set the clipboard data. all other formats will be deleted.
51 virtual bool SetData( wxDataObject *data );
52
53 // add to the clipboard data.
54 virtual bool AddData( wxDataObject *data );
55
56 // ask if data in correct format is available
57 virtual bool IsSupported( const wxDataFormat& format );
58
59 // fill data with data on the clipboard (if available)
60 virtual bool GetData( wxDataObject& data );
61
62 // clears wxTheClipboard and the system's clipboard if possible
63 virtual void Clear();
64
65 // flushes the clipboard: this means that the data which is currently on
66 // clipboard will stay available even after the application exits (possibly
67 // eating memory), otherwise the clipboard will be emptied on exit
68 virtual bool Flush();
69
70 // X11 has two clipboards which get selected by this call. Empty on MSW.
71 void UsePrimarySelection( bool WXUNUSED(primary) = FALSE ) { }
72
73 private:
74 wxDataObject *m_data;
75 bool m_open;
76 };
77
78 #endif // wxUSE_CLIPBOARD
79
80 #endif
81 // _WX_CLIPBRD_H_