## wxRichTextStyleSheet

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.

Derived from

wxObject

Include files

<wx/richtext/richtextstyles.h>

Data structures

Members

wxRichTextStyleSheet::wxRichTextStyleSheet
wxRichTextStyleSheet::~wxRichTextStyleSheet
wxRichTextStyleSheet::AddCharacterStyle
wxRichTextStyleSheet::AddListStyle
wxRichTextStyleSheet::AddParagraphStyle
wxRichTextStyleSheet::AddStyle
wxRichTextStyleSheet::DeleteStyles
wxRichTextStyleSheet::FindCharacterStyle
wxRichTextStyleSheet::FindListStyle
wxRichTextStyleSheet::FindParagraphStyle
wxRichTextStyleSheet::FindStyle
wxRichTextStyleSheet::GetCharacterStyle
wxRichTextStyleSheet::GetCharacterStyleCount
wxRichTextStyleSheet::GetDescription
wxRichTextStyleSheet::GetListStyle
wxRichTextStyleSheet::GetListStyleCount
wxRichTextStyleSheet::GetName
wxRichTextStyleSheet::GetParagraphStyle
wxRichTextStyleSheet::GetParagraphStyleCount
wxRichTextStyleSheet::RemoveCharacterStyle
wxRichTextStyleSheet::RemoveListStyle
wxRichTextStyleSheet::RemoveParagraphStyle
wxRichTextStyleSheet::RemoveStyle
wxRichTextStyleSheet::SetDescription
wxRichTextStyleSheet::SetName

### wxRichTextStyleSheet::wxRichTextStyleSheet

wxRichTextStyleSheet()

Constructor.

### wxRichTextStyleSheet::~wxRichTextStyleSheet

~wxRichTextStyleSheet()

Destructor.

### wxRichTextStyleSheet::AddCharacterStyle

bool AddCharacterStyle(wxRichTextCharacterStyleDefinition* def)

Adds a definition to the character style list.

### wxRichTextStyleSheet::AddListStyle

bool AddListStyle(wxRichTextListStyleDefinition* def)

Adds a definition to the list style list.

### wxRichTextStyleSheet::AddParagraphStyle

bool AddParagraphStyle(wxRichTextParagraphStyleDefinition* def)

Adds a definition to the paragraph style list.

### wxRichTextStyleSheet::AddStyle

bool AddStyle(wxRichTextStyleDefinition* def)

Adds a definition to the appropriate style list.

### wxRichTextStyleSheet::DeleteStyles

void DeleteStyles()

Deletes all styles.

### wxRichTextStyleSheet::FindCharacterStyle

wxRichTextCharacterStyleDefinition* FindCharacterStyle(const wxString& name) const

Finds a character definition by name.

### wxRichTextStyleSheet::FindListStyle

wxRichTextListStyleDefinition* FindListStyle(const wxString& name) const

Finds a list definition by name.

### wxRichTextStyleSheet::FindParagraphStyle

wxRichTextParagraphStyleDefinition* FindParagraphStyle(const wxString& name) const

Finds a paragraph definition by name.

### wxRichTextStyleSheet::FindStyle

wxRichTextStyleDefinition* FindStyle(const wxString& name) const

Finds a style definition by name.

### wxRichTextStyleSheet::GetCharacterStyle

wxRichTextCharacterStyleDefinition* GetCharacterStyle(size_t n) const

Returns the nth character style.

### wxRichTextStyleSheet::GetCharacterStyleCount

size_t GetCharacterStyleCount() const

Returns the number of character styles.

### wxRichTextStyleSheet::GetDescription

const wxString& GetDescription() const

Returns the style sheet's description.

### wxRichTextStyleSheet::GetListStyle

wxRichTextListStyleDefinition* GetListStyle(size_t n) const

Returns the nth list style.

### wxRichTextStyleSheet::GetListStyleCount

size_t GetListStyleCount() const

Returns the number of list styles.

### wxRichTextStyleSheet::GetName

const wxString& GetName() const

Returns the style sheet's name.

### wxRichTextStyleSheet::GetParagraphStyle

wxRichTextParagraphStyleDefinition* GetParagraphStyle(size_t n) const

Returns the nth paragraph style.

### wxRichTextStyleSheet::GetParagraphStyleCount

size_t GetParagraphStyleCount() const

Returns the number of paragraph styles.

### wxRichTextStyleSheet::RemoveCharacterStyle

bool RemoveCharacterStyle(wxRichTextStyleDefinition* def, bool deleteStyle = false)

Removes a character style.

### wxRichTextStyleSheet::RemoveListStyle

bool RemoveListStyle(wxRichTextStyleDefinition* def, bool deleteStyle = false)

Removes a list style.

### wxRichTextStyleSheet::RemoveParagraphStyle

bool RemoveParagraphStyle(wxRichTextStyleDefinition* def, bool deleteStyle = false)

Removes a paragraph style.

### wxRichTextStyleSheet::RemoveStyle

bool RemoveStyle(wxRichTextStyleDefinition* def, bool deleteStyle = false)

Removes a style.

### wxRichTextStyleSheet::SetDescription

void SetDescription(const wxString& descr)

Sets the style sheet's description.

### wxRichTextStyleSheet::SetName

void SetName(const wxString& name)

Sets the style sheet's name.