- // pure virtuals to override
- // get the best suited format for rendering our data
- virtual wxDataFormat GetPreferredFormat() const = 0;
- // get the number of formats we support: it is understood that if we
- // can accept data in some format, then we can render data in this
- // format as well, but the contrary is not necessarily true. For the
- // default value of the argument, all formats we support should be
- // returned, but if outputOnlyToo == FALSE, then we should only return
- // the formats which our SetData() understands
- virtual size_t GetFormatCount(bool outputOnlyToo = TRUE) const
- { return 1; }
- // return all formats in the provided array (of size GetFormatCount())
- virtual void GetAllFormats(wxDataFormat *formats,
- bool outputOnlyToo = TRUE) const
- { formats[0] = GetPreferredFormat(); }
- // get the (total) size of data for the given format
- virtual size_t GetDataSize(const wxDataFormat& format) const = 0;
- // copy raw data (in the specified format) to provided pointer
- virtual bool GetDataHere(const wxDataFormat& format, void *buf) const = 0;
- // get data from the buffer (in the given format)
- virtual bool SetData(const wxDataFormat& format, const void *buf) = 0;
-
- // accessors
- // retrieve IDataObject interface (for other OLE related classes)