]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk1/clipbrd.h
added stubs for wxTreeCtrl functions not yet implemented under MSW
[wxWidgets.git] / include / wx / gtk1 / clipbrd.h
CommitLineData
dc86cb34
RR
1/////////////////////////////////////////////////////////////////////////////
2// Name: clipboard.h
3// Purpose:
4// Author: Robert Roebling
5// Id: $Id$
6// Copyright: (c) 1998 Robert Roebling
7// Licence: wxWindows licence
8/////////////////////////////////////////////////////////////////////////////
9
10
11#ifndef __GTKCLIPBOARDH__
12#define __GTKCLIPBOARDH__
13
14#ifdef __GNUG__
15#pragma interface
16#endif
17
18#include "wx/defs.h"
19#include "wx/object.h"
20#include "wx/list.h"
8b53e5a2 21#include "wx/dataobj.h"
dc86cb34 22#include "wx/control.h"
b527aac5 23#include "wx/module.h"
dc86cb34
RR
24
25//-----------------------------------------------------------------------------
26// classes
27//-----------------------------------------------------------------------------
28
29class wxClipboard;
b527aac5 30class wxClipboardModule;
dc86cb34
RR
31
32//-----------------------------------------------------------------------------
33// global data
34//-----------------------------------------------------------------------------
35
36extern wxClipboard* wxTheClipboard;
37
38//-----------------------------------------------------------------------------
39// wxClipboard
40//-----------------------------------------------------------------------------
41
b527aac5 42class wxClipboard: public wxObject
dc86cb34
RR
43{
44 DECLARE_DYNAMIC_CLASS(wxClipboard)
45
46public:
47
48 wxClipboard();
49 ~wxClipboard();
50
8b53e5a2
RR
51 // open the clipboard before SetData() and GetData()
52 virtual bool Open();
b527aac5 53
8b53e5a2
RR
54 // close the clipboard after SetData() and GetData()
55 virtual void Close();
b527aac5 56
8b53e5a2
RR
57 // can be called several times
58 virtual bool SetData( wxDataObject *data );
59
60 // format available on the clipboard ?
61 // supply ID if private format, the same as wxPrivateDataObject::SetId()
62 virtual bool IsSupportedFormat( wxDataFormat format, const wxString &id = "" );
63
64 // fill data with data on the clipboard (if available)
65 virtual bool GetData( wxDataObject *data );
b527aac5
RR
66
67 // clears wxTheClipboard and the system's clipboard if possible
68 virtual void Clear();
dc86cb34
RR
69
70 // implementation
8b53e5a2
RR
71
72 GdkAtom GetTargetAtom( wxDataFormat format, const wxString &id = "" );
73
74 bool m_open;
dc86cb34 75
8b53e5a2 76 wxList m_dataObjects;
b527aac5
RR
77 char *m_sentString,
78 *m_receivedString;
79 void *m_receivedTargets;
80 GtkWidget *m_clipboardWidget;
81
82 bool m_formatSupported;
83 GdkAtom m_targetRequested;
84
8b53e5a2 85 wxDataObject *m_receivedData;
b527aac5
RR
86};
87
88//-----------------------------------------------------------------------------
89// wxClipboardModule
90//-----------------------------------------------------------------------------
91
92class wxClipboardModule: public wxModule
93{
94 DECLARE_DYNAMIC_CLASS(wxClipboardModule)
95
96public:
97 wxClipboardModule() {}
98 bool OnInit();
99 void OnExit();
dc86cb34
RR
100};
101
b527aac5 102
dc86cb34
RR
103#endif
104 // __GTKCLIPBOARDH__