.. 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.RichTextPlainTextHandler:
==========================================================================================================================================
|phoenix_title| **wx.richtext.RichTextPlainTextHandler**
==========================================================================================================================================
Implements saving a buffer to plain text.
.. seealso:: :ref:`wx.richtext.RichTextFileHandler`, :ref:`wx.richtext.RichTextBuffer`, :ref:`wx.richtext.RichTextCtrl`
|
|class_hierarchy| Class Hierarchy
=================================
.. raw:: html
Inheritance diagram for class
RichTextPlainTextHandler:
|
|method_summary| Methods Summary
================================
================================================================================ ================================================================================
:meth:`~wx.richtext.RichTextPlainTextHandler.__init__`
:meth:`~wx.richtext.RichTextPlainTextHandler.CanLoad` Returns ``True`` if we can load using this handler.
:meth:`~wx.richtext.RichTextPlainTextHandler.CanSave` Returns ``True`` if we can save using this handler.
:meth:`~wx.richtext.RichTextPlainTextHandler.DoLoadFile` Override to load content from `stream` into `buffer`.
:meth:`~wx.richtext.RichTextPlainTextHandler.DoSaveFile` Override to save content to `stream` from `buffer`.
================================================================================ ================================================================================
|
|api| Class API
===============
.. class:: wx.richtext.RichTextPlainTextHandler(RichTextFileHandler)
**Possible constructors**::
RichTextPlainTextHandler(name="Text", ext="txt",
type=RICHTEXT_TYPE_TEXT)
Implements saving a buffer to plain text.
.. method:: __init__(self, name="Text", ext="txt", type=RICHTEXT_TYPE_TEXT)
:param `name`:
:type `name`: string
:param `ext`:
:type `ext`: string
:param `type`:
:type `type`: wx.richtext.RichTextFileType
.. method:: CanLoad(self)
Returns ``True`` if we can load using this handler.
:rtype: `bool`
.. method:: CanSave(self)
Returns ``True`` if we can save using this handler.
:rtype: `bool`
.. method:: DoLoadFile(self, buffer, stream)
Override to load content from `stream` into `buffer`.
:param `buffer`:
:type `buffer`: wx.richtext.RichTextBuffer
:param `stream`:
:type `stream`: wx.InputStream
:rtype: `bool`
.. method:: DoSaveFile(self, buffer, stream)
Override to save content to `stream` from `buffer`.
:param `buffer`:
:type `buffer`: wx.richtext.RichTextBuffer
:param `stream`:
:type `stream`: wx.OutputStream
:rtype: `bool`