Implements a rich text data object for clipboard transfer.
__init__ |
The constructor doesn’t copy the pointer, so it shouldn’t go away while this object is alive. |
GetDataHere |
Copy the data to the buffer, return True on success. |
GetDataSize |
Gets the size of our data. |
GetPreferredFormat |
Returns the preferred format for either rendering the data (if dir is Get , its default value) or for setting it. |
GetRichTextBuffer |
After a call to this function, the buffer is owned by the caller and it is responsible for deleting it. |
GetRichTextBufferFormatId |
Returns the id for the new data format. |
SetData |
Copy the data from the buffer, return True on success. |
wx.richtext.
RichTextBufferDataObject
(DataObjectSimple)¶Possible constructors:
RichTextBufferDataObject(richTextBuffer=None)
Implements a rich text data object for clipboard transfer.
__init__
(self, richTextBuffer=None)¶The constructor doesn’t copy the pointer, so it shouldn’t go away while this object is alive.
Parameters: | richTextBuffer (wx.richtext.RichTextBuffer) – |
---|
GetDataHere
(self, *args, **kw)¶GetDataHere (self, buf)
Copy the data to the buffer, return True
on success.
Must be implemented in the derived class if the object supports rendering its data.
Parameters: | buf – |
---|---|
Return type: | bool |
GetDataHere (self, format, buf)
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.
Parameters: |
|
---|---|
Return type: | bool |
GetDataSize
(self, *args, **kw)¶GetDataSize (self)
Gets the size of our data.
Must be implemented in the derived class if the object supports rendering its data.
Return type: | int |
---|
GetDataSize (self, format)
Returns the data size of the given format format.
Parameters: | format (wx.DataFormat) – |
---|---|
Return type: | int |
GetPreferredFormat
(self, 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 (Direction) – |
---|---|
Return type: | DataFormat |
GetRichTextBuffer
(self)¶After a call to this function, the buffer is owned by the caller and it is responsible for deleting it.
Return type: | wx.richtext.RichTextBuffer |
---|
GetRichTextBufferFormatId
()¶Returns the id for the new data format.
Return type: | wx.Char |
---|
SetData
(self, *args, **kw)¶SetData (self, len, buf)
Copy the data from the buffer, return True
on success.
Must be implemented in the derived class if the object supports setting its data.
Parameters: |
|
---|---|
Return type: | bool |
SetData (self, format, len, buf)
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.
Parameters: |
|
---|---|
Return type: | bool |
Returns: |
|
DataSize
¶See GetDataSize
RichTextBuffer
¶