wx.richtext.RichTextDrawingHandler¶
The base class for custom drawing handlers.
Currently, drawing handlers can provide virtual attributes.
Class Hierarchy¶
Methods Summary¶
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. |
Properties Summary¶
Class API¶
- class wx.richtext.RichTextDrawingHandler(Object)¶
Possible constructors:
RichTextDrawingHandler(name='') -> None
The base class for custom drawing handlers.
Methods¶
- __init__(self, name='')¶
Creates a drawing handler object.
- Parameters:
name (string)
- Return type:
None
- GetName(self)¶
Returns the name of the handler.
- Return type:
str
- GetVirtualAttributes(self, attr, obj)¶
Provides virtual attributes that we can provide.
- Parameters:
attr (wx.richtext.RichTextAttr)
- Return type:
bool
- GetVirtualSubobjectAttributes(self, obj, positions, attributes)¶
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.
- Parameters:
positions (list of integers)
attributes (RichTextAttrArray)
- Return type:
int
- GetVirtualSubobjectAttributesCount(self, obj)¶
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.
- Parameters:
- Return type:
int
- GetVirtualText(self, obj, text)¶
Gets the virtual text for this object.
- Parameters:
text (string)
- Return type:
bool
- HasVirtualAttributes(self, obj)¶
Returns
True
if this object has virtual attributes that we can provide.- Parameters:
- Return type:
bool
- HasVirtualText(self, obj)¶
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.
- Parameters:
- Return type:
bool
- SetName(self, name)¶
Sets the name of the handler.
- Parameters:
name (string)
- Return type:
None
Properties¶