(start of) wxCustomDataObject docs

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4377 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 1999-11-05 19:19:58 +00:00
parent 7beba2fc73
commit 864753e906
3 changed files with 63 additions and 80 deletions

View File

@ -37,6 +37,7 @@
\input control.tex
\input critsect.tex
\input crtslock.tex
\input custdobj.tex
\input cursor.tex
\input database.tex
\input dataform.tex
@ -166,7 +167,6 @@
\input postscpt.tex
\input prevwin.tex
\input print.tex
\input prvdatob.tex
\input prvtdrpt.tex
\input process.tex
\input progdlg.tex

View File

@ -0,0 +1,62 @@
\section{\class{wxCustomDataObject}}\label{wxcustomdataobject}
wxCustomDataObject is a specialization of
\helpref{wxDataObjectSimple}{wxdataobjectsimple} for some
application-specific data in arbitrary (either custom or one of the standard
ones). The only restriction is that it is supposed that this data can be
copied bitwise (i.e. with {\tt memcpy()}), so it would be a bad idea to make
it contain a C++ object (though C struct is fine).
\wxheading{Derived from}
\helpref{wxDataObjectSimple}{wxdataobjectsimple}
\helpref{wxDataObject}{wxdataobject}
\wxheading{Include files}
<wx/dataobj.h>
\wxheading{See also}
\helpref{wxDataObject}{wxdataobject}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxCustomDataObject::wxCustomDataObject}\label{wxcustomdataobjectwxcustomdataobject}
\func{}{wxCustomDataObject}{\param{const wxDataFormat\& }{format = wxFormatInvalid}}
The constructor accepts a {\it format} argument which specifies the (single)
format supported by this object. If it isn't set here,
\helpref{SetFormat}{wxdataobjectsimplesetformat} should be used.
\membersection{wxCustomDataObject::\destruct{wxCustomDataObject}}\label{wxcustomdataobjectdtor}
\func{}{\destruct{wxCustomDataObject}}{\void}
The destructor will free the data hold by the object. Notice that although it
calls a virtual \helpref{Free()}{wxcustomdataobjectfree} function, the base
class version will always be called (C++ doesn't allow calling virtual
functions from constructors or destructors), so if you override {\tt Free()}, you
should override the destructor in your class as well (which would probably
just call the derived class' version of {\tt Free()}).
\membersection{wxCustomDataObject::SetData}\label{wxcustomdataobjectsetdata}
\func{virtual void}{SetData}{\param{const char }{*data}, \param{size\_t }{size}}
Set the data. The data object will make an internal copy.
\membersection{wxCustomDataObject::GetSize}\label{wxcustomdataobjectgetsize}
\constfunc{virtual size\_t}{GetDataSize}{\void}
Returns the data size.
\membersection{wxCustomDataObject::GetData}\label{wxcustomdataobjectgetdata}
\func{virtual char*}{GetData}{\void}
Returns a pointer to the data.

View File

@ -1,79 +0,0 @@
\section{\class{wxPrivateDataObject}}\label{wxprivatedataobject}
wxPrivateDataObject is a specialization of wxDataObject for application-specific or standard
format data. The format of the data contained in an instance of this class must be identified
with a string literal corresponding to the mime-type of the data. Typically this would be
"image/png" or "text/html" or "application/word".
\wxheading{Derived from}
\helpref{wxDataObject}{wxdataobject}
\wxheading{Include files}
<wx/dataobj.h>
\wxheading{See also}
\helpref{wxDataObject}{wxdataobject}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxPrivateDataObject::wxPrivateDataObject}\label{wxprivatedataobjectwxprivatedataobject}
\func{}{wxPrivateDataObject}{\void}
\membersection{wxPrivateDataObject::\destruct{wxPrivateDataObject}}\label{wxprivatedataobjectdtor}
\func{}{\destruct{wxPrivateDataObject}}{\void}
\membersection{wxPrivateDataObject::SetId}\label{wxprivatedataobjectsetid}
\func{virtual void}{SetId}{\param{const wxString\& }{id}}
The string ID identifies the format of clipboard or DnD data. A word
processor would e.g. add a wxTextDataObject and a wxPrivateDataObject
to the clipboard - the latter with the Id "application/word".
\membersection{wxPrivateDataObject::GetId}\label{wxprivatedataobjectgetid}
\constfunc{virtual wxString}{GetId}{\void}
Returns the ID of the clipboard or DnD data format.
\membersection{wxPrivateDataObject::SetData}\label{wxprivatedataobjectsetdata}
\func{virtual void}{SetData}{\param{const char }{*data}, \param{size\_t }{size}}
Set the data. The data object will make an internal copy.
\membersection{wxPrivateDataObject::GetSize}\label{wxprivatedataobjectgetsize}
\constfunc{virtual size\_t}{GetDataSize}{\void}
Returns the data size.
\membersection{wxPrivateDataObject::GetData}\label{wxprivatedataobjectgetdata}
\func{virtual char*}{GetData}{\void}
Returns a pointer to the data.
\membersection{wxPrivateDataObject::WriteData}\label{wxprivatedataobjectwritedata}
\constfunc{virtual void}{WriteData}{\param{void}{*dest} }
Write the data owned by this class to {\it dest}. By default, this
calls \helpref{WriteData}{wxprivatedataobjectwritedata2} with data
set using \helpref{SetData}{wxprivatedataobjectsetdata}.
This can be overridden to provide data on-demand; in this case
\helpref{WriteData(data,dest)}{wxprivatedataobjectwritedata2} (see below) must be called from
within the overriding WriteData() method.
\membersection{wxPrivateDataObject::WriteData}\label{wxprivatedataobjectwritedata2}
\constfunc{void}{WriteData}{\param{const char* }{data}, \param{void}{*dest} }
Writes the data {\it data} to {\it dest}. This method must be called
from \helpref{WriteData}{wxprivatedataobjectwritedata}.