]>
Commit | Line | Data |
---|---|---|
864753e9 VZ |
1 | \section{\class{wxCustomDataObject}}\label{wxcustomdataobject} |
2 | ||
3 | wxCustomDataObject is a specialization of | |
4 | \helpref{wxDataObjectSimple}{wxdataobjectsimple} for some | |
5 | application-specific data in arbitrary (either custom or one of the standard | |
6 | ones). The only restriction is that it is supposed that this data can be | |
7 | copied bitwise (i.e. with {\tt memcpy()}), so it would be a bad idea to make | |
8 | it contain a C++ object (though C struct is fine). | |
9 | ||
10 | \wxheading{Derived from} | |
11 | ||
12 | \helpref{wxDataObjectSimple}{wxdataobjectsimple} | |
13 | \helpref{wxDataObject}{wxdataobject} | |
14 | ||
15 | \wxheading{Include files} | |
16 | ||
17 | <wx/dataobj.h> | |
18 | ||
19 | \wxheading{See also} | |
20 | ||
21 | \helpref{wxDataObject}{wxdataobject} | |
22 | ||
23 | \latexignore{\rtfignore{\wxheading{Members}}} | |
24 | ||
25 | \membersection{wxCustomDataObject::wxCustomDataObject}\label{wxcustomdataobjectwxcustomdataobject} | |
26 | ||
27 | \func{}{wxCustomDataObject}{\param{const wxDataFormat\& }{format = wxFormatInvalid}} | |
28 | ||
29 | The constructor accepts a {\it format} argument which specifies the (single) | |
30 | format supported by this object. If it isn't set here, | |
31 | \helpref{SetFormat}{wxdataobjectsimplesetformat} should be used. | |
32 | ||
33 | \membersection{wxCustomDataObject::\destruct{wxCustomDataObject}}\label{wxcustomdataobjectdtor} | |
34 | ||
35 | \func{}{\destruct{wxCustomDataObject}}{\void} | |
36 | ||
37 | The destructor will free the data hold by the object. Notice that although it | |
38 | calls a virtual \helpref{Free()}{wxcustomdataobjectfree} function, the base | |
39 | class version will always be called (C++ doesn't allow calling virtual | |
40 | functions from constructors or destructors), so if you override {\tt Free()}, you | |
41 | should override the destructor in your class as well (which would probably | |
42 | just call the derived class' version of {\tt Free()}). | |
43 | ||
44 | ||
45 | \membersection{wxCustomDataObject::SetData}\label{wxcustomdataobjectsetdata} | |
46 | ||
47 | \func{virtual void}{SetData}{\param{const char }{*data}, \param{size\_t }{size}} | |
48 | ||
49 | Set the data. The data object will make an internal copy. | |
50 | ||
51 | \membersection{wxCustomDataObject::GetSize}\label{wxcustomdataobjectgetsize} | |
52 | ||
53 | \constfunc{virtual size\_t}{GetDataSize}{\void} | |
54 | ||
55 | Returns the data size. | |
56 | ||
57 | \membersection{wxCustomDataObject::GetData}\label{wxcustomdataobjectgetdata} | |
58 | ||
59 | \func{virtual char*}{GetData}{\void} | |
60 | ||
61 | Returns a pointer to the data. | |
62 |