- Not surprisingly, being 'smart' comes at a price of added
- complexity. This is reasonable for the situations when you really need
- to support multiple formats, but may be annoying if you only want to
- do something simple like cut and paste text.
-
- To provide a solution for both cases, wxWidgets has two predefined
- classes which derive from wx.DataObject: `wx.DataObjectSimple` and
- `wx.DataObjectComposite`. `wx.DataObjectSimple` is the simplest
- wx.DataObject possible and only holds data in a single format (such as
- text or bitmap) and `wx.DataObjectComposite` is the simplest way to
- implement a wx.DataObject which supports multiple simultaneous formats
- because it achievs this by simply holding several
- `wx.DataObjectSimple` objects.
-
- Please note that the easiest way to use drag and drop and the
- clipboard with multiple formats is by using `wx.DataObjectComposite`,
- but it is not the most efficient one as each `wx.DataObjectSimple`
- would contain the whole data in its 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 wx.DataObject directly and make it enumerate its
- formats and provide the data in the requested format on
- demand. (**TODO**: This is currently not possible from Python. Make
- it so.)
-
- Note that the platform transfer mechanisms for the clipboard and drag
- and drop, do not copy any data out of the source application 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 available.
-