wx.DataObject Class Reference

Inheritance diagram for wx.DataObject:

wx.Object wx.DataObjectComposite wx.DataObjectSimple wx.BitmapDataObject wx.DataObjectCustom wx.FileDataObject wx.TextDataObject wx.DataObjectGeneric wx.NetMacros.GeneratorDataObject wx.VisualComponent.SizerWindowDataObject

List of all members.

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)


Detailed Description

wx.DataObject represents a piece of data which knows which formats it supports and knows how to render itself in each of them - 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().


Member Enumeration Documentation

enum wx::DataObject::DataDirection

Enumerator:
Get  Use this to refer specifications on rendering the data.
Set  Use this to refer specifications on setting the data.


Constructor & Destructor Documentation

wx.DataObject.DataObject ( IntPtr  wxObject  ) 


Member Function Documentation

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.

Parameters:
destination Defines the desired format. This will copy the data of this object into this argument.
Returns:
True on success, false on failure.

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.

Parameters:
dir Defines whether the format for rendering or setting is desired.
Returns:

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.

Parameters:
dir Defines whether the format for rendering or setting is desired.
Returns:

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.

Parameters:
dir Defines whether the format for rendering or setting is desired.
Returns:


Manual of the wx.NET   (c) 2003-2011 the wx.NET project at   Get wx.NET at SourceForge.net. Fast, secure and Free Open Source software downloads