The base class for custom drawing handlers.
Currently, drawing handlers can provide virtual attributes.
See also
wx.richtext.RichTextBuffer, wx.richtext.RichTextCtrl
Creates a drawing handler object. |
|
Returns the name of the handler. |
|
Provides virtual attributes that we can provide. |
|
Gets the mixed virtual attributes for individual positions within the object. |
|
Gets the count for mixed virtual attributes for individual positions within the object. |
|
Gets the virtual text for this object. |
|
Returns |
|
Do we have virtual text for this object? Virtual text allows an application to replace characters in an object for editing and display purposes, for example for highlighting special characters. |
|
Sets the name of the handler. |
wx.richtext.
RichTextDrawingHandler
(Object)¶Possible constructors:
RichTextDrawingHandler(name: str='') -> None
The base class for custom drawing handlers.
__init__
(self, name: str='')¶Creates a drawing handler object.
name (string) –
None
GetName
(self)¶Returns the name of the handler.
str
GetVirtualAttributes
(self, attr : RichTextAttr, obj : RichTextObject)¶Provides virtual attributes that we can provide.
attr (wx.richtext.RichTextAttr) –
obj (wx.richtext.RichTextObject) –
bool
GetVirtualSubobjectAttributes
(self, obj : RichTextObject, positions : List[int], attributes : RichTextAttrArray)¶Gets the mixed virtual attributes for individual positions within the object.
For example, individual characters within a text object may require special highlighting. Returns the number of virtual attributes found.
obj (wx.richtext.RichTextObject) –
positions (list of integers) –
attributes (RichTextAttrArray) –
int
GetVirtualSubobjectAttributesCount
(self, obj : RichTextObject)¶Gets the count for mixed virtual attributes for individual positions within the object.
For example, individual characters within a text object may require special highlighting.
obj (wx.richtext.RichTextObject) –
int
GetVirtualText
(self, obj : RichTextPlainText, text : str)¶Gets the virtual text for this object.
obj (wx.richtext.RichTextPlainText) –
text (string) –
bool
HasVirtualAttributes
(self, obj : RichTextObject)¶Returns True
if this object has virtual attributes that we can provide.
obj (wx.richtext.RichTextObject) –
bool
HasVirtualText
(self, obj : RichTextPlainText)¶Do we have virtual text for this object? Virtual text allows an application to replace characters in an object for editing and display purposes, for example for highlighting special characters.
obj (wx.richtext.RichTextPlainText) –
bool
SetName
(self, name : str)¶Sets the name of the handler.
name (string) –
None