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
Include files
<wx/richtext/richtextstyles.h>
Data structures
Members
wxRichTextStyleSheet::wxRichTextStyleSheet
wxRichTextStyleSheet::~wxRichTextStyleSheet
wxRichTextStyleSheet::AddCharacterStyle
wxRichTextStyleSheet::AddListStyle
wxRichTextStyleSheet::AddParagraphStyle
wxRichTextStyleSheet::DeleteStyles
wxRichTextStyleSheet::FindCharacterStyle
wxRichTextStyleSheet::FindListStyle
wxRichTextStyleSheet::FindParagraphStyle
wxRichTextStyleSheet::GetCharacterStyle
wxRichTextStyleSheet::GetCharacterStyleCount
wxRichTextStyleSheet::GetListStyle
wxRichTextStyleSheet::GetListStyleCount
wxRichTextStyleSheet::GetParagraphStyle
wxRichTextStyleSheet::GetParagraphStyleCount
wxRichTextStyleSheet::Init
wxRichTextStyleSheet::RemoveCharacterStyle
wxRichTextStyleSheet::RemoveListStyle
wxRichTextStyleSheet::RemoveParagraphStyle
wxRichTextStyleSheet()
Constructor.
~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.
void DeleteStyles()
Deletes all styles.
wxRichTextCharacterStyleDefinition* FindCharacterStyle(const wxString& name) const
Finds a character definition by name.
wxRichTextListStyleDefinition* FindListStyle(const wxString& name) const
Finds a list definition by name.
wxRichTextParagraphStyleDefinition* FindParagraphStyle(const wxString& name) const
Finds a paragraph definition by name.
wxRichTextCharacterStyleDefinition* GetCharacterStyle(size_t n) const
Returns the nth character style.
size_t GetCharacterStyleCount() const
Returns the number of character styles.
wxRichTextListStyleDefinition* GetListStyle(size_t n) const
Returns the nth list style.
size_t GetListStyleCount() const
Returns the number of list styles.
wxRichTextParagraphStyleDefinition* GetParagraphStyle(size_t n) const
Returns the nth paragraph style.
size_t GetParagraphStyleCount() const
Returns the number of paragraph styles.
void Init()
Initialises the style sheet.
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.