]> git.saurik.com Git - wxWidgets.git/blame - include/wx/mgl/clipbrd.h
fixed return value of wxMDIChildFrame::HandleGetMinMaxInfo()
[wxWidgets.git] / include / wx / mgl / clipbrd.h
CommitLineData
32b8ec41
VZ
1/////////////////////////////////////////////////////////////////////////////
2// Name: clipboard.h
3// Purpose:
4// Author: Vaclav Slavik
5// Id: $Id$
52750c2e 6// Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com)
32b8ec41
VZ
7// Licence: wxWindows licence
8/////////////////////////////////////////////////////////////////////////////
9
10
11#ifndef __WX_CLIPBOARD_H__
12#define __WX_CLIPBOARD_H__
13
12028905 14#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
32b8ec41
VZ
15#pragma interface "clipbrd.h"
16#endif
17
18#if wxUSE_CLIPBOARD
19
20#include "wx/object.h"
21#include "wx/list.h"
22#include "wx/dataobj.h"
23#include "wx/control.h"
24#include "wx/module.h"
25
26// ----------------------------------------------------------------------------
27// wxClipboard
28// ----------------------------------------------------------------------------
29
30class WXDLLEXPORT wxClipboard : public wxClipboardBase
31{
32public:
33 wxClipboard() {}
34 ~wxClipboard() {}
35
36 // open the clipboard before SetData() and GetData()
37 virtual bool Open() {}
38
39 // close the clipboard after SetData() and GetData()
40 virtual void Close() {}
41
42 // query whether the clipboard is opened
43 virtual bool IsOpened() const {}
44
45 // set the clipboard data. all other formats will be deleted.
46 virtual bool SetData( wxDataObject *data ) {}
47
48 // add to the clipboard data.
49 virtual bool AddData( wxDataObject *data ) {}
50
51 // ask if data in correct format is available
52 virtual bool IsSupported( const wxDataFormat& format ) {}
53
54 // fill data with data on the clipboard (if available)
55 virtual bool GetData( wxDataObject& data ) {}
56
57 // clears wxTheClipboard and the system's clipboard if possible
58 virtual void Clear() {}
59
60 // If primary == TRUE, use primary selection in all further ops,
61 // primary == FALSE resets it.
62 virtual void UsePrimarySelection(bool primary = TRUE)
63 { m_usePrimary = primary; }
64
65 // implementation from now on
66 bool m_open;
67 bool m_ownsClipboard;
68 bool m_ownsPrimarySelection;
69 wxDataObject *m_data;
70
71 GtkWidget *m_clipboardWidget; /* for getting and offering data */
72 GtkWidget *m_targetsWidget; /* for getting list of supported formats */
73 bool m_waiting; /* querying data or formats is asynchronous */
74
75 bool m_formatSupported;
76 GdkAtom m_targetRequested;
77 bool m_usePrimary;
78 wxDataObject *m_receivedData;
79
80private:
81 DECLARE_DYNAMIC_CLASS(wxClipboard)
82};
83
84#endif
85 // wxUSE_CLIPBOARD
86
87#endif
88 // __WX_CLIPBOARD_H__