]>
git.saurik.com Git - wxWidgets.git/blob - src/gtk/dataobj.cpp
1 ///////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxDataObject class
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 ///////////////////////////////////////////////////////////////////////////////
11 #pragma implementation "dataobj.h"
14 #include "wx/dataobj.h"
17 //-------------------------------------------------------------------------
19 //-------------------------------------------------------------------------
21 IMPLEMENT_ABSTRACT_CLASS( wxDataObject
, wxObject
)
23 // ----------------------------------------------------------------------------
25 // ----------------------------------------------------------------------------
27 IMPLEMENT_DYNAMIC_CLASS( wxTextDataObject
, wxDataObject
)
29 // ----------------------------------------------------------------------------
31 // ----------------------------------------------------------------------------
33 IMPLEMENT_DYNAMIC_CLASS( wxFileDataObject
, wxDataObject
)
35 // ----------------------------------------------------------------------------
37 // ----------------------------------------------------------------------------
39 IMPLEMENT_DYNAMIC_CLASS( wxBitmapDataObject
, wxDataObject
)
41 // ----------------------------------------------------------------------------
42 // wxPrivateDataObject
43 // ----------------------------------------------------------------------------
45 IMPLEMENT_DYNAMIC_CLASS( wxPrivateDataObject
, wxDataObject
)
47 wxPrivateDataObject::wxPrivateDataObject()
50 m_data
= (char*) NULL
;
51 m_id
= wxTheApp
->GetAppName();
54 wxPrivateDataObject::~wxPrivateDataObject()
56 if (m_data
) delete[] m_data
;
59 void wxPrivateDataObject::SetData( const char *data
, size_t size
)
63 if (m_data
) delete[] m_data
;
65 m_data
= new char[size
];
67 memcpy( m_data
, data
, size
);