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

==========================================================================================================================================
|phoenix_title|  **wx.richtext.RichTextStyleOrganiserDialog**
==========================================================================================================================================

This class shows a style sheet and allows the user to edit, add and remove styles.          

It can also be used as a style browser, for example if the application is not using a permanent :ref:`wx.richtext.RichTextStyleComboCtrl`  or :ref:`wx.richtext.RichTextStyleListCtrl`  to present 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>RichTextStyleOrganiserDialog</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.RichTextStyleOrganiserDialog_inheritance.png" alt="Inheritance diagram of RichTextStyleOrganiserDialog" 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.RichTextStyleOrganiserDialog.html" title="wx.richtext.RichTextStyleOrganiserDialog" alt="" coords="5,469,297,499"/> <area shape="rect" id="node2" href="wx.Dialog.html" title="wx.Dialog" alt="" coords="108,392,195,421"/> <area shape="rect" id="node3" href="wx.TopLevelWindow.html" title="wx.TopLevelWindow" alt="" coords="74,315,229,344"/> <area shape="rect" id="node4" href="wx.NonOwnedWindow.html" title="wx.NonOwnedWindow" alt="" coords="67,237,235,267"/> <area shape="rect" id="node5" href="wx.Window.html" title="wx.Window" alt="" coords="103,160,200,189"/> <area shape="rect" id="node6" href="wx.EvtHandler.html" title="wx.EvtHandler" alt="" coords="93,83,210,112"/> <area shape="rect" id="node7" href="wx.Object.html" title="wx.Object" alt="" coords="48,5,135,35"/> <area shape="rect" id="node8" href="wx.Trackable.html" title="wx.Trackable" alt="" coords="159,5,266,35"/> </map> 
   </p>
   </div>

|


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

================================================================================ ================================================================================
:meth:`~wx.richtext.RichTextStyleOrganiserDialog.__init__`                       Default constructor.
:meth:`~wx.richtext.RichTextStyleOrganiserDialog.ApplyStyle`                     Applies the selected style to selection in the given control or the control passed to the constructor.
:meth:`~wx.richtext.RichTextStyleOrganiserDialog.Create`                         Creates the dialog.
:meth:`~wx.richtext.RichTextStyleOrganiserDialog.GetClassDefaultAttributes`      
:meth:`~wx.richtext.RichTextStyleOrganiserDialog.GetFlags`                       Returns the flags used to control the interface presented to the user.
:meth:`~wx.richtext.RichTextStyleOrganiserDialog.GetRestartNumbering`            Returns ``True`` if the user has opted to restart numbering.
:meth:`~wx.richtext.RichTextStyleOrganiserDialog.GetRichTextCtrl`                Returns the associated rich text control (if any).
:meth:`~wx.richtext.RichTextStyleOrganiserDialog.GetSelectedStyle`               Returns selected style name.
:meth:`~wx.richtext.RichTextStyleOrganiserDialog.GetSelectedStyleDefinition`     Returns selected style definition.
:meth:`~wx.richtext.RichTextStyleOrganiserDialog.GetStyleSheet`                  Returns the associated style sheet.
:meth:`~wx.richtext.RichTextStyleOrganiserDialog.SetFlags`                       Sets the flags used to control the interface presented to the user.
:meth:`~wx.richtext.RichTextStyleOrganiserDialog.SetRestartNumbering`            Checks or unchecks the restart numbering checkbox.
:meth:`~wx.richtext.RichTextStyleOrganiserDialog.SetRichTextCtrl`                Sets the control to be associated with the dialog, for the purposes of applying a style to the selection.
:meth:`~wx.richtext.RichTextStyleOrganiserDialog.SetShowToolTips`                Determines whether tooltips will be shown.
:meth:`~wx.richtext.RichTextStyleOrganiserDialog.SetStyleSheet`                  Sets the associated style sheet.
================================================================================ ================================================================================


|


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

================================================================================ ================================================================================
:attr:`~wx.richtext.RichTextStyleOrganiserDialog.Flags`                          See :meth:`~wx.richtext.RichTextStyleOrganiserDialog.GetFlags` and :meth:`~wx.richtext.RichTextStyleOrganiserDialog.SetFlags`
:attr:`~wx.richtext.RichTextStyleOrganiserDialog.RestartNumbering`               See :meth:`~wx.richtext.RichTextStyleOrganiserDialog.GetRestartNumbering` and :meth:`~wx.richtext.RichTextStyleOrganiserDialog.SetRestartNumbering`
:attr:`~wx.richtext.RichTextStyleOrganiserDialog.RichTextCtrl`                   See :meth:`~wx.richtext.RichTextStyleOrganiserDialog.GetRichTextCtrl` and :meth:`~wx.richtext.RichTextStyleOrganiserDialog.SetRichTextCtrl`
:attr:`~wx.richtext.RichTextStyleOrganiserDialog.SelectedStyle`                  See :meth:`~wx.richtext.RichTextStyleOrganiserDialog.GetSelectedStyle`
:attr:`~wx.richtext.RichTextStyleOrganiserDialog.SelectedStyleDefinition`        See :meth:`~wx.richtext.RichTextStyleOrganiserDialog.GetSelectedStyleDefinition`
:attr:`~wx.richtext.RichTextStyleOrganiserDialog.StyleSheet`                     See :meth:`~wx.richtext.RichTextStyleOrganiserDialog.GetStyleSheet` and :meth:`~wx.richtext.RichTextStyleOrganiserDialog.SetStyleSheet`
================================================================================ ================================================================================


|


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


.. class:: wx.richtext.RichTextStyleOrganiserDialog(Dialog)

   **Possible constructors**::

       RichTextStyleOrganiserDialog()
       
       RichTextStyleOrganiserDialog(flags, sheet, ctrl, parent, id=ID_ANY,
                                    caption=_("StyleOrganiser"), pos=DefaultPosition, size=DefaultSize,
                                    style=DEFAULT_DIALOG_STYLE|RESIZE_BORDER|SYSTEM_MENU|CLOSE_BOX)
       
   
   This class shows a style sheet and allows the user to edit, add and
   remove styles.



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



      |overload| Overloaded Implementations:

      :html:`<hr class="overloadsep" /><br />`

      
      **__init__** `(self)`
      
      Default constructor.                   
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **__init__** `(self, flags, sheet, ctrl, parent, id=ID_ANY, caption=_("StyleOrganiser"), pos=DefaultPosition, size=DefaultSize, style=DEFAULT_DIALOG_STYLE|RESIZE_BORDER|SYSTEM_MENU|CLOSE_BOX)`
      
      Constructor.                  
      
      To create a dialog, pass a bitlist of `flags`  (see below), a style sheet, a text control to apply a selected style to (or ``None``), followed by the usual window parameters. 
      
      To specify the operations available to the user, pass a combination of these values to `flags:`   
      
      
      
      - ``wx.richtext.RICHTEXT_ORGANISER_DELETE_STYLES``:  Provides a button for deleting styles. 
      - ``wx.richtext.RICHTEXT_ORGANISER_CREATE_STYLES``:  Provides buttons for creating styles. 
      - ``wx.richtext.RICHTEXT_ORGANISER_APPLY_STYLES``:  Provides a button for applying the currently selected style to the selection. 
      - ``wx.richtext.RICHTEXT_ORGANISER_EDIT_STYLES``:  Provides a button for editing styles. 
      - ``wx.richtext.RICHTEXT_ORGANISER_RENAME_STYLES``:  Provides a button for renaming styles. 
      - ``wx.richtext.RICHTEXT_ORGANISER_OK_CANCEL``:  Provides ``wx.OK`` and Cancel buttons. 
      - ``wx.richtext.RICHTEXT_ORGANISER_RENUMBER``:  Provides a checkbox for specifying that the selection should be renumbered. 
      
      
      
      
      The following flags determine what will be displayed in the style list: 
      
      
      
      - ``wx.richtext.RICHTEXT_ORGANISER_SHOW_CHARACTER``:  Displays character styles only. 
      - ``wx.richtext.RICHTEXT_ORGANISER_SHOW_PARAGRAPH``:  Displays paragraph styles only. 
      - ``wx.richtext.RICHTEXT_ORGANISER_SHOW_LIST``:  Displays list styles only. 
      - ``wx.richtext.RICHTEXT_ORGANISER_SHOW_ALL``:  Displays all styles. 
      
      
      
      
      The following symbols define commonly-used combinations of flags: 
      
      
      
      - ``wx.richtext.RICHTEXT_ORGANISER_ORGANISE``:  Enable all style editing operations so the dialog behaves as a style organiser. 
      - ``wx.richtext.RICHTEXT_ORGANISER_BROWSE``:  Show a list of all styles and their previews, but only allow application of a style or cancellation of the dialog. This makes the dialog behave as a style browser. 
      - ``wx.richtext.RICHTEXT_ORGANISER_BROWSE_NUMBERING``:  Enables only list style browsing, plus a control to specify renumbering. This allows the dialog to be used for applying list styles to the selection.  
      
      
                       
      
      
      :param `flags`: 
      :type `flags`: int
      :param `sheet`: 
      :type `sheet`: wx.richtext.RichTextStyleSheet
      :param `ctrl`: 
      :type `ctrl`: wx.richtext.RichTextCtrl
      :param `parent`: 
      :type `parent`: wx.Window
      :param `id`: 
      :type `id`: wx.WindowID
      :param `caption`: 
      :type `caption`: string
      :param `pos`: 
      :type `pos`: wx.Point
      :param `size`: 
      :type `size`: wx.Size
      :param `style`: 
      :type `style`: long
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`






   .. method:: ApplyStyle(self, ctrl=None)

      Applies the selected style to selection in the given control or the control passed to the constructor.                  


      :param `ctrl`: 
      :type `ctrl`: wx.richtext.RichTextCtrl




      :rtype: `bool`








   .. method:: Create(self, flags, sheet, ctrl, parent, id=ID_ANY, caption=GetTranslation("StyleOrganiser"), pos=DefaultPosition, size=Size(400,300), style=DEFAULT_DIALOG_STYLE|RESIZE_BORDER|SYSTEM_MENU|CLOSE_BOX)

      Creates the dialog.                  

      See the constructor.                  


      :param `flags`: 
      :type `flags`: int
      :param `sheet`: 
      :type `sheet`: wx.richtext.RichTextStyleSheet
      :param `ctrl`: 
      :type `ctrl`: wx.richtext.RichTextCtrl
      :param `parent`: 
      :type `parent`: wx.Window
      :param `id`: 
      :type `id`: wx.WindowID
      :param `caption`: 
      :type `caption`: string
      :param `pos`: 
      :type `pos`: wx.Point
      :param `size`: 
      :type `size`: wx.Size
      :param `style`: 
      :type `style`: long




      :rtype: `bool`








   .. staticmethod:: GetClassDefaultAttributes(variant=WINDOW_VARIANT_NORMAL)




      :param `variant`: 
      :type `variant`: wx.WindowVariant




      :rtype: :ref:`VisualAttributes`








   .. method:: GetFlags(self)

      Returns the flags used to control the interface presented to the user.                  

      :rtype: `int`








   .. method:: GetRestartNumbering(self)

      Returns ``True`` if the user has opted to restart numbering.                  

      :rtype: `bool`








   .. method:: GetRichTextCtrl(self)

      Returns the associated rich text control (if any).                  

      :rtype: :ref:`wx.richtext.RichTextCtrl`








   .. method:: GetSelectedStyle(self)

      Returns selected style name.                  

      :rtype: `string`








   .. method:: GetSelectedStyleDefinition(self)

      Returns selected style definition.                  

      :rtype: :ref:`wx.richtext.RichTextStyleDefinition`








   .. method:: GetStyleSheet(self)

      Returns the associated style sheet.                  

      :rtype: :ref:`wx.richtext.RichTextStyleSheet`








   .. method:: SetFlags(self, flags)

      Sets the flags used to control the interface presented to the user.                  


      :param `flags`: 
      :type `flags`: int







   .. method:: SetRestartNumbering(self, restartNumbering)

      Checks or unchecks the restart numbering checkbox.                  


      :param `restartNumbering`: 
      :type `restartNumbering`: bool







   .. method:: SetRichTextCtrl(self, ctrl)

      Sets the control to be associated with the dialog, for the purposes of applying a style to the selection.                  


      :param `ctrl`: 
      :type `ctrl`: wx.richtext.RichTextCtrl







   .. staticmethod:: SetShowToolTips(show)

      Determines whether tooltips will be shown.                  


      :param `show`: 
      :type `show`: bool







   .. method:: SetStyleSheet(self, sheet)

      Sets the associated style sheet.                  


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







   .. attribute:: Flags

      See :meth:`~wx.richtext.RichTextStyleOrganiserDialog.GetFlags` and :meth:`~wx.richtext.RichTextStyleOrganiserDialog.SetFlags`


   .. attribute:: RestartNumbering

      See :meth:`~wx.richtext.RichTextStyleOrganiserDialog.GetRestartNumbering` and :meth:`~wx.richtext.RichTextStyleOrganiserDialog.SetRestartNumbering`


   .. attribute:: RichTextCtrl

      See :meth:`~wx.richtext.RichTextStyleOrganiserDialog.GetRichTextCtrl` and :meth:`~wx.richtext.RichTextStyleOrganiserDialog.SetRichTextCtrl`


   .. attribute:: SelectedStyle

      See :meth:`~wx.richtext.RichTextStyleOrganiserDialog.GetSelectedStyle`


   .. attribute:: SelectedStyleDefinition

      See :meth:`~wx.richtext.RichTextStyleOrganiserDialog.GetSelectedStyleDefinition`


   .. attribute:: StyleSheet

      See :meth:`~wx.richtext.RichTextStyleOrganiserDialog.GetStyleSheet` and :meth:`~wx.richtext.RichTextStyleOrganiserDialog.SetStyleSheet`

