]> git.saurik.com Git - wxWidgets.git/blob - src/motif/dataobj.cpp
"continue;" restored to prevent the app from going into infinite loop
[wxWidgets.git] / src / motif / dataobj.cpp
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: dataobj.cpp
3 // Purpose: wxDataObject class
4 // Author: Julian Smart
5 // Id: $Id$
6 // Copyright: (c) 1998 Julian Smart
7 // Licence: wxWindows licence
8 ///////////////////////////////////////////////////////////////////////////////
9
10 #ifdef __GNUG__
11 #pragma implementation "dataobj.h"
12 #endif
13
14 #include "wx/dataobj.h"
15 #include "wx/app.h"
16
17 //-------------------------------------------------------------------------
18 // wxDataObject
19 //-------------------------------------------------------------------------
20
21 IMPLEMENT_ABSTRACT_CLASS( wxDataObject, wxObject )
22
23 // ----------------------------------------------------------------------------
24 // wxTextDataObject
25 // ----------------------------------------------------------------------------
26
27 IMPLEMENT_DYNAMIC_CLASS( wxTextDataObject, wxDataObject )
28
29 // ----------------------------------------------------------------------------
30 // wxFileDataObject
31 // ----------------------------------------------------------------------------
32
33 IMPLEMENT_DYNAMIC_CLASS( wxFileDataObject, wxDataObject )
34
35 // ----------------------------------------------------------------------------
36 // wxBitmapDataObject
37 // ----------------------------------------------------------------------------
38
39 IMPLEMENT_DYNAMIC_CLASS( wxBitmapDataObject, wxDataObject )
40
41 // ----------------------------------------------------------------------------
42 // wxPrivateDataObject
43 // ----------------------------------------------------------------------------
44
45 IMPLEMENT_DYNAMIC_CLASS( wxPrivateDataObject, wxDataObject )
46
47 wxPrivateDataObject::wxPrivateDataObject()
48 {
49 m_size = 0;
50 m_data = (char*) NULL;
51 m_id = wxTheApp->GetAppName();
52 }
53
54 wxPrivateDataObject::~wxPrivateDataObject()
55 {
56 if (m_data) delete[] m_data;
57 }
58
59 void wxPrivateDataObject::SetData( const char *data, size_t size )
60 {
61 m_size = size;
62
63 if (m_data) delete[] m_data;
64
65 m_data = new char[size];
66
67 memcpy( m_data, data, size );
68 }
69