.. 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.RichTextStyleDefinition:

==========================================================================================================================================
|phoenix_title|  **wx.richtext.RichTextStyleDefinition**
==========================================================================================================================================

This is a base class for paragraph and character styles. 
         









|

|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>RichTextStyleDefinition</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.RichTextStyleDefinition_inheritance.svg" alt="Inheritance diagram of RichTextStyleDefinition" usemap="#dummy" class="inheritance"/></center>
   <script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
   <map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.richtext.RichTextStyleDefinition.html" title="This is a base class for paragraph and character styles." alt="" coords="5,82,279,111"/> <area shape="rect" id="node2" href="wx.Object.html" title="This is the root class of many of the wxWidgets classes." alt="" coords="93,5,192,34"/> </map> 
   </p>
   </div>

|


|sub_classes| Known Subclasses
==============================

:ref:`wx.richtext.RichTextCharacterStyleDefinition`, :ref:`wx.richtext.RichTextParagraphStyleDefinition`

|


|method_summary| Methods Summary
================================

================================================================================ ================================================================================
:meth:`~wx.richtext.RichTextStyleDefinition.__init__`                            Constructor.
:meth:`~wx.richtext.RichTextStyleDefinition.GetBaseStyle`                        Returns the style on which this style is based.
:meth:`~wx.richtext.RichTextStyleDefinition.GetDescription`                      Returns the style's description.
:meth:`~wx.richtext.RichTextStyleDefinition.GetName`                             Returns the style name.
:meth:`~wx.richtext.RichTextStyleDefinition.GetProperties`                       Returns the definition's properties.
:meth:`~wx.richtext.RichTextStyleDefinition.GetStyle`                            
:meth:`~wx.richtext.RichTextStyleDefinition.GetStyleMergedWithBase`              Returns the style attributes combined with the attributes of the specified base style, if any.
:meth:`~wx.richtext.RichTextStyleDefinition.SetBaseStyle`                        Sets the name of the style that this style is based on.
:meth:`~wx.richtext.RichTextStyleDefinition.SetDescription`                      Sets the style description.
:meth:`~wx.richtext.RichTextStyleDefinition.SetName`                             Sets the name of the style.
:meth:`~wx.richtext.RichTextStyleDefinition.SetProperties`                       Sets the definition's properties.
:meth:`~wx.richtext.RichTextStyleDefinition.SetStyle`                            Sets the attributes for this style.
================================================================================ ================================================================================


|


|property_summary| Properties Summary
=====================================

================================================================================ ================================================================================
:attr:`~wx.richtext.RichTextStyleDefinition.BaseStyle`                           See :meth:`~wx.richtext.RichTextStyleDefinition.GetBaseStyle` and :meth:`~wx.richtext.RichTextStyleDefinition.SetBaseStyle`
:attr:`~wx.richtext.RichTextStyleDefinition.Description`                         See :meth:`~wx.richtext.RichTextStyleDefinition.GetDescription` and :meth:`~wx.richtext.RichTextStyleDefinition.SetDescription`
:attr:`~wx.richtext.RichTextStyleDefinition.Name`                                See :meth:`~wx.richtext.RichTextStyleDefinition.GetName` and :meth:`~wx.richtext.RichTextStyleDefinition.SetName`
:attr:`~wx.richtext.RichTextStyleDefinition.Properties`                          See :meth:`~wx.richtext.RichTextStyleDefinition.GetProperties` and :meth:`~wx.richtext.RichTextStyleDefinition.SetProperties`
:attr:`~wx.richtext.RichTextStyleDefinition.Style`                               See :meth:`~wx.richtext.RichTextStyleDefinition.GetStyle` and :meth:`~wx.richtext.RichTextStyleDefinition.SetStyle`
================================================================================ ================================================================================


|


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


.. class:: wx.richtext.RichTextStyleDefinition(Object)

   **Possible constructors**::

       RichTextStyleDefinition(name: str='') -> None
       
   
   This is a base class for paragraph and character styles.



   .. method:: __init__(self, name: str='')

      Constructor. 
                 


      :param `name`: 
      :type `name`: string




      :rtype: `None`     








   .. method:: GetBaseStyle(self)

      Returns the style on which this style is based. 
                 

      :rtype: `str`








   .. method:: GetDescription(self)

      Returns the style's description. 
                 

      :rtype: `str`








   .. method:: GetName(self)

      Returns the style name. 
                 

      :rtype: `str`








   .. method:: GetProperties(self)

      Returns the definition's properties. 
                 

      :rtype: :ref:`wx.richtext.RichTextProperties`








   .. method:: GetStyle(self)



      :rtype: :ref:`wx.richtext.RichTextAttr`








   .. method:: GetStyleMergedWithBase(self, sheet : RichTextStyleSheet)

      Returns the style attributes combined with the attributes of the specified base style, if any. 
                 

      This function works recursively. 
                 


      :param `sheet`: 
      :type `sheet`: wx.richtext.RichTextStyleSheet




      :rtype: :ref:`wx.richtext.RichTextAttr`








   .. method:: SetBaseStyle(self, name : str)

      Sets the name of the style that this style is based on. 
                 


      :param `name`: 
      :type `name`: string




      :rtype: `None`     








   .. method:: SetDescription(self, descr : str)

      Sets the style description. 
                 


      :param `descr`: 
      :type `descr`: string




      :rtype: `None`     








   .. method:: SetName(self, name : str)

      Sets the name of the style. 
                 


      :param `name`: 
      :type `name`: string




      :rtype: `None`     








   .. method:: SetProperties(self, props : RichTextProperties)

      Sets the definition's properties. 
                 


      :param `props`: 
      :type `props`: wx.richtext.RichTextProperties




      :rtype: `None`     








   .. method:: SetStyle(self, style : RichTextAttr)

      Sets the attributes for this style. 
                 


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




      :rtype: `None`     








   .. attribute:: BaseStyle

      See :meth:`~wx.richtext.RichTextStyleDefinition.GetBaseStyle` and :meth:`~wx.richtext.RichTextStyleDefinition.SetBaseStyle`


   .. attribute:: Description

      See :meth:`~wx.richtext.RichTextStyleDefinition.GetDescription` and :meth:`~wx.richtext.RichTextStyleDefinition.SetDescription`


   .. attribute:: Name

      See :meth:`~wx.richtext.RichTextStyleDefinition.GetName` and :meth:`~wx.richtext.RichTextStyleDefinition.SetName`


   .. attribute:: Properties

      See :meth:`~wx.richtext.RichTextStyleDefinition.GetProperties` and :meth:`~wx.richtext.RichTextStyleDefinition.SetProperties`


   .. attribute:: Style

      See :meth:`~wx.richtext.RichTextStyleDefinition.GetStyle` and :meth:`~wx.richtext.RichTextStyleDefinition.SetStyle`