]> git.saurik.com Git - wxWidgets.git/blame - include/wx/palmos/clipbrd.h
wxCalendarCtrl workaround for occasional wrong combobox height reporting on wxMSW
[wxWidgets.git] / include / wx / palmos / clipbrd.h
CommitLineData
ffecfa5a
JS
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/palmos/clipbrd.h
3// Purpose: wxClipboad class and clipboard functions for Palm OS
e1d63b79 4// Author: William Osborne - minimal working wxPalmOS port
ffecfa5a
JS
5// Modified by:
6// Created: 10/13/04
e1d63b79 7// RCS-ID: $Id$
ffecfa5a
JS
8// Copyright: (c) William Osborne
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_CLIPBRD_H_
13#define _WX_CLIPBRD_H_
14
ffecfa5a
JS
15#if wxUSE_CLIPBOARD
16
17#include "wx/list.h"
18#include "wx/module.h"
19#include "wx/dataobj.h" // for wxDataFormat
20
21// These functions superceded by wxClipboard, but retained in order to
22// implement wxClipboard, and for compatibility.
23
24// open/close the clipboard
25WXDLLEXPORT bool wxOpenClipboard();
26WXDLLEXPORT bool wxIsClipboardOpened();
27#define wxClipboardOpen wxIsClipboardOpened
28WXDLLEXPORT bool wxCloseClipboard();
29
30// get/set data
31WXDLLEXPORT bool wxEmptyClipboard();
32WXDLLEXPORT bool wxSetClipboardData(wxDataFormat dataFormat,
33 const void *data,
34 int width = 0, int height = 0);
35WXDLLEXPORT void* wxGetClipboardData(wxDataFormat dataFormat,
36 long *len = NULL);
37
38// clipboard formats
39WXDLLEXPORT bool wxIsClipboardFormatAvailable(wxDataFormat dataFormat);
40WXDLLEXPORT wxDataFormat wxEnumClipboardFormats(wxDataFormat dataFormat);
41WXDLLEXPORT int wxRegisterClipboardFormat(wxChar *formatName);
42WXDLLEXPORT bool wxGetClipboardFormatName(wxDataFormat dataFormat,
43 wxChar *formatName,
44 int maxCount);
45
46//-----------------------------------------------------------------------------
47// wxClipboard
48//-----------------------------------------------------------------------------
49
50class WXDLLEXPORT wxDataObject;
51class WXDLLEXPORT wxClipboard : public wxObject
52{
53 DECLARE_DYNAMIC_CLASS(wxClipboard)
54
55public:
56 wxClipboard();
57 ~wxClipboard();
58
59 // open the clipboard before SetData() and GetData()
60 virtual bool Open();
61
62 // close the clipboard after SetData() and GetData()
63 virtual void Close();
64
65 // query whether the clipboard is opened
66 virtual bool IsOpened() const;
67
68 // set the clipboard data. all other formats will be deleted.
69 virtual bool SetData( wxDataObject *data );
70
71 // add to the clipboard data.
72 virtual bool AddData( wxDataObject *data );
73
74 // ask if data in correct format is available
75 virtual bool IsSupported( wxDataFormat format );
76
77 // fill data with data on the clipboard (if available)
78 virtual bool GetData( wxDataObject& data );
79
80 // clears wxTheClipboard and the system's clipboard if possible
81 virtual void Clear();
82
83 // flushes the clipboard: this means that the data which is currently on
84 // clipboard will stay available even after the application exits (possibly
85 // eating memory), otherwise the clipboard will be emptied on exit
86 virtual bool Flush();
87
88 // X11 has two clipboards which get selected by this call. Empty on MSW.
89 void UsePrimarySelection( bool WXUNUSED(primary) = FALSE ) { }
90
91private:
92 bool m_clearOnExit;
93 bool m_isOpened;
94};
95
96#endif // wxUSE_CLIPBOARD
97#endif
98 // _WX_CLIPBRD_H_