wx.richtext.RichTextAttr¶
A class representing enhanced attributes for rich text objects.
This adds a wx.richtext.TextBoxAttr member to the basic wx.TextAttr class.
Class Hierarchy¶
Methods Summary¶
Constructor taking a wx.TextAttr. |
|
Merges the given attributes. |
|
Collects the attributes that are common to a range of content, building up a note of which attributes are absent in some objects and which clash in some objects. |
|
Copy function. |
|
Partial equality test. |
|
Returns the text box attributes. |
|
Returns |
|
Removes the specified attributes from this object. |
|
Set the text box attributes. |
|
Equality test. |
Properties Summary¶
See |
|
A public C++ attribute of type |
Class API¶
- class wx.richtext.RichTextAttr(TextAttr)¶
Possible constructors:
RichTextAttr(attr) -> None RichTextAttr(attr) -> None RichTextAttr() -> None
A class representing enhanced attributes for rich text objects.
Methods¶
- __init__(self, *args, **kw)¶
-
__init__ (self, attr)
Constructor taking a wx.TextAttr.
- Parameters:
attr (wx.TextAttr)
- Return type:
None
__init__ (self, attr)
Copy constructor.
- Parameters:
attr (wx.richtext.RichTextAttr)
- Return type:
None
__init__ (self)
Default constructor.
- Return type:
None
- Apply(self, style, compareWith=None)¶
Merges the given attributes.
If compareWith is not
None, then it will be used to mask out those attributes that are the same in style and compareWith, for situations where we don’t want to explicitly set inherited attributes.- Parameters:
style (wx.richtext.RichTextAttr)
compareWith (wx.richtext.RichTextAttr)
- Return type:
bool
- CollectCommonAttributes(self, attr, clashingAttr, absentAttr)¶
Collects the attributes that are common to a range of content, building up a note of which attributes are absent in some objects and which clash in some objects.
- Parameters:
attr (wx.richtext.RichTextAttr)
clashingAttr (wx.richtext.RichTextAttr)
absentAttr (wx.richtext.RichTextAttr)
- Return type:
None
- Copy(self, attr)¶
Copy function.
- Parameters:
attr (wx.richtext.RichTextAttr)
- Return type:
None
- EqPartial(self, attr, weakTest=True)¶
Partial equality test.
If weakTest is
True, attributes of this object do not have to be present if those attributes ofattrare present. If weakTest isFalse, the function will fail if an attribute is present inattrbut not in this object.- Parameters:
attr (wx.richtext.RichTextAttr)
weakTest (bool)
- Return type:
bool
- GetTextBoxAttr(self)¶
Returns the text box attributes.
- Return type:
- IsDefault(self)¶
Returns
Trueif no attributes are set.- Return type:
bool
- RemoveStyle(self, attr)¶
Removes the specified attributes from this object.
- Parameters:
attr (wx.richtext.RichTextAttr)
- Return type:
bool
- SetTextBoxAttr(self, attr)¶
Set the text box attributes.
- Parameters:
attr (wx.richtext.TextBoxAttr)
- Return type:
None
- __eq__(self, attr)¶
Equality test.
- Parameters:
attr (wx.richtext.RichTextAttr)
- Return type:
bool
Properties¶
- TextBoxAttr¶
See
GetTextBoxAttrandSetTextBoxAttr
- m_textBoxAttr¶
A public C++ attribute of type
TextBoxAttr.
