1998-05-27 19:24:11 -04:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
1999-10-20 20:25:42 -04:00
|
|
|
// Name: msw/ole/dataobj.h
|
1998-05-27 19:24:11 -04:00
|
|
|
// Purpose: declaration of the wxDataObject class
|
|
|
|
// Author: Vadim Zeitlin
|
1999-10-20 20:25:42 -04:00
|
|
|
// Modified by:
|
1998-05-27 19:24:11 -04:00
|
|
|
// Created: 10.05.98
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
|
1998-08-07 19:52:45 -04:00
|
|
|
// Licence: wxWindows licence
|
1998-05-27 19:24:11 -04:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
1999-10-20 20:25:42 -04:00
|
|
|
#ifndef _WX_MSW_OLE_DATAOBJ_H
|
|
|
|
#define _WX_MSW_OLE_DATAOBJ_H
|
1999-06-23 06:03:44 -04:00
|
|
|
|
1998-05-27 19:24:11 -04:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// forward declarations
|
|
|
|
// ----------------------------------------------------------------------------
|
1999-10-17 20:08:40 -04:00
|
|
|
|
1998-05-27 19:24:11 -04:00
|
|
|
struct IDataObject;
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// wxDataObject is a "smart" and polymorphic piece of data.
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
1999-10-20 21:58:57 -04:00
|
|
|
class WXDLLEXPORT wxDataObject : public wxDataObjectBase
|
1998-05-27 19:24:11 -04:00
|
|
|
{
|
|
|
|
public:
|
1999-10-16 21:18:49 -04:00
|
|
|
// ctor & dtor
|
|
|
|
wxDataObject();
|
|
|
|
virtual ~wxDataObject();
|
|
|
|
|
1999-10-20 21:58:57 -04:00
|
|
|
// retrieve IDataObject interface (for other OLE related classes)
|
1999-10-16 21:18:49 -04:00
|
|
|
IDataObject *GetInterface() const { return m_pIDataObject; }
|
1999-10-17 20:08:40 -04:00
|
|
|
|
|
|
|
// tell the object that it should be now owned by IDataObject - i.e. when
|
|
|
|
// it is deleted, it should delete us as well
|
|
|
|
void SetAutoDelete();
|
|
|
|
|
1999-10-20 21:58:57 -04:00
|
|
|
// return TRUE if we support this format in "Get" direction
|
2000-01-13 18:39:48 -05:00
|
|
|
bool IsSupportedFormat(const wxDataFormat& format) const
|
|
|
|
{ return wxDataObjectBase::IsSupported(format, Get); }
|
1999-10-20 21:58:57 -04:00
|
|
|
|
1999-10-16 21:18:49 -04:00
|
|
|
// function to return symbolic name of clipboard format (for debug messages)
|
2001-08-16 19:46:56 -04:00
|
|
|
#ifdef __WXDEBUG__
|
2000-07-15 15:51:35 -04:00
|
|
|
static const wxChar *GetFormatName(wxDataFormat format);
|
1999-01-13 13:01:39 -05:00
|
|
|
|
1999-10-22 09:26:45 -04:00
|
|
|
#define wxGetFormatName(format) wxDataObject::GetFormatName(format)
|
|
|
|
#else // !Debug
|
2001-08-16 19:46:56 -04:00
|
|
|
#define wxGetFormatName(format) _T("")
|
1999-10-22 09:26:45 -04:00
|
|
|
#endif // Debug/!Debug
|
|
|
|
|
1998-05-27 19:24:11 -04:00
|
|
|
private:
|
1999-10-16 21:18:49 -04:00
|
|
|
IDataObject *m_pIDataObject; // pointer to the COM interface
|
1998-05-27 19:24:11 -04:00
|
|
|
};
|
|
|
|
|
1999-10-20 20:25:42 -04:00
|
|
|
#endif //_WX_MSW_OLE_DATAOBJ_H
|