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.
Default constructor. |
|
Clears the properties. |
|
Copies from props. |
|
Finds the given property. |
|
Finds or creates a property with the given name, returning a pointer to the variant. |
|
Returns a count of the properties. |
|
Returns the array of variants implementing the properties. |
|
Gets the property variant by name. |
|
Gets the value of the named property as a boolean. |
|
Gets the value of the named property as a double. |
|
Gets the value of the named property as a long integer. |
|
Returns all the property names. |
|
Gets the value of the named property as a string. |
|
Returns |
|
Merges the given properties with these properties. |
|
Removes the given property. |
|
Removes the given properties from these properties. |
|
Sets the array of variants. |
|
Sets the property by passing a variant which contains a name and value. |
|
Equality operator. |
wx.richtext.
RichTextProperties
(Object)¶Possible constructors:
RichTextProperties()
RichTextProperties(props)
A simple property class using Variants.
__init__
(self, *args, **kw)¶__init__ (self)
Default constructor.
__init__ (self, props)
Copy constructor.
props (wx.richtext.RichTextProperties) –
Clear
(self)¶Clears the properties.
Copy
(self, props)¶Copies from props.
props (wx.richtext.RichTextProperties) –
Find
(self, name)¶Finds the given property.
name (string) –
int
FindOrCreateProperty
(self, name)¶Finds or creates a property with the given name, returning a pointer to the variant.
name (string) –
Variant
GetCount
(self)¶Returns a count of the properties.
int
GetProperties
(self)¶Returns the array of variants implementing the properties.
RichTextVariantArray
GetProperty
(self, name)¶Gets the property variant by name.
name (string) –
Variant
GetPropertyBool
(self, name)¶Gets the value of the named property as a boolean.
name (string) –
bool
GetPropertyDouble
(self, name)¶Gets the value of the named property as a double.
name (string) –
float
GetPropertyLong
(self, name)¶Gets the value of the named property as a long integer.
name (string) –
long
GetPropertyNames
(self)¶Returns all the property names.
list of strings
GetPropertyString
(self, name)¶Gets the value of the named property as a string.
name (string) –
string
HasProperty
(self, name)¶Returns True
if the given property is found.
name (string) –
bool
MergeProperties
(self, properties)¶Merges the given properties with these properties.
properties (wx.richtext.RichTextProperties) –
Remove
(self, name)¶Removes the given property.
name (string) –
bool
RemoveProperties
(self, properties)¶Removes the given properties from these properties.
properties (wx.richtext.RichTextProperties) –
SetProperties
(self, props)¶Sets the array of variants.
props (RichTextVariantArray) –
SetProperty
(self, *args, **kw)¶SetProperty (self, variant)
Sets the property by passing a variant which contains a name and value.
variant (Variant) –
SetProperty (self, name, variant)
Sets a property by name and variant.
name (string) –
variant (Variant) –
SetProperty (self, name, value)
Sets a property by name and string value.
name (string) –
value (string) –
SetProperty (self, name, value)
Sets a property by name and Char value.
name (string) –
value (wx.Char) –
SetProperty (self, name, value)
Sets property by name and long integer value.
name (string) –
value (long) –
SetProperty (self, name, value)
Sets property by name and float value.
name (string) –
value (float) –
__eq__
(self)¶Equality operator.
props (wx.richtext.RichTextProperties) –
Properties
¶See GetProperties
and SetProperties
PropertyNames
¶See GetPropertyNames