]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/richtextstylelistbox.tex
fix ReceiveTimeout() reference
[wxWidgets.git] / docs / latex / wx / richtextstylelistbox.tex
CommitLineData
62a268cc
JS
1\section{\class{wxRichTextStyleComboCtrl}}\label{wxrichtextstylecomboctrl}
2
3This is a combo control that can display the styles in a \helpref{wxRichTextStyleSheet}{wxrichtextstylesheet},
4and apply the selection to an associated \helpref{wxRichTextCtrl}{wxrichtextctrl}.
5
6See {\tt samples/richtext} for an example of how to use it.
7
8\wxheading{Derived from}
9
7376079d
VZ
10\helpref{wxComboCtrl}{wxcomboctrl}\\
11\helpref{wxControl}{wxcontrol}\\
12\helpref{wxWindow}{wxwindow}\\
13\helpref{wxEvtHandler}{wxevthandler}\\
14\helpref{wxObject}{wxobject}
62a268cc
JS
15
16\wxheading{Include files}
17
18<wx/richtext/richtextstyles.h>
19
a7af285d
VZ
20\wxheading{Library}
21
22\helpref{wxRichtext}{librarieslist}
23
62a268cc
JS
24\wxheading{See also}
25
26\helpref{wxRichTextStyleListBox}{wxrichtextstylelistbox}, \helpref{wxRichTextCtrl overview}{wxrichtextctrloverview}
27
28\latexignore{\rtfignore{\wxheading{Members}}}
29
30\membersection{wxRichTextStyleComboCtrl::wxRichTextStyleComboCtrl}\label{wxrichtextstylecomboctrlwxrichtextstylecomboctrl}
31
32\func{}{wxRichTextStyleComboCtrl}{\param{wxWindow* }{parent}, \param{wxWindowID }{id = wxID\_ANY}, \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize}, \param{long }{style = 0}}
33
34Constructor.
35
36\membersection{wxRichTextStyleComboCtrl::\destruct{wxRichTextStyleComboCtrl}}\label{wxrichtextstylecomboctrldtor}
37
38\func{}{\destruct{wxRichTextStyleComboCtrl}}{\void}
39
40Destructor.
41
42\membersection{wxRichTextStyleComboCtrl::GetRichTextCtrl}\label{wxrichtextstylecomboctrlgetrichtextctrl}
43
44\constfunc{wxRichTextCtrl*}{GetRichTextCtrl}{\void}
45
46Returns the \helpref{wxRichTextCtrl}{wxrichtextctrl} associated with this control.
47
48\membersection{wxRichTextStyleComboCtrl::GetStyleSheet}\label{wxrichtextstylecomboctrlgetstylesheet}
49
50\constfunc{wxRichTextStyleSheet*}{GetStyleSheet}{\void}
51
52Returns the style sheet associated with this control.
53
54\membersection{wxRichTextStyleComboCtrl::SetRichTextCtrl}\label{wxrichtextstylecomboctrlsetrichtextctrl}
55
56\func{void}{SetRichTextCtrl}{\param{wxRichTextCtrl* }{ctrl}}
57
58Associates the control with a \helpref{wxRichTextCtrl}{wxrichtextctrl}.
59
60\membersection{wxRichTextStyleComboCtrl::SetStyleSheet}\label{wxrichtextstylecomboctrlsetstylesheet}
61
62\func{void}{SetStyleSheet}{\param{wxRichTextStyleSheet* }{styleSheet}}
63
64Associates the control with a style sheet.
65
66\membersection{wxRichTextStyleComboCtrl::UpdateStyles}\label{wxrichtextstylecomboctrlupdatestyles}
67
68\func{void}{UpdateStyles}{\void}
69
70Updates the combo control from the associated style sheet.
71
72
5f35b46a
JS
73\section{\class{wxRichTextStyleListBox}}\label{wxrichtextstylelistbox}
74
75This is a listbox that can display the styles in a \helpref{wxRichTextStyleSheet}{wxrichtextstylesheet},
76and apply the selection to an associated \helpref{wxRichTextCtrl}{wxrichtextctrl}.
77
78See {\tt samples/richtext} for an example of how to use it.
79
80\wxheading{Derived from}
81
7376079d
VZ
82\helpref{wxHtmlListBox}{wxhtmllistbox}\\
83\helpref{wxVListBox}{wxvlistbox}\\
84\helpref{wxVScrolledWindow}{wxvscrolledwindow}\\
85\helpref{wxPanel}{wxpanel}\\
86\helpref{wxWindow}{wxwindow}\\
87\helpref{wxEvtHandler}{wxevthandler}\\
88\helpref{wxObject}{wxobject}
5f35b46a
JS
89
90\wxheading{Include files}
91
92<wx/richtext/richtextstyles.h>
93
a7af285d
VZ
94\wxheading{Library}
95
96\helpref{wxRichtext}{librarieslist}
97
62a268cc
JS
98\wxheading{See also}
99
100\helpref{wxRichTextStyleComboCtrl}{wxrichtextstylecomboctrl}, \helpref{wxRichTextCtrl overview}{wxrichtextctrloverview}
5f35b46a
JS
101
102\latexignore{\rtfignore{\wxheading{Members}}}
103
104\membersection{wxRichTextStyleListBox::wxRichTextStyleListBox}\label{wxrichtextstylelistboxwxrichtextstylelistbox}
105
106\func{}{wxRichTextStyleListBox}{\param{wxWindow* }{parent}, \param{wxWindowID }{id = wxID\_ANY}, \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize}, \param{long }{style = 0}}
107
108Constructor.
109
110\membersection{wxRichTextStyleListBox::\destruct{wxRichTextStyleListBox}}\label{wxrichtextstylelistboxdtor}
111
112\func{}{\destruct{wxRichTextStyleListBox}}{\void}
113
114Destructor.
115
62a268cc
JS
116\membersection{wxRichTextStyleListBox::ApplyStyle}\label{wxrichtextstylelistboxapplystyle}
117
118\func{void}{ApplyStyle}{\param{int }{i}}
119
120Applies the {\it i}th style to the associated rich text control.
121
5f35b46a
JS
122\membersection{wxRichTextStyleListBox::ConvertTenthsMMToPixels}\label{wxrichtextstylelistboxconverttenthsmmtopixels}
123
124\constfunc{int}{ConvertTenthsMMToPixels}{\param{wxDC\& }{dc}, \param{int }{units}}
125
126Converts units in tenths of a millimetre to device units.
127
128\membersection{wxRichTextStyleListBox::CreateHTML}\label{wxrichtextstylelistboxcreatehtml}
129
130\constfunc{wxString}{CreateHTML}{\param{wxRichTextStyleDefinition* }{def}}
131
132Creates a suitable HTML fragment for a definition.
133
62a268cc
JS
134\membersection{wxRichTextStyleListBox::GetApplyOnSelection}\label{wxrichtextstylelistboxgetapplyonselection}
135
136\constfunc{bool}{GetApplyOnSelection}{\void}
137
138If the return value is \true, clicking on a style name in the list will immediately
139apply the style to the associated rich text control.
140
5f35b46a
JS
141\membersection{wxRichTextStyleListBox::GetRichTextCtrl}\label{wxrichtextstylelistboxgetrichtextctrl}
142
143\constfunc{wxRichTextCtrl*}{GetRichTextCtrl}{\void}
144
145Returns the \helpref{wxRichTextCtrl}{wxrichtextctrl} associated with this listbox.
146
147\membersection{wxRichTextStyleListBox::GetStyle}\label{wxrichtextstylelistboxgetstyle}
148
149\constfunc{wxRichTextStyleDefinition*}{GetStyle}{\param{size\_t }{i}}
150
151Gets a style for a listbox index.
152
153\membersection{wxRichTextStyleListBox::GetStyleSheet}\label{wxrichtextstylelistboxgetstylesheet}
154
155\constfunc{wxRichTextStyleSheet*}{GetStyleSheet}{\void}
156
157Returns the style sheet associated with this listbox.
158
1f65137f
JS
159\membersection{wxRichTextStyleListBox::GetStyleType}\label{wxrichtextstylelistboxgetstyletype}
160
161\constfunc{wxRichTextStyleListBox::wxRichTextStyleType}{GetStyleType}{\void}
162
163Returns the type of style to show in the list box.
164
5f35b46a
JS
165\membersection{wxRichTextStyleListBox::OnGetItem}\label{wxrichtextstylelistboxongetitem}
166
167\constfunc{wxString}{OnGetItem}{\param{size\_t }{n}}
168
169Returns the HTML for this item.
170
171\membersection{wxRichTextStyleListBox::OnLeftDown}\label{wxrichtextstylelistboxonleftdown}
172
173\func{void}{OnLeftDown}{\param{wxMouseEvent\& }{event}}
174
175Implements left click behaviour, applying the clicked style to the wxRichTextCtrl.
176
177\membersection{wxRichTextStyleListBox::OnSelect}\label{wxrichtextstylelistboxonselect}
178
179\func{void}{OnSelect}{\param{wxCommandEvent\& }{event}}
180
181Reacts to selection.
182
62a268cc
JS
183\membersection{wxRichTextStyleListBox::SetApplyOnSelection}\label{wxrichtextstylelistboxsetapplyonselection}
184
185\func{void}{SetApplyOnSelection}{\param{bool }{applyOnSelection}}
186
187If {\it applyOnSelection} is \true, clicking on a style name in the list will immediately
188apply the style to the associated rich text control.
189
5f35b46a
JS
190\membersection{wxRichTextStyleListBox::SetRichTextCtrl}\label{wxrichtextstylelistboxsetrichtextctrl}
191
192\func{void}{SetRichTextCtrl}{\param{wxRichTextCtrl* }{ctrl}}
193
194Associates the listbox with a \helpref{wxRichTextCtrl}{wxrichtextctrl}.
195
196\membersection{wxRichTextStyleListBox::SetStyleSheet}\label{wxrichtextstylelistboxsetstylesheet}
197
198\func{void}{SetStyleSheet}{\param{wxRichTextStyleSheet* }{styleSheet}}
199
200Associates the control with a style sheet.
201
1f65137f
JS
202\membersection{wxRichTextStyleListBox::SetStyleType}\label{wxrichtextstylelistboxsetstyletype}
203
204\func{void}{SetStyleType}{\param{wxRichTextStyleListBox::wxRichTextStyleType }{styleType}}
205
206Sets the style type to display. One of wxRichTextStyleListBox::wxRICHTEXT\_STYLE\_ALL, wxRichTextStyleListBox::wxRICHTEXT\_STYLE\_PARAGRAPH,
207wxRichTextStyleListBox::wxRICHTEXT\_STYLE\_CHARACTER and wxRichTextStyleListBox::wxRICHTEXT\_STYLE\_LIST.
208
5f35b46a
JS
209\membersection{wxRichTextStyleListBox::UpdateStyles}\label{wxrichtextstylelistboxupdatestyles}
210
211\func{void}{UpdateStyles}{\void}
212
213Updates the list from the associated style sheet.
62a268cc 214
1f65137f
JS
215
216\section{\class{wxRichTextStyleListCtrl}}\label{wxrichtextstylelistctrl}
217
218This class incorporates a \helpref{wxRichTextStyleListBox}{wxrichtextstylelistbox} and
219a choice control that allows the user to select the category of style to view.
220It is demonstrated in the wxRichTextCtrl sample in {\tt samples/richtext}.
221
222To use wxRichTextStyleListCtrl, add the control to your window hierarchy and
223call \helpref{SetStyleType}{wxrichtextstylelistctrlsetstyletype} with
224one of wxRichTextStyleListBox::wxRICHTEXT\_STYLE\_ALL, wxRichTextStyleListBox::wxRICHTEXT\_STYLE\_PARAGRAPH,
225wxRichTextStyleListBox::wxRICHTEXT\_STYLE\_CHARACTER and wxRichTextStyleListBox::wxRICHTEXT\_STYLE\_LIST to set the current view.
226Associate the control with a style sheet and rich text control with SetStyleSheet and SetRichTextCtrl,
227so that when a style is double-clicked, it is applied to the selection.
228
229\wxheading{Window styles}
230
231\twocolwidtha{5cm}
232\begin{twocollist}\itemsep=0pt
233\twocolitem{\windowstyle{wxRICHTEXTSTYLELIST\_HIDE\_TYPE\_SELECTOR}}{This style hides the category selection control.}
234\end{twocollist}
235
236\wxheading{Derived from}
237
7376079d
VZ
238\helpref{wxControl}{wxcontrol}\\
239\helpref{wxWindow}{wxwindow}\\
240\helpref{wxEvtHandler}{wxevthandler}\\
241\helpref{wxObject}{wxobject}
1f65137f
JS
242
243\wxheading{Include files}
244
245<wx/richtext/richtextstyles.h>
246
a7af285d
VZ
247\wxheading{Library}
248
249\helpref{wxRichtext}{librarieslist}
250
1f65137f
JS
251\wxheading{Data structures}
252
253\latexignore{\rtfignore{\wxheading{Members}}}
254
255\membersection{wxRichTextStyleListCtrl::wxRichTextStyleListCtrl}\label{wxrichtextstylelistctrlwxrichtextstylelistctrl}
256
257\func{}{wxRichTextStyleListCtrl}{\param{wxWindow* }{parent}, \param{wxWindowID }{id = wxID\_ANY}, \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize}, \param{long }{style = 0}}
258
259\func{}{wxRichTextStyleListCtrl}{\void}
260
261Constructors.
262
263\membersection{wxRichTextStyleListCtrl::Create}\label{wxrichtextstylelistctrlcreate}
264
265\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID }{id = wxID\_ANY}, \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize}, \param{long }{style = 0}}
266
267Creates the windows.
268
269\membersection{wxRichTextStyleListCtrl::GetRichTextCtrl}\label{wxrichtextstylelistctrlgetrichtextctrl}
270
271\constfunc{wxRichTextCtrl*}{GetRichTextCtrl}{\void}
272
273Returns the associated rich text control, if any.
274
275\membersection{wxRichTextStyleListCtrl::GetStyleChoice}\label{wxrichtextstylelistctrlgetstylechoice}
276
277\constfunc{wxChoice*}{GetStyleChoice}{\void}
278
279Returns the wxChoice control used for selecting the style category.
280
281\membersection{wxRichTextStyleListCtrl::GetStyleListBox}\label{wxrichtextstylelistctrlgetstylelistbox}
282
283\constfunc{wxRichTextStyleListBox*}{GetStyleListBox}{\void}
284
285Returns the wxListBox control used to view the style list.
286
287\membersection{wxRichTextStyleListCtrl::GetStyleSheet}\label{wxrichtextstylelistctrlgetstylesheet}
288
289\constfunc{wxRichTextStyleSheet*}{GetStyleSheet}{\void}
290
291Returns the associated style sheet, if any.
292
293\membersection{wxRichTextStyleListCtrl::GetStyleType}\label{wxrichtextstylelistctrlgetstyletype}
294
295\constfunc{wxRichTextStyleListBox::wxRichTextStyleType}{GetStyleType}{\void}
296
297Returns the type of style to show in the list box.
298
299\membersection{wxRichTextStyleListCtrl::SetRichTextCtrl}\label{wxrichtextstylelistctrlsetrichtextctrl}
300
301\func{void}{SetRichTextCtrl}{\param{wxRichTextCtrl* }{ctrl}}
302
303Associates the control with a wxRichTextCtrl.
304
305\membersection{wxRichTextStyleListCtrl::SetStyleSheet}\label{wxrichtextstylelistctrlsetstylesheet}
306
307\func{void}{SetStyleSheet}{\param{wxRichTextStyleSheet* }{styleSheet}}
308
309Associates the control with a style sheet.
310
311\membersection{wxRichTextStyleListCtrl::SetStyleType}\label{wxrichtextstylelistctrlsetstyletype}
312
313\func{void}{SetStyleType}{\param{wxRichTextStyleListBox::wxRichTextStyleType }{styleType}}
314
315Sets the style type to display. One of wxRichTextStyleListBox::wxRICHTEXT\_STYLE\_ALL, wxRichTextStyleListBox::wxRICHTEXT\_STYLE\_PARAGRAPH,
316wxRichTextStyleListBox::wxRICHTEXT\_STYLE\_CHARACTER and wxRichTextStyleListBox::wxRICHTEXT\_STYLE\_LIST.
317
318\membersection{wxRichTextStyleListCtrl::UpdateStyles}\label{wxrichtextstylelistctrlupdatestyles}
319
320\func{void}{UpdateStyles}{\void}
321
322Updates the style list box.
323