.. wxPython Phoenix documentation

   This file was generated by Phoenix's sphinx generator and associated
   tools, do not edit by hand.

   Copyright: (c) 2011-2017 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

   <div id="toggleBlock" onclick="return toggleVisibility(this)" class="closed" style="cursor:pointer;">
   <img id="toggleBlock-trigger" src="_static/images/closed.png"/>
   Inheritance diagram for class <strong>RichTextAttr</strong>:
   </div>
   <div id="toggleBlock-summary" style="display:block;"></div>
   <div id="toggleBlock-content" style="display:none;">
   <p class="graphviz">
   <center><img src="_static/images/inheritance/wx.richtext.RichTextAttr_inheritance.png" alt="Inheritance diagram of RichTextAttr" usemap="#dummy" class="inheritance"/></center>
   </div>
   <script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
   <map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.TextAttr.html" title="wx.TextAttr" alt="" coords="44,5,135,35"/> <area shape="rect" id="node2" href="wx.richtext.RichTextAttr.html" title="wx.richtext.RichTextAttr" alt="" coords="5,83,173,112"/> </map> 
   </p>

|


|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 :ref:`~wx.richtext.TextBoxAttr`.
================================================================================ ================================================================================


|


|api| Class API
===============


.. class:: wx.richtext.RichTextAttr(TextAttr)

   **Possible constructors**::

       RichTextAttr(attr)
       
       RichTextAttr(attr)
       
       RichTextAttr()
       
   
   A class representing enhanced attributes for rich text objects.



   .. method:: __init__(self, *args, **kw)



      |overload| Overloaded Implementations:

      **~~~**

      
      **__init__** `(self, attr)`
      
      Constructor taking a :ref:`wx.TextAttr`.                  
      
      
      :param `attr`: 
      :type `attr`: wx.TextAttr
      
      
      
      
      
      
      **~~~**

      
      **__init__** `(self, attr)`
      
      Copy constructor.                  
      
      
      :param `attr`: 
      :type `attr`: wx.richtext.RichTextAttr
      
      
      
      
      
      
      **~~~**

      
      **__init__** `(self)`
      
      Default constructor.                   
      
      
      
      
      **~~~**






   .. method:: Apply(self, style, compareWith=None)

      Merges the given attributes.                  

      If `compareWith`  is non-NULL, 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, 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.                  


      :param `attr`: 
      :type `attr`: wx.richtext.RichTextAttr
      :param `clashingAttr`: 
      :type `clashingAttr`: wx.richtext.RichTextAttr
      :param `absentAttr`: 
      :type `absentAttr`: wx.richtext.RichTextAttr







   .. method:: Copy(self, attr)

      Copy function.                  


      :param `attr`: 
      :type `attr`: wx.richtext.RichTextAttr







   .. method:: 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 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)

      Removes the specified attributes from this object.                  


      :param `attr`: 
      :type `attr`: wx.richtext.RichTextAttr




      :rtype: `bool`








   .. method:: SetTextBoxAttr(self, attr)

      Set the text box attributes.                  


      :param `attr`: 
      :type `attr`: wx.richtext.TextBoxAttr







   .. 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 :ref:`~wx.richtext.TextBoxAttr`.

