/[pcsx2_0.9.7]/branch/r3113_0.9.7_beta/3rdparty/wxWidgets/include/wx/msw/ole/dataobj.h
ViewVC logotype

Contents of /branch/r3113_0.9.7_beta/3rdparty/wxWidgets/include/wx/msw/ole/dataobj.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 32 - (show annotations) (download)
Tue Sep 7 03:29:01 2010 UTC (10 years, 10 months ago) by william
File MIME type: text/plain
File size: 3093 byte(s)
branching from upstream revision (http://pcsx2.googlecode.com/svn/trunk
): r3113 to
https://svn.netsolutions.dnsalias.com/websvn/ps2/pcsx2/pcsx2_0.9.7/branch/r3113_0.9.7_beta
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: msw/ole/dataobj.h
3 // Purpose: declaration of the wxDataObject class
4 // Author: Vadim Zeitlin
5 // Modified by:
6 // Created: 10.05.98
7 // RCS-ID: $Id: dataobj.h 37406 2006-02-09 03:45:14Z VZ $
8 // Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_MSW_OLE_DATAOBJ_H
13 #define _WX_MSW_OLE_DATAOBJ_H
14
15 // ----------------------------------------------------------------------------
16 // forward declarations
17 // ----------------------------------------------------------------------------
18
19 struct IDataObject;
20
21 // ----------------------------------------------------------------------------
22 // wxDataObject is a "smart" and polymorphic piece of data.
23 // ----------------------------------------------------------------------------
24
25 class WXDLLEXPORT wxDataObject : public wxDataObjectBase
26 {
27 public:
28 // ctor & dtor
29 wxDataObject();
30 virtual ~wxDataObject();
31
32 // retrieve IDataObject interface (for other OLE related classes)
33 IDataObject *GetInterface() const { return m_pIDataObject; }
34
35 // tell the object that it should be now owned by IDataObject - i.e. when
36 // it is deleted, it should delete us as well
37 void SetAutoDelete();
38
39 // return true if we support this format in "Get" direction
40 bool IsSupportedFormat(const wxDataFormat& format) const
41 { return wxDataObjectBase::IsSupported(format, Get); }
42
43 // if this method returns false, this wxDataObject will be copied to
44 // the clipboard with its size prepended to it, which is compatible with
45 // older wx versions
46 //
47 // if returns true, then this wxDataObject will be copied to the clipboard
48 // without any additional information and ::HeapSize() function will be used
49 // to get the size of that data
50 virtual bool NeedsVerbatimData(const wxDataFormat& WXUNUSED(format)) const
51 {
52 // return false from here only for compatibility with earlier wx versions
53 return true;
54 }
55
56 // function to return symbolic name of clipboard format (for debug messages)
57 #ifdef __WXDEBUG__
58 static const wxChar *GetFormatName(wxDataFormat format);
59
60 #define wxGetFormatName(format) wxDataObject::GetFormatName(format)
61 #else // !Debug
62 #define wxGetFormatName(format) _T("")
63 #endif // Debug/!Debug
64 // they need to be accessed from wxIDataObject, so made them public,
65 // or wxIDataObject friend
66 public:
67 virtual const void* GetSizeFromBuffer( const void* buffer, size_t* size,
68 const wxDataFormat& format );
69 virtual void* SetSizeInBuffer( void* buffer, size_t size,
70 const wxDataFormat& format );
71 virtual size_t GetBufferOffset( const wxDataFormat& format );
72
73 private:
74 IDataObject *m_pIDataObject; // pointer to the COM interface
75
76 DECLARE_NO_COPY_CLASS(wxDataObject)
77 };
78
79 #endif //_WX_MSW_OLE_DATAOBJ_H

  ViewVC Help
Powered by ViewVC 1.1.22