1998-05-20 10:12:05 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: clipbrd.h
|
|
|
|
// Purpose: Clipboard functionality
|
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 01/02/97
|
|
|
|
// RCS-ID: $Id$
|
1998-08-07 19:52:45 -04:00
|
|
|
// Copyright: (c) Julian Smart
|
|
|
|
// Licence: wxWindows licence
|
1998-05-20 10:12:05 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
1998-08-07 19:52:45 -04:00
|
|
|
#ifndef _WX_CLIPBRD_H_
|
|
|
|
#define _WX_CLIPBRD_H_
|
1998-05-20 10:12:05 -04:00
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface "clipbrd.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "wx/defs.h"
|
|
|
|
#include "wx/setup.h"
|
|
|
|
|
1998-09-25 09:28:52 -04:00
|
|
|
#if wxUSE_CLIPBOARD
|
1998-05-20 10:12:05 -04:00
|
|
|
|
|
|
|
#include "wx/list.h"
|
|
|
|
|
1999-01-13 13:01:39 -05:00
|
|
|
// These functions superceded by wxClipboard, but retained in order to implement
|
|
|
|
// wxClipboard, and for compatibility.
|
1998-11-22 17:32:53 -05:00
|
|
|
WXDLLEXPORT bool wxOpenClipboard(void);
|
|
|
|
WXDLLEXPORT bool wxClipboardOpen(void);
|
|
|
|
WXDLLEXPORT bool wxCloseClipboard(void);
|
|
|
|
WXDLLEXPORT bool wxEmptyClipboard(void);
|
1999-01-13 13:01:39 -05:00
|
|
|
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);
|
1998-11-22 17:32:53 -05:00
|
|
|
WXDLLEXPORT int wxRegisterClipboardFormat(char *formatName);
|
1999-01-13 13:01:39 -05:00
|
|
|
WXDLLEXPORT bool wxGetClipboardFormatName(wxDataFormat dataFormat, char *formatName, int maxCount);
|
1998-05-20 10:12:05 -04:00
|
|
|
|
1999-01-13 13:01:39 -05:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// wxClipboard
|
|
|
|
//-----------------------------------------------------------------------------
|
1998-05-20 10:12:05 -04:00
|
|
|
|
1999-01-13 13:01:39 -05:00
|
|
|
class WXDLLEXPORT wxDataObject;
|
|
|
|
class WXDLLEXPORT wxClipboard: public wxObject
|
1998-05-20 10:12:05 -04:00
|
|
|
{
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxClipboard)
|
|
|
|
|
1999-01-13 13:01:39 -05:00
|
|
|
public:
|
|
|
|
|
1998-05-20 10:12:05 -04:00
|
|
|
wxClipboard();
|
|
|
|
~wxClipboard();
|
|
|
|
|
1999-01-13 13:01:39 -05:00
|
|
|
// open the clipboard before SetData() and GetData()
|
|
|
|
virtual bool Open();
|
|
|
|
|
|
|
|
// close the clipboard after SetData() and GetData()
|
|
|
|
virtual void Close();
|
|
|
|
|
|
|
|
// can be called several times
|
|
|
|
virtual bool SetData( wxDataObject *data );
|
|
|
|
|
|
|
|
// format available on the clipboard ?
|
|
|
|
// supply ID if private format, the same as wxPrivateDataObject::SetId()
|
|
|
|
virtual bool IsSupportedFormat( wxDataFormat format, const wxString &id = wxEmptyString );
|
|
|
|
|
|
|
|
// fill data with data on the clipboard (if available)
|
|
|
|
virtual bool GetData( wxDataObject *data );
|
|
|
|
|
|
|
|
// clears wxTheClipboard and the system's clipboard if possible
|
|
|
|
virtual void Clear();
|
|
|
|
|
|
|
|
// implementation
|
|
|
|
|
|
|
|
bool m_open;
|
1998-05-20 10:12:05 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
/* The clipboard */
|
1999-01-13 13:01:39 -05:00
|
|
|
// WXDLLEXPORT_DATA(extern wxClipboard*) wxTheClipboard;
|
1998-05-20 10:12:05 -04:00
|
|
|
|
1998-09-25 09:28:52 -04:00
|
|
|
#endif // wxUSE_CLIPBOARD
|
1998-05-20 10:12:05 -04:00
|
|
|
#endif
|
1998-08-07 19:52:45 -04:00
|
|
|
// _WX_CLIPBRD_H_
|