]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/dobjsmpl.tex
added frame icon for HTMLhelp frame
[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
9%% Licence: wxWindows licence
10%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11
12\section{\class{wxDataObjectSimple}}\label{wxdataobjectsimple}
13
14This is the simplest possible implementation of
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
22\wxheading{Virtual functions to override}
23
24The objects supporting rendering the data must override
25\helpref{GetDataSize}{wxdataobjectsimplegetdatasize} and
26\helpref{GetDataHere}{wxdataobjectsimplegetdatahere} while the objects which
27may be set must override \helpref{SetData}{wxdataobjectsimplesetdata}. Of
28course, the objects supporting both operations must override all threee
29methods.
30
31\wxheading{Derived from}
32
33\helpref{wxDataObject}{wxdataobject}
34
35\wxheading{Include files}
36
37<wx/dataobj.h>
38
39\wxheading{See also}
40
41\helpref{Clipboard and drag and drop overview}{wxclipboardonfigoverview},
42\helpref{DnD sample}{samplednd},
43\helpref{wxFileDataObject}{wxfiledataobject},
44\helpref{wxTextDataObject}{wxtextdataobject},
45\helpref{wxBitmapDataObject}{wxbitmapdataobject}
46
47\latexignore{\rtfignore{\wxheading{Members}}}
48
49\membersection{wxDataObjectSimple::wxDataObjectSimple}\label{wxdataobjectsimplewxdataobjectsimple}
50
51\func{}{wxDataObjectSimple}{\param{const wxDataFormat\&}{ format = wxFormatInvalid}}
52
53Constructor accepts the supported format (none by default) which may also be
54set later with \helpref{SetFormat}{wxdataobjectsimplesetformat}.
55
56\membersection{wxDataObjectSimple::GetFormat}\label{wxdataobjectsimplegetformat}
57
58\constfunc{const wxDataFormat\&}{GetFormat}{\void}
59
60Returns the (one and only one) format supported by this object. It is supposed
61that the format is supported in both directions.
62
63\membersection{wxDataObjectSimple::SetFormat}\label{wxdataobjectsimplesetformat}
64
65\func{void}{SetFormat}{\param{const wxDataFormat\&}{ format}}
66
67Sets the supported format.
68
69\membersection{wxDataObjectSimple::GetDataSize}\label{wxdataobjectsimplegetdatasize}
70
71\constfunc{virtual size\_t}{GetDataSize}{\void}
72
73Gets the size of our data. Must be implemented in the derived class if the
74object supports rendering its data.
75
76\membersection{wxDataObjectSimple::GetDataHere}\label{wxdataobjectsimplegetdatahere}
77
78\constfunc{virtual bool}{GetDataHere}{\param{void }{*buf}}
79
80Copy the data to the buffer, return TRUE on success. Must be implemented in the
81derived class if the object supports rendering its data.
82
83\membersection{wxDataObjectSimple::SetData}\label{wxdataobjectsimplesetdata}
84
85\func{virtual bool}{SetData}{\param{size\_t }{len}, \param{const void }{*buf}}
86
87Copy the data from the buffer, return TRUE on success. Must be implemented in
88the derived class if the object supports setting its data.
89
90