.. 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.RichTextProperties:
==========================================================================================================================================
|phoenix_title| **wx.richtext.RichTextProperties**
==========================================================================================================================================
A simple property class using Variants.
This is used to give each rich text object the ability to store custom properties that can be used by the application.
.. seealso:: :ref:`wx.richtext.RichTextBuffer`, :ref:`wx.richtext.RichTextObject`, :ref:`wx.richtext.RichTextCtrl`
|
|class_hierarchy| Class Hierarchy
=================================
.. raw:: html

Inheritance diagram for class
RichTextProperties:
|
|method_summary| Methods Summary
================================
================================================================================ ================================================================================
:meth:`~wx.richtext.RichTextProperties.__init__` Default constructor.
:meth:`~wx.richtext.RichTextProperties.Clear` Clears the properties.
:meth:`~wx.richtext.RichTextProperties.Copy` Copies from `props`.
:meth:`~wx.richtext.RichTextProperties.Find` Finds the given property.
:meth:`~wx.richtext.RichTextProperties.FindOrCreateProperty` Finds or creates a property with the given name, returning a pointer to the variant.
:meth:`~wx.richtext.RichTextProperties.GetCount` Returns a count of the properties.
:meth:`~wx.richtext.RichTextProperties.GetProperties` Returns the array of variants implementing the properties.
:meth:`~wx.richtext.RichTextProperties.GetProperty` Gets the property variant by name.
:meth:`~wx.richtext.RichTextProperties.GetPropertyBool` Gets the value of the named property as a boolean.
:meth:`~wx.richtext.RichTextProperties.GetPropertyDouble` Gets the value of the named property as a double.
:meth:`~wx.richtext.RichTextProperties.GetPropertyLong` Gets the value of the named property as a long integer.
:meth:`~wx.richtext.RichTextProperties.GetPropertyNames` Returns all the property names.
:meth:`~wx.richtext.RichTextProperties.GetPropertyString` Gets the value of the named property as a string.
:meth:`~wx.richtext.RichTextProperties.HasProperty` Returns ``True`` if the given property is found.
:meth:`~wx.richtext.RichTextProperties.MergeProperties` Merges the given properties with these properties.
:meth:`~wx.richtext.RichTextProperties.Remove` Removes the given property.
:meth:`~wx.richtext.RichTextProperties.RemoveProperties` Removes the given properties from these properties.
:meth:`~wx.richtext.RichTextProperties.SetProperties` Sets the array of variants.
:meth:`~wx.richtext.RichTextProperties.SetProperty` Sets the property by passing a variant which contains a name and value.
:meth:`~wx.richtext.RichTextProperties.__eq__` Equality operator.
================================================================================ ================================================================================
|
|property_summary| Properties Summary
=====================================
================================================================================ ================================================================================
:attr:`~wx.richtext.RichTextProperties.Count` See :meth:`~wx.richtext.RichTextProperties.GetCount`
:attr:`~wx.richtext.RichTextProperties.Properties` See :meth:`~wx.richtext.RichTextProperties.GetProperties` and :meth:`~wx.richtext.RichTextProperties.SetProperties`
:attr:`~wx.richtext.RichTextProperties.PropertyNames` See :meth:`~wx.richtext.RichTextProperties.GetPropertyNames`
================================================================================ ================================================================================
|
|api| Class API
===============
.. class:: wx.richtext.RichTextProperties(Object)
**Possible constructors**::
RichTextProperties() -> None
RichTextProperties(props : RichTextProperties) -> None
A simple property class using Variants.
.. method:: __init__(self, *args, **kw)
|overload| **Overloaded Implementations:**
:html:`
`
**__init__** `(self)`
Default constructor.
:rtype: `None`
:html:`
`
**__init__** `(self, props : RichTextProperties)`
Copy constructor.
:param `props`:
:type `props`: wx.richtext.RichTextProperties
:rtype: `None`
:html:`
`
.. method:: Clear(self)
Clears the properties.
:rtype: `None`
.. method:: Copy(self, props : RichTextProperties)
Copies from `props`.
:param `props`:
:type `props`: wx.richtext.RichTextProperties
:rtype: `None`
.. method:: Find(self, name : str)
Finds the given property.
:param `name`:
:type `name`: string
:rtype: `int`
.. method:: FindOrCreateProperty(self, name : str)
Finds or creates a property with the given name, returning a pointer to the variant.
:param `name`:
:type `name`: string
:rtype: `Variant`
.. method:: GetCount(self)
Returns a count of the properties.
:rtype: `int`
.. method:: GetProperties(self)
Returns the array of variants implementing the properties.
:rtype: `RichTextVariantArray`
.. method:: GetProperty(self, name : str)
Gets the property variant by name.
:param `name`:
:type `name`: string
:rtype: `Variant`
.. method:: GetPropertyBool(self, name : str)
Gets the value of the named property as a boolean.
:param `name`:
:type `name`: string
:rtype: `bool`
.. method:: GetPropertyDouble(self, name : str)
Gets the value of the named property as a double.
:param `name`:
:type `name`: string
:rtype: `float`
.. method:: GetPropertyLong(self, name : str)
Gets the value of the named property as a long integer.
:param `name`:
:type `name`: string
:rtype: `int`
.. method:: GetPropertyNames(self)
Returns all the property names.
:rtype: `List[str]`
.. method:: GetPropertyString(self, name : str)
Gets the value of the named property as a string.
:param `name`:
:type `name`: string
:rtype: `str`
.. method:: HasProperty(self, name : str)
Returns ``True`` if the given property is found.
:param `name`:
:type `name`: string
:rtype: `bool`
.. method:: MergeProperties(self, properties : RichTextProperties)
Merges the given properties with these properties.
:param `properties`:
:type `properties`: wx.richtext.RichTextProperties
:rtype: `None`
.. method:: Remove(self, name : str)
Removes the given property.
:param `name`:
:type `name`: string
:rtype: `bool`
.. method:: RemoveProperties(self, properties : RichTextProperties)
Removes the given properties from these properties.
:param `properties`:
:type `properties`: wx.richtext.RichTextProperties
:rtype: `None`
.. method:: SetProperties(self, props : RichTextVariantArray)
Sets the array of variants.
:param `props`:
:type `props`: RichTextVariantArray
:rtype: `None`
.. method:: SetProperty(self, *args, **kw)
|overload| **Overloaded Implementations:**
:html:`
`
**SetProperty** `(self, variant : Variant)`
Sets the property by passing a variant which contains a name and value.
:param `variant`:
:type `variant`: Variant
:rtype: `None`
:html:`
`
**SetProperty** `(self, name : str, variant : Variant)`
Sets a property by name and variant.
:param `name`:
:type `name`: string
:param `variant`:
:type `variant`: Variant
:rtype: `None`
:html:`
`
**SetProperty** `(self, name : str, value : str)`
Sets a property by name and string value.
:param `name`:
:type `name`: string
:param `value`:
:type `value`: string
:rtype: `None`
:html:`
`
**SetProperty** `(self, name : str, value : str)`
Sets a property by name and Char value.
:param `name`:
:type `name`: string
:param `value`:
:type `value`: wx.Char
:rtype: `None`
:html:`
`
**SetProperty** `(self, name : str, value : int)`
Sets property by name and long integer value.
:param `name`:
:type `name`: string
:param `value`:
:type `value`: long
:rtype: `None`
:html:`
`
**SetProperty** `(self, name : str, value : float)`
Sets property by name and float value.
:param `name`:
:type `name`: string
:param `value`:
:type `value`: float
:rtype: `None`
:html:`
`
.. method:: __eq__(self)
Equality operator.
:param `props`:
:type `props`: wx.richtext.RichTextProperties
.. attribute:: Count
See :meth:`~wx.richtext.RichTextProperties.GetCount`
.. attribute:: Properties
See :meth:`~wx.richtext.RichTextProperties.GetProperties` and :meth:`~wx.richtext.RichTextProperties.SetProperties`
.. attribute:: PropertyNames
See :meth:`~wx.richtext.RichTextProperties.GetPropertyNames`