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

==========================================================================================================================================
|phoenix_title|  **wx.richtext.RichTextCommand**
==========================================================================================================================================

Implements a command on the undo/redo stack. 
         

A :ref:`wx.richtext.RichTextCommand`  object contains one or more :ref:`wx.richtext.RichTextAction`  objects, allowing aggregation of a number of operations into one command. 








         



.. seealso:: :ref:`wx.richtext.RichTextAction`    







|

|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>RichTextCommand</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.RichTextCommand_inheritance.svg" alt="Inheritance diagram of RichTextCommand" 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.RichTextCommand.html" title="Implements a command on the undo/redo stack." alt="" coords="5,159,249,188"/> <area shape="rect" id="node2" href="wx.Command.html" title="wx.Command  is a base class for modelling an application command, which is an action usually performed by selecting a menu item, pressing a toolbar button or any other means provided by the application to change the data or view." alt="" coords="64,82,191,111"/> <area shape="rect" id="node3" href="wx.Object.html" title="This is the root class of many of the wxWidgets classes." alt="" coords="78,5,177,34"/> </map> 
   </p>
   </div>

|


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

================================================================================ ================================================================================
:meth:`~wx.richtext.RichTextCommand.__init__`                                    Constructor for one action.
:meth:`~wx.richtext.RichTextCommand.AddAction`                                   Adds an action to the action list.
:meth:`~wx.richtext.RichTextCommand.ClearActions`                                Clears the action list.
:meth:`~wx.richtext.RichTextCommand.Do`                                          Performs the command.
:meth:`~wx.richtext.RichTextCommand.GetActions`                                  Returns the action list.
:meth:`~wx.richtext.RichTextCommand.Undo`                                        Undoes the command.
================================================================================ ================================================================================


|


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

================================================================================ ================================================================================
:attr:`~wx.richtext.RichTextCommand.Actions`                                     See :meth:`~wx.richtext.RichTextCommand.GetActions`
================================================================================ ================================================================================


|


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


.. class:: wx.richtext.RichTextCommand(Command)

   **Possible constructors**::

       RichTextCommand(name : str, id : RichTextCommandId, buffer :
                       RichTextBuffer, container : RichTextParagraphLayoutBox, ctrl :
                       RichTextCtrl, ignoreFirstTime: bool=False) -> None
       
       RichTextCommand(name : str) -> None
       
   
   Implements a command on the undo/redo stack.



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



      |overload| **Overloaded Implementations:**

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

      
      **__init__** `(self, name : str, id : RichTextCommandId, buffer : RichTextBuffer, container : RichTextParagraphLayoutBox, ctrl : RichTextCtrl, ignoreFirstTime: bool=False)`
      
      Constructor for one action. 
                       
      
      
      :param `name`: 
      :type `name`: string
      :param `id`: 
      :type `id`: wx.richtext.RichTextCommandId
      :param `buffer`: 
      :type `buffer`: wx.richtext.RichTextBuffer
      :param `container`: 
      :type `container`: wx.richtext.RichTextParagraphLayoutBox
      :param `ctrl`: 
      :type `ctrl`: wx.richtext.RichTextCtrl
      :param `ignoreFirstTime`: 
      :type `ignoreFirstTime`: bool
      
      
      
      
      :rtype: `None`     
      
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **__init__** `(self, name : str)`
      
      Constructor for multiple actions. 
                       
      
      
      :param `name`: 
      :type `name`: string
      
      
      
      
      :rtype: `None`     
      
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`






   .. method:: AddAction(self, action : RichTextAction)

      Adds an action to the action list. 
                 


      :param `action`: 
      :type `action`: wx.richtext.RichTextAction




      :rtype: `None`     








   .. method:: ClearActions(self)

      Clears the action list. 
                 

      :rtype: `None`     








   .. method:: Do(self)

      Performs the command. 
                 

      :rtype: `bool`








   .. method:: GetActions(self)

      Returns the action list. 
                 

      :rtype: `RichTextActionList`     








   .. method:: Undo(self)

      Undoes the command. 
                 

      :rtype: `bool`








   .. attribute:: Actions

      See :meth:`~wx.richtext.RichTextCommand.GetActions`