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::GetBulletFont
}\label{wxrichtextattrgetbulletfont
}
148 \constfunc{const wxString\&
}{GetBulletFont
}{\void}
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.
153 \membersection{wxRichTextAttr::GetBulletNumber
}\label{wxrichtextattrgetbulletnumber
}
155 \constfunc{int
}{GetBulletNumber
}{\void}
157 Returns the bullet number.
159 \membersection{wxRichTextAttr::GetBulletStyle
}\label{wxrichtextattrgetbulletstyle
}
161 \constfunc{int
}{GetBulletStyle
}{\void}
163 Returns the bullet style.
164 See
\helpref{wxRichTextAttr::SetBulletStyle
}{wxrichtextattrsetbulletstyle
} for a list of available styles.
166 \membersection{wxRichTextAttr::GetBulletSymbol
}\label{wxrichtextattrgetbulletsymbol
}
168 \constfunc{wxChar
}{GetBulletSymbol
}{\void}
170 Returns the bullet symbol, a character.
172 \membersection{wxRichTextAttr::GetCharacterStyleName
}\label{wxrichtextattrgetcharacterstylename
}
174 \constfunc{const wxString\&
}{GetCharacterStyleName
}{\void}
176 Returns the name of the character style.
178 \membersection{wxRichTextAttr::GetFlags
}\label{wxrichtextattrgetflags
}
180 \constfunc{long
}{GetFlags
}{\void}
182 Returns flags indicating which attributes are applicable.
183 See
\helpref{wxRichTextAttr::SetFlags
}{wxrichtextattrsetflags
} for a list of available flags.
185 \membersection{wxRichTextAttr::GetFontAttributes
}\label{wxrichtextattrgetfontattributes
}
187 \func{bool
}{GetFontAttributes
}{\param{const wxFont\&
}{font
}}
189 Sets the font attributes from the given font.
191 \membersection{wxRichTextAttr::GetFontFaceName
}\label{wxrichtextattrgetfontfacename
}
193 \constfunc{const wxString\&
}{GetFontFaceName
}{\void}
195 Returns the font face name.
197 \membersection{wxRichTextAttr::GetFontSize
}\label{wxrichtextattrgetfontsize
}
199 \constfunc{int
}{GetFontSize
}{\void}
201 Returns the font size in points.
203 \membersection{wxRichTextAttr::GetFontStyle
}\label{wxrichtextattrgetfontstyle
}
205 \constfunc{int
}{GetFontStyle
}{\void}
207 Returns the font style.
209 \membersection{wxRichTextAttr::GetFontUnderlined
}\label{wxrichtextattrgetfontunderlined
}
211 \constfunc{bool
}{GetFontUnderlined
}{\void}
213 Returns
\true if the font is underlined.
215 \membersection{wxRichTextAttr::GetFontWeight
}\label{wxrichtextattrgetfontweight
}
217 \constfunc{int
}{GetFontWeight
}{\void}
219 Returns the font weight.
221 \membersection{wxRichTextAttr::GetLeftIndent
}\label{wxrichtextattrgetleftindent
}
223 \constfunc{long
}{GetLeftIndent
}{\void}
225 Returns the left indent in tenths of a millimetre.
227 \membersection{wxRichTextAttr::GetLeftSubIndent
}\label{wxrichtextattrgetleftsubindent
}
229 \constfunc{long
}{GetLeftSubIndent
}{\void}
231 Returns the left sub-indent in tenths of a millimetre.
233 \membersection{wxRichTextAttr::GetLineSpacing
}\label{wxrichtextattrgetlinespacing
}
235 \constfunc{int
}{GetLineSpacing
}{\void}
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.
240 \membersection{wxRichTextAttr::GetParagraphSpacingAfter
}\label{wxrichtextattrgetparagraphspacingafter
}
242 \constfunc{int
}{GetParagraphSpacingAfter
}{\void}
244 Returns the space in tenths of a millimeter after the paragraph.
246 \membersection{wxRichTextAttr::GetParagraphSpacingBefore
}\label{wxrichtextattrgetparagraphspacingbefore
}
248 \constfunc{int
}{GetParagraphSpacingBefore
}{\void}
250 Returns the space in tenths of a millimeter before the paragraph.
252 \membersection{wxRichTextAttr::GetParagraphStyleName
}\label{wxrichtextattrgetparagraphstylename
}
254 \constfunc{const wxString\&
}{GetParagraphStyleName
}{\void}
256 Returns the name of the paragraph style.
258 \membersection{wxRichTextAttr::GetRightIndent
}\label{wxrichtextattrgetrightindent
}
260 \constfunc{long
}{GetRightIndent
}{\void}
262 Returns the right indent in tenths of a millimeter.
264 \membersection{wxRichTextAttr::GetTabs
}\label{wxrichtextattrgettabs
}
266 \constfunc{const wxArrayInt\&
}{GetTabs
}{\void}
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.
271 \membersection{wxRichTextAttr::GetTextColour
}\label{wxrichtextattrgettextcolour
}
273 \constfunc{const wxColour\&
}{GetTextColour
}{\void}
275 Returns the text foreground colour.
277 \membersection{wxRichTextAttr::HasAlignment
}\label{wxrichtextattrhasalignment
}
279 \constfunc{bool
}{HasAlignment
}{\void}
281 Returns
\true if the attribute object specifies alignment.
283 \membersection{wxRichTextAttr::HasBackgroundColour
}\label{wxrichtextattrhasbackgroundcolour
}
285 \constfunc{bool
}{HasBackgroundColour
}{\void}
287 Returns
\true if the attribute object specifies a background colour.
289 \membersection{wxRichTextAttr::HasBulletNumber
}\label{wxrichtextattrhasbulletnumber
}
291 \constfunc{bool
}{HasBulletNumber
}{\void}
293 Returns
\true if the attribute object specifies a bullet number.
295 \membersection{wxRichTextAttr::HasBulletStyle
}\label{wxrichtextattrhasbulletstyle
}
297 \constfunc{bool
}{HasBulletStyle
}{\void}
299 Returns
\true if the attribute object specifies a bullet style.
301 \membersection{wxRichTextAttr::HasBulletSymbol
}\label{wxrichtextattrhasbulletsymbol
}
303 \constfunc{bool
}{HasBulletSymbol
}{\void}
305 Returns
\true if the attribute object specifies a bullet symbol.
307 \membersection{wxRichTextAttr::HasCharacterStyleName
}\label{wxrichtextattrhascharacterstylename
}
309 \constfunc{bool
}{HasCharacterStyleName
}{\void}
311 Returns
\true if the attribute object specifies a character style name.
313 \membersection{wxRichTextAttr::HasFaceName
}\label{wxrichtextattrhasfacename
}
315 \constfunc{bool
}{HasFaceName
}{\void}
317 Returns
\true if the attribute object specifies a font face name.
319 \membersection{wxRichTextAttr::HasFlag
}\label{wxrichtextattrhasflag
}
321 \constfunc{bool
}{HasFlag
}{\param{long
}{flag
}}
323 Returns
\true if the
{\it flag
} is present in the attribute object's flag bitlist.
325 \membersection{wxRichTextAttr::HasFont
}\label{wxrichtextattrhasfont
}
327 \constfunc{bool
}{HasFont
}{\void}
329 Returns
\true if the attribute object specifies any font attributes.
331 \membersection{wxRichTextAttr::HasItalic
}\label{wxrichtextattrhasitalic
}
333 \constfunc{bool
}{HasItalic
}{\void}
335 Returns
\true if the attribute object specifies italic style.
337 \membersection{wxRichTextAttr::HasLeftIndent
}\label{wxrichtextattrhasleftindent
}
339 \constfunc{bool
}{HasLeftIndent
}{\void}
341 Returns
\true if the attribute object specifies a left indent.
343 \membersection{wxRichTextAttr::HasLineSpacing
}\label{wxrichtextattrhaslinespacing
}
345 \constfunc{bool
}{HasLineSpacing
}{\void}
347 Returns
\true if the attribute object specifies line spacing.
349 \membersection{wxRichTextAttr::HasParagraphSpacingAfter
}\label{wxrichtextattrhasparagraphspacingafter
}
351 \constfunc{bool
}{HasParagraphSpacingAfter
}{\void}
353 Returns
\true if the attribute object specifies spacing after a paragraph.
355 \membersection{wxRichTextAttr::HasParagraphSpacingBefore
}\label{wxrichtextattrhasparagraphspacingbefore
}
357 \constfunc{bool
}{HasParagraphSpacingBefore
}{\void}
359 Returns
\true if the attribute object specifies spacing before a paragraph.
361 \membersection{wxRichTextAttr::HasParagraphStyleName
}\label{wxrichtextattrhasparagraphstylename
}
363 \constfunc{bool
}{HasParagraphStyleName
}{\void}
365 Returns
\true if the attribute object specifies a paragraph style name.
367 \membersection{wxRichTextAttr::HasRightIndent
}\label{wxrichtextattrhasrightindent
}
369 \constfunc{bool
}{HasRightIndent
}{\void}
371 Returns
\true if the attribute object specifies a right indent.
373 \membersection{wxRichTextAttr::HasSize
}\label{wxrichtextattrhassize
}
375 \constfunc{bool
}{HasSize
}{\void}
377 Returns
\true if the attribute object specifies a font point size.
379 \membersection{wxRichTextAttr::HasTabs
}\label{wxrichtextattrhastabs
}
381 \constfunc{bool
}{HasTabs
}{\void}
383 Returns
\true if the attribute object specifies tab stops.
385 \membersection{wxRichTextAttr::HasTextColour
}\label{wxrichtextattrhastextcolour
}
387 \constfunc{bool
}{HasTextColour
}{\void}
389 Returns
\true if the attribute object specifies a text foreground colour.
391 \membersection{wxRichTextAttr::HasUnderlined
}\label{wxrichtextattrhasunderlined
}
393 \constfunc{bool
}{HasUnderlined
}{\void}
395 Returns
\true if the attribute object specifies either underlining or no underlining.
397 \membersection{wxRichTextAttr::HasWeight
}\label{wxrichtextattrhasweight
}
399 \constfunc{bool
}{HasWeight
}{\void}
401 Returns
\true if the attribute object specifies font weight (bold, light or normal).
403 \membersection{wxRichTextAttr::Init
}\label{wxrichtextattrinit
}
405 \func{void
}{Init
}{\void}
407 Initialise the object.
409 \membersection{wxRichTextAttr::IsCharacterStyle
}\label{wxrichtextattrischaracterstyle
}
411 \constfunc{bool
}{IsCharacterStyle
}{\void}
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.
416 \membersection{wxRichTextAttr::IsDefault
}\label{wxrichtextattrisdefault
}
418 \constfunc{bool
}{IsDefault
}{\void}
420 Returns
\false if we have any attributes set,
\true otherwise.
422 \membersection{wxRichTextAttr::IsParagraphStyle
}\label{wxrichtextattrisparagraphstyle
}
424 \constfunc{bool
}{IsParagraphStyle
}{\void}
426 Returns
\true if the object represents a paragraph style, that is,
427 the flags specify alignment, indentation, tabs, paragraph spacing, or
430 \membersection{wxRichTextAttr::SetAlignment
}\label{wxrichtextattrsetalignment
}
432 \func{void
}{SetAlignment
}{\param{wxTextAttrAlignment
}{alignment
}}
434 Sets the paragraph alignment. These are the possible values for
{\it alignment
}:
438 enum wxTextAttrAlignment
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
450 \membersection{wxRichTextAttr::SetBackgroundColour
}\label{wxrichtextattrsetbackgroundcolour
}
452 \func{void
}{SetBackgroundColour
}{\param{const wxColour\&
}{colBack
}}
454 Sets the background colour.
456 \membersection{wxRichTextAttr::SetBulletFont
}\label{wxrichtextattrsetbulletfont
}
458 \func{void
}{SetBulletFont
}{\param{const wxString\&
}{font
}}
460 Sets the name of the font associated with the bullet symbol.
461 Only valid for attributes with wxTEXT
\_ATTR\_BULLET\_SYMBOL.
463 \membersection{wxRichTextAttr::SetBulletNumber
}\label{wxrichtextattrsetbulletnumber
}
465 \func{void
}{SetBulletNumber
}{\param{int
}{n
}}
467 Sets the bullet number.
469 \membersection{wxRichTextAttr::SetBulletStyle
}\label{wxrichtextattrsetbulletstyle
}
471 \func{void
}{SetBulletStyle
}{\param{int
}{style
}}
473 Sets the bullet style. The following styles can be passed:
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
490 \membersection{wxRichTextAttr::SetBulletSymbol
}\label{wxrichtextattrsetbulletsymbol
}
492 \func{void
}{SetBulletSymbol
}{\param{wxChar
}{symbol
}}
494 Sets the paragraph symbol.
496 \membersection{wxRichTextAttr::SetCharacterStyleName
}\label{wxrichtextattrsetcharacterstylename
}
498 \func{void
}{SetCharacterStyleName
}{\param{const wxString\&
}{name
}}
500 Sets the character style name.
502 \membersection{wxRichTextAttr::SetFlags
}\label{wxrichtextattrsetflags
}
504 \func{void
}{SetFlags
}{\param{long
}{flags
}}
506 Sets the flags determining which styles are being specified. The following
507 flags can be passed in a bitlist:
511 // Standard wxTextAttr constants
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
528 // Extra formatting flags not in wxTextAttr
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
541 \membersection{wxRichTextAttr::SetFontFaceName
}\label{wxrichtextattrsetfontfacename
}
543 \func{void
}{SetFontFaceName
}{\param{const wxString\&
}{faceName
}}
545 Sets the paragraph alignment.
547 \membersection{wxRichTextAttr::SetFontSize
}\label{wxrichtextattrsetfontsize
}
549 \func{void
}{SetFontSize
}{\param{int
}{pointSize
}}
551 Sets the font size in points.
553 \membersection{wxRichTextAttr::SetFontStyle
}\label{wxrichtextattrsetfontstyle
}
555 \func{void
}{SetFontStyle
}{\param{int
}{fontStyle
}}
557 Sets the font style (normal, italic or slanted).
559 \membersection{wxRichTextAttr::SetFontUnderlined
}\label{wxrichtextattrsetfontunderlined
}
561 \func{void
}{SetFontUnderlined
}{\param{bool
}{underlined
}}
563 Sets the font underlining.
565 \membersection{wxRichTextAttr::SetFontWeight
}\label{wxrichtextattrsetfontweight
}
567 \func{void
}{SetFontWeight
}{\param{int
}{fontWeight
}}
569 Sets the font weight.
571 \membersection{wxRichTextAttr::SetLeftIndent
}\label{wxrichtextattrsetleftindent
}
573 \func{void
}{SetLeftIndent
}{\param{int
}{indent
},
\param{int
}{subIndent =
0}}
575 Sets the left indent and left subindent in tenths of a millimetre.
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.
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.
587 \membersection{wxRichTextAttr::SetLineSpacing
}\label{wxrichtextattrsetlinespacing
}
589 \func{void
}{SetLineSpacing
}{\param{int
}{spacing
}}
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:
597 #define wxTEXT_ATTR_LINE_SPACING_NORMAL
10
598 #define wxTEXT_ATTR_LINE_SPACING_HALF
15
599 #define wxTEXT_ATTR_LINE_SPACING_TWICE
20
603 \membersection{wxRichTextAttr::SetParagraphSpacingAfter
}\label{wxrichtextattrsetparagraphspacingafter
}
605 \func{void
}{SetParagraphSpacingAfter
}{\param{int
}{spacing
}}
607 Sets the spacing after a paragraph, in tenths of a millimetre.
609 \membersection{wxRichTextAttr::SetParagraphSpacingBefore
}\label{wxrichtextattrsetparagraphspacingbefore
}
611 \func{void
}{SetParagraphSpacingBefore
}{\param{int
}{spacing
}}
613 Sets the spacing before a paragraph, in tenths of a millimetre.
615 \membersection{wxRichTextAttr::SetParagraphStyleName
}\label{wxrichtextattrsetparagraphstylename
}
617 \func{void
}{SetParagraphStyleName
}{\param{const wxString\&
}{name
}}
619 Sets the name of the paragraph style.
621 \membersection{wxRichTextAttr::SetRightIndent
}\label{wxrichtextattrsetrightindent
}
623 \func{void
}{SetRightIndent
}{\param{int
}{indent
}}
625 Sets the right indent in tenths of a millimetre.
627 \membersection{wxRichTextAttr::SetTabs
}\label{wxrichtextattrsettabs
}
629 \func{void
}{SetTabs
}{\param{const wxArrayInt\&
}{tabs
}}
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.
634 \membersection{wxRichTextAttr::SetTextColour
}\label{wxrichtextattrsettextcolour
}
636 \func{void
}{SetTextColour
}{\param{const wxColour\&
}{colText
}}
638 Sets the text foreground colout.
640 \membersection{wxRichTextAttr::operator=
}\label{wxrichtextattroperatorassign
}
642 \func{void operator
}{operator=
}{\param{const wxTextAttrEx\&
}{attr
}}
644 Assignment from a
\helpref{wxTextAttrEx
}{wxtextattr
} object.
646 \func{void operator
}{operator=
}{\param{const wxRichTextAttr\&
}{attr
}}
648 Assignment from a
\helpref{wxRichTextAttr
}{wxrichtextattr
} object.
650 \membersection{wxRichTextAttr::wxTextAttrEx
}\label{wxrichtextattrwxtextattrex
}
652 \constfunc{operator
}{wxTextAttrEx
}{\void}
654 Makes a
\helpref{wxTextAttrEx
}{wxtextattrex
} object from this object.