.. 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.RichTextDrawingContext:
==========================================================================================================================================
|phoenix_title| **wx.richtext.RichTextDrawingContext**
==========================================================================================================================================
A class for passing information to drawing and measuring functions.
.. seealso:: :ref:`wx.richtext.RichTextBuffer`, :ref:`wx.richtext.RichTextCtrl`
|
|class_hierarchy| Class Hierarchy
=================================
.. raw:: html

Inheritance diagram for class
RichTextDrawingContext:
|
|method_summary| Methods Summary
================================
================================================================================ ================================================================================
:meth:`~wx.richtext.RichTextDrawingContext.__init__` Pass the buffer to the context so the context can retrieve information such as virtual attributes.
:meth:`~wx.richtext.RichTextDrawingContext.ApplyVirtualAttributes` Applies any virtual attributes relevant to this object.
:meth:`~wx.richtext.RichTextDrawingContext.EnableDelayedImageLoading` Enable or disable delayed image loading.
:meth:`~wx.richtext.RichTextDrawingContext.EnableImages` Enable or disable images.
:meth:`~wx.richtext.RichTextDrawingContext.EnableVirtualAttributes` Enables virtual attribute processing.
:meth:`~wx.richtext.RichTextDrawingContext.GetDelayedImageLoading` Returns ``True`` if delayed image loading is enabled.
:meth:`~wx.richtext.RichTextDrawingContext.GetImagesEnabled` Returns ``True`` if images are enabled.
:meth:`~wx.richtext.RichTextDrawingContext.GetLayingOut` Returns ``True`` if laying out.
:meth:`~wx.richtext.RichTextDrawingContext.GetVirtualAttributes` Returns the virtual attributes for this object.
:meth:`~wx.richtext.RichTextDrawingContext.GetVirtualAttributesEnabled` Returns ``True`` if virtual attribute processing is enabled.
:meth:`~wx.richtext.RichTextDrawingContext.GetVirtualSubobjectAttributes` Gets the mixed virtual attributes for individual positions within the object.
:meth:`~wx.richtext.RichTextDrawingContext.GetVirtualSubobjectAttributesCount` Gets the count for mixed virtual attributes for individual positions within the object.
:meth:`~wx.richtext.RichTextDrawingContext.GetVirtualText` Gets the virtual text for this object.
:meth:`~wx.richtext.RichTextDrawingContext.HasVirtualAttributes` Does this object have virtual attributes? Virtual attributes can be provided for visual cues without affecting the actual styling.
:meth:`~wx.richtext.RichTextDrawingContext.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.RichTextDrawingContext.Init`
:meth:`~wx.richtext.RichTextDrawingContext.SetLayingOut` Set laying out flag.
================================================================================ ================================================================================
|
|property_summary| Properties Summary
=====================================
================================================================================ ================================================================================
:attr:`~wx.richtext.RichTextDrawingContext.DelayedImageLoading` See :meth:`~wx.richtext.RichTextDrawingContext.GetDelayedImageLoading`
:attr:`~wx.richtext.RichTextDrawingContext.ImagesEnabled` See :meth:`~wx.richtext.RichTextDrawingContext.GetImagesEnabled`
:attr:`~wx.richtext.RichTextDrawingContext.LayingOut` See :meth:`~wx.richtext.RichTextDrawingContext.GetLayingOut` and :meth:`~wx.richtext.RichTextDrawingContext.SetLayingOut`
:attr:`~wx.richtext.RichTextDrawingContext.VirtualAttributesEnabled` See :meth:`~wx.richtext.RichTextDrawingContext.GetVirtualAttributesEnabled`
:attr:`~wx.richtext.RichTextDrawingContext.m_buffer` A public C++ attribute of type `~wx.richtext.RichTextBuffer` .
:attr:`~wx.richtext.RichTextDrawingContext.m_enableDelayedImageLoading` A public C++ attribute of type ``bool``.
:attr:`~wx.richtext.RichTextDrawingContext.m_enableImages` A public C++ attribute of type ``bool``.
:attr:`~wx.richtext.RichTextDrawingContext.m_enableVirtualAttributes` A public C++ attribute of type ``bool``.
:attr:`~wx.richtext.RichTextDrawingContext.m_layingOut` A public C++ attribute of type ``bool``.
================================================================================ ================================================================================
|
|api| Class API
===============
.. class:: wx.richtext.RichTextDrawingContext(Object)
**Possible constructors**::
RichTextDrawingContext(buffer : RichTextBuffer) -> None
A class for passing information to drawing and measuring functions.
.. method:: __init__(self, buffer : RichTextBuffer)
Pass the buffer to the context so the context can retrieve information such as virtual attributes.
:param `buffer`:
:type `buffer`: wx.richtext.RichTextBuffer
:rtype: `None`
.. method:: ApplyVirtualAttributes(self, attr : RichTextAttr, obj : RichTextObject)
Applies any virtual attributes relevant to this object.
:param `attr`:
:type `attr`: wx.richtext.RichTextAttr
:param `obj`:
:type `obj`: wx.richtext.RichTextObject
:rtype: `bool`
.. method:: EnableDelayedImageLoading(self, b : bool)
Enable or disable delayed image loading.
:param `b`:
:type `b`: bool
:rtype: `None`
.. method:: EnableImages(self, b : bool)
Enable or disable images.
:param `b`:
:type `b`: bool
:rtype: `None`
.. method:: EnableVirtualAttributes(self, b : bool)
Enables virtual attribute processing.
:param `b`:
:type `b`: bool
:rtype: `None`
.. method:: GetDelayedImageLoading(self)
Returns ``True`` if delayed image loading is enabled.
:rtype: `bool`
.. method:: GetImagesEnabled(self)
Returns ``True`` if images are enabled.
:rtype: `bool`
.. method:: GetLayingOut(self)
Returns ``True`` if laying out.
:rtype: `bool`
.. method:: GetVirtualAttributes(self, obj : RichTextObject)
Returns the virtual attributes for this object.
Virtual attributes can be provided for visual cues without affecting the actual styling.
:param `obj`:
:type `obj`: wx.richtext.RichTextObject
:rtype: :ref:`wx.richtext.RichTextAttr`
.. method:: GetVirtualAttributesEnabled(self)
Returns ``True`` if virtual attribute processing is enabled.
:rtype: `bool`
.. method:: GetVirtualSubobjectAttributes(self, obj : RichTextObject, positions : List[int], attributes : RichTextAttrArray)
Gets the mixed virtual attributes for individual positions within the object.
For example, individual characters within a text object may require special highlighting. The function is passed the count returned by GetVirtualSubobjectAttributesCount.
: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 : RichTextObject)
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 : RichTextPlainText, text : str)
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 : RichTextObject)
Does this object have virtual attributes? Virtual attributes can be provided for visual cues without affecting the actual styling.
:param `obj`:
:type `obj`: wx.richtext.RichTextObject
:rtype: `bool`
.. method:: HasVirtualText(self, obj : RichTextPlainText)
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:: Init(self)
:rtype: `None`
.. method:: SetLayingOut(self, b : bool)
Set laying out flag.
:param `b`:
:type `b`: bool
:rtype: `None`
.. attribute:: DelayedImageLoading
See :meth:`~wx.richtext.RichTextDrawingContext.GetDelayedImageLoading`
.. attribute:: ImagesEnabled
See :meth:`~wx.richtext.RichTextDrawingContext.GetImagesEnabled`
.. attribute:: LayingOut
See :meth:`~wx.richtext.RichTextDrawingContext.GetLayingOut` and :meth:`~wx.richtext.RichTextDrawingContext.SetLayingOut`
.. attribute:: VirtualAttributesEnabled
See :meth:`~wx.richtext.RichTextDrawingContext.GetVirtualAttributesEnabled`
.. attribute:: m_buffer
A public C++ attribute of type `~wx.richtext.RichTextBuffer` .
.. attribute:: m_enableDelayedImageLoading
A public C++ attribute of type ``bool``.
.. attribute:: m_enableImages
A public C++ attribute of type ``bool``.
.. attribute:: m_enableVirtualAttributes
A public C++ attribute of type ``bool``.
.. attribute:: m_layingOut
A public C++ attribute of type ``bool``.