1998-09-18 10:19:10 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2006-07-25 14:31:55 +00:00
|
|
|
// Name: wx/motif/clipbrd.h
|
1998-09-18 10:19:10 +00:00
|
|
|
// Purpose: Clipboard functionality.
|
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 17/09/98
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) Julian Smart
|
2004-05-23 20:53:33 +00:00
|
|
|
// Licence: wxWindows licence
|
1998-09-18 10:19:10 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_CLIPBRD_H_
|
|
|
|
#define _WX_CLIPBRD_H_
|
|
|
|
|
1999-06-29 12:34:18 +00:00
|
|
|
#if wxUSE_CLIPBOARD
|
1998-09-18 10:19:10 +00:00
|
|
|
|
2007-07-09 10:09:52 +00:00
|
|
|
class WXDLLIMPEXP_FWD_CORE wxDataObject;
|
2003-05-12 19:55:35 +00:00
|
|
|
struct wxDataIdToDataObject;
|
2003-01-18 13:01:17 +00:00
|
|
|
|
1999-10-21 20:16:53 +00:00
|
|
|
#include "wx/list.h"
|
2003-05-12 19:55:35 +00:00
|
|
|
|
2003-01-18 13:01:17 +00:00
|
|
|
WX_DECLARE_LIST(wxDataObject, wxDataObjectList);
|
2003-05-12 19:55:35 +00:00
|
|
|
WX_DECLARE_LIST(wxDataIdToDataObject, wxDataIdToDataObjectList);
|
1998-09-18 10:19:10 +00:00
|
|
|
|
2007-09-25 16:53:28 +00:00
|
|
|
WXDLLEXPORT bool wxOpenClipboard();
|
|
|
|
WXDLLEXPORT bool wxClipboardOpen();
|
|
|
|
WXDLLEXPORT bool wxCloseClipboard();
|
|
|
|
WXDLLEXPORT bool wxEmptyClipboard();
|
|
|
|
WXDLLEXPORT bool wxIsClipboardFormatAvailable(wxDataFormat dataFormat);
|
|
|
|
WXDLLEXPORT bool wxSetClipboardData(wxDataFormat dataFormat, wxObject *obj, int width = 0, int height = 0);
|
|
|
|
WXDLLEXPORT wxObject* wxGetClipboardData(wxDataFormat dataFormat, long *len = NULL);
|
|
|
|
WXDLLEXPORT wxDataFormat wxEnumClipboardFormats(wxDataFormat dataFormat);
|
|
|
|
WXDLLEXPORT wxDataFormat wxRegisterClipboardFormat(char *formatName);
|
|
|
|
WXDLLEXPORT bool wxGetClipboardFormatName(wxDataFormat dataFormat, char *formatName, int maxCount);
|
1999-01-14 15:15:39 +00:00
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// wxClipboard
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2005-08-03 00:53:09 +00:00
|
|
|
class WXDLLIMPEXP_CORE wxClipboard : public wxClipboardBase
|
1999-01-14 15:15:39 +00:00
|
|
|
{
|
|
|
|
public:
|
1999-10-21 00:25:42 +00:00
|
|
|
wxClipboard();
|
2006-09-05 20:47:48 +00:00
|
|
|
virtual ~wxClipboard();
|
2006-07-25 14:31:55 +00:00
|
|
|
|
1999-10-21 00:25:42 +00:00
|
|
|
// open the clipboard before SetData() and GetData()
|
|
|
|
virtual bool Open();
|
2006-07-25 14:31:55 +00:00
|
|
|
|
1999-10-21 00:25:42 +00:00
|
|
|
// close the clipboard after SetData() and GetData()
|
|
|
|
virtual void Close();
|
2006-07-25 14:31:55 +00:00
|
|
|
|
1999-10-21 20:16:53 +00:00
|
|
|
// opened?
|
|
|
|
virtual bool IsOpened() const { return m_open; }
|
2006-07-25 14:31:55 +00:00
|
|
|
|
1999-10-21 20:16:53 +00:00
|
|
|
// replaces the data on the clipboard with data
|
1999-10-21 00:25:42 +00:00
|
|
|
virtual bool SetData( wxDataObject *data );
|
2006-07-25 14:31:55 +00:00
|
|
|
|
1999-10-21 20:16:53 +00:00
|
|
|
// adds data to the clipboard
|
|
|
|
virtual bool AddData( wxDataObject *data );
|
2006-07-25 14:31:55 +00:00
|
|
|
|
1999-10-21 00:25:42 +00:00
|
|
|
// format available on the clipboard ?
|
1999-10-21 20:16:53 +00:00
|
|
|
virtual bool IsSupported( const wxDataFormat& format );
|
2006-07-25 14:31:55 +00:00
|
|
|
|
1999-10-21 00:25:42 +00:00
|
|
|
// fill data with data on the clipboard (if available)
|
1999-10-21 20:16:53 +00:00
|
|
|
virtual bool GetData( wxDataObject& data );
|
2006-07-25 14:31:55 +00:00
|
|
|
|
1999-10-21 00:25:42 +00:00
|
|
|
// clears wxTheClipboard and the system's clipboard if possible
|
|
|
|
virtual void Clear();
|
2006-07-25 14:31:55 +00:00
|
|
|
|
1999-10-21 00:25:42 +00:00
|
|
|
// implementation from now on
|
|
|
|
bool m_open;
|
2003-01-18 13:01:17 +00:00
|
|
|
wxDataObjectList m_data;
|
2003-05-12 19:55:35 +00:00
|
|
|
wxDataIdToDataObjectList m_idToObject;
|
|
|
|
|
1999-10-21 00:25:42 +00:00
|
|
|
private:
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxClipboard)
|
1999-01-14 15:15:39 +00:00
|
|
|
};
|
|
|
|
|
1999-06-29 12:34:18 +00:00
|
|
|
#endif // wxUSE_CLIPBOARD
|
|
|
|
|
2007-03-31 02:57:55 +00:00
|
|
|
#endif // _WX_CLIPBRD_H_
|