Package wx :: Class CustomDataObject
[frames | no frames]

Type CustomDataObject

  object --+        
           |        
  DataObject --+    
               |    
DataObjectSimple --+
                   |
                  CustomDataObject


wx.CustomDataObject is a specialization of wx.DataObjectSimple for some application-specific data in arbitrary format. Python strings are used for getting and setting data, but any picklable object can easily be transfered via strings. A copy of the data is stored in the data object.


Method Summary
CustomDataObject __init__(self, format)
__init__(self, String formatName) -> CustomDataObject __init__(self) -> CustomDataObject
  __repr__(self)
String GetData(self)
Returns the data bytes from the data object as a string.
size_t GetSize(self)
Get the size of the data.
bool SetData(self, data)
Copy the data value to the data object.
bool TakeData(self, data)
Copy the data value to the data object.
    Inherited from DataObjectSimple
String GetDataHere(self)
Returns the data bytes from the data object as a string, returns None on failure.
size_t GetDataSize(self)
Get the size of our data.
DataFormat GetFormat(self)
Returns the (one and only one) format supported by this object.
  SetFormat(self, format)
Sets the supported format.
    Inherited from DataObject
  __del__(self)
[formats] GetAllFormats(self, dir)
Returns a list of all the wx.DataFormats that this dataobject supports in the given direction.
size_t GetFormatCount(self, dir)
Returns the number of available formats for rendering or setting the data.
DataFormat GetPreferredFormat(self, dir)
Returns the preferred format for either rendering the data (if dir is Get, its default value) or for setting it.
bool IsSupported(self, format, dir)
Returns True if this format is supported.
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
Return hash(x)...
  __new__(T, S, ...)
Return a new object with type S, a subtype of T...
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
Return str(x)...

Class Variable Summary
    Inherited from DataObject
int Both = 3                                                                     
int Get = 1                                                                     
int Set = 2                                                                     

Method Details

__init__(self, format)
(Constructor)

__init__(self, String formatName) -> CustomDataObject __init__(self) -> CustomDataObject

wx.CustomDataObject is a specialization of wx.DataObjectSimple for some application-specific data in arbitrary format. Python strings are used for getting and setting data, but any picklable object can easily be transfered via strings. A copy of the data is stored in the data object.

Parameters:
format
           (type=DataFormat)

Returns:
CustomDataObject
Overrides:
wx.DataObjectSimple.__init__

GetData(self)

Returns the data bytes from the data object as a string.

Returns:
String

GetSize(self)

Get the size of the data.

Returns:
size_t

SetData(self, data)

Copy the data value to the data object.

Parameters:
data
           (type=String)

Returns:
bool
Overrides:
wx.DataObjectSimple.SetData

TakeData(self, data)

Copy the data value to the data object.

Parameters:
data
           (type=String)

Returns:
bool
Overrides:
wx.DataObjectSimple.SetData

Generated by Epydoc 2.1.20050511.rpd on Sat Jun 16 16:46:38 2007 http://epydoc.sf.net