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