.. wxPython Phoenix documentation
This file was generated by Phoenix's sphinx generator and associated
tools, do not edit by hand.
Copyright: (c) 2011-2020 by Total Control Software
License: wxWindows License
.. include:: headings.inc
.. _wx.richtext.RichTextAttr:
==========================================================================================================================================
|phoenix_title| **wx.richtext.RichTextAttr**
==========================================================================================================================================
A class representing enhanced attributes for rich text objects.
This adds a :ref:`wx.richtext.TextBoxAttr` member to the basic :ref:`wx.TextAttr` class.
.. seealso:: :ref:`wx.TextAttr`, :ref:`wx.richtext.TextBoxAttr`, :ref:`wx.richtext.RichTextCtrl`
|
|class_hierarchy| Class Hierarchy
=================================
.. raw:: html

Inheritance diagram for class
RichTextAttr:
|
|method_summary| Methods Summary
================================
================================================================================ ================================================================================
:meth:`~wx.richtext.RichTextAttr.__init__` Constructor taking a :ref:`wx.TextAttr`.
:meth:`~wx.richtext.RichTextAttr.Apply` Merges the given attributes.
:meth:`~wx.richtext.RichTextAttr.CollectCommonAttributes` 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.
:meth:`~wx.richtext.RichTextAttr.Copy` Copy function.
:meth:`~wx.richtext.RichTextAttr.EqPartial` Partial equality test.
:meth:`~wx.richtext.RichTextAttr.GetTextBoxAttr` Returns the text box attributes.
:meth:`~wx.richtext.RichTextAttr.IsDefault` Returns ``True`` if no attributes are set.
:meth:`~wx.richtext.RichTextAttr.RemoveStyle` Removes the specified attributes from this object.
:meth:`~wx.richtext.RichTextAttr.SetTextBoxAttr` Set the text box attributes.
:meth:`~wx.richtext.RichTextAttr.__eq__` Equality test.
================================================================================ ================================================================================
|
|property_summary| Properties Summary
=====================================
================================================================================ ================================================================================
:attr:`~wx.richtext.RichTextAttr.TextBoxAttr` See :meth:`~wx.richtext.RichTextAttr.GetTextBoxAttr` and :meth:`~wx.richtext.RichTextAttr.SetTextBoxAttr`
:attr:`~wx.richtext.RichTextAttr.m_textBoxAttr` A public C++ attribute of type `~wx.richtext.TextBoxAttr` .
================================================================================ ================================================================================
|
|api| Class API
===============
.. class:: wx.richtext.RichTextAttr(TextAttr)
**Possible constructors**::
RichTextAttr(attr : TextAttr) -> None
RichTextAttr(attr : RichTextAttr) -> None
RichTextAttr() -> None
A class representing enhanced attributes for rich text objects.
.. method:: __init__(self, *args, **kw)
|overload| **Overloaded Implementations:**
:html:`
`
**__init__** `(self, attr : TextAttr)`
Constructor taking a :ref:`wx.TextAttr`.
:param `attr`:
:type `attr`: wx.TextAttr
:rtype: `None`
:html:`
`
**__init__** `(self, attr : RichTextAttr)`
Copy constructor.
:param `attr`:
:type `attr`: wx.richtext.RichTextAttr
:rtype: `None`
:html:`
`
**__init__** `(self)`
Default constructor.
:rtype: `None`
:html:`
`
.. method:: Apply(self, style : RichTextAttr, compareWith: Optional[RichTextAttr]=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.
:param `style`:
:type `style`: wx.richtext.RichTextAttr
:param `compareWith`:
:type `compareWith`: wx.richtext.RichTextAttr
:rtype: `bool`
.. method:: CollectCommonAttributes(self, attr : RichTextAttr, clashingAttr : RichTextAttr, absentAttr : RichTextAttr)
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.
:param `attr`:
:type `attr`: wx.richtext.RichTextAttr
:param `clashingAttr`:
:type `clashingAttr`: wx.richtext.RichTextAttr
:param `absentAttr`:
:type `absentAttr`: wx.richtext.RichTextAttr
:rtype: `None`
.. method:: Copy(self, attr : RichTextAttr)
Copy function.
:param `attr`:
:type `attr`: wx.richtext.RichTextAttr
:rtype: `None`
.. method:: EqPartial(self, attr : RichTextAttr, weakTest: bool=True)
Partial equality test.
If `weakTest` is ``True``, attributes of this object do not have to be present if those attributes of `attr` are present. If `weakTest` is ``False``, the function will fail if an attribute is present in `attr` but not in this object.
:param `attr`:
:type `attr`: wx.richtext.RichTextAttr
:param `weakTest`:
:type `weakTest`: bool
:rtype: `bool`
.. method:: GetTextBoxAttr(self)
Returns the text box attributes.
:rtype: :ref:`wx.richtext.TextBoxAttr`
.. method:: IsDefault(self)
Returns ``True`` if no attributes are set.
:rtype: `bool`
.. method:: RemoveStyle(self, attr : RichTextAttr)
Removes the specified attributes from this object.
:param `attr`:
:type `attr`: wx.richtext.RichTextAttr
:rtype: `bool`
.. method:: SetTextBoxAttr(self, attr : TextBoxAttr)
Set the text box attributes.
:param `attr`:
:type `attr`: wx.richtext.TextBoxAttr
:rtype: `None`
.. method:: __eq__(self)
Equality test.
:param `attr`:
:type `attr`: wx.richtext.RichTextAttr
.. attribute:: TextBoxAttr
See :meth:`~wx.richtext.RichTextAttr.GetTextBoxAttr` and :meth:`~wx.richtext.RichTextAttr.SetTextBoxAttr`
.. attribute:: m_textBoxAttr
A public C++ attribute of type `~wx.richtext.TextBoxAttr` .