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