1998-05-27 23:24:11 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
1999-10-21 00:25:42 +00:00
|
|
|
// Name: msw/ole/dataobj.h
|
1998-05-27 23:24:11 +00:00
|
|
|
// Purpose: declaration of the wxDataObject class
|
|
|
|
// Author: Vadim Zeitlin
|
1999-10-21 00:25:42 +00:00
|
|
|
// Modified by:
|
1998-05-27 23:24:11 +00:00
|
|
|
// Created: 10.05.98
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
|
1998-08-07 23:52:45 +00:00
|
|
|
// Licence: wxWindows licence
|
1998-05-27 23:24:11 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
1999-10-21 00:25:42 +00:00
|
|
|
#ifndef _WX_MSW_OLE_DATAOBJ_H
|
|
|
|
#define _WX_MSW_OLE_DATAOBJ_H
|
1999-06-23 10:03:44 +00:00
|
|
|
|
1998-05-27 23:24:11 +00:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// forward declarations
|
|
|
|
// ----------------------------------------------------------------------------
|
1999-10-18 00:08:40 +00:00
|
|
|
|
1998-05-27 23:24:11 +00:00
|
|
|
struct IDataObject;
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// wxDataObject is a "smart" and polymorphic piece of data.
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
1999-10-21 01:58:57 +00:00
|
|
|
class WXDLLEXPORT wxDataObject : public wxDataObjectBase
|
1998-05-27 23:24:11 +00:00
|
|
|
{
|
|
|
|
public:
|
1999-10-17 01:18:49 +00:00
|
|
|
// ctor & dtor
|
|
|
|
wxDataObject();
|
|
|
|
virtual ~wxDataObject();
|
|
|
|
|
1999-10-21 01:58:57 +00:00
|
|
|
// retrieve IDataObject interface (for other OLE related classes)
|
1999-10-17 01:18:49 +00:00
|
|
|
IDataObject *GetInterface() const { return m_pIDataObject; }
|
1999-10-18 00:08:40 +00: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-21 01:58:57 +00:00
|
|
|
// return TRUE if we support this format in "Get" direction
|
|
|
|
bool IsSupportedFormat(const wxDataFormat& format) const;
|
|
|
|
|
1999-10-22 13:26:45 +00:00
|
|
|
#ifdef __WXDEBUG__
|
1999-10-17 01:18:49 +00:00
|
|
|
// function to return symbolic name of clipboard format (for debug messages)
|
|
|
|
static const char *GetFormatName(wxDataFormat format);
|
1999-01-13 18:01:39 +00:00
|
|
|
|
1999-10-22 13:26:45 +00:00
|
|
|
#define wxGetFormatName(format) wxDataObject::GetFormatName(format)
|
|
|
|
#else // !Debug
|
|
|
|
#define wxGetFormatName(format) ""
|
|
|
|
#endif // Debug/!Debug
|
|
|
|
|
1998-05-27 23:24:11 +00:00
|
|
|
private:
|
1999-10-17 01:18:49 +00:00
|
|
|
IDataObject *m_pIDataObject; // pointer to the COM interface
|
1998-05-27 23:24:11 +00:00
|
|
|
};
|
|
|
|
|
1999-10-21 00:25:42 +00:00
|
|
|
#endif //_WX_MSW_OLE_DATAOBJ_H
|