.. 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() RichTextProperties(props) A simple property class using Variants. .. method:: __init__(self, *args, **kw) |overload| Overloaded Implementations: :html:`

` **__init__** `(self)` Default constructor. :html:`

` **__init__** `(self, props)` Copy constructor. :param `props`: :type `props`: wx.richtext.RichTextProperties :html:`

` .. method:: Clear(self) Clears the properties. .. method:: Copy(self, props) Copies from `props`. :param `props`: :type `props`: wx.richtext.RichTextProperties .. method:: Find(self, name) Finds the given property. :param `name`: :type `name`: string :rtype: `int` .. method:: FindOrCreateProperty(self, name) 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) Gets the property variant by name. :param `name`: :type `name`: string :rtype: `Variant` .. method:: GetPropertyBool(self, name) Gets the value of the named property as a boolean. :param `name`: :type `name`: string :rtype: `bool` .. method:: GetPropertyDouble(self, name) Gets the value of the named property as a double. :param `name`: :type `name`: string :rtype: `float` .. method:: GetPropertyLong(self, name) Gets the value of the named property as a long integer. :param `name`: :type `name`: string :rtype: `long` .. method:: GetPropertyNames(self) Returns all the property names. :rtype: `list of strings` .. method:: GetPropertyString(self, name) Gets the value of the named property as a string. :param `name`: :type `name`: string :rtype: `string` .. method:: HasProperty(self, name) Returns ``True`` if the given property is found. :param `name`: :type `name`: string :rtype: `bool` .. method:: MergeProperties(self, properties) Merges the given properties with these properties. :param `properties`: :type `properties`: wx.richtext.RichTextProperties .. method:: Remove(self, name) Removes the given property. :param `name`: :type `name`: string :rtype: `bool` .. method:: RemoveProperties(self, properties) Removes the given properties from these properties. :param `properties`: :type `properties`: wx.richtext.RichTextProperties .. method:: SetProperties(self, props) Sets the array of variants. :param `props`: :type `props`: RichTextVariantArray .. method:: SetProperty(self, *args, **kw) |overload| Overloaded Implementations: :html:`

` **SetProperty** `(self, variant)` Sets the property by passing a variant which contains a name and value. :param `variant`: :type `variant`: Variant :html:`

` **SetProperty** `(self, name, variant)` Sets a property by name and variant. :param `name`: :type `name`: string :param `variant`: :type `variant`: Variant :html:`

` **SetProperty** `(self, name, value)` Sets a property by name and string value. :param `name`: :type `name`: string :param `value`: :type `value`: string :html:`

` **SetProperty** `(self, name, value)` Sets a property by name and Char value. :param `name`: :type `name`: string :param `value`: :type `value`: wx.Char :html:`

` **SetProperty** `(self, name, value)` Sets property by name and long integer value. :param `name`: :type `name`: string :param `value`: :type `value`: long :html:`

` **SetProperty** `(self, name, value)` Sets property by name and float value. :param `name`: :type `name`: string :param `value`: :type `value`: float :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`