## wxRichTextAttr

wxRichTextAttr represents the character and paragraph attributes, or style, for a range of text in a wxRichTextCtrl. This class is specific to wxRichTextCtrl, although you can also use the standard wxTextAttr class with wxRichTextCtrl.

When setting up a wxRichTextAttr object, pass a bitlist mask to SetFlags to indicate which style elements should be changed. As a convenience, when you call a setter such s SetFont, the relevant bit will be set.

wxRichTextAttr stores attributes without a wxFont object, so is a much more efficient way to query styles than using a wxTextAttr or wxTextAttrEx object.

Derived from

No base class

Include files

<wx/richtext/richtextbuffer.h>

Constants

The following values can be passed to SetAlignment to determine paragraph alignment.

    enum wxTextAttrAlignment
    {
        wxTEXT_ALIGNMENT_DEFAULT,
        wxTEXT_ALIGNMENT_LEFT,
        wxTEXT_ALIGNMENT_CENTRE,
        wxTEXT_ALIGNMENT_CENTER = wxTEXT_ALIGNMENT_CENTRE,
        wxTEXT_ALIGNMENT_RIGHT,
        wxTEXT_ALIGNMENT_JUSTIFIED
    };

These values are passed in a bitlist to SetFlags to determine what attributes will be considered when setting the attributes for a text control.

    // Standard wxTextAttr constants

    #define wxTEXT_ATTR_TEXT_COLOUR             0x0001
    #define wxTEXT_ATTR_BACKGROUND_COLOUR       0x0002
    #define wxTEXT_ATTR_FONT_FACE               0x0004
    #define wxTEXT_ATTR_FONT_SIZE               0x0008
    #define wxTEXT_ATTR_FONT_WEIGHT             0x0010
    #define wxTEXT_ATTR_FONT_ITALIC             0x0020
    #define wxTEXT_ATTR_FONT_UNDERLINE          0x0040
    #define wxTEXT_ATTR_FONT \
      wxTEXT_ATTR_FONT_FACE | wxTEXT_ATTR_FONT_SIZE | wxTEXT_ATTR_FONT_WEIGHT \
    | wxTEXT_ATTR_FONT_ITALIC | wxTEXT_ATTR_FONT_UNDERLINE
    #define wxTEXT_ATTR_ALIGNMENT               0x0080
    #define wxTEXT_ATTR_LEFT_INDENT             0x0100
    #define wxTEXT_ATTR_RIGHT_INDENT            0x0200
    #define wxTEXT_ATTR_TABS                    0x0400

    // Extra formatting flags not in wxTextAttr

    #define wxTEXT_ATTR_PARA_SPACING_AFTER      0x00000800
    #define wxTEXT_ATTR_PARA_SPACING_BEFORE     0x00001000
    #define wxTEXT_ATTR_LINE_SPACING            0x00002000
    #define wxTEXT_ATTR_CHARACTER_STYLE_NAME    0x00004000
    #define wxTEXT_ATTR_PARAGRAPH_STYLE_NAME    0x00008000
    #define wxTEXT_ATTR_LIST_STYLE_NAME         0x00010000
    #define wxTEXT_ATTR_BULLET_STYLE            0x00020000
    #define wxTEXT_ATTR_BULLET_NUMBER           0x00040000
    #define wxTEXT_ATTR_BULLET_TEXT             0x00080000
    #define wxTEXT_ATTR_BULLET_NAME             0x00100000
    #define wxTEXT_ATTR_URL                     0x00200000
    #define wxTEXT_ATTR_PAGE_BREAK              0x00400000

The following styles can be passed to wxRichTextAttr::SetBulletStyle:

    #define wxTEXT_ATTR_BULLET_STYLE_NONE               0x00000000
    #define wxTEXT_ATTR_BULLET_STYLE_ARABIC             0x00000001
    #define wxTEXT_ATTR_BULLET_STYLE_LETTERS_UPPER      0x00000002
    #define wxTEXT_ATTR_BULLET_STYLE_LETTERS_LOWER      0x00000004
    #define wxTEXT_ATTR_BULLET_STYLE_ROMAN_UPPER        0x00000008
    #define wxTEXT_ATTR_BULLET_STYLE_ROMAN_LOWER        0x00000010
    #define wxTEXT_ATTR_BULLET_STYLE_SYMBOL             0x00000020
    #define wxTEXT_ATTR_BULLET_STYLE_BITMAP             0x00000040
    #define wxTEXT_ATTR_BULLET_STYLE_PARENTHESES        0x00000080
    #define wxTEXT_ATTR_BULLET_STYLE_PERIOD             0x00000100
    #define wxTEXT_ATTR_BULLET_STYLE_STANDARD           0x00000200
    #define wxTEXT_ATTR_BULLET_STYLE_RIGHT_PARENTHESIS  0x00000400
    #define wxTEXT_ATTR_BULLET_STYLE_OUTLINE            0x00000800
    #define wxTEXT_ATTR_BULLET_STYLE_ALIGN_LEFT         0x00000000
    #define wxTEXT_ATTR_BULLET_STYLE_ALIGN_RIGHT        0x00001000
    #define wxTEXT_ATTR_BULLET_STYLE_ALIGN_CENTRE       0x00002000

The following constants can be passed to wxRichTextAttr::SetLineSpacing:

    #define wxTEXT_ATTR_LINE_SPACING_NORMAL         10
    #define wxTEXT_ATTR_LINE_SPACING_HALF           15
    #define wxTEXT_ATTR_LINE_SPACING_TWICE          20

See also

wxTextAttr, wxTextAttrEx, wxRichTextCtrl

Members

wxRichTextAttr::wxRichTextAttr
wxRichTextAttr::CopyTo
wxRichTextAttr::CreateFont
wxRichTextAttr::GetAlignment
wxRichTextAttr::GetBackgroundColour
wxRichTextAttr::GetBulletFont
wxRichTextAttr::GetBulletName
wxRichTextAttr::GetBulletNumber
wxRichTextAttr::GetBulletStyle
wxRichTextAttr::GetBulletText
wxRichTextAttr::GetCharacterStyleName
wxRichTextAttr::GetFlags
wxRichTextAttr::GetFontAttributes
wxRichTextAttr::GetFontFaceName
wxRichTextAttr::GetFontSize
wxRichTextAttr::GetFontStyle
wxRichTextAttr::GetFontUnderlined
wxRichTextAttr::GetFontWeight
wxRichTextAttr::GetLeftIndent
wxRichTextAttr::GetLeftSubIndent
wxRichTextAttr::GetLineSpacing
wxRichTextAttr::GetListStyleName
wxRichTextAttr::GetParagraphSpacingAfter
wxRichTextAttr::GetParagraphSpacingBefore
wxRichTextAttr::GetParagraphStyleName
wxRichTextAttr::GetRightIndent
wxRichTextAttr::GetTabs
wxRichTextAttr::GetTextColour
wxRichTextAttr::GetURL
wxRichTextAttr::HasAlignment
wxRichTextAttr::HasBackgroundColour
wxRichTextAttr::HasBulletName
wxRichTextAttr::HasBulletNumber
wxRichTextAttr::HasBulletStyle
wxRichTextAttr::HasBulletText
wxRichTextAttr::HasCharacterStyleName
wxRichTextAttr::HasFaceName
wxRichTextAttr::HasFlag
wxRichTextAttr::HasFont
wxRichTextAttr::HasItalic
wxRichTextAttr::HasLeftIndent
wxRichTextAttr::HasLineSpacing
wxRichTextAttr::HasListStyleName
wxRichTextAttr::HasPageBreak
wxRichTextAttr::HasParagraphSpacingAfter
wxRichTextAttr::HasParagraphSpacingBefore
wxRichTextAttr::HasParagraphStyleName
wxRichTextAttr::HasRightIndent
wxRichTextAttr::HasSize
wxRichTextAttr::HasTabs
wxRichTextAttr::HasTextColour
wxRichTextAttr::HasUnderlined
wxRichTextAttr::HasWeight
wxRichTextAttr::Init
wxRichTextAttr::IsCharacterStyle
wxRichTextAttr::IsDefault
wxRichTextAttr::IsParagraphStyle
wxRichTextAttr::SetAlignment
wxRichTextAttr::SetBackgroundColour
wxRichTextAttr::SetBulletFont
wxRichTextAttr::SetBulletName
wxRichTextAttr::SetBulletNumber
wxRichTextAttr::SetBulletStyle
wxRichTextAttr::SetBulletText
wxRichTextAttr::SetCharacterStyleName
wxRichTextAttr::SetFlags
wxRichTextAttr::SetFontFaceName
wxRichTextAttr::SetFontSize
wxRichTextAttr::SetFontStyle
wxRichTextAttr::SetFontUnderlined
wxRichTextAttr::SetFontWeight
wxRichTextAttr::SetLeftIndent
wxRichTextAttr::SetLineSpacing
wxRichTextAttr::SetListStyleName
wxRichTextAttr::SetPageBreak
wxRichTextAttr::SetParagraphSpacingAfter
wxRichTextAttr::SetParagraphSpacingBefore
wxRichTextAttr::SetParagraphStyleName
wxRichTextAttr::SetRightIndent
wxRichTextAttr::SetTabs
wxRichTextAttr::SetTextColour
wxRichTextAttr::SetURL
wxRichTextAttr::operator=
wxRichTextAttr::wxTextAttrEx

### wxRichTextAttr::wxRichTextAttr

wxRichTextAttr()

wxRichTextAttr(const wxColour& colText, const wxColour& colBack = wxNullColour, wxTextAttrAlignment alignment = wxTEXT_ALIGNMENT_DEFAULT)

wxRichTextAttr(const wxTextAttrEx& attr)

Constructors.

### wxRichTextAttr::CopyTo

void CopyTo(wxTextAttrEx& attr) const

Copies the wxRichTextAttr attributes to a wxTextAttrEx object.

### wxRichTextAttr::CreateFont

wxFont CreateFont() const

Creates a font from the font attributes.

### wxRichTextAttr::GetAlignment

wxTextAttrAlignment GetAlignment() const

Returns the alignment flags. See wxRichTextAttr::SetAlignment for a list of available styles.

### wxRichTextAttr::GetBackgroundColour

const wxColour& GetBackgroundColour() const

Returns the background colour.

### wxRichTextAttr::GetBulletFont

const wxString& GetBulletFont() const

Returns a string containing the name of the font associated with the bullet symbol. Only valid for attributes with wxTEXT_ATTR_BULLET_SYMBOL.

### wxRichTextAttr::GetBulletName

const wxString& GetBulletName() const

Returns the standard bullet name, applicable if the bullet style is wxTEXT_ATTR_BULLET_STYLE_STANDARD. Currently the following standard bullet names are supported:

- `standard/circle`
- `standard/square`
- `standard/diamond`
- `standard/triangle`

If you wish your application to support further bullet graphics, you can derive a class from wxRichTextRenderer or wxRichTextStdRenderer, override `DrawStandardBullet` and `EnumerateStandardBulletNames`, and set an instance of the class using wxRichTextBuffer::SetRenderer.

### wxRichTextAttr::GetBulletNumber

int GetBulletNumber() const

Returns the bullet number.

### wxRichTextAttr::GetBulletStyle

int GetBulletStyle() const

Returns the bullet style. See wxRichTextAttr::SetBulletStyle for a list of available styles.

### wxRichTextAttr::GetBulletText

const wxString& GetBulletText() const

Returns the bullet text, which could be a symbol, or (for example) cached outline text.

### wxRichTextAttr::GetCharacterStyleName

const wxString& GetCharacterStyleName() const

Returns the name of the character style.

### wxRichTextAttr::GetFlags

long GetFlags() const

Returns flags indicating which attributes are applicable. See wxRichTextAttr::SetFlags for a list of available flags.

### wxRichTextAttr::GetFontAttributes

bool GetFontAttributes(const wxFont& font)

Sets the font attributes from the given font.

### wxRichTextAttr::GetFontFaceName

const wxString& GetFontFaceName() const

Returns the font face name.

### wxRichTextAttr::GetFontSize

int GetFontSize() const

Returns the font size in points.

### wxRichTextAttr::GetFontStyle

int GetFontStyle() const

Returns the font style.

### wxRichTextAttr::GetFontUnderlined

bool GetFontUnderlined() const

Returns `true` if the font is underlined.

### wxRichTextAttr::GetFontWeight

int GetFontWeight() const

Returns the font weight.

### wxRichTextAttr::GetLeftIndent

long GetLeftIndent() const

Returns the left indent in tenths of a millimetre.

### wxRichTextAttr::GetLeftSubIndent

long GetLeftSubIndent() const

Returns the left sub-indent in tenths of a millimetre.

### wxRichTextAttr::GetLineSpacing

int GetLineSpacing() const

Returns the line spacing value, one of wxTEXT_ATTR_LINE_SPACING_NORMAL, wxTEXT_ATTR_LINE_SPACING_HALF, and wxTEXT_ATTR_LINE_SPACING_TWICE.

### wxRichTextAttr::GetListStyleName

const wxString& GetListStyleName() const

Returns the name of the list style.

### wxRichTextAttr::GetParagraphSpacingAfter

int GetParagraphSpacingAfter() const

Returns the space in tenths of a millimeter after the paragraph.

### wxRichTextAttr::GetParagraphSpacingBefore

int GetParagraphSpacingBefore() const

Returns the space in tenths of a millimeter before the paragraph.

### wxRichTextAttr::GetParagraphStyleName

const wxString& GetParagraphStyleName() const

Returns the name of the paragraph style.

### wxRichTextAttr::GetRightIndent

long GetRightIndent() const

Returns the right indent in tenths of a millimeter.

### wxRichTextAttr::GetTabs

const wxArrayInt& GetTabs() const

Returns an array of tab stops, each expressed in tenths of a millimeter. Each stop is measured from the left margin and therefore each value must be larger than the last.

### wxRichTextAttr::GetTextColour

const wxColour& GetTextColour() const

Returns the text foreground colour.

### wxRichTextAttr::GetURL

const wxString& GetURL() const

Returns the URL for the content. Content with wxTEXT_ATTR_URL style causes wxRichTextCtrl to show a hand cursor over it, and wxRichTextCtrl generates a wxTextUrlEvent when the content is clicked.

### wxRichTextAttr::HasAlignment

bool HasAlignment() const

Returns `true` if the attribute object specifies alignment.

### wxRichTextAttr::HasBackgroundColour

bool HasBackgroundColour() const

Returns `true` if the attribute object specifies a background colour.

### wxRichTextAttr::HasBulletName

bool HasBulletName() const

Returns `true` if the attribute object specifies a standard bullet name.

### wxRichTextAttr::HasBulletNumber

bool HasBulletNumber() const

Returns `true` if the attribute object specifies a bullet number.

### wxRichTextAttr::HasBulletStyle

bool HasBulletStyle() const

Returns `true` if the attribute object specifies a bullet style.

### wxRichTextAttr::HasBulletText

bool HasBulletText() const

Returns `true` if the attribute object specifies bullet text (usually specifying a symbol).

### wxRichTextAttr::HasCharacterStyleName

bool HasCharacterStyleName() const

Returns `true` if the attribute object specifies a character style name.

### wxRichTextAttr::HasFaceName

bool HasFaceName() const

Returns `true` if the attribute object specifies a font face name.

### wxRichTextAttr::HasFlag

bool HasFlag(long flag) const

Returns `true` if the flag is present in the attribute object's flag bitlist.

### wxRichTextAttr::HasFont

bool HasFont() const

Returns `true` if the attribute object specifies any font attributes.

### wxRichTextAttr::HasItalic

bool HasItalic() const

Returns `true` if the attribute object specifies italic style.

### wxRichTextAttr::HasLeftIndent

bool HasLeftIndent() const

Returns `true` if the attribute object specifies a left indent.

### wxRichTextAttr::HasLineSpacing

bool HasLineSpacing() const

Returns `true` if the attribute object specifies line spacing.

### wxRichTextAttr::HasListStyleName

bool HasListStyleName() const

Returns `true` if the attribute object specifies a list style name.

### wxRichTextAttr::HasPageBreak

bool HasPageBreak() const

Returns `true` if the attribute object specifies a page break before this paragraph.

### wxRichTextAttr::HasParagraphSpacingAfter

bool HasParagraphSpacingAfter() const

Returns `true` if the attribute object specifies spacing after a paragraph.

### wxRichTextAttr::HasParagraphSpacingBefore

bool HasParagraphSpacingBefore() const

Returns `true` if the attribute object specifies spacing before a paragraph.

### wxRichTextAttr::HasParagraphStyleName

bool HasParagraphStyleName() const

Returns `true` if the attribute object specifies a paragraph style name.

### wxRichTextAttr::HasRightIndent

bool HasRightIndent() const

Returns `true` if the attribute object specifies a right indent.

### wxRichTextAttr::HasSize

bool HasSize() const

Returns `true` if the attribute object specifies a font point size.

### wxRichTextAttr::HasTabs

bool HasTabs() const

Returns `true` if the attribute object specifies tab stops.

### wxRichTextAttr::HasTextColour

bool HasTextColour() const

Returns `true` if the attribute object specifies a text foreground colour.

### wxRichTextAttr::HasUnderlined

bool HasUnderlined() const

Returns `true` if the attribute object specifies either underlining or no underlining.

### wxRichTextAttr::HasWeight

bool HasWeight() const

Returns `true` if the attribute object specifies font weight (bold, light or normal).

### wxRichTextAttr::Init

void Init()

Initialise the object.

### wxRichTextAttr::IsCharacterStyle

bool IsCharacterStyle() const

Returns `true` if the object represents a character style, that is, the flags specify a font or a text background or foreground colour.

### wxRichTextAttr::IsDefault

bool IsDefault() const

Returns `false` if we have any attributes set, `true` otherwise.

### wxRichTextAttr::IsParagraphStyle

bool IsParagraphStyle() const

Returns `true` if the object represents a paragraph style, that is, the flags specify alignment, indentation, tabs, paragraph spacing, or bullet style.

### wxRichTextAttr::SetAlignment

void SetAlignment(wxTextAttrAlignment alignment)

Sets the paragraph alignment. These are the possible values for alignment:

    enum wxTextAttrAlignment
    {
        wxTEXT_ALIGNMENT_DEFAULT,
        wxTEXT_ALIGNMENT_LEFT,
        wxTEXT_ALIGNMENT_CENTRE,
        wxTEXT_ALIGNMENT_CENTER = wxTEXT_ALIGNMENT_CENTRE,
        wxTEXT_ALIGNMENT_RIGHT,
        wxTEXT_ALIGNMENT_JUSTIFIED
    };

### wxRichTextAttr::SetBackgroundColour

void SetBackgroundColour(const wxColour& colBack)

Sets the background colour.

### wxRichTextAttr::SetBulletFont

void SetBulletFont(const wxString& font)

Sets the name of the font associated with the bullet symbol. Only valid for attributes with wxTEXT_ATTR_BULLET_SYMBOL.

### wxRichTextAttr::SetBulletName

void SetBulletName(const wxString& name)

Sets the standard bullet name, applicable if the bullet style is wxTEXT_ATTR_BULLET_STYLE_STANDARD. See wxRichTextAttr::GetBulletName for a list of supported names, and how to expand the range of supported types.

### wxRichTextAttr::SetBulletNumber

void SetBulletNumber(int n)

Sets the bullet number.

### wxRichTextAttr::SetBulletStyle

void SetBulletStyle(int style)

Sets the bullet style. The following styles can be passed:

    #define wxTEXT_ATTR_BULLET_STYLE_NONE               0x00000000
    #define wxTEXT_ATTR_BULLET_STYLE_ARABIC             0x00000001
    #define wxTEXT_ATTR_BULLET_STYLE_LETTERS_UPPER      0x00000002
    #define wxTEXT_ATTR_BULLET_STYLE_LETTERS_LOWER      0x00000004
    #define wxTEXT_ATTR_BULLET_STYLE_ROMAN_UPPER        0x00000008
    #define wxTEXT_ATTR_BULLET_STYLE_ROMAN_LOWER        0x00000010
    #define wxTEXT_ATTR_BULLET_STYLE_SYMBOL             0x00000020
    #define wxTEXT_ATTR_BULLET_STYLE_BITMAP             0x00000040
    #define wxTEXT_ATTR_BULLET_STYLE_PARENTHESES        0x00000080
    #define wxTEXT_ATTR_BULLET_STYLE_PERIOD             0x00000100
    #define wxTEXT_ATTR_BULLET_STYLE_STANDARD           0x00000200
    #define wxTEXT_ATTR_BULLET_STYLE_RIGHT_PARENTHESIS  0x00000400
    #define wxTEXT_ATTR_BULLET_STYLE_OUTLINE            0x00000800
    #define wxTEXT_ATTR_BULLET_STYLE_ALIGN_LEFT         0x00000000
    #define wxTEXT_ATTR_BULLET_STYLE_ALIGN_RIGHT        0x00001000
    #define wxTEXT_ATTR_BULLET_STYLE_ALIGN_CENTRE       0x00002000

### wxRichTextAttr::SetBulletText

void SetBulletText(const wxString text)

Sets the bullet text, which could be a symbol, or (for example) cached outline text.

### wxRichTextAttr::SetCharacterStyleName

void SetCharacterStyleName(const wxString& name)

Sets the character style name.

### wxRichTextAttr::SetFlags

void SetFlags(long flags)

Sets the flags determining which styles are being specified. The following flags can be passed in a bitlist:

    // Standard wxTextAttr constants

    #define wxTEXT_ATTR_TEXT_COLOUR             0x0001
    #define wxTEXT_ATTR_BACKGROUND_COLOUR       0x0002
    #define wxTEXT_ATTR_FONT_FACE               0x0004
    #define wxTEXT_ATTR_FONT_SIZE               0x0008
    #define wxTEXT_ATTR_FONT_WEIGHT             0x0010
    #define wxTEXT_ATTR_FONT_ITALIC             0x0020
    #define wxTEXT_ATTR_FONT_UNDERLINE          0x0040
    #define wxTEXT_ATTR_FONT \
      wxTEXT_ATTR_FONT_FACE | wxTEXT_ATTR_FONT_SIZE | wxTEXT_ATTR_FONT_WEIGHT \
    | wxTEXT_ATTR_FONT_ITALIC | wxTEXT_ATTR_FONT_UNDERLINE
    #define wxTEXT_ATTR_ALIGNMENT               0x0080
    #define wxTEXT_ATTR_LEFT_INDENT             0x0100
    #define wxTEXT_ATTR_RIGHT_INDENT            0x0200
    #define wxTEXT_ATTR_TABS                    0x0400

    // Extra formatting flags not in wxTextAttr

    #define wxTEXT_ATTR_PARA_SPACING_AFTER      0x00000800
    #define wxTEXT_ATTR_PARA_SPACING_BEFORE     0x00001000
    #define wxTEXT_ATTR_LINE_SPACING            0x00002000
    #define wxTEXT_ATTR_CHARACTER_STYLE_NAME    0x00004000
    #define wxTEXT_ATTR_PARAGRAPH_STYLE_NAME    0x00008000
    #define wxTEXT_ATTR_LIST_STYLE_NAME         0x00010000
    #define wxTEXT_ATTR_BULLET_STYLE            0x00020000
    #define wxTEXT_ATTR_BULLET_NUMBER           0x00040000
    #define wxTEXT_ATTR_BULLET_TEXT             0x00080000
    #define wxTEXT_ATTR_BULLET_NAME             0x00100000
    #define wxTEXT_ATTR_URL                     0x00200000

### wxRichTextAttr::SetFontFaceName

void SetFontFaceName(const wxString& faceName)

Sets the paragraph alignment.

### wxRichTextAttr::SetFontSize

void SetFontSize(int pointSize)

Sets the font size in points.

### wxRichTextAttr::SetFontStyle

void SetFontStyle(int fontStyle)

Sets the font style (normal, italic or slanted).

### wxRichTextAttr::SetFontUnderlined

void SetFontUnderlined(bool underlined)

Sets the font underlining.

### wxRichTextAttr::SetFontWeight

void SetFontWeight(int fontWeight)

Sets the font weight.

### wxRichTextAttr::SetLeftIndent

void SetLeftIndent(int indent, int subIndent = 0)

Sets the left indent and left subindent in tenths of a millimetre.

The sub-indent is an offset from the left of the paragraph, and is used for all but the first line in a paragraph. A positive value will cause the first line to appear to the left of the subsequent lines, and a negative value will cause the first line to be indented relative to the subsequent lines.

wxRichTextBuffer uses indentation to render a bulleted item. The left indent is the distance between the margin and the bullet. The content of the paragraph, including the first line, starts at leftMargin + leftSubIndent. So the distance between the left edge of the bullet and the left of the actual paragraph is leftSubIndent.

### wxRichTextAttr::SetLineSpacing

void SetLineSpacing(int spacing)

Sets the line spacing. spacing is a multiple, where 10 means single-spacing, 15 means 1.5 spacing, and 20 means double spacing. The following constants are defined for convenience:

    #define wxTEXT_ATTR_LINE_SPACING_NORMAL         10
    #define wxTEXT_ATTR_LINE_SPACING_HALF           15
    #define wxTEXT_ATTR_LINE_SPACING_TWICE          20

### wxRichTextAttr::SetListStyleName

void SetListStyleName(const wxString& name)

Sets the list style name.

### wxRichTextAttr::SetPageBreak

void SetPageBreak(bool pageBreak = true)

Specifies a page break before this paragraph.

### wxRichTextAttr::SetParagraphSpacingAfter

void SetParagraphSpacingAfter(int spacing)

Sets the spacing after a paragraph, in tenths of a millimetre.

### wxRichTextAttr::SetParagraphSpacingBefore

void SetParagraphSpacingBefore(int spacing)

Sets the spacing before a paragraph, in tenths of a millimetre.

### wxRichTextAttr::SetParagraphStyleName

void SetParagraphStyleName(const wxString& name)

Sets the name of the paragraph style.

### wxRichTextAttr::SetRightIndent

void SetRightIndent(int indent)

Sets the right indent in tenths of a millimetre.

### wxRichTextAttr::SetTabs

void SetTabs(const wxArrayInt& tabs)

Sets the tab stops, expressed in tenths of a millimetre. Each stop is measured from the left margin and therefore each value must be larger than the last.

### wxRichTextAttr::SetTextColour

void SetTextColour(const wxColour& colText)

Sets the text foreground colout.

### wxRichTextAttr::SetURL

void SetURL(const wxString& url)

Sets the URL for the content. Sets the wxTEXT_ATTR_URL style; content with this style causes wxRichTextCtrl to show a hand cursor over it, and wxRichTextCtrl generates a wxTextUrlEvent when the content is clicked.

### wxRichTextAttr::operator=

void operator operator=(const wxTextAttrEx& attr)

Assignment from a wxTextAttrEx object.

void operator operator=(const wxRichTextAttr& attr)

Assignment from a wxRichTextAttr object.

### wxRichTextAttr::wxTextAttrEx

operator wxTextAttrEx() const

Makes a wxTextAttrEx object from this object.