1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 %% Purpose: wxDataObjectSimple documentation
4 %% Author: Vadim Zeitlin
8 %% Copyright: (c) Vadim Zeitlin
9 %% License: wxWindows license
10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
12 \section{\class{wxDataObjectSimple
}}\label{wxdataobjectsimple
}
14 This is the simplest possible implementation of the
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.
19 Notice that this is still an abstract base class and cannot be used but should
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
27 \perlnote{In wxPerl, you need to derive your data object class
28 from Wx::PlDataObjectSimple.
}
30 \wxheading{Virtual functions to override
}
32 The objects supporting rendering the data must override
33 \helpref{GetDataSize
}{wxdataobjectsimplegetdatasize
} and
34 \helpref{GetDataHere
}{wxdataobjectsimplegetdatahere
} while the objects which
35 may be set must override
\helpref{SetData
}{wxdataobjectsimplesetdata
}. Of
36 course, the objects supporting both operations must override all three
39 \wxheading{Derived from
}
41 \helpref{wxDataObject
}{wxdataobject
}
43 \wxheading{Include files
}
49 \helpref{Clipboard and drag and drop overview
}{wxdndoverview
},
50 \helpref{DnD sample
}{samplednd
},
51 \helpref{wxFileDataObject
}{wxfiledataobject
},
52 \helpref{wxTextDataObject
}{wxtextdataobject
},
53 \helpref{wxBitmapDataObject
}{wxbitmapdataobject
}
55 \latexignore{\rtfignore{\wxheading{Members
}}}
57 \membersection{wxDataObjectSimple::wxDataObjectSimple
}\label{wxdataobjectsimplewxdataobjectsimple
}
59 \func{}{wxDataObjectSimple
}{\param{const wxDataFormat\&
}{ format = wxFormatInvalid
}}
61 Constructor accepts the supported format (none by default) which may also be
62 set later with
\helpref{SetFormat
}{wxdataobjectsimplesetformat
}.
64 \membersection{wxDataObjectSimple::GetFormat
}\label{wxdataobjectsimplegetformat
}
66 \constfunc{const wxDataFormat\&
}{GetFormat
}{\void}
68 Returns the (one and only one) format supported by this object. It is supposed
69 that the format is supported in both directions.
71 \membersection{wxDataObjectSimple::SetFormat
}\label{wxdataobjectsimplesetformat
}
73 \func{void
}{SetFormat
}{\param{const wxDataFormat\&
}{ format
}}
75 Sets the supported format.
77 \membersection{wxDataObjectSimple::GetDataSize
}\label{wxdataobjectsimplegetdatasize
}
79 \constfunc{virtual size
\_t}{GetDataSize
}{\void}
81 Gets the size of our data. Must be implemented in the derived class if the
82 object supports rendering its data.
84 \membersection{wxDataObjectSimple::GetDataHere
}\label{wxdataobjectsimplegetdatahere
}
86 \constfunc{virtual bool
}{GetDataHere
}{\param{void
}{*buf
}}
88 Copy the data to the buffer, return TRUE on success. Must be implemented in the
89 derived class if the object supports rendering its data.
91 \pythonnote{When implementing this method in wxPython, no additional
92 parameters are required and the data should be returned from the
95 \membersection{wxDataObjectSimple::SetData
}\label{wxdataobjectsimplesetdata
}
97 \func{virtual bool
}{SetData
}{\param{size
\_t }{len
},
\param{const void
}{*buf
}}
99 Copy the data from the buffer, return TRUE on success. Must be implemented in
100 the derived class if the object supports setting its data.
102 \pythonnote{When implementing this method in wxPython, the data comes
103 as a single string parameter rather than the two shown here.
}