]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/mac/clipbrd.h
Added possibility of 2-step initialisation, and wxWIZARD_EX_HELPBUTTON style.
[wxWidgets.git] / include / wx / mac / clipbrd.h
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: clipbrd.h
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: AUTHOR
8// Modified by:
9// Created: ??/??/98
10// RCS-ID: $Id$
11// Copyright: (c) AUTHOR
12// Licence: wxWindows licence
13/////////////////////////////////////////////////////////////////////////////
14
15#ifndef _WX_CLIPBRD_H_
16#define _WX_CLIPBRD_H_
17
18#ifdef __GNUG__
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
32class WXDLLEXPORT wxDataObject;
33class WXDLLEXPORT wxClipboard : public wxClipboardBase
34{
35 DECLARE_DYNAMIC_CLASS(wxClipboard)
36
37public:
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
73private:
74 wxDataObject *m_data;
75 bool m_open;
76};
77
78#endif // wxUSE_CLIPBOARD
79
80#endif
81 // _WX_CLIPBRD_H_