]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/dobjsmpl.tex
command events are not redirected to focused window
[wxWidgets.git] / docs / latex / wx / dobjsmpl.tex
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
14 This is the simplest possible implementation of
15 \helpref{wxDataObject}{wxdataobject} class. The data object of (a class derived
16 from) this class only supports one format, so the number of virtual functions
17 to be implemented is reduced.
18
19 Notice that this is still an abstract base class and cannot be used but should
20 be derived from.
21
22 \pythonnote{If you wish to create a derived wxDataObjectSimple class in
23 wxPython you should derive the class from wxPyDataObjectSimple
24 in order to get Python-aware capabilities for the various virtual
25 methods.}
26
27 \wxheading{Virtual functions to override}
28
29 The objects supporting rendering the data must override
30 \helpref{GetDataSize}{wxdataobjectsimplegetdatasize} and
31 \helpref{GetDataHere}{wxdataobjectsimplegetdatahere} while the objects which
32 may be set must override \helpref{SetData}{wxdataobjectsimplesetdata}. Of
33 course, the objects supporting both operations must override all threee
34 methods.
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
46 \helpref{Clipboard and drag and drop overview}{wxdndoverview},
47 \helpref{DnD sample}{samplednd},
48 \helpref{wxFileDataObject}{wxfiledataobject},
49 \helpref{wxTextDataObject}{wxtextdataobject},
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
58 Constructor accepts the supported format (none by default) which may also be
59 set later with \helpref{SetFormat}{wxdataobjectsimplesetformat}.
60
61 \membersection{wxDataObjectSimple::GetFormat}\label{wxdataobjectsimplegetformat}
62
63 \constfunc{const wxDataFormat\&}{GetFormat}{\void}
64
65 Returns the (one and only one) format supported by this object. It is supposed
66 that the format is supported in both directions.
67
68 \membersection{wxDataObjectSimple::SetFormat}\label{wxdataobjectsimplesetformat}
69
70 \func{void}{SetFormat}{\param{const wxDataFormat\&}{ format}}
71
72 Sets the supported format.
73
74 \membersection{wxDataObjectSimple::GetDataSize}\label{wxdataobjectsimplegetdatasize}
75
76 \constfunc{virtual size\_t}{GetDataSize}{\void}
77
78 Gets the size of our data. Must be implemented in the derived class if the
79 object supports rendering its data.
80
81 \membersection{wxDataObjectSimple::GetDataHere}\label{wxdataobjectsimplegetdatahere}
82
83 \constfunc{virtual bool}{GetDataHere}{\param{void }{*buf}}
84
85 Copy the data to the buffer, return TRUE on success. Must be implemented in the
86 derived class if the object supports rendering its data.
87
88 \pythonnote{When implementing this method in wxPython, no additional
89 parameters are required and the data should be returned from the
90 method as a string.}
91
92 \membersection{wxDataObjectSimple::SetData}\label{wxdataobjectsimplesetdata}
93
94 \func{virtual bool}{SetData}{\param{size\_t }{len}, \param{const void }{*buf}}
95
96 Copy the data from the buffer, return TRUE on success. Must be implemented in
97 the derived class if the object supports setting its data.
98
99 \pythonnote{When implementing this method in wxPython, the data comes
100 as a single string parameter rather than the two shown here.}
101
102