]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/richtextattr.tex
use explicit virtual keyword with overridden virtual methods
[wxWidgets.git] / docs / latex / wx / richtextattr.tex
CommitLineData
5f35b46a
JS
1\section{\class{wxRichTextAttr}}\label{wxrichtextattr}
2
3wxRichTextAttr represents the character and paragraph attributes, or style,
4for a range of text in a \helpref{wxRichTextCtrl}{wxrichtextctrl}. This class
5is specific to wxRichTextCtrl, although you can also use the
6standard \helpref{wxTextAttr}{wxtextattr} class with wxRichTextCtrl.
7
8When setting up a wxRichTextAttr object, pass a bitlist mask to \helpref{SetFlags}{wxrichtextattrsetflags} to
9indicate which style elements should be changed. As a convenience, when you call a setter such
10s SetFont, the relevant bit will be set.
11
12wxRichTextAttr stores attributes without a wxFont object, so is a much more
13efficient way to query styles than using a \helpref{wxTextAttr}{wxtextattr} or \helpref{wxTextAttrEx}{wxtextattrex} object.
14
15\wxheading{Derived from}
16
17No base class
18
19\wxheading{Include files}
20
21<wx/richtext/richtextbuffer.h>
22
23\wxheading{Constants}
24
25The following values can be passed to SetAlignment to determine
26paragraph alignment.
27
28{\small
29\begin{verbatim}
30enum wxTextAttrAlignment
31{
32 wxTEXT_ALIGNMENT_DEFAULT,
33 wxTEXT_ALIGNMENT_LEFT,
34 wxTEXT_ALIGNMENT_CENTRE,
35 wxTEXT_ALIGNMENT_CENTER = wxTEXT_ALIGNMENT_CENTRE,
36 wxTEXT_ALIGNMENT_RIGHT,
37 wxTEXT_ALIGNMENT_JUSTIFIED
38};
39\end{verbatim}
40}
41
42These values are passed in a bitlist to SetFlags to determine
43what attributes will be considered when setting the attributes
44for a text control.
45
46{\small
47\begin{verbatim}
48// Standard wxTextAttr constants
49
50#define wxTEXT_ATTR_TEXT_COLOUR 0x0001
51#define wxTEXT_ATTR_BACKGROUND_COLOUR 0x0002
52#define wxTEXT_ATTR_FONT_FACE 0x0004
53#define wxTEXT_ATTR_FONT_SIZE 0x0008
54#define wxTEXT_ATTR_FONT_WEIGHT 0x0010
55#define wxTEXT_ATTR_FONT_ITALIC 0x0020
56#define wxTEXT_ATTR_FONT_UNDERLINE 0x0040
57#define wxTEXT_ATTR_FONT \
58 wxTEXT_ATTR_FONT_FACE | wxTEXT_ATTR_FONT_SIZE | wxTEXT_ATTR_FONT_WEIGHT \
59| wxTEXT_ATTR_FONT_ITALIC | wxTEXT_ATTR_FONT_UNDERLINE
60#define wxTEXT_ATTR_ALIGNMENT 0x0080
61#define wxTEXT_ATTR_LEFT_INDENT 0x0100
62#define wxTEXT_ATTR_RIGHT_INDENT 0x0200
63#define wxTEXT_ATTR_TABS 0x0400
64
65// Extra formatting flags not in wxTextAttr
66
67#define wxTEXT_ATTR_PARA_SPACING_AFTER 0x00000800
68#define wxTEXT_ATTR_PARA_SPACING_BEFORE 0x00001000
69#define wxTEXT_ATTR_LINE_SPACING 0x00002000
70#define wxTEXT_ATTR_CHARACTER_STYLE_NAME 0x00004000
71#define wxTEXT_ATTR_PARAGRAPH_STYLE_NAME 0x00008000
d2d0adc7
JS
72#define wxTEXT_ATTR_LIST_STYLE_NAME 0x00010000
73#define wxTEXT_ATTR_BULLET_STYLE 0x00020000
74#define wxTEXT_ATTR_BULLET_NUMBER 0x00040000
75#define wxTEXT_ATTR_BULLET_TEXT 0x00080000
76#define wxTEXT_ATTR_BULLET_NAME 0x00100000
77#define wxTEXT_ATTR_URL 0x00200000
36f01cc7 78#define wxTEXT_ATTR_PAGE_BREAK 0x00400000
5f35b46a
JS
79\end{verbatim}
80}
81
82The following styles can be passed to wxRichTextAttr::SetBulletStyle:
83
84{\small
85\begin{verbatim}
d2d0adc7
JS
86#define wxTEXT_ATTR_BULLET_STYLE_NONE 0x00000000
87#define wxTEXT_ATTR_BULLET_STYLE_ARABIC 0x00000001
88#define wxTEXT_ATTR_BULLET_STYLE_LETTERS_UPPER 0x00000002
89#define wxTEXT_ATTR_BULLET_STYLE_LETTERS_LOWER 0x00000004
90#define wxTEXT_ATTR_BULLET_STYLE_ROMAN_UPPER 0x00000008
91#define wxTEXT_ATTR_BULLET_STYLE_ROMAN_LOWER 0x00000010
92#define wxTEXT_ATTR_BULLET_STYLE_SYMBOL 0x00000020
93#define wxTEXT_ATTR_BULLET_STYLE_BITMAP 0x00000040
94#define wxTEXT_ATTR_BULLET_STYLE_PARENTHESES 0x00000080
95#define wxTEXT_ATTR_BULLET_STYLE_PERIOD 0x00000100
96#define wxTEXT_ATTR_BULLET_STYLE_STANDARD 0x00000200
97#define wxTEXT_ATTR_BULLET_STYLE_RIGHT_PARENTHESIS 0x00000400
98#define wxTEXT_ATTR_BULLET_STYLE_OUTLINE 0x00000800
99#define wxTEXT_ATTR_BULLET_STYLE_ALIGN_LEFT 0x00000000
100#define wxTEXT_ATTR_BULLET_STYLE_ALIGN_RIGHT 0x00001000
101#define wxTEXT_ATTR_BULLET_STYLE_ALIGN_CENTRE 0x00002000
5f35b46a
JS
102\end{verbatim}
103}
104
105The following constants can be passed to wxRichTextAttr::SetLineSpacing:
106
107{\small
108\begin{verbatim}
109#define wxTEXT_ATTR_LINE_SPACING_NORMAL 10
110#define wxTEXT_ATTR_LINE_SPACING_HALF 15
111#define wxTEXT_ATTR_LINE_SPACING_TWICE 20
112\end{verbatim}
113}
114
115\wxheading{See also}
116
117\helpref{wxTextAttr}{wxtextattr}, \helpref{wxTextAttrEx}{wxtextattrex}, \helpref{wxRichTextCtrl}{wxrichtextctrl}
118
119\latexignore{\rtfignore{\wxheading{Members}}}
120
121\membersection{wxRichTextAttr::wxRichTextAttr}\label{wxrichtextattrwxrichtextattr}
122
123\func{}{wxRichTextAttr}{\void}
124
125\func{}{wxRichTextAttr}{\param{const wxColour\& }{colText}, \param{const wxColour\& }{colBack = wxNullColour}, \param{wxTextAttrAlignment }{alignment = wxTEXT\_ALIGNMENT\_DEFAULT}}
126
127\func{}{wxRichTextAttr}{\param{const wxTextAttrEx\& }{attr}}
128
129Constructors.
130
131\membersection{wxRichTextAttr::CopyTo}\label{wxrichtextattrcopyto}
132
133\constfunc{void}{CopyTo}{\param{wxTextAttrEx\& }{attr}}
134
135Copies the wxRichTextAttr attributes to a \helpref{wxTextAttrEx}{wxtextattrex} object.
136
137\membersection{wxRichTextAttr::CreateFont}\label{wxrichtextattrcreatefont}
138
139\constfunc{wxFont}{CreateFont}{\void}
140
141Creates a font from the font attributes.
142
143\membersection{wxRichTextAttr::GetAlignment}\label{wxrichtextattrgetalignment}
144
145\constfunc{wxTextAttrAlignment}{GetAlignment}{\void}
146
147Returns the alignment flags.
148See \helpref{wxRichTextAttr::SetAlignment}{wxrichtextattrsetalignment} for a list of available styles.
149
150\membersection{wxRichTextAttr::GetBackgroundColour}\label{wxrichtextattrgetbackgroundcolour}
151
152\constfunc{const wxColour\&}{GetBackgroundColour}{\void}
153
154Returns the background colour.
155
62a268cc
JS
156\membersection{wxRichTextAttr::GetBulletFont}\label{wxrichtextattrgetbulletfont}
157
158\constfunc{const wxString\&}{GetBulletFont}{\void}
159
160Returns a string containing the name of the font associated with the bullet symbol.
161Only valid for attributes with wxTEXT\_ATTR\_BULLET\_SYMBOL.
162
d2d0adc7
JS
163\membersection{wxRichTextAttr::GetBulletName}\label{wxrichtextattrgetbulletname}
164
165\constfunc{const wxString\&}{GetBulletName}{\void}
166
167Returns the standard bullet name, applicable if the bullet style is wxTEXT\_ATTR\_BULLET\_STYLE\_STANDARD.
168Currently the following standard bullet names are supported:
169
170\begin{itemize}\itemsep=0pt
171\item {\tt standard/circle}
172\item {\tt standard/square}
173\item {\tt standard/diamond}
174\item {\tt standard/triangle}
175\end{itemize}
176
177If you wish your application to support further bullet graphics, you can derive a
178class from wxRichTextRenderer or wxRichTextStdRenderer, override {\tt DrawStandardBullet} and {\tt EnumerateStandardBulletNames}, and
179set an instance of the class using \helpref{wxRichTextBuffer::SetRenderer}{wxrichtextbuffersetrenderer}.
180
5f35b46a
JS
181\membersection{wxRichTextAttr::GetBulletNumber}\label{wxrichtextattrgetbulletnumber}
182
183\constfunc{int}{GetBulletNumber}{\void}
184
185Returns the bullet number.
186
187\membersection{wxRichTextAttr::GetBulletStyle}\label{wxrichtextattrgetbulletstyle}
188
189\constfunc{int}{GetBulletStyle}{\void}
190
191Returns the bullet style.
192See \helpref{wxRichTextAttr::SetBulletStyle}{wxrichtextattrsetbulletstyle} for a list of available styles.
193
d2d0adc7 194\membersection{wxRichTextAttr::GetBulletText}\label{wxrichtextattrgetbullettext}
5f35b46a 195
d2d0adc7 196\constfunc{const wxString\&}{GetBulletText}{\void}
5f35b46a 197
d2d0adc7 198Returns the bullet text, which could be a symbol, or (for example) cached outline text.
5f35b46a
JS
199
200\membersection{wxRichTextAttr::GetCharacterStyleName}\label{wxrichtextattrgetcharacterstylename}
201
202\constfunc{const wxString\&}{GetCharacterStyleName}{\void}
203
204Returns the name of the character style.
205
206\membersection{wxRichTextAttr::GetFlags}\label{wxrichtextattrgetflags}
207
208\constfunc{long}{GetFlags}{\void}
209
210Returns flags indicating which attributes are applicable.
211See \helpref{wxRichTextAttr::SetFlags}{wxrichtextattrsetflags} for a list of available flags.
212
213\membersection{wxRichTextAttr::GetFontAttributes}\label{wxrichtextattrgetfontattributes}
214
215\func{bool}{GetFontAttributes}{\param{const wxFont\& }{font}}
216
217Sets the font attributes from the given font.
218
219\membersection{wxRichTextAttr::GetFontFaceName}\label{wxrichtextattrgetfontfacename}
220
221\constfunc{const wxString\&}{GetFontFaceName}{\void}
222
223Returns the font face name.
224
225\membersection{wxRichTextAttr::GetFontSize}\label{wxrichtextattrgetfontsize}
226
227\constfunc{int}{GetFontSize}{\void}
228
229Returns the font size in points.
230
231\membersection{wxRichTextAttr::GetFontStyle}\label{wxrichtextattrgetfontstyle}
232
233\constfunc{int}{GetFontStyle}{\void}
234
235Returns the font style.
236
237\membersection{wxRichTextAttr::GetFontUnderlined}\label{wxrichtextattrgetfontunderlined}
238
239\constfunc{bool}{GetFontUnderlined}{\void}
240
241Returns \true if the font is underlined.
242
243\membersection{wxRichTextAttr::GetFontWeight}\label{wxrichtextattrgetfontweight}
244
245\constfunc{int}{GetFontWeight}{\void}
246
247Returns the font weight.
248
249\membersection{wxRichTextAttr::GetLeftIndent}\label{wxrichtextattrgetleftindent}
250
251\constfunc{long}{GetLeftIndent}{\void}
252
253Returns the left indent in tenths of a millimetre.
254
255\membersection{wxRichTextAttr::GetLeftSubIndent}\label{wxrichtextattrgetleftsubindent}
256
257\constfunc{long}{GetLeftSubIndent}{\void}
258
259Returns the left sub-indent in tenths of a millimetre.
260
261\membersection{wxRichTextAttr::GetLineSpacing}\label{wxrichtextattrgetlinespacing}
262
263\constfunc{int}{GetLineSpacing}{\void}
264
265Returns the line spacing value, one of wxTEXT\_ATTR\_LINE\_SPACING\_NORMAL,
266wxTEXT\_ATTR\_LINE\_SPACING\_HALF, and wxTEXT\_ATTR\_LINE\_SPACING\_TWICE.
267
d2d0adc7
JS
268\membersection{wxRichTextAttr::GetListStyleName}\label{wxrichtextattrgetliststylename}
269
270\constfunc{const wxString\&}{GetListStyleName}{\void}
271
272Returns the name of the list style.
273
5f35b46a
JS
274\membersection{wxRichTextAttr::GetParagraphSpacingAfter}\label{wxrichtextattrgetparagraphspacingafter}
275
276\constfunc{int}{GetParagraphSpacingAfter}{\void}
277
278Returns the space in tenths of a millimeter after the paragraph.
279
280\membersection{wxRichTextAttr::GetParagraphSpacingBefore}\label{wxrichtextattrgetparagraphspacingbefore}
281
282\constfunc{int}{GetParagraphSpacingBefore}{\void}
283
284Returns the space in tenths of a millimeter before the paragraph.
285
286\membersection{wxRichTextAttr::GetParagraphStyleName}\label{wxrichtextattrgetparagraphstylename}
287
288\constfunc{const wxString\&}{GetParagraphStyleName}{\void}
289
290Returns the name of the paragraph style.
291
292\membersection{wxRichTextAttr::GetRightIndent}\label{wxrichtextattrgetrightindent}
293
294\constfunc{long}{GetRightIndent}{\void}
295
296Returns the right indent in tenths of a millimeter.
297
298\membersection{wxRichTextAttr::GetTabs}\label{wxrichtextattrgettabs}
299
300\constfunc{const wxArrayInt\&}{GetTabs}{\void}
301
302Returns an array of tab stops, each expressed in tenths of a millimeter. Each stop
303is measured from the left margin and therefore each value must be larger than the last.
304
305\membersection{wxRichTextAttr::GetTextColour}\label{wxrichtextattrgettextcolour}
306
307\constfunc{const wxColour\&}{GetTextColour}{\void}
308
309Returns the text foreground colour.
310
d2d0adc7
JS
311\membersection{wxRichTextAttr::GetURL}\label{wxrichtextattrgeturl}
312
313\constfunc{const wxString\&}{GetURL}{\void}
314
315Returns the URL for the content. Content with wxTEXT\_ATTR\_URL style
316causes wxRichTextCtrl to show a hand cursor over it, and wxRichTextCtrl generates
317a wxTextUrlEvent when the content is clicked.
318
5f35b46a
JS
319\membersection{wxRichTextAttr::HasAlignment}\label{wxrichtextattrhasalignment}
320
321\constfunc{bool}{HasAlignment}{\void}
322
323Returns \true if the attribute object specifies alignment.
324
325\membersection{wxRichTextAttr::HasBackgroundColour}\label{wxrichtextattrhasbackgroundcolour}
326
327\constfunc{bool}{HasBackgroundColour}{\void}
328
329Returns \true if the attribute object specifies a background colour.
330
d2d0adc7
JS
331\membersection{wxRichTextAttr::HasBulletName}\label{wxrichtextattrhasbulletname}
332
333\constfunc{bool}{HasBulletName}{\void}
334
335Returns \true if the attribute object specifies a standard bullet name.
336
5f35b46a
JS
337\membersection{wxRichTextAttr::HasBulletNumber}\label{wxrichtextattrhasbulletnumber}
338
339\constfunc{bool}{HasBulletNumber}{\void}
340
341Returns \true if the attribute object specifies a bullet number.
342
343\membersection{wxRichTextAttr::HasBulletStyle}\label{wxrichtextattrhasbulletstyle}
344
345\constfunc{bool}{HasBulletStyle}{\void}
346
347Returns \true if the attribute object specifies a bullet style.
348
d2d0adc7 349\membersection{wxRichTextAttr::HasBulletText}\label{wxrichtextattrhasbullettext}
5f35b46a 350
d2d0adc7 351\constfunc{bool}{HasBulletText}{\void}
5f35b46a 352
d2d0adc7 353Returns \true if the attribute object specifies bullet text (usually specifying a symbol).
5f35b46a
JS
354
355\membersection{wxRichTextAttr::HasCharacterStyleName}\label{wxrichtextattrhascharacterstylename}
356
357\constfunc{bool}{HasCharacterStyleName}{\void}
358
359Returns \true if the attribute object specifies a character style name.
360
361\membersection{wxRichTextAttr::HasFaceName}\label{wxrichtextattrhasfacename}
362
363\constfunc{bool}{HasFaceName}{\void}
364
365Returns \true if the attribute object specifies a font face name.
366
367\membersection{wxRichTextAttr::HasFlag}\label{wxrichtextattrhasflag}
368
369\constfunc{bool}{HasFlag}{\param{long }{flag}}
370
371Returns \true if the {\it flag} is present in the attribute object's flag bitlist.
372
373\membersection{wxRichTextAttr::HasFont}\label{wxrichtextattrhasfont}
374
375\constfunc{bool}{HasFont}{\void}
376
377Returns \true if the attribute object specifies any font attributes.
378
379\membersection{wxRichTextAttr::HasItalic}\label{wxrichtextattrhasitalic}
380
381\constfunc{bool}{HasItalic}{\void}
382
383Returns \true if the attribute object specifies italic style.
384
385\membersection{wxRichTextAttr::HasLeftIndent}\label{wxrichtextattrhasleftindent}
386
387\constfunc{bool}{HasLeftIndent}{\void}
388
389Returns \true if the attribute object specifies a left indent.
390
391\membersection{wxRichTextAttr::HasLineSpacing}\label{wxrichtextattrhaslinespacing}
392
393\constfunc{bool}{HasLineSpacing}{\void}
394
395Returns \true if the attribute object specifies line spacing.
396
d2d0adc7
JS
397\membersection{wxRichTextAttr::HasListStyleName}\label{wxrichtextattrhasliststylename}
398
399\constfunc{bool}{HasListStyleName}{\void}
400
401Returns \true if the attribute object specifies a list style name.
402
36f01cc7
JS
403\membersection{wxRichTextAttr::HasPageBreak}\label{wxrichtextattrhaspagebreak}
404
405\constfunc{bool}{HasPageBreak}{\void}
406
407Returns \true if the attribute object specifies a page break before this paragraph.
408
5f35b46a
JS
409\membersection{wxRichTextAttr::HasParagraphSpacingAfter}\label{wxrichtextattrhasparagraphspacingafter}
410
411\constfunc{bool}{HasParagraphSpacingAfter}{\void}
412
413Returns \true if the attribute object specifies spacing after a paragraph.
414
415\membersection{wxRichTextAttr::HasParagraphSpacingBefore}\label{wxrichtextattrhasparagraphspacingbefore}
416
417\constfunc{bool}{HasParagraphSpacingBefore}{\void}
418
419Returns \true if the attribute object specifies spacing before a paragraph.
420
421\membersection{wxRichTextAttr::HasParagraphStyleName}\label{wxrichtextattrhasparagraphstylename}
422
423\constfunc{bool}{HasParagraphStyleName}{\void}
424
425Returns \true if the attribute object specifies a paragraph style name.
426
427\membersection{wxRichTextAttr::HasRightIndent}\label{wxrichtextattrhasrightindent}
428
429\constfunc{bool}{HasRightIndent}{\void}
430
431Returns \true if the attribute object specifies a right indent.
432
433\membersection{wxRichTextAttr::HasSize}\label{wxrichtextattrhassize}
434
435\constfunc{bool}{HasSize}{\void}
436
437Returns \true if the attribute object specifies a font point size.
438
439\membersection{wxRichTextAttr::HasTabs}\label{wxrichtextattrhastabs}
440
441\constfunc{bool}{HasTabs}{\void}
442
443Returns \true if the attribute object specifies tab stops.
444
445\membersection{wxRichTextAttr::HasTextColour}\label{wxrichtextattrhastextcolour}
446
447\constfunc{bool}{HasTextColour}{\void}
448
449Returns \true if the attribute object specifies a text foreground colour.
450
451\membersection{wxRichTextAttr::HasUnderlined}\label{wxrichtextattrhasunderlined}
452
453\constfunc{bool}{HasUnderlined}{\void}
454
455Returns \true if the attribute object specifies either underlining or no underlining.
456
457\membersection{wxRichTextAttr::HasWeight}\label{wxrichtextattrhasweight}
458
459\constfunc{bool}{HasWeight}{\void}
460
461Returns \true if the attribute object specifies font weight (bold, light or normal).
462
463\membersection{wxRichTextAttr::Init}\label{wxrichtextattrinit}
464
465\func{void}{Init}{\void}
466
467Initialise the object.
468
469\membersection{wxRichTextAttr::IsCharacterStyle}\label{wxrichtextattrischaracterstyle}
470
471\constfunc{bool}{IsCharacterStyle}{\void}
472
473Returns \true if the object represents a character style, that is,
474the flags specify a font or a text background or foreground colour.
475
476\membersection{wxRichTextAttr::IsDefault}\label{wxrichtextattrisdefault}
477
478\constfunc{bool}{IsDefault}{\void}
479
480Returns \false if we have any attributes set, \true otherwise.
481
482\membersection{wxRichTextAttr::IsParagraphStyle}\label{wxrichtextattrisparagraphstyle}
483
484\constfunc{bool}{IsParagraphStyle}{\void}
485
486Returns \true if the object represents a paragraph style, that is,
487the flags specify alignment, indentation, tabs, paragraph spacing, or
488bullet style.
489
490\membersection{wxRichTextAttr::SetAlignment}\label{wxrichtextattrsetalignment}
491
492\func{void}{SetAlignment}{\param{wxTextAttrAlignment }{alignment}}
493
494Sets the paragraph alignment. These are the possible values for {\it alignment}:
495
496{\small
497\begin{verbatim}
498enum wxTextAttrAlignment
499{
500 wxTEXT_ALIGNMENT_DEFAULT,
501 wxTEXT_ALIGNMENT_LEFT,
502 wxTEXT_ALIGNMENT_CENTRE,
503 wxTEXT_ALIGNMENT_CENTER = wxTEXT_ALIGNMENT_CENTRE,
504 wxTEXT_ALIGNMENT_RIGHT,
505 wxTEXT_ALIGNMENT_JUSTIFIED
506};
507\end{verbatim}
508}
509
510\membersection{wxRichTextAttr::SetBackgroundColour}\label{wxrichtextattrsetbackgroundcolour}
511
512\func{void}{SetBackgroundColour}{\param{const wxColour\& }{colBack}}
513
514Sets the background colour.
515
62a268cc
JS
516\membersection{wxRichTextAttr::SetBulletFont}\label{wxrichtextattrsetbulletfont}
517
518\func{void}{SetBulletFont}{\param{const wxString\& }{font}}
519
520Sets the name of the font associated with the bullet symbol.
521Only valid for attributes with wxTEXT\_ATTR\_BULLET\_SYMBOL.
522
d2d0adc7
JS
523\membersection{wxRichTextAttr::SetBulletName}\label{wxrichtextattrsetbulletname}
524
525\func{void}{SetBulletName}{\param{const wxString\& }{name}}
526
527Sets the standard bullet name, applicable if the bullet style is wxTEXT\_ATTR\_BULLET\_STYLE\_STANDARD.
528See \helpref{wxRichTextAttr::GetBulletName}{wxrichtextattrgetbulletname} for a list
529of supported names, and how to expand the range of supported types.
530
5f35b46a
JS
531\membersection{wxRichTextAttr::SetBulletNumber}\label{wxrichtextattrsetbulletnumber}
532
533\func{void}{SetBulletNumber}{\param{int }{n}}
534
535Sets the bullet number.
536
537\membersection{wxRichTextAttr::SetBulletStyle}\label{wxrichtextattrsetbulletstyle}
538
539\func{void}{SetBulletStyle}{\param{int }{style}}
540
541Sets the bullet style. The following styles can be passed:
542
543{\small
544\begin{verbatim}
d2d0adc7
JS
545#define wxTEXT_ATTR_BULLET_STYLE_NONE 0x00000000
546#define wxTEXT_ATTR_BULLET_STYLE_ARABIC 0x00000001
547#define wxTEXT_ATTR_BULLET_STYLE_LETTERS_UPPER 0x00000002
548#define wxTEXT_ATTR_BULLET_STYLE_LETTERS_LOWER 0x00000004
549#define wxTEXT_ATTR_BULLET_STYLE_ROMAN_UPPER 0x00000008
550#define wxTEXT_ATTR_BULLET_STYLE_ROMAN_LOWER 0x00000010
551#define wxTEXT_ATTR_BULLET_STYLE_SYMBOL 0x00000020
552#define wxTEXT_ATTR_BULLET_STYLE_BITMAP 0x00000040
553#define wxTEXT_ATTR_BULLET_STYLE_PARENTHESES 0x00000080
554#define wxTEXT_ATTR_BULLET_STYLE_PERIOD 0x00000100
555#define wxTEXT_ATTR_BULLET_STYLE_STANDARD 0x00000200
556#define wxTEXT_ATTR_BULLET_STYLE_RIGHT_PARENTHESIS 0x00000400
557#define wxTEXT_ATTR_BULLET_STYLE_OUTLINE 0x00000800
558#define wxTEXT_ATTR_BULLET_STYLE_ALIGN_LEFT 0x00000000
559#define wxTEXT_ATTR_BULLET_STYLE_ALIGN_RIGHT 0x00001000
560#define wxTEXT_ATTR_BULLET_STYLE_ALIGN_CENTRE 0x00002000
5f35b46a
JS
561\end{verbatim}
562}
563
d2d0adc7 564\membersection{wxRichTextAttr::SetBulletText}\label{wxrichtextattrsetbullettext}
5f35b46a 565
d2d0adc7 566\func{void}{SetBulletText}{\param{const wxString& }{text}}
5f35b46a 567
d2d0adc7 568Sets the bullet text, which could be a symbol, or (for example) cached outline text.
5f35b46a
JS
569
570\membersection{wxRichTextAttr::SetCharacterStyleName}\label{wxrichtextattrsetcharacterstylename}
571
572\func{void}{SetCharacterStyleName}{\param{const wxString\& }{name}}
573
574Sets the character style name.
575
576\membersection{wxRichTextAttr::SetFlags}\label{wxrichtextattrsetflags}
577
578\func{void}{SetFlags}{\param{long }{flags}}
579
580Sets the flags determining which styles are being specified. The following
581flags can be passed in a bitlist:
582
583{\small
584\begin{verbatim}
585// Standard wxTextAttr constants
586
587#define wxTEXT_ATTR_TEXT_COLOUR 0x0001
588#define wxTEXT_ATTR_BACKGROUND_COLOUR 0x0002
589#define wxTEXT_ATTR_FONT_FACE 0x0004
590#define wxTEXT_ATTR_FONT_SIZE 0x0008
591#define wxTEXT_ATTR_FONT_WEIGHT 0x0010
592#define wxTEXT_ATTR_FONT_ITALIC 0x0020
593#define wxTEXT_ATTR_FONT_UNDERLINE 0x0040
594#define wxTEXT_ATTR_FONT \
595 wxTEXT_ATTR_FONT_FACE | wxTEXT_ATTR_FONT_SIZE | wxTEXT_ATTR_FONT_WEIGHT \
596| wxTEXT_ATTR_FONT_ITALIC | wxTEXT_ATTR_FONT_UNDERLINE
597#define wxTEXT_ATTR_ALIGNMENT 0x0080
598#define wxTEXT_ATTR_LEFT_INDENT 0x0100
599#define wxTEXT_ATTR_RIGHT_INDENT 0x0200
600#define wxTEXT_ATTR_TABS 0x0400
601
602// Extra formatting flags not in wxTextAttr
603
604#define wxTEXT_ATTR_PARA_SPACING_AFTER 0x00000800
605#define wxTEXT_ATTR_PARA_SPACING_BEFORE 0x00001000
606#define wxTEXT_ATTR_LINE_SPACING 0x00002000
607#define wxTEXT_ATTR_CHARACTER_STYLE_NAME 0x00004000
608#define wxTEXT_ATTR_PARAGRAPH_STYLE_NAME 0x00008000
d2d0adc7
JS
609#define wxTEXT_ATTR_LIST_STYLE_NAME 0x00010000
610#define wxTEXT_ATTR_BULLET_STYLE 0x00020000
611#define wxTEXT_ATTR_BULLET_NUMBER 0x00040000
612#define wxTEXT_ATTR_BULLET_TEXT 0x00080000
613#define wxTEXT_ATTR_BULLET_NAME 0x00100000
614#define wxTEXT_ATTR_URL 0x00200000
5f35b46a
JS
615\end{verbatim}
616}
617
618\membersection{wxRichTextAttr::SetFontFaceName}\label{wxrichtextattrsetfontfacename}
619
620\func{void}{SetFontFaceName}{\param{const wxString\& }{faceName}}
621
622Sets the paragraph alignment.
623
624\membersection{wxRichTextAttr::SetFontSize}\label{wxrichtextattrsetfontsize}
625
626\func{void}{SetFontSize}{\param{int }{pointSize}}
627
628Sets the font size in points.
629
630\membersection{wxRichTextAttr::SetFontStyle}\label{wxrichtextattrsetfontstyle}
631
632\func{void}{SetFontStyle}{\param{int }{fontStyle}}
633
634Sets the font style (normal, italic or slanted).
635
636\membersection{wxRichTextAttr::SetFontUnderlined}\label{wxrichtextattrsetfontunderlined}
637
638\func{void}{SetFontUnderlined}{\param{bool }{underlined}}
639
640Sets the font underlining.
641
642\membersection{wxRichTextAttr::SetFontWeight}\label{wxrichtextattrsetfontweight}
643
644\func{void}{SetFontWeight}{\param{int }{fontWeight}}
645
646Sets the font weight.
647
648\membersection{wxRichTextAttr::SetLeftIndent}\label{wxrichtextattrsetleftindent}
649
650\func{void}{SetLeftIndent}{\param{int }{indent}, \param{int }{subIndent = 0}}
651
652Sets the left indent and left subindent in tenths of a millimetre.
653
654The sub-indent is an offset from the left of the paragraph, and is used for all but the
655first line in a paragraph. A positive value will cause the first line to appear to the left
656of the subsequent lines, and a negative value will cause the first line to be indented
657relative to the subsequent lines.
658
659wxRichTextBuffer uses indentation to render a bulleted item. The left indent is the distance between
660the margin and the bullet. The content of the paragraph, including the first line, starts
661at leftMargin + leftSubIndent. So the distance between the left edge of the bullet and the
662left of the actual paragraph is leftSubIndent.
663
664\membersection{wxRichTextAttr::SetLineSpacing}\label{wxrichtextattrsetlinespacing}
665
666\func{void}{SetLineSpacing}{\param{int }{spacing}}
667
668Sets the line spacing. {\it spacing} is a multiple, where 10 means single-spacing,
66915 means 1.5 spacing, and 20 means double spacing. The following constants are
670defined for convenience:
671
672{\small
673\begin{verbatim}
674#define wxTEXT_ATTR_LINE_SPACING_NORMAL 10
675#define wxTEXT_ATTR_LINE_SPACING_HALF 15
676#define wxTEXT_ATTR_LINE_SPACING_TWICE 20
677\end{verbatim}
678}
679
d2d0adc7
JS
680\membersection{wxRichTextAttr::SetListStyleName}\label{wxrichtextattrsetliststylename}
681
682\func{void}{SetListStyleName}{\param{const wxString\& }{name}}
683
684Sets the list style name.
685
36f01cc7
JS
686\membersection{wxRichTextAttr::SetPageBreak}\label{wxrichtextattrsetpagebreak}
687
688\func{void}{SetPageBreak}{\param{bool}{ pageBreak = true}}
689
690Specifies a page break before this paragraph.
691
5f35b46a
JS
692\membersection{wxRichTextAttr::SetParagraphSpacingAfter}\label{wxrichtextattrsetparagraphspacingafter}
693
694\func{void}{SetParagraphSpacingAfter}{\param{int }{spacing}}
695
696Sets the spacing after a paragraph, in tenths of a millimetre.
697
698\membersection{wxRichTextAttr::SetParagraphSpacingBefore}\label{wxrichtextattrsetparagraphspacingbefore}
699
700\func{void}{SetParagraphSpacingBefore}{\param{int }{spacing}}
701
702Sets the spacing before a paragraph, in tenths of a millimetre.
703
704\membersection{wxRichTextAttr::SetParagraphStyleName}\label{wxrichtextattrsetparagraphstylename}
705
706\func{void}{SetParagraphStyleName}{\param{const wxString\& }{name}}
707
708Sets the name of the paragraph style.
709
710\membersection{wxRichTextAttr::SetRightIndent}\label{wxrichtextattrsetrightindent}
711
712\func{void}{SetRightIndent}{\param{int }{indent}}
713
714Sets the right indent in tenths of a millimetre.
715
716\membersection{wxRichTextAttr::SetTabs}\label{wxrichtextattrsettabs}
717
718\func{void}{SetTabs}{\param{const wxArrayInt\& }{tabs}}
719
720Sets the tab stops, expressed in tenths of a millimetre.
721Each stop is measured from the left margin and therefore each value must be larger than the last.
722
723\membersection{wxRichTextAttr::SetTextColour}\label{wxrichtextattrsettextcolour}
724
725\func{void}{SetTextColour}{\param{const wxColour\& }{colText}}
726
727Sets the text foreground colout.
728
d2d0adc7
JS
729\membersection{wxRichTextAttr::SetURL}\label{wxrichtextattrseturl}
730
731\func{void}{SetURL}{\param{const wxString\& }{url}}
732
733Sets the URL for the content. Sets the wxTEXT\_ATTR\_URL style; content with this style
734causes wxRichTextCtrl to show a hand cursor over it, and wxRichTextCtrl generates
735a wxTextUrlEvent when the content is clicked.
736
5f35b46a
JS
737\membersection{wxRichTextAttr::operator=}\label{wxrichtextattroperatorassign}
738
739\func{void operator}{operator=}{\param{const wxTextAttrEx\& }{attr}}
740
741Assignment from a \helpref{wxTextAttrEx}{wxtextattr} object.
742
743\func{void operator}{operator=}{\param{const wxRichTextAttr\& }{attr}}
744
745Assignment from a \helpref{wxRichTextAttr}{wxrichtextattr} object.
746
747\membersection{wxRichTextAttr::wxTextAttrEx}\label{wxrichtextattrwxtextattrex}
748
749\constfunc{operator}{wxTextAttrEx}{\void}
750
751Makes a \helpref{wxTextAttrEx}{wxtextattrex} object from this object.
62a268cc 752