
Public Types | |
| enum | DataDirection |
Public Member Functions | |
| bool | CopyInto (DataObject destination) |
| DataObject (IntPtr wxObject) | |
| wx.DataFormat[] | GetAllFormats (DataDirection dir) |
| int | GetFormatCount (DataDirection dir) |
| DataFormat | GetPreferredFormat () |
| DataFormat | GetPreferredFormat (DataDirection dir) |
GetDataHere(), and how to restore data from the buffer (SetData()).Although this class may be used directly (i.e. custom classes may be derived from it), in many cases it might be simpler to use either wx.DataObjectSimple or wx.DataObjectComposite classes.
A data object may be "read only", i.e. support only GetData() functions or "read-write", i.e. support both GetData() and SetData() (in principle, it might be "write only" too, but this is rare). Moreover, it doesn't have to support the same formats in Get() and Set() directions: for example, a data object containing JPEG image might accept BMPs in GetData() because JPEG image may be easily transformed into BMP but not in SetData(). Accordingly, all methods dealing with formats take an additional "direction" argument which is either SET or GET and which tells the function if the format needs to be supported by SetData() or GetDataHere().
| wx.DataObject.DataObject | ( | IntPtr | wxObject | ) |
| bool wx.DataObject.CopyInto | ( | DataObject | destination | ) |
Copies the contained data into the data object in the argument list. This method assumes that the received format is the preferred format of the argument. If either this method is not able to read data of the argument's preferred format or setting the data in the destination fails, the result will be false. The result will be true on success.
| destination | Defines the desired format. This will copy the data of this object into this argument. |
| wx.DataFormat [] wx.DataObject.GetAllFormats | ( | DataDirection | dir | ) |
| int wx.DataObject.GetFormatCount | ( | DataDirection | dir | ) |
Returns the number of available formats for rendering or setting the data.
| dir | Defines whether the format for rendering or setting is desired. |
| DataFormat wx.DataObject.GetPreferredFormat | ( | ) |
Returns the preferred format for either rendering the data (if dir is Get). Usually this will be the native format of the wx.DataObject.
| dir | Defines whether the format for rendering or setting is desired. |
| DataFormat wx.DataObject.GetPreferredFormat | ( | DataDirection | dir | ) |
Returns the preferred format for either rendering the data (if dir is Get, its default value) or for setting it. Usually this will be the native format of the wx.DataObject.
| dir | Defines whether the format for rendering or setting is desired. |