1 \section{\class{wxRichTextStyleListBox
}}\label{wxrichtextstylelistbox
}
3 This is a listbox that can display the styles in a
\helpref{wxRichTextStyleSheet
}{wxrichtextstylesheet
},
4 and apply the selection to an associated
\helpref{wxRichTextCtrl
}{wxrichtextctrl
}.
6 See
{\tt samples/richtext
} for an example of how to use it.
8 \wxheading{Derived from
}
10 \helpref{wxHtmlListBox
}{wxhtmllistbox
}
12 \wxheading{Include files
}
14 <wx/richtext/richtextstyles.h>
16 \wxheading{Data structures
}
18 \latexignore{\rtfignore{\wxheading{Members
}}}
20 \membersection{wxRichTextStyleListBox::wxRichTextStyleListBox
}\label{wxrichtextstylelistboxwxrichtextstylelistbox
}
22 \func{}{wxRichTextStyleListBox
}{\param{wxWindow*
}{parent
},
\param{wxWindowID
}{id = wxID
\_ANY},
\param{const wxPoint\&
}{pos = wxDefaultPosition
},
\param{const wxSize\&
}{size = wxDefaultSize
},
\param{long
}{style =
0}}
26 \membersection{wxRichTextStyleListBox::
\destruct{wxRichTextStyleListBox
}}\label{wxrichtextstylelistboxdtor
}
28 \func{}{\destruct{wxRichTextStyleListBox
}}{\void}
32 \membersection{wxRichTextStyleListBox::ConvertTenthsMMToPixels
}\label{wxrichtextstylelistboxconverttenthsmmtopixels
}
34 \constfunc{int
}{ConvertTenthsMMToPixels
}{\param{wxDC\&
}{dc
},
\param{int
}{units
}}
36 Converts units in tenths of a millimetre to device units.
38 \membersection{wxRichTextStyleListBox::CreateHTML
}\label{wxrichtextstylelistboxcreatehtml
}
40 \constfunc{wxString
}{CreateHTML
}{\param{wxRichTextStyleDefinition*
}{def
}}
42 Creates a suitable HTML fragment for a definition.
44 \membersection{wxRichTextStyleListBox::GetRichTextCtrl
}\label{wxrichtextstylelistboxgetrichtextctrl
}
46 \constfunc{wxRichTextCtrl*
}{GetRichTextCtrl
}{\void}
48 Returns the
\helpref{wxRichTextCtrl
}{wxrichtextctrl
} associated with this listbox.
50 \membersection{wxRichTextStyleListBox::GetStyle
}\label{wxrichtextstylelistboxgetstyle
}
52 \constfunc{wxRichTextStyleDefinition*
}{GetStyle
}{\param{size
\_t }{i
}}
54 Gets a style for a listbox index.
56 \membersection{wxRichTextStyleListBox::GetStyleSheet
}\label{wxrichtextstylelistboxgetstylesheet
}
58 \constfunc{wxRichTextStyleSheet*
}{GetStyleSheet
}{\void}
60 Returns the style sheet associated with this listbox.
62 \membersection{wxRichTextStyleListBox::OnGetItem
}\label{wxrichtextstylelistboxongetitem
}
64 \constfunc{wxString
}{OnGetItem
}{\param{size
\_t }{n
}}
66 Returns the HTML for this item.
68 \membersection{wxRichTextStyleListBox::OnLeftDown
}\label{wxrichtextstylelistboxonleftdown
}
70 \func{void
}{OnLeftDown
}{\param{wxMouseEvent\&
}{event
}}
72 Implements left click behaviour, applying the clicked style to the wxRichTextCtrl.
74 \membersection{wxRichTextStyleListBox::OnSelect
}\label{wxrichtextstylelistboxonselect
}
76 \func{void
}{OnSelect
}{\param{wxCommandEvent\&
}{event
}}
80 \membersection{wxRichTextStyleListBox::SetRichTextCtrl
}\label{wxrichtextstylelistboxsetrichtextctrl
}
82 \func{void
}{SetRichTextCtrl
}{\param{wxRichTextCtrl*
}{ctrl
}}
84 Associates the listbox with a
\helpref{wxRichTextCtrl
}{wxrichtextctrl
}.
86 \membersection{wxRichTextStyleListBox::SetStyleSheet
}\label{wxrichtextstylelistboxsetstylesheet
}
88 \func{void
}{SetStyleSheet
}{\param{wxRichTextStyleSheet*
}{styleSheet
}}
90 Associates the control with a style sheet.
92 \membersection{wxRichTextStyleListBox::UpdateStyles
}\label{wxrichtextstylelistboxupdatestyles
}
94 \func{void
}{UpdateStyles
}{\void}
96 Updates the list from the associated style sheet.