]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/dobjsmpl.tex
1. added wxTE_AUTO_URL style and support for it under Win32 (and brief
[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
f6bcfd97 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
eb91c0be
VZ
27\wxheading{Virtual functions to override}
28
fa482912
JS
29The objects supporting rendering the data must override
30\helpref{GetDataSize}{wxdataobjectsimplegetdatasize} and
eb91c0be
VZ
31\helpref{GetDataHere}{wxdataobjectsimplegetdatahere} while the objects which
32may be set must override \helpref{SetData}{wxdataobjectsimplesetdata}. Of
33course, the objects supporting both operations must override all threee
34methods.
35
36\wxheading{Derived from}
37
38\helpref{wxDataObject}{wxdataobject}
39
40\wxheading{Include files}
41
42<wx/dataobj.h>
43
44\wxheading{See also}
45
fa482912
JS
46\helpref{Clipboard and drag and drop overview}{wxdndoverview},
47\helpref{DnD sample}{samplednd},
48\helpref{wxFileDataObject}{wxfiledataobject},
49\helpref{wxTextDataObject}{wxtextdataobject},
eb91c0be
VZ
50\helpref{wxBitmapDataObject}{wxbitmapdataobject}
51
52\latexignore{\rtfignore{\wxheading{Members}}}
53
54\membersection{wxDataObjectSimple::wxDataObjectSimple}\label{wxdataobjectsimplewxdataobjectsimple}
55
56\func{}{wxDataObjectSimple}{\param{const wxDataFormat\&}{ format = wxFormatInvalid}}
57
58Constructor accepts the supported format (none by default) which may also be
59set later with \helpref{SetFormat}{wxdataobjectsimplesetformat}.
60
61\membersection{wxDataObjectSimple::GetFormat}\label{wxdataobjectsimplegetformat}
62
63\constfunc{const wxDataFormat\&}{GetFormat}{\void}
64
65Returns the (one and only one) format supported by this object. It is supposed
66that the format is supported in both directions.
67
68\membersection{wxDataObjectSimple::SetFormat}\label{wxdataobjectsimplesetformat}
69
70\func{void}{SetFormat}{\param{const wxDataFormat\&}{ format}}
71
72Sets the supported format.
73
74\membersection{wxDataObjectSimple::GetDataSize}\label{wxdataobjectsimplegetdatasize}
75
76\constfunc{virtual size\_t}{GetDataSize}{\void}
77
78Gets the size of our data. Must be implemented in the derived class if the
79object supports rendering its data.
80
81\membersection{wxDataObjectSimple::GetDataHere}\label{wxdataobjectsimplegetdatahere}
82
83\constfunc{virtual bool}{GetDataHere}{\param{void }{*buf}}
84
85Copy the data to the buffer, return TRUE on success. Must be implemented in the
86derived class if the object supports rendering its data.
87
b1462dfa
RD
88\pythonnote{When implementing this method in wxPython, no additional
89parameters are required and the data should be returned from the
90method as a string.}
91
eb91c0be
VZ
92\membersection{wxDataObjectSimple::SetData}\label{wxdataobjectsimplesetdata}
93
94\func{virtual bool}{SetData}{\param{size\_t }{len}, \param{const void }{*buf}}
95
96Copy the data from the buffer, return TRUE on success. Must be implemented in
97the derived class if the object supports setting its data.
98
b1462dfa
RD
99\pythonnote{When implementing this method in wxPython, the data comes
100as a single string parameter rather than the two shown here.}
101