1 \section{\class{wxRichTextStyleComboCtrl
}}\label{wxrichtextstylecomboctrl
}
3 This is a combo control 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{wxComboCtrl
}{wxcomboctrl
}
12 \wxheading{Include files
}
14 <wx/richtext/richtextstyles.h>
18 \helpref{wxRichTextStyleListBox
}{wxrichtextstylelistbox
},
\helpref{wxRichTextCtrl overview
}{wxrichtextctrloverview
}
20 \latexignore{\rtfignore{\wxheading{Members
}}}
22 \membersection{wxRichTextStyleComboCtrl::wxRichTextStyleComboCtrl
}\label{wxrichtextstylecomboctrlwxrichtextstylecomboctrl
}
24 \func{}{wxRichTextStyleComboCtrl
}{\param{wxWindow*
}{parent
},
\param{wxWindowID
}{id = wxID
\_ANY},
\param{const wxPoint\&
}{pos = wxDefaultPosition
},
\param{const wxSize\&
}{size = wxDefaultSize
},
\param{long
}{style =
0}}
28 \membersection{wxRichTextStyleComboCtrl::
\destruct{wxRichTextStyleComboCtrl
}}\label{wxrichtextstylecomboctrldtor
}
30 \func{}{\destruct{wxRichTextStyleComboCtrl
}}{\void}
34 \membersection{wxRichTextStyleComboCtrl::GetRichTextCtrl
}\label{wxrichtextstylecomboctrlgetrichtextctrl
}
36 \constfunc{wxRichTextCtrl*
}{GetRichTextCtrl
}{\void}
38 Returns the
\helpref{wxRichTextCtrl
}{wxrichtextctrl
} associated with this control.
40 \membersection{wxRichTextStyleComboCtrl::GetStyleSheet
}\label{wxrichtextstylecomboctrlgetstylesheet
}
42 \constfunc{wxRichTextStyleSheet*
}{GetStyleSheet
}{\void}
44 Returns the style sheet associated with this control.
46 \membersection{wxRichTextStyleComboCtrl::SetRichTextCtrl
}\label{wxrichtextstylecomboctrlsetrichtextctrl
}
48 \func{void
}{SetRichTextCtrl
}{\param{wxRichTextCtrl*
}{ctrl
}}
50 Associates the control with a
\helpref{wxRichTextCtrl
}{wxrichtextctrl
}.
52 \membersection{wxRichTextStyleComboCtrl::SetStyleSheet
}\label{wxrichtextstylecomboctrlsetstylesheet
}
54 \func{void
}{SetStyleSheet
}{\param{wxRichTextStyleSheet*
}{styleSheet
}}
56 Associates the control with a style sheet.
58 \membersection{wxRichTextStyleComboCtrl::UpdateStyles
}\label{wxrichtextstylecomboctrlupdatestyles
}
60 \func{void
}{UpdateStyles
}{\void}
62 Updates the combo control from the associated style sheet.
65 \section{\class{wxRichTextStyleListBox
}}\label{wxrichtextstylelistbox
}
67 This is a listbox that can display the styles in a
\helpref{wxRichTextStyleSheet
}{wxrichtextstylesheet
},
68 and apply the selection to an associated
\helpref{wxRichTextCtrl
}{wxrichtextctrl
}.
70 See
{\tt samples/richtext
} for an example of how to use it.
72 \wxheading{Derived from
}
74 \helpref{wxHtmlListBox
}{wxhtmllistbox
}
76 \wxheading{Include files
}
78 <wx/richtext/richtextstyles.h>
82 \helpref{wxRichTextStyleComboCtrl
}{wxrichtextstylecomboctrl
},
\helpref{wxRichTextCtrl overview
}{wxrichtextctrloverview
}
84 \latexignore{\rtfignore{\wxheading{Members
}}}
86 \membersection{wxRichTextStyleListBox::wxRichTextStyleListBox
}\label{wxrichtextstylelistboxwxrichtextstylelistbox
}
88 \func{}{wxRichTextStyleListBox
}{\param{wxWindow*
}{parent
},
\param{wxWindowID
}{id = wxID
\_ANY},
\param{const wxPoint\&
}{pos = wxDefaultPosition
},
\param{const wxSize\&
}{size = wxDefaultSize
},
\param{long
}{style =
0}}
92 \membersection{wxRichTextStyleListBox::
\destruct{wxRichTextStyleListBox
}}\label{wxrichtextstylelistboxdtor
}
94 \func{}{\destruct{wxRichTextStyleListBox
}}{\void}
98 \membersection{wxRichTextStyleListBox::ApplyStyle
}\label{wxrichtextstylelistboxapplystyle
}
100 \func{void
}{ApplyStyle
}{\param{int
}{i
}}
102 Applies the
{\it i
}th style to the associated rich text control.
104 \membersection{wxRichTextStyleListBox::ConvertTenthsMMToPixels
}\label{wxrichtextstylelistboxconverttenthsmmtopixels
}
106 \constfunc{int
}{ConvertTenthsMMToPixels
}{\param{wxDC\&
}{dc
},
\param{int
}{units
}}
108 Converts units in tenths of a millimetre to device units.
110 \membersection{wxRichTextStyleListBox::CreateHTML
}\label{wxrichtextstylelistboxcreatehtml
}
112 \constfunc{wxString
}{CreateHTML
}{\param{wxRichTextStyleDefinition*
}{def
}}
114 Creates a suitable HTML fragment for a definition.
116 \membersection{wxRichTextStyleListBox::GetApplyOnSelection
}\label{wxrichtextstylelistboxgetapplyonselection
}
118 \constfunc{bool
}{GetApplyOnSelection
}{\void}
120 If the return value is
\true, clicking on a style name in the list will immediately
121 apply the style to the associated rich text control.
123 \membersection{wxRichTextStyleListBox::GetRichTextCtrl
}\label{wxrichtextstylelistboxgetrichtextctrl
}
125 \constfunc{wxRichTextCtrl*
}{GetRichTextCtrl
}{\void}
127 Returns the
\helpref{wxRichTextCtrl
}{wxrichtextctrl
} associated with this listbox.
129 \membersection{wxRichTextStyleListBox::GetStyle
}\label{wxrichtextstylelistboxgetstyle
}
131 \constfunc{wxRichTextStyleDefinition*
}{GetStyle
}{\param{size
\_t }{i
}}
133 Gets a style for a listbox index.
135 \membersection{wxRichTextStyleListBox::GetStyleSheet
}\label{wxrichtextstylelistboxgetstylesheet
}
137 \constfunc{wxRichTextStyleSheet*
}{GetStyleSheet
}{\void}
139 Returns the style sheet associated with this listbox.
141 \membersection{wxRichTextStyleListBox::OnGetItem
}\label{wxrichtextstylelistboxongetitem
}
143 \constfunc{wxString
}{OnGetItem
}{\param{size
\_t }{n
}}
145 Returns the HTML for this item.
147 \membersection{wxRichTextStyleListBox::OnLeftDown
}\label{wxrichtextstylelistboxonleftdown
}
149 \func{void
}{OnLeftDown
}{\param{wxMouseEvent\&
}{event
}}
151 Implements left click behaviour, applying the clicked style to the wxRichTextCtrl.
153 \membersection{wxRichTextStyleListBox::OnSelect
}\label{wxrichtextstylelistboxonselect
}
155 \func{void
}{OnSelect
}{\param{wxCommandEvent\&
}{event
}}
159 \membersection{wxRichTextStyleListBox::SetApplyOnSelection
}\label{wxrichtextstylelistboxsetapplyonselection
}
161 \func{void
}{SetApplyOnSelection
}{\param{bool
}{applyOnSelection
}}
163 If
{\it applyOnSelection
} is
\true, clicking on a style name in the list will immediately
164 apply the style to the associated rich text control.
166 \membersection{wxRichTextStyleListBox::SetRichTextCtrl
}\label{wxrichtextstylelistboxsetrichtextctrl
}
168 \func{void
}{SetRichTextCtrl
}{\param{wxRichTextCtrl*
}{ctrl
}}
170 Associates the listbox with a
\helpref{wxRichTextCtrl
}{wxrichtextctrl
}.
172 \membersection{wxRichTextStyleListBox::SetStyleSheet
}\label{wxrichtextstylelistboxsetstylesheet
}
174 \func{void
}{SetStyleSheet
}{\param{wxRichTextStyleSheet*
}{styleSheet
}}
176 Associates the control with a style sheet.
178 \membersection{wxRichTextStyleListBox::UpdateStyles
}\label{wxrichtextstylelistboxupdatestyles
}
180 \func{void
}{UpdateStyles
}{\void}
182 Updates the list from the associated style sheet.