1 \section{\class{wxRichTextAttr
}}\label{wxrichtextattr
}
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.
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.
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.
15 \wxheading{Derived from
}
19 \wxheading{Include files
}
21 <wx/richtext/richtextbuffer.h>
25 The following values can be passed to SetAlignment to determine
30 enum wxTextAttrAlignment
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
42 These values are passed in a bitlist to SetFlags to determine
43 what attributes will be considered when setting the attributes
48 // Standard wxTextAttr constants
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
65 // Extra formatting flags not in wxTextAttr
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
78 The following styles can be passed to wxRichTextAttr::SetBulletStyle:
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
95 The following constants can be passed to wxRichTextAttr::SetLineSpacing:
99 #define wxTEXT_ATTR_LINE_SPACING_NORMAL
10
100 #define wxTEXT_ATTR_LINE_SPACING_HALF
15
101 #define wxTEXT_ATTR_LINE_SPACING_TWICE
20
107 \helpref{wxTextAttr
}{wxtextattr
},
\helpref{wxTextAttrEx
}{wxtextattrex
},
\helpref{wxRichTextCtrl
}{wxrichtextctrl
}
109 \latexignore{\rtfignore{\wxheading{Members
}}}
111 \membersection{wxRichTextAttr::wxRichTextAttr
}\label{wxrichtextattrwxrichtextattr
}
113 \func{}{wxRichTextAttr
}{\void}
115 \func{}{wxRichTextAttr
}{\param{const wxColour\&
}{colText
},
\param{const wxColour\&
}{colBack = wxNullColour
},
\param{wxTextAttrAlignment
}{alignment = wxTEXT
\_ALIGNMENT\_DEFAULT}}
117 \func{}{wxRichTextAttr
}{\param{const wxTextAttrEx\&
}{attr
}}
121 \membersection{wxRichTextAttr::CopyTo
}\label{wxrichtextattrcopyto
}
123 \constfunc{void
}{CopyTo
}{\param{wxTextAttrEx\&
}{attr
}}
125 Copies the wxRichTextAttr attributes to a
\helpref{wxTextAttrEx
}{wxtextattrex
} object.
127 \membersection{wxRichTextAttr::CreateFont
}\label{wxrichtextattrcreatefont
}
129 \constfunc{wxFont
}{CreateFont
}{\void}
131 Creates a font from the font attributes.
133 \membersection{wxRichTextAttr::GetAlignment
}\label{wxrichtextattrgetalignment
}
135 \constfunc{wxTextAttrAlignment
}{GetAlignment
}{\void}
137 Returns the alignment flags.
138 See
\helpref{wxRichTextAttr::SetAlignment
}{wxrichtextattrsetalignment
} for a list of available styles.
140 \membersection{wxRichTextAttr::GetBackgroundColour
}\label{wxrichtextattrgetbackgroundcolour
}
142 \constfunc{const wxColour\&
}{GetBackgroundColour
}{\void}
144 Returns the background colour.
146 \membersection{wxRichTextAttr::GetBulletNumber
}\label{wxrichtextattrgetbulletnumber
}
148 \constfunc{int
}{GetBulletNumber
}{\void}
150 Returns the bullet number.
152 \membersection{wxRichTextAttr::GetBulletStyle
}\label{wxrichtextattrgetbulletstyle
}
154 \constfunc{int
}{GetBulletStyle
}{\void}
156 Returns the bullet style.
157 See
\helpref{wxRichTextAttr::SetBulletStyle
}{wxrichtextattrsetbulletstyle
} for a list of available styles.
159 \membersection{wxRichTextAttr::GetBulletSymbol
}\label{wxrichtextattrgetbulletsymbol
}
161 \constfunc{wxChar
}{GetBulletSymbol
}{\void}
163 Returns the bullet symbol, a character.
165 \membersection{wxRichTextAttr::GetCharacterStyleName
}\label{wxrichtextattrgetcharacterstylename
}
167 \constfunc{const wxString\&
}{GetCharacterStyleName
}{\void}
169 Returns the name of the character style.
171 \membersection{wxRichTextAttr::GetFlags
}\label{wxrichtextattrgetflags
}
173 \constfunc{long
}{GetFlags
}{\void}
175 Returns flags indicating which attributes are applicable.
176 See
\helpref{wxRichTextAttr::SetFlags
}{wxrichtextattrsetflags
} for a list of available flags.
178 \membersection{wxRichTextAttr::GetFontAttributes
}\label{wxrichtextattrgetfontattributes
}
180 \func{bool
}{GetFontAttributes
}{\param{const wxFont\&
}{font
}}
182 Sets the font attributes from the given font.
184 \membersection{wxRichTextAttr::GetFontFaceName
}\label{wxrichtextattrgetfontfacename
}
186 \constfunc{const wxString\&
}{GetFontFaceName
}{\void}
188 Returns the font face name.
190 \membersection{wxRichTextAttr::GetFontSize
}\label{wxrichtextattrgetfontsize
}
192 \constfunc{int
}{GetFontSize
}{\void}
194 Returns the font size in points.
196 \membersection{wxRichTextAttr::GetFontStyle
}\label{wxrichtextattrgetfontstyle
}
198 \constfunc{int
}{GetFontStyle
}{\void}
200 Returns the font style.
202 \membersection{wxRichTextAttr::GetFontUnderlined
}\label{wxrichtextattrgetfontunderlined
}
204 \constfunc{bool
}{GetFontUnderlined
}{\void}
206 Returns
\true if the font is underlined.
208 \membersection{wxRichTextAttr::GetFontWeight
}\label{wxrichtextattrgetfontweight
}
210 \constfunc{int
}{GetFontWeight
}{\void}
212 Returns the font weight.
214 \membersection{wxRichTextAttr::GetLeftIndent
}\label{wxrichtextattrgetleftindent
}
216 \constfunc{long
}{GetLeftIndent
}{\void}
218 Returns the left indent in tenths of a millimetre.
220 \membersection{wxRichTextAttr::GetLeftSubIndent
}\label{wxrichtextattrgetleftsubindent
}
222 \constfunc{long
}{GetLeftSubIndent
}{\void}
224 Returns the left sub-indent in tenths of a millimetre.
226 \membersection{wxRichTextAttr::GetLineSpacing
}\label{wxrichtextattrgetlinespacing
}
228 \constfunc{int
}{GetLineSpacing
}{\void}
230 Returns the line spacing value, one of wxTEXT
\_ATTR\_LINE\_SPACING\_NORMAL,
231 wxTEXT
\_ATTR\_LINE\_SPACING\_HALF, and wxTEXT
\_ATTR\_LINE\_SPACING\_TWICE.
233 \membersection{wxRichTextAttr::GetParagraphSpacingAfter
}\label{wxrichtextattrgetparagraphspacingafter
}
235 \constfunc{int
}{GetParagraphSpacingAfter
}{\void}
237 Returns the space in tenths of a millimeter after the paragraph.
239 \membersection{wxRichTextAttr::GetParagraphSpacingBefore
}\label{wxrichtextattrgetparagraphspacingbefore
}
241 \constfunc{int
}{GetParagraphSpacingBefore
}{\void}
243 Returns the space in tenths of a millimeter before the paragraph.
245 \membersection{wxRichTextAttr::GetParagraphStyleName
}\label{wxrichtextattrgetparagraphstylename
}
247 \constfunc{const wxString\&
}{GetParagraphStyleName
}{\void}
249 Returns the name of the paragraph style.
251 \membersection{wxRichTextAttr::GetRightIndent
}\label{wxrichtextattrgetrightindent
}
253 \constfunc{long
}{GetRightIndent
}{\void}
255 Returns the right indent in tenths of a millimeter.
257 \membersection{wxRichTextAttr::GetTabs
}\label{wxrichtextattrgettabs
}
259 \constfunc{const wxArrayInt\&
}{GetTabs
}{\void}
261 Returns an array of tab stops, each expressed in tenths of a millimeter. Each stop
262 is measured from the left margin and therefore each value must be larger than the last.
264 \membersection{wxRichTextAttr::GetTextColour
}\label{wxrichtextattrgettextcolour
}
266 \constfunc{const wxColour\&
}{GetTextColour
}{\void}
268 Returns the text foreground colour.
270 \membersection{wxRichTextAttr::HasAlignment
}\label{wxrichtextattrhasalignment
}
272 \constfunc{bool
}{HasAlignment
}{\void}
274 Returns
\true if the attribute object specifies alignment.
276 \membersection{wxRichTextAttr::HasBackgroundColour
}\label{wxrichtextattrhasbackgroundcolour
}
278 \constfunc{bool
}{HasBackgroundColour
}{\void}
280 Returns
\true if the attribute object specifies a background colour.
282 \membersection{wxRichTextAttr::HasBulletNumber
}\label{wxrichtextattrhasbulletnumber
}
284 \constfunc{bool
}{HasBulletNumber
}{\void}
286 Returns
\true if the attribute object specifies a bullet number.
288 \membersection{wxRichTextAttr::HasBulletStyle
}\label{wxrichtextattrhasbulletstyle
}
290 \constfunc{bool
}{HasBulletStyle
}{\void}
292 Returns
\true if the attribute object specifies a bullet style.
294 \membersection{wxRichTextAttr::HasBulletSymbol
}\label{wxrichtextattrhasbulletsymbol
}
296 \constfunc{bool
}{HasBulletSymbol
}{\void}
298 Returns
\true if the attribute object specifies a bullet symbol.
300 \membersection{wxRichTextAttr::HasCharacterStyleName
}\label{wxrichtextattrhascharacterstylename
}
302 \constfunc{bool
}{HasCharacterStyleName
}{\void}
304 Returns
\true if the attribute object specifies a character style name.
306 \membersection{wxRichTextAttr::HasFaceName
}\label{wxrichtextattrhasfacename
}
308 \constfunc{bool
}{HasFaceName
}{\void}
310 Returns
\true if the attribute object specifies a font face name.
312 \membersection{wxRichTextAttr::HasFlag
}\label{wxrichtextattrhasflag
}
314 \constfunc{bool
}{HasFlag
}{\param{long
}{flag
}}
316 Returns
\true if the
{\it flag
} is present in the attribute object's flag bitlist.
318 \membersection{wxRichTextAttr::HasFont
}\label{wxrichtextattrhasfont
}
320 \constfunc{bool
}{HasFont
}{\void}
322 Returns
\true if the attribute object specifies any font attributes.
324 \membersection{wxRichTextAttr::HasItalic
}\label{wxrichtextattrhasitalic
}
326 \constfunc{bool
}{HasItalic
}{\void}
328 Returns
\true if the attribute object specifies italic style.
330 \membersection{wxRichTextAttr::HasLeftIndent
}\label{wxrichtextattrhasleftindent
}
332 \constfunc{bool
}{HasLeftIndent
}{\void}
334 Returns
\true if the attribute object specifies a left indent.
336 \membersection{wxRichTextAttr::HasLineSpacing
}\label{wxrichtextattrhaslinespacing
}
338 \constfunc{bool
}{HasLineSpacing
}{\void}
340 Returns
\true if the attribute object specifies line spacing.
342 \membersection{wxRichTextAttr::HasParagraphSpacingAfter
}\label{wxrichtextattrhasparagraphspacingafter
}
344 \constfunc{bool
}{HasParagraphSpacingAfter
}{\void}
346 Returns
\true if the attribute object specifies spacing after a paragraph.
348 \membersection{wxRichTextAttr::HasParagraphSpacingBefore
}\label{wxrichtextattrhasparagraphspacingbefore
}
350 \constfunc{bool
}{HasParagraphSpacingBefore
}{\void}
352 Returns
\true if the attribute object specifies spacing before a paragraph.
354 \membersection{wxRichTextAttr::HasParagraphStyleName
}\label{wxrichtextattrhasparagraphstylename
}
356 \constfunc{bool
}{HasParagraphStyleName
}{\void}
358 Returns
\true if the attribute object specifies a paragraph style name.
360 \membersection{wxRichTextAttr::HasRightIndent
}\label{wxrichtextattrhasrightindent
}
362 \constfunc{bool
}{HasRightIndent
}{\void}
364 Returns
\true if the attribute object specifies a right indent.
366 \membersection{wxRichTextAttr::HasSize
}\label{wxrichtextattrhassize
}
368 \constfunc{bool
}{HasSize
}{\void}
370 Returns
\true if the attribute object specifies a font point size.
372 \membersection{wxRichTextAttr::HasTabs
}\label{wxrichtextattrhastabs
}
374 \constfunc{bool
}{HasTabs
}{\void}
376 Returns
\true if the attribute object specifies tab stops.
378 \membersection{wxRichTextAttr::HasTextColour
}\label{wxrichtextattrhastextcolour
}
380 \constfunc{bool
}{HasTextColour
}{\void}
382 Returns
\true if the attribute object specifies a text foreground colour.
384 \membersection{wxRichTextAttr::HasUnderlined
}\label{wxrichtextattrhasunderlined
}
386 \constfunc{bool
}{HasUnderlined
}{\void}
388 Returns
\true if the attribute object specifies either underlining or no underlining.
390 \membersection{wxRichTextAttr::HasWeight
}\label{wxrichtextattrhasweight
}
392 \constfunc{bool
}{HasWeight
}{\void}
394 Returns
\true if the attribute object specifies font weight (bold, light or normal).
396 \membersection{wxRichTextAttr::Init
}\label{wxrichtextattrinit
}
398 \func{void
}{Init
}{\void}
400 Initialise the object.
402 \membersection{wxRichTextAttr::IsCharacterStyle
}\label{wxrichtextattrischaracterstyle
}
404 \constfunc{bool
}{IsCharacterStyle
}{\void}
406 Returns
\true if the object represents a character style, that is,
407 the flags specify a font or a text background or foreground colour.
409 \membersection{wxRichTextAttr::IsDefault
}\label{wxrichtextattrisdefault
}
411 \constfunc{bool
}{IsDefault
}{\void}
413 Returns
\false if we have any attributes set,
\true otherwise.
415 \membersection{wxRichTextAttr::IsParagraphStyle
}\label{wxrichtextattrisparagraphstyle
}
417 \constfunc{bool
}{IsParagraphStyle
}{\void}
419 Returns
\true if the object represents a paragraph style, that is,
420 the flags specify alignment, indentation, tabs, paragraph spacing, or
423 \membersection{wxRichTextAttr::SetAlignment
}\label{wxrichtextattrsetalignment
}
425 \func{void
}{SetAlignment
}{\param{wxTextAttrAlignment
}{alignment
}}
427 Sets the paragraph alignment. These are the possible values for
{\it alignment
}:
431 enum wxTextAttrAlignment
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
443 \membersection{wxRichTextAttr::SetBackgroundColour
}\label{wxrichtextattrsetbackgroundcolour
}
445 \func{void
}{SetBackgroundColour
}{\param{const wxColour\&
}{colBack
}}
447 Sets the background colour.
449 \membersection{wxRichTextAttr::SetBulletNumber
}\label{wxrichtextattrsetbulletnumber
}
451 \func{void
}{SetBulletNumber
}{\param{int
}{n
}}
453 Sets the bullet number.
455 \membersection{wxRichTextAttr::SetBulletStyle
}\label{wxrichtextattrsetbulletstyle
}
457 \func{void
}{SetBulletStyle
}{\param{int
}{style
}}
459 Sets the bullet style. The following styles can be passed:
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
476 \membersection{wxRichTextAttr::SetBulletSymbol
}\label{wxrichtextattrsetbulletsymbol
}
478 \func{void
}{SetBulletSymbol
}{\param{wxChar
}{symbol
}}
480 Sets the paragraph symbol.
482 \membersection{wxRichTextAttr::SetCharacterStyleName
}\label{wxrichtextattrsetcharacterstylename
}
484 \func{void
}{SetCharacterStyleName
}{\param{const wxString\&
}{name
}}
486 Sets the character style name.
488 \membersection{wxRichTextAttr::SetFlags
}\label{wxrichtextattrsetflags
}
490 \func{void
}{SetFlags
}{\param{long
}{flags
}}
492 Sets the flags determining which styles are being specified. The following
493 flags can be passed in a bitlist:
497 // Standard wxTextAttr constants
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
514 // Extra formatting flags not in wxTextAttr
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
527 \membersection{wxRichTextAttr::SetFontFaceName
}\label{wxrichtextattrsetfontfacename
}
529 \func{void
}{SetFontFaceName
}{\param{const wxString\&
}{faceName
}}
531 Sets the paragraph alignment.
533 \membersection{wxRichTextAttr::SetFontSize
}\label{wxrichtextattrsetfontsize
}
535 \func{void
}{SetFontSize
}{\param{int
}{pointSize
}}
537 Sets the font size in points.
539 \membersection{wxRichTextAttr::SetFontStyle
}\label{wxrichtextattrsetfontstyle
}
541 \func{void
}{SetFontStyle
}{\param{int
}{fontStyle
}}
543 Sets the font style (normal, italic or slanted).
545 \membersection{wxRichTextAttr::SetFontUnderlined
}\label{wxrichtextattrsetfontunderlined
}
547 \func{void
}{SetFontUnderlined
}{\param{bool
}{underlined
}}
549 Sets the font underlining.
551 \membersection{wxRichTextAttr::SetFontWeight
}\label{wxrichtextattrsetfontweight
}
553 \func{void
}{SetFontWeight
}{\param{int
}{fontWeight
}}
555 Sets the font weight.
557 \membersection{wxRichTextAttr::SetLeftIndent
}\label{wxrichtextattrsetleftindent
}
559 \func{void
}{SetLeftIndent
}{\param{int
}{indent
},
\param{int
}{subIndent =
0}}
561 Sets the left indent and left subindent in tenths of a millimetre.
563 The sub-indent is an offset from the left of the paragraph, and is used for all but the
564 first line in a paragraph. A positive value will cause the first line to appear to the left
565 of the subsequent lines, and a negative value will cause the first line to be indented
566 relative to the subsequent lines.
568 wxRichTextBuffer uses indentation to render a bulleted item. The left indent is the distance between
569 the margin and the bullet. The content of the paragraph, including the first line, starts
570 at leftMargin + leftSubIndent. So the distance between the left edge of the bullet and the
571 left of the actual paragraph is leftSubIndent.
573 \membersection{wxRichTextAttr::SetLineSpacing
}\label{wxrichtextattrsetlinespacing
}
575 \func{void
}{SetLineSpacing
}{\param{int
}{spacing
}}
577 Sets the line spacing.
{\it spacing
} is a multiple, where
10 means single-spacing,
578 15 means
1.5 spacing, and
20 means double spacing. The following constants are
579 defined for convenience:
583 #define wxTEXT_ATTR_LINE_SPACING_NORMAL
10
584 #define wxTEXT_ATTR_LINE_SPACING_HALF
15
585 #define wxTEXT_ATTR_LINE_SPACING_TWICE
20
589 \membersection{wxRichTextAttr::SetParagraphSpacingAfter
}\label{wxrichtextattrsetparagraphspacingafter
}
591 \func{void
}{SetParagraphSpacingAfter
}{\param{int
}{spacing
}}
593 Sets the spacing after a paragraph, in tenths of a millimetre.
595 \membersection{wxRichTextAttr::SetParagraphSpacingBefore
}\label{wxrichtextattrsetparagraphspacingbefore
}
597 \func{void
}{SetParagraphSpacingBefore
}{\param{int
}{spacing
}}
599 Sets the spacing before a paragraph, in tenths of a millimetre.
601 \membersection{wxRichTextAttr::SetParagraphStyleName
}\label{wxrichtextattrsetparagraphstylename
}
603 \func{void
}{SetParagraphStyleName
}{\param{const wxString\&
}{name
}}
605 Sets the name of the paragraph style.
607 \membersection{wxRichTextAttr::SetRightIndent
}\label{wxrichtextattrsetrightindent
}
609 \func{void
}{SetRightIndent
}{\param{int
}{indent
}}
611 Sets the right indent in tenths of a millimetre.
613 \membersection{wxRichTextAttr::SetTabs
}\label{wxrichtextattrsettabs
}
615 \func{void
}{SetTabs
}{\param{const wxArrayInt\&
}{tabs
}}
617 Sets the tab stops, expressed in tenths of a millimetre.
618 Each stop is measured from the left margin and therefore each value must be larger than the last.
620 \membersection{wxRichTextAttr::SetTextColour
}\label{wxrichtextattrsettextcolour
}
622 \func{void
}{SetTextColour
}{\param{const wxColour\&
}{colText
}}
624 Sets the text foreground colout.
626 \membersection{wxRichTextAttr::operator=
}\label{wxrichtextattroperatorassign
}
628 \func{void operator
}{operator=
}{\param{const wxTextAttrEx\&
}{attr
}}
630 Assignment from a
\helpref{wxTextAttrEx
}{wxtextattr
} object.
632 \func{void operator
}{operator=
}{\param{const wxRichTextAttr\&
}{attr
}}
634 Assignment from a
\helpref{wxRichTextAttr
}{wxrichtextattr
} object.
636 \membersection{wxRichTextAttr::wxTextAttrEx
}\label{wxrichtextattrwxtextattrex
}
638 \constfunc{operator
}{wxTextAttrEx
}{\void}
640 Makes a
\helpref{wxTextAttrEx
}{wxtextattrex
} object from this object.