Implements a rich text data object for clipboard transfer.
The constructor doesn’t copy the pointer, so it shouldn’t go away while this object is alive. |
|
Copy the data to the buffer, return |
|
Gets the size of our data. |
|
Returns the preferred format for either rendering the data (if dir is |
|
After a call to this function, the buffer is owned by the caller and it is responsible for deleting it. |
|
Returns the id for the new data format. |
|
Copy the data from the buffer, return |
See |
|
Possible constructors:
RichTextBufferDataObject(richTextBuffer: Optional[RichTextBuffer]=None)
-> None
Implements a rich text data object for clipboard transfer.
The constructor doesn’t copy the pointer, so it shouldn’t go away while this object is alive.
richTextBuffer (wx.richtext.RichTextBuffer)
None
GetDataHere (self, buf : Any)
Copy the data to the buffer, return True
on success.
Must be implemented in the derived class if the object supports rendering its data.
buf
bool
GetDataHere (self, format : DataFormat, buf : Any)
The method will write the data of the format format to the buffer buf.
In other words, copy the data from this object in the given format to the supplied buffer. Returns True
on success, False
on failure.
format (wx.DataFormat)
buf
bool
GetDataSize (self)
Gets the size of our data.
Must be implemented in the derived class if the object supports rendering its data.
int
GetDataSize (self, format : DataFormat)
Returns the data size of the given format format.
format (wx.DataFormat)
int
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 (Direction)
DataFormat
After a call to this function, the buffer is owned by the caller and it is responsible for deleting it.
Returns the id for the new data format.
str
SetData (self, len : int, buf : Any)
Copy the data from the buffer, return True
on success.
Must be implemented in the derived class if the object supports setting its data.
len (int)
buf
bool
SetData (self, format : DataFormat, len : int, buf : Any)
Set the data in the format format of the length len provided in the buffer buf.
In other words, copy length bytes of data from the buffer to this data object.
format (wx.DataFormat) – The format for which to set the data.
len (int) – The size of data in bytes.
buf – Non-NULL pointer to the data.
bool
True
on success, False
on failure.
See GetDataSize