Contents Up Previous Next

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::AddParagraphStyle
wxRichTextStyleSheet::DeleteStyles
wxRichTextStyleSheet::FindCharacterStyle
wxRichTextStyleSheet::FindParagraphStyle
wxRichTextStyleSheet::GetCharacterStyle
wxRichTextStyleSheet::GetCharacterStyleCount
wxRichTextStyleSheet::GetParagraphStyle
wxRichTextStyleSheet::GetParagraphStyleCount
wxRichTextStyleSheet::Init
wxRichTextStyleSheet::RemoveCharacterStyle
wxRichTextStyleSheet::RemoveParagraphStyle


wxRichTextStyleSheet::wxRichTextStyleSheet

wxRichTextStyleSheet()

Constructor.


wxRichTextStyleSheet::~wxRichTextStyleSheet

~wxRichTextStyleSheet()

Destructor.


wxRichTextStyleSheet::AddCharacterStyle

bool AddCharacterStyle(wxRichTextCharacterStyleDefinition* def)

Adds a definition to the character style list.


wxRichTextStyleSheet::AddParagraphStyle

bool AddParagraphStyle(wxRichTextParagraphStyleDefinition* def)

Adds a definition to the paragraph style list.


wxRichTextStyleSheet::DeleteStyles

void DeleteStyles()

Deletes all styles.


wxRichTextStyleSheet::FindCharacterStyle

wxRichTextCharacterStyleDefinition* FindCharacterStyle(const wxString& name) const

Finds a character definition by name.


wxRichTextStyleSheet::FindParagraphStyle

wxRichTextParagraphStyleDefinition* FindParagraphStyle(const wxString& name) const

Finds a paragraph 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::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::Init

void Init()

Initialises the style sheet.


wxRichTextStyleSheet::RemoveCharacterStyle

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

Removes a character style.


wxRichTextStyleSheet::RemoveParagraphStyle

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

Removes a paragraph style.