.. 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, id, buffer, container, ctrl,
ignoreFirstTime=False)
RichTextCommand(name)
Implements a command on the undo/redo stack.
.. method:: __init__(self, *args, **kw)
|overload| Overloaded Implementations:
:html:`
`
**__init__** `(self, name, id, buffer, container, ctrl, ignoreFirstTime=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
:html:`
`
**__init__** `(self, name)`
Constructor for multiple actions.
:param `name`:
:type `name`: string
:html:`
`
.. method:: AddAction(self, action)
Adds an action to the action list.
:param `action`:
:type `action`: wx.richtext.RichTextAction
.. method:: ClearActions(self)
Clears the action list.
.. 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`