Contents Up Previous Next

wxRichTextStyleListCtrl

This class incorporates a wxRichTextStyleListBox and a choice control that allows the user to select the category of style to view. It is demonstrated in the wxRichTextCtrl sample in samples/richtext.

To use wxRichTextStyleListCtrl, add the control to your window hierarchy and call SetStyleType with one of wxRichTextStyleListBox::wxRICHTEXT_STYLE_ALL, wxRichTextStyleListBox::wxRICHTEXT_STYLE_PARAGRAPH, wxRichTextStyleListBox::wxRICHTEXT_STYLE_CHARACTER and wxRichTextStyleListBox::wxRICHTEXT_STYLE_LIST to set the current view. Associate the control with a style sheet and rich text control with SetStyleSheet and SetRichTextCtrl, so that when a style is double-clicked, it is applied to the selection.

Window styles

wxRICHTEXTSTYLELIST_HIDE_TYPE_SELECTOR This style hides the category selection control.

Derived from

wxControl

Include files

<wx/richtext/richtextstyles.h>

Data structures

Members

wxRichTextStyleListCtrl::wxRichTextStyleListCtrl
wxRichTextStyleListCtrl::Create
wxRichTextStyleListCtrl::GetRichTextCtrl
wxRichTextStyleListCtrl::GetStyleChoice
wxRichTextStyleListCtrl::GetStyleListBox
wxRichTextStyleListCtrl::GetStyleSheet
wxRichTextStyleListCtrl::GetStyleType
wxRichTextStyleListCtrl::SetRichTextCtrl
wxRichTextStyleListCtrl::SetStyleSheet
wxRichTextStyleListCtrl::SetStyleType
wxRichTextStyleListCtrl::UpdateStyles


wxRichTextStyleListCtrl::wxRichTextStyleListCtrl

wxRichTextStyleListCtrl(wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0)

wxRichTextStyleListCtrl()

Constructors.


wxRichTextStyleListCtrl::Create

bool Create(wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0)

Creates the windows.


wxRichTextStyleListCtrl::GetRichTextCtrl

wxRichTextCtrl* GetRichTextCtrl() const

Returns the associated rich text control, if any.


wxRichTextStyleListCtrl::GetStyleChoice

wxChoice* GetStyleChoice() const

Returns the wxChoice control used for selecting the style category.


wxRichTextStyleListCtrl::GetStyleListBox

wxRichTextStyleListBox* GetStyleListBox() const

Returns the wxListBox control used to view the style list.


wxRichTextStyleListCtrl::GetStyleSheet

wxRichTextStyleSheet* GetStyleSheet() const

Returns the associated style sheet, if any.


wxRichTextStyleListCtrl::GetStyleType

wxRichTextStyleListBox::wxRichTextStyleType GetStyleType() const

Returns the type of style to show in the list box.


wxRichTextStyleListCtrl::SetRichTextCtrl

void SetRichTextCtrl(wxRichTextCtrl* ctrl)

Associates the control with a wxRichTextCtrl.


wxRichTextStyleListCtrl::SetStyleSheet

void SetStyleSheet(wxRichTextStyleSheet* styleSheet)

Associates the control with a style sheet.


wxRichTextStyleListCtrl::SetStyleType

void SetStyleType(wxRichTextStyleListBox::wxRichTextStyleType styleType)

Sets the style type to display. One of wxRichTextStyleListBox::wxRICHTEXT_STYLE_ALL, wxRichTextStyleListBox::wxRICHTEXT_STYLE_PARAGRAPH, wxRichTextStyleListBox::wxRICHTEXT_STYLE_CHARACTER and wxRichTextStyleListBox::wxRICHTEXT_STYLE_LIST.


wxRichTextStyleListCtrl::UpdateStyles

void UpdateStyles()

Updates the style list box.