X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/407f36811ed2513233df1343f0b3591f09efb77e..bf7945cef10c0844a32e95695c544d829da9293a:/docs/latex/wx/dataobj.tex diff --git a/docs/latex/wx/dataobj.tex b/docs/latex/wx/dataobj.tex index 2538703aaf..5a62f8532e 100644 --- a/docs/latex/wx/dataobj.tex +++ b/docs/latex/wx/dataobj.tex @@ -6,7 +6,7 @@ %% Created: 18.10.99 %% RCS-ID: $Id$ %% Copyright: (c) wxWindows team -%% Licence: wxWindows licence +%% License: wxWindows license %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{\class{wxDataObject}}\label{wxdataobject} @@ -53,33 +53,33 @@ because it achievs this by simply holding several wxDataObjectSimple objects. So, you have several solutions when you need a wxDataObject class (and you need one as soon as you want to transfer data via the clipboard or drag and drop): -\begin{twocollist}\itemsep=0pt -\twocolitem{0. Use one of built-in classes}{You may use wxTextDataObject, +\begin{twocollist}\itemsep=1cm +\twocolitem{{\bf 1. Use one of the built-in classes}}{You may use wxTextDataObject, wxBitmapDataObject or wxFileDataObject in the simplest cases when you only need to support one format and your data is either text, bitmap or list of files.} -\twocolitem{1. Derive your class from wxDataObjectSimple}{This is the simplest +\twocolitem{{\bf 2. Use wxDataObjectSimple}}{Deriving from wxDataObjectSimple is the simplest solution for custom data - you will only support one format and so probably won't be able to communicate with other programs, but data transfer will work in your program (or between different copies of it).} -\twocolitem{2. Use wxDataObjectComposite}{This is a simple but powerful +\twocolitem{{\bf 3. Use wxDataObjectComposite}}{This is a simple but powerful solution which allows you to support any number of formats (either standard or custom if you combine it with the previous solution).} -\twocolitem{3. Derive from wxDataObject directly}{This is the solution for -maximal flexibility and efficiency, but it also is the most difficult to +\twocolitem{{\bf 4. Use wxDataObject directly}}{This is the solution for +maximal flexibility and efficiency, but it is also is the most difficult to implement.} \end{twocollist} Please note that the easiest way to use drag and drop and the clipboard with multiple formats is by using wxDataObjectComposite, but it is not the most efficient one as each wxDataObjectSimple would contain the whole data in its -respective formars. Now imagine that you want to paste 200 pages of text in +respective formats. Now imagine that you want to paste 200 pages of text in your proprietary format, as well as Word, RTF, HTML, Unicode and plain text to the clipboard and even today's computers are in trouble. For this case, you will have to derive from wxDataObject directly and make it enumerate its formats and provide the data in the requested format on demand. Note that neither the GTK data transfer mechanisms for the clipboard and -drag and drop, neither does the OLE data transfer copy any data until another application +drag and drop, nor the OLE data transfer copy any data until another application actually requests the data. This is in contrast to the 'feel' offered to the user of a program who would normally think that the data resides in the clipboard after having pressed 'Copy' - in reality it is only declared to be @@ -92,7 +92,7 @@ wxDataObjectSimple: \helpref{wxFileDataObject}{wxfiledataobject}, change. You may also derive your own data object classes from -\helpref{wxCustomDataObject}{wxprivatedataobject} for user-defined types. The +\helpref{wxCustomDataObject}{wxcustomdataobject} for user-defined types. The format of user-defined data is given as mime-type string literal, such as "application/word" or "image/png". These strings are used as they are under Unix (so far only GTK) to identify a format and are translated into their @@ -100,6 +100,10 @@ Windows equivalent under Win32 (using the OLE IDataObject for data exchange to and from the clipboard and for drag and drop). Note that the format string translation under Windows is not yet finished. +\pythonnote{At this time this class is not directly usable from wxPython. +Derive a class from \helpref{wxPyDataObjectSimple}{wxdataobjectsimple} +instead.} + \wxheading{Virtual functions to override} Each class derived directly from wxDataObject must override and implement all @@ -119,12 +123,12 @@ None \wxheading{See also} -\helpref{Clipboard and drag and drop overview}{wxclipboardonfigoverview}, +\helpref{Clipboard and drag and drop overview}{wxdndoverview}, \helpref{DnD sample}{samplednd}, \helpref{wxFileDataObject}{wxfiledataobject}, \helpref{wxTextDataObject}{wxtextdataobject}, \helpref{wxBitmapDataObject}{wxbitmapdataobject}, -\helpref{wxPrivateDataObject}{wxprivatedataobject}, +\helpref{wxCustomDataObject}{wxcustomdataobject}, \helpref{wxDropTarget}{wxdroptarget}, \helpref{wxDropSource}{wxdropsource}, \helpref{wxTextDropTarget}{wxtextdroptarget},