| Version: 3.0.1

- Main Page
- Related Pages
- Categories
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
wxRichTextStyleSheet Class Reference
Rich Text

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

Inheritance diagram for wxRichTextStyleSheet:
[legend]

## Detailed Description

A style sheet contains named paragraph and character styles that make it easy for a user to apply combinations of attributes to a wxRichTextCtrl.

You can use a wxRichTextStyleListBox in your user interface to show available styles to the user, and allow application of styles to the control.

##

Library: wxRichText
Category: Rich Text

## Public Member Functions

| wxRichTextStyleSheet ()
| Constructor.
virtual | ~wxRichTextStyleSheet ()
| Destructor.
bool | AddCharacterStyle (wxRichTextCharacterStyleDefinition *def)
| Adds a definition to the character style list.
bool | AddListStyle (wxRichTextListStyleDefinition *def)
| Adds a definition to the list style list.
bool | AddParagraphStyle (wxRichTextParagraphStyleDefinition *def)
| Adds a definition to the paragraph style list.
bool | AddStyle (wxRichTextStyleDefinition *def)
| Adds a definition to the appropriate style list.
void | DeleteStyles ()
| Deletes all styles.
wxRichTextCharacterStyleDefinition * | FindCharacterStyle (const wxString &name, bool recurse=true) const
| Finds a character definition by name.
wxRichTextListStyleDefinition * | FindListStyle (const wxString &name, bool recurse=true) const
| Finds a list definition by name.
wxRichTextParagraphStyleDefinition * | FindParagraphStyle (const wxString &name, bool recurse=true) const
| Finds a paragraph definition by name.
wxRichTextStyleDefinition * | FindStyle (const wxString &name) const
| Finds a style definition by name.
wxRichTextCharacterStyleDefinition * | GetCharacterStyle (size_t n) const
| Returns the nth character style.
size_t | GetCharacterStyleCount () const
| Returns the number of character styles.
const wxString & | GetDescription () const
| Returns the style sheet's description.
wxRichTextListStyleDefinition * | GetListStyle (size_t n) const
| Returns the nth list style.
size_t | GetListStyleCount () const
| Returns the number of list styles.
const wxString & | GetName () const
| Returns the style sheet's name.
wxRichTextParagraphStyleDefinition * | GetParagraphStyle (size_t n) const
| Returns the nth paragraph style.
size_t | GetParagraphStyleCount () const
| Returns the number of paragraph styles.
bool | RemoveCharacterStyle (wxRichTextStyleDefinition *def, bool deleteStyle=false)
| Removes a character style.
bool | RemoveListStyle (wxRichTextStyleDefinition *def, bool deleteStyle=false)
| Removes a list style.
bool | RemoveParagraphStyle (wxRichTextStyleDefinition *def, bool deleteStyle=false)
| Removes a paragraph style.
bool | RemoveStyle (wxRichTextStyleDefinition *def, bool deleteStyle=false)
| Removes a style.
void | SetDescription (const wxString &descr)
| Sets the style sheet's description.
void | SetName (const wxString &name)
| Sets the style sheet's name.
wxRichTextProperties & | GetProperties ()
| Returns the sheet's properties.
const wxRichTextProperties & | GetProperties () const
| Returns the sheet's properties.
void | SetProperties (const wxRichTextProperties &props)
| Sets the sheet's properties.
Public Member Functions inherited from wxObject
| wxObject ()
| Default ctor; initializes to NULL the internal reference data.
| wxObject (const wxObject &other)
| Copy ctor.
virtual | ~wxObject ()
| Destructor.
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).
wxObjectRefData * | GetRefData () const
| Returns the wxObject::m_refData pointer, i.e. the data referenced by this object.
bool | IsKindOf (const wxClassInfo *info) const
| Determines whether this class is a subclass of (or the same class as) the given class.
bool | IsSameAs (const wxObject &obj) const
| Returns true if this object has the same data pointer as obj.
void | Ref (const wxObject &clone)
| Makes this object refer to the data in clone.
void | SetRefData (wxObjectRefData *data)
| Sets the wxObject::m_refData pointer.
void | UnRef ()
| Decrements the reference count in the associated data, and if it is zero, deletes the data.
void | UnShare ()
| This is the same of AllocExclusive() but this method is public.
void | operator delete (void *buf)
| The delete operator is defined for debugging versions of the library only, when the identifier `WXDEBUG` is defined.
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.

## Additional Inherited Members

Protected Member Functions inherited from wxObject
void | AllocExclusive ()
| Ensure that this object's data is not shared with any other object.
virtual wxObjectRefData * | CreateRefData () const
| Creates a new instance of the wxObjectRefData-derived class specific to this object and returns it.
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.
Protected Attributes inherited from wxObject
wxObjectRefData * | m_refData
| Pointer to an object which is the object's reference-counted data.

## Constructor & Destructor Documentation

wxRichTextStyleSheet::wxRichTextStyleSheet | ( |  | ) |

Constructor.

virtual wxRichTextStyleSheet::~wxRichTextStyleSheet | ( |  | ) |

virtual

Destructor.

## Member Function Documentation

bool wxRichTextStyleSheet::AddCharacterStyle | ( | wxRichTextCharacterStyleDefinition * | def | ) |

Adds a definition to the character style list.

bool wxRichTextStyleSheet::AddListStyle | ( | wxRichTextListStyleDefinition * | def | ) |

Adds a definition to the list style list.

bool wxRichTextStyleSheet::AddParagraphStyle | ( | wxRichTextParagraphStyleDefinition * | def | ) |

Adds a definition to the paragraph style list.

bool wxRichTextStyleSheet::AddStyle | ( | wxRichTextStyleDefinition * | def | ) |

Adds a definition to the appropriate style list.

void wxRichTextStyleSheet::DeleteStyles | ( |  | ) |

Deletes all styles.

wxRichTextCharacterStyleDefinition* wxRichTextStyleSheet::FindCharacterStyle | ( | const wxString & | name,
|  | bool | recurse = `true`
| ) |  | const

Finds a character definition by name.

wxRichTextListStyleDefinition* wxRichTextStyleSheet::FindListStyle | ( | const wxString & | name,
|  | bool | recurse = `true`
| ) |  | const

Finds a list definition by name.

wxRichTextParagraphStyleDefinition* wxRichTextStyleSheet::FindParagraphStyle | ( | const wxString & | name,
|  | bool | recurse = `true`
| ) |  | const

Finds a paragraph definition by name.

wxRichTextStyleDefinition* wxRichTextStyleSheet::FindStyle | ( | const wxString & | name | ) | const

Finds a style definition by name.

wxRichTextCharacterStyleDefinition* wxRichTextStyleSheet::GetCharacterStyle | ( | size_t | n | ) | const

Returns the nth character style.

size_t wxRichTextStyleSheet::GetCharacterStyleCount | ( |  | ) | const

Returns the number of character styles.

const wxString& wxRichTextStyleSheet::GetDescription | ( |  | ) | const

Returns the style sheet's description.

wxRichTextListStyleDefinition* wxRichTextStyleSheet::GetListStyle | ( | size_t | n | ) | const

Returns the nth list style.

size_t wxRichTextStyleSheet::GetListStyleCount | ( |  | ) | const

Returns the number of list styles.

const wxString& wxRichTextStyleSheet::GetName | ( |  | ) | const

Returns the style sheet's name.

wxRichTextParagraphStyleDefinition* wxRichTextStyleSheet::GetParagraphStyle | ( | size_t | n | ) | const

Returns the nth paragraph style.

size_t wxRichTextStyleSheet::GetParagraphStyleCount | ( |  | ) | const

Returns the number of paragraph styles.

wxRichTextProperties& wxRichTextStyleSheet::GetProperties | ( |  | ) |

Returns the sheet's properties.

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

Returns the sheet's properties.

bool wxRichTextStyleSheet::RemoveCharacterStyle | ( | wxRichTextStyleDefinition * | def,
|  | bool | deleteStyle = `false`
| ) |  |

Removes a character style.

bool wxRichTextStyleSheet::RemoveListStyle | ( | wxRichTextStyleDefinition * | def,
|  | bool | deleteStyle = `false`
| ) |  |

Removes a list style.

bool wxRichTextStyleSheet::RemoveParagraphStyle | ( | wxRichTextStyleDefinition * | def,
|  | bool | deleteStyle = `false`
| ) |  |

Removes a paragraph style.

bool wxRichTextStyleSheet::RemoveStyle | ( | wxRichTextStyleDefinition * | def,
|  | bool | deleteStyle = `false`
| ) |  |

Removes a style.

void wxRichTextStyleSheet::SetDescription | ( | const wxString & | descr | ) |

Sets the style sheet's description.

void wxRichTextStyleSheet::SetName | ( | const wxString & | name | ) |

Sets the style sheet's name.

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

Sets the sheet's properties.