.. wxPython Phoenix documentation This file was generated by Phoenix's sphinx generator and associated tools, do not edit by hand. Copyright: (c) 2011-2018 by Total Control Software License: wxWindows License .. include:: headings.inc .. _wx.richtext.RichTextDrawingHandler: ========================================================================================================================================== |phoenix_title| **wx.richtext.RichTextDrawingHandler** ========================================================================================================================================== The base class for custom drawing handlers. Currently, drawing handlers can provide virtual attributes. .. seealso:: :ref:`wx.richtext.RichTextBuffer`, :ref:`wx.richtext.RichTextCtrl` | |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>RichTextDrawingHandler</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.RichTextDrawingHandler_inheritance.png" alt="Inheritance diagram of RichTextDrawingHandler" 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.RichTextDrawingHandler.html" title="The base class for custom drawing handlers." alt="" coords="5,83,272,112"/> <area shape="rect" id="node2" href="wx.Object.html" title="This is the root class of many of the wxWidgets classes." alt="" coords="95,5,183,35"/> </map> </p> </div> | |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~wx.richtext.RichTextDrawingHandler.__init__` Creates a drawing handler object. :meth:`~wx.richtext.RichTextDrawingHandler.GetName` Returns the name of the handler. :meth:`~wx.richtext.RichTextDrawingHandler.GetVirtualAttributes` Provides virtual attributes that we can provide. :meth:`~wx.richtext.RichTextDrawingHandler.GetVirtualSubobjectAttributes` Gets the mixed virtual attributes for individual positions within the object. :meth:`~wx.richtext.RichTextDrawingHandler.GetVirtualSubobjectAttributesCount` Gets the count for mixed virtual attributes for individual positions within the object. :meth:`~wx.richtext.RichTextDrawingHandler.GetVirtualText` Gets the virtual text for this object. :meth:`~wx.richtext.RichTextDrawingHandler.HasVirtualAttributes` Returns ``True`` if this object has virtual attributes that we can provide. :meth:`~wx.richtext.RichTextDrawingHandler.HasVirtualText` Do we have virtual text for this object? Virtual text allows an application to replace characters in an object for editing and display purposes, for example for highlighting special characters. :meth:`~wx.richtext.RichTextDrawingHandler.SetName` Sets the name of the handler. ================================================================================ ================================================================================ | |property_summary| Properties Summary ===================================== ================================================================================ ================================================================================ :attr:`~wx.richtext.RichTextDrawingHandler.Name` See :meth:`~wx.richtext.RichTextDrawingHandler.GetName` and :meth:`~wx.richtext.RichTextDrawingHandler.SetName` ================================================================================ ================================================================================ | |api| Class API =============== .. class:: wx.richtext.RichTextDrawingHandler(Object) **Possible constructors**:: RichTextDrawingHandler(name="") The base class for custom drawing handlers. .. method:: __init__(self, name="") Creates a drawing handler object. :param `name`: :type `name`: string .. method:: GetName(self) Returns the name of the handler. :rtype: `string` .. method:: GetVirtualAttributes(self, attr, obj) Provides virtual attributes that we can provide. :param `attr`: :type `attr`: wx.richtext.RichTextAttr :param `obj`: :type `obj`: wx.richtext.RichTextObject :rtype: `bool` .. method:: GetVirtualSubobjectAttributes(self, obj, positions, attributes) Gets the mixed virtual attributes for individual positions within the object. For example, individual characters within a text object may require special highlighting. Returns the number of virtual attributes found. :param `obj`: :type `obj`: wx.richtext.RichTextObject :param `positions`: :type `positions`: list of integers :param `attributes`: :type `attributes`: RichTextAttrArray :rtype: `int` .. method:: GetVirtualSubobjectAttributesCount(self, obj) Gets the count for mixed virtual attributes for individual positions within the object. For example, individual characters within a text object may require special highlighting. :param `obj`: :type `obj`: wx.richtext.RichTextObject :rtype: `int` .. method:: GetVirtualText(self, obj, text) Gets the virtual text for this object. :param `obj`: :type `obj`: wx.richtext.RichTextPlainText :param `text`: :type `text`: string :rtype: `bool` .. method:: HasVirtualAttributes(self, obj) Returns ``True`` if this object has virtual attributes that we can provide. :param `obj`: :type `obj`: wx.richtext.RichTextObject :rtype: `bool` .. method:: HasVirtualText(self, obj) Do we have virtual text for this object? Virtual text allows an application to replace characters in an object for editing and display purposes, for example for highlighting special characters. :param `obj`: :type `obj`: wx.richtext.RichTextPlainText :rtype: `bool` .. method:: SetName(self, name) Sets the name of the handler. :param `name`: :type `name`: string .. attribute:: Name See :meth:`~wx.richtext.RichTextDrawingHandler.GetName` and :meth:`~wx.richtext.RichTextDrawingHandler.SetName`