| Version: 3.2.5

Public Member Functions | Protected Attributes | List of all members
wxRichTextProperties Class Reference
Class List by Category » Rich Text

`#include <wx/richtext/richtextbuffer.h>`

Inheritance diagram for wxRichTextProperties:
[legend]

## Detailed Description

A simple property class using wxVariants.

This is used to give each rich text object the ability to store custom properties that can be used by the application.

##

Library: wxRichText
Category: Rich Text

See also
  wxRichTextBuffer, wxRichTextObject, wxRichTextCtrl

## Public Member Functions

| wxRichTextProperties ()
| Default constructor. More...
| wxRichTextProperties (const wxRichTextProperties &props)
| Copy constructor. More...
void | operator= (const wxRichTextProperties &props)
| Assignment operator. More...
bool | operator== (const wxRichTextProperties &props) const
| Equality operator. More...
void | Copy (const wxRichTextProperties &props)
| Copies from props. More...
const wxVariant & | operator[] (size_t idx) const
| Returns the variant at the given index. More...
wxVariant & | operator[] (size_t idx)
| Returns the variant at the given index. More...
void | Clear ()
| Clears the properties. More...
const wxRichTextVariantArray & | GetProperties () const
| Returns the array of variants implementing the properties. More...
wxRichTextVariantArray & | GetProperties ()
| Returns the array of variants implementing the properties. More...
void | SetProperties (const wxRichTextVariantArray &props)
| Sets the array of variants. More...
wxArrayString | GetPropertyNames () const
| Returns all the property names. More...
size_t | GetCount () const
| Returns a count of the properties. More...
bool | HasProperty (const wxString &name) const
| Returns true if the given property is found. More...
int | Find (const wxString &name) const
| Finds the given property. More...
bool | Remove (const wxString &name)
| Removes the given property. More...
const wxVariant & | GetProperty (const wxString &name) const
| Gets the property variant by name. More...
wxVariant * | FindOrCreateProperty (const wxString &name)
| Finds or creates a property with the given name, returning a pointer to the variant. More...
wxString | GetPropertyString (const wxString &name) const
| Gets the value of the named property as a string. More...
long | GetPropertyLong (const wxString &name) const
| Gets the value of the named property as a long integer. More...
bool | GetPropertyBool (const wxString &name) const
| Gets the value of the named property as a boolean. More...
double | GetPropertyDouble (const wxString &name) const
| Gets the value of the named property as a double. More...
void | SetProperty (const wxVariant &variant)
| Sets the property by passing a variant which contains a name and value. More...
void | SetProperty (const wxString &name, const wxVariant &variant)
| Sets a property by name and variant. More...
void | SetProperty (const wxString &name, const wxString &value)
| Sets a property by name and string value. More...
void | SetProperty (const wxString &name, const wxChar *value)
| Sets a property by name and wxChar* value. More...
void | SetProperty (const wxString &name, long value)
| Sets property by name and long integer value. More...
void | SetProperty (const wxString &name, double value)
| Sets property by name and double value. More...
void | SetProperty (const wxString &name, bool value)
| Sets property by name and boolean value. More...
void | RemoveProperties (const wxRichTextProperties &properties)
| Removes the given properties from these properties. More...
void | MergeProperties (const wxRichTextProperties &properties)
| Merges the given properties with these properties. More...
Public Member Functions inherited from wxObject
| wxObject ()
| Default ctor; initializes to NULL the internal reference data. More...
| wxObject (const wxObject &other)
| Copy ctor. More...
virtual | ~wxObject ()
| Destructor. More...
virtual wxClassInfo * | GetClassInfo () const
| This virtual function is redefined for every class that requires run-time type information, when using the wxDECLARE_CLASS macro (or similar). More...
wxObjectRefData * | GetRefData () const
| Returns the wxObject::m_refData pointer, i.e. the data referenced by this object. More...
bool | IsKindOf (const wxClassInfo *info) const
| Determines whether this class is a subclass of (or the same class as) the given class. More...
bool | IsSameAs (const wxObject &obj) const
| Returns true if this object has the same data pointer as obj. More...
void | Ref (const wxObject &clone)
| Makes this object refer to the data in clone. More...
void | SetRefData (wxObjectRefData *data)
| Sets the wxObject::m_refData pointer. More...
void | UnRef ()
| Decrements the reference count in the associated data, and if it is zero, deletes the data. More...
void | UnShare ()
| This is the same of AllocExclusive() but this method is public. More...
void | operator delete (void *buf)
| The delete operator is defined for debugging versions of the library only, when the identifier `__WXDEBUG__` is defined. More...
void * | operator new (size_t size, const wxString &filename=NULL, int lineNum=0)
| The new operator is defined for debugging versions of the library only, when the identifier `__WXDEBUG__` is defined. More...

## Protected Attributes

wxRichTextVariantArray | m_properties
Protected Attributes inherited from wxObject
wxObjectRefData * | m_refData
| Pointer to an object which is the object's reference-counted data. More...

## Additional Inherited Members

Protected Member Functions inherited from wxObject
void | AllocExclusive ()
| Ensure that this object's data is not shared with any other object. More...
virtual wxObjectRefData * | CreateRefData () const
| Creates a new instance of the wxObjectRefData-derived class specific to this object and returns it. More...
virtual wxObjectRefData * | CloneRefData (const wxObjectRefData *data) const
| Creates a new instance of the wxObjectRefData-derived class specific to this object and initializes it copying data. More...

## Constructor & Destructor Documentation

## ◆ wxRichTextProperties() [1/2]

wxRichTextProperties::wxRichTextProperties | ( |  | ) |

inline

Default constructor.

## ◆ wxRichTextProperties() [2/2]

wxRichTextProperties::wxRichTextProperties | ( | const wxRichTextProperties & | props | ) |

inline

Copy constructor.

## Member Function Documentation

## ◆ Clear()

void wxRichTextProperties::Clear | ( |  | ) |

inline

Clears the properties.

## ◆ Copy()

void wxRichTextProperties::Copy | ( | const wxRichTextProperties & | props | ) |

inline

Copies from props.

## ◆ Find()

int wxRichTextProperties::Find | ( | const wxString & | name | ) | const

Finds the given property.

## ◆ FindOrCreateProperty()

wxVariant* wxRichTextProperties::FindOrCreateProperty | ( | const wxString & | name | ) |

Finds or creates a property with the given name, returning a pointer to the variant.

## ◆ GetCount()

size_t wxRichTextProperties::GetCount | ( |  | ) | const

inline

Returns a count of the properties.

## ◆ GetProperties() [1/2]

wxRichTextVariantArray& wxRichTextProperties::GetProperties | ( |  | ) |

inline

Returns the array of variants implementing the properties.

## ◆ GetProperties() [2/2]

const wxRichTextVariantArray& wxRichTextProperties::GetProperties | ( |  | ) | const

inline

Returns the array of variants implementing the properties.

## ◆ GetProperty()

const wxVariant& wxRichTextProperties::GetProperty | ( | const wxString & | name | ) | const

Gets the property variant by name.

## ◆ GetPropertyBool()

bool wxRichTextProperties::GetPropertyBool | ( | const wxString & | name | ) | const

Gets the value of the named property as a boolean.

## ◆ GetPropertyDouble()

double wxRichTextProperties::GetPropertyDouble | ( | const wxString & | name | ) | const

Gets the value of the named property as a double.

## ◆ GetPropertyLong()

long wxRichTextProperties::GetPropertyLong | ( | const wxString & | name | ) | const

Gets the value of the named property as a long integer.

## ◆ GetPropertyNames()

wxArrayString wxRichTextProperties::GetPropertyNames | ( |  | ) | const

Returns all the property names.

## ◆ GetPropertyString()

wxString wxRichTextProperties::GetPropertyString | ( | const wxString & | name | ) | const

Gets the value of the named property as a string.

## ◆ HasProperty()

bool wxRichTextProperties::HasProperty | ( | const wxString & | name | ) | const

inline

Returns true if the given property is found.

## ◆ MergeProperties()

void wxRichTextProperties::MergeProperties | ( | const wxRichTextProperties & | properties | ) |

Merges the given properties with these properties.

## ◆ operator=()

void wxRichTextProperties::operator= | ( | const wxRichTextProperties & | props | ) |

inline

Assignment operator.

## ◆ operator==()

bool wxRichTextProperties::operator== | ( | const wxRichTextProperties & | props | ) | const

Equality operator.

## ◆ operator[]() [1/2]

wxVariant& wxRichTextProperties::operator[] | ( | size_t | idx | ) |

inline

Returns the variant at the given index.

## ◆ operator[]() [2/2]

const wxVariant& wxRichTextProperties::operator[] | ( | size_t | idx | ) | const

inline

Returns the variant at the given index.

## ◆ Remove()

bool wxRichTextProperties::Remove | ( | const wxString & | name | ) |

Removes the given property.

## ◆ RemoveProperties()

void wxRichTextProperties::RemoveProperties | ( | const wxRichTextProperties & | properties | ) |

Removes the given properties from these properties.

## ◆ SetProperties()

void wxRichTextProperties::SetProperties | ( | const wxRichTextVariantArray & | props | ) |

inline

Sets the array of variants.

## ◆ SetProperty() [1/7]

void wxRichTextProperties::SetProperty | ( | const wxString & | name,
|  | bool | value
| ) |  |

Sets property by name and boolean value.

## ◆ SetProperty() [2/7]

void wxRichTextProperties::SetProperty | ( | const wxString & | name,
|  | const wxChar * | value
| ) |  |

Sets a property by name and wxChar* value.

## ◆ SetProperty() [3/7]

void wxRichTextProperties::SetProperty | ( | const wxString & | name,
|  | const wxString & | value
| ) |  |

Sets a property by name and string value.

## ◆ SetProperty() [4/7]

void wxRichTextProperties::SetProperty | ( | const wxString & | name,
|  | const wxVariant & | variant
| ) |  |

Sets a property by name and variant.

## ◆ SetProperty() [5/7]

void wxRichTextProperties::SetProperty | ( | const wxString & | name,
|  | double | value
| ) |  |

Sets property by name and double value.

## ◆ SetProperty() [6/7]

void wxRichTextProperties::SetProperty | ( | const wxString & | name,
|  | long | value
| ) |  |

Sets property by name and long integer value.

## ◆ SetProperty() [7/7]

void wxRichTextProperties::SetProperty | ( | const wxVariant & | variant | ) |

Sets the property by passing a variant which contains a name and value.

## Member Data Documentation

## ◆ m_properties

wxRichTextVariantArray wxRichTextProperties::m_properties

protected