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

Inheritance diagram for class
RichTextCommand:
|
|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:`
`
**__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:`
`
**__init__** `(self, name : str)`
Constructor for multiple actions.
:param `name`:
:type `name`: string
:rtype: `None`
:html:`
`
.. 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`