]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/dobjsmpl.tex
Updated border style names
[wxWidgets.git] / docs / latex / wx / dobjsmpl.tex
CommitLineData
eb91c0be
VZ
1%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2%% Name: dobjsmpl.tex
3%% Purpose: wxDataObjectSimple documentation
4%% Author: Vadim Zeitlin
5%% Modified by:
6%% Created: 02.11.99
7%% RCS-ID: $Id$
8%% Copyright: (c) Vadim Zeitlin
8795498c 9%% License: wxWindows license
eb91c0be
VZ
10%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11
12\section{\class{wxDataObjectSimple}}\label{wxdataobjectsimple}
13
fa482912 14This is the simplest possible implementation of the
eb91c0be
VZ
15\helpref{wxDataObject}{wxdataobject} class. The data object of (a class derived
16from) this class only supports one format, so the number of virtual functions
17to be implemented is reduced.
18
19Notice that this is still an abstract base class and cannot be used but should
20be derived from.
21
b1462dfa
RD
22\pythonnote{If you wish to create a derived wxDataObjectSimple class in
23wxPython you should derive the class from wxPyDataObjectSimple
24in order to get Python-aware capabilities for the various virtual
25methods.}
26
d3f3e857
MB
27\perlnote{In wxPerl, you need to derive your data object class
28from Wx::PlDataObjectSimple.}
29
eb91c0be
VZ
30\wxheading{Virtual functions to override}
31
fa482912
JS
32The objects supporting rendering the data must override
33\helpref{GetDataSize}{wxdataobjectsimplegetdatasize} and
eb91c0be
VZ
34\helpref{GetDataHere}{wxdataobjectsimplegetdatahere} while the objects which
35may be set must override \helpref{SetData}{wxdataobjectsimplesetdata}. Of
2edb0bde 36course, the objects supporting both operations must override all three
eb91c0be
VZ
37methods.
38
39\wxheading{Derived from}
40
41\helpref{wxDataObject}{wxdataobject}
42
43\wxheading{Include files}
44
45<wx/dataobj.h>
46
a7af285d
VZ
47\wxheading{Library}
48
49\helpref{wxCore}{librarieslist}
50
eb91c0be
VZ
51\wxheading{See also}
52
fa482912
JS
53\helpref{Clipboard and drag and drop overview}{wxdndoverview},
54\helpref{DnD sample}{samplednd},
55\helpref{wxFileDataObject}{wxfiledataobject},
56\helpref{wxTextDataObject}{wxtextdataobject},
eb91c0be
VZ
57\helpref{wxBitmapDataObject}{wxbitmapdataobject}
58
59\latexignore{\rtfignore{\wxheading{Members}}}
60
61\membersection{wxDataObjectSimple::wxDataObjectSimple}\label{wxdataobjectsimplewxdataobjectsimple}
62
63\func{}{wxDataObjectSimple}{\param{const wxDataFormat\&}{ format = wxFormatInvalid}}
64
65Constructor accepts the supported format (none by default) which may also be
66set later with \helpref{SetFormat}{wxdataobjectsimplesetformat}.
67
68\membersection{wxDataObjectSimple::GetFormat}\label{wxdataobjectsimplegetformat}
69
70\constfunc{const wxDataFormat\&}{GetFormat}{\void}
71
72Returns the (one and only one) format supported by this object. It is supposed
73that the format is supported in both directions.
74
75\membersection{wxDataObjectSimple::SetFormat}\label{wxdataobjectsimplesetformat}
76
77\func{void}{SetFormat}{\param{const wxDataFormat\&}{ format}}
78
79Sets the supported format.
80
81\membersection{wxDataObjectSimple::GetDataSize}\label{wxdataobjectsimplegetdatasize}
82
83\constfunc{virtual size\_t}{GetDataSize}{\void}
84
85Gets the size of our data. Must be implemented in the derived class if the
86object supports rendering its data.
87
88\membersection{wxDataObjectSimple::GetDataHere}\label{wxdataobjectsimplegetdatahere}
89
90\constfunc{virtual bool}{GetDataHere}{\param{void }{*buf}}
91
cc81d32f 92Copy the data to the buffer, return true on success. Must be implemented in the
eb91c0be
VZ
93derived class if the object supports rendering its data.
94
b1462dfa
RD
95\pythonnote{When implementing this method in wxPython, no additional
96parameters are required and the data should be returned from the
97method as a string.}
98
eb91c0be
VZ
99\membersection{wxDataObjectSimple::SetData}\label{wxdataobjectsimplesetdata}
100
101\func{virtual bool}{SetData}{\param{size\_t }{len}, \param{const void }{*buf}}
102
cc81d32f 103Copy the data from the buffer, return true on success. Must be implemented in
eb91c0be
VZ
104the derived class if the object supports setting its data.
105
b1462dfa
RD
106\pythonnote{When implementing this method in wxPython, the data comes
107as a single string parameter rather than the two shown here.}
108