]>
Commit | Line | Data |
---|---|---|
8b53e5a2 RR |
1 | /////////////////////////////////////////////////////////////////////////////// |
2 | // Name: dataobj.cpp | |
3 | // Purpose: wxDataObject class | |
4 | // Author: Robert Roebling | |
5 | // Id: $Id$ | |
6 | // Copyright: (c) 1998 Robert Roebling | |
7 | // Licence: wxWindows licence | |
8 | /////////////////////////////////////////////////////////////////////////////// | |
9 | ||
10 | #ifdef __GNUG__ | |
11 | #pragma implementation "dataobj.h" | |
12 | #endif | |
13 | ||
14 | #include "wx/dataobj.h" | |
15 | ||
16 | //------------------------------------------------------------------------- | |
17 | // wxDataObject | |
18 | //------------------------------------------------------------------------- | |
19 | ||
20 | IMPLEMENT_ABSTRACT_CLASS( wxDataObject, wxObject ) | |
21 | ||
22 | // ---------------------------------------------------------------------------- | |
23 | // wxTextDataObject | |
24 | // ---------------------------------------------------------------------------- | |
25 | ||
26 | IMPLEMENT_DYNAMIC_CLASS( wxTextDataObject, wxDataObject ) | |
27 | ||
28 | // ---------------------------------------------------------------------------- | |
29 | // wxFileDataObject | |
30 | // ---------------------------------------------------------------------------- | |
31 | ||
32 | IMPLEMENT_DYNAMIC_CLASS( wxFileDataObject, wxDataObject ) | |
33 | ||
34 | // ---------------------------------------------------------------------------- | |
35 | // wxBitmapDataObject | |
36 | // ---------------------------------------------------------------------------- | |
37 | ||
38 | IMPLEMENT_DYNAMIC_CLASS( wxBitmapDataObject, wxDataObject ) | |
39 | ||
40 | // ---------------------------------------------------------------------------- | |
41 | // wxPrivateDataObject | |
42 | // ---------------------------------------------------------------------------- | |
43 | ||
44 | IMPLEMENT_DYNAMIC_CLASS( wxPrivateDataObject, wxDataObject ) | |
45 | ||
46 | void wxPrivateDataObject::SetData( const char *data, size_t size ) | |
47 | { | |
48 | m_size = size; | |
49 | ||
50 | if (m_data) delete[] m_data; | |
51 | ||
52 | m_data = new char[size]; | |
53 | ||
54 | memcpy( m_data, data, size ); | |
55 | } | |
56 |