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