| Version: 3.2.8

Public Member Functions | Public Attributes | List of all members
wxRichTextAttr Class Reference
Class List by Category » Rich Text

`#include <wx/richtext/richtextbuffer.h>`

Inheritance diagram for wxRichTextAttr:
[legend]

## Detailed Description

A class representing enhanced attributes for rich text objects.

This adds a wxTextBoxAttr member to the basic wxTextAttr class.

##

Library: wxRichText
Category: Rich Text

See also
  wxTextAttr, wxTextBoxAttr, wxRichTextCtrl

## Public Member Functions
| wxRichTextAttr (const wxTextAttr &attr)
| Constructor taking a wxTextAttr. More...
| wxRichTextAttr (const wxRichTextAttr &attr)
| Copy constructor. More...
| wxRichTextAttr ()
| Default constructor. More...
void | Copy (const wxRichTextAttr &attr)
| Copy function. More...
void | operator= (const wxRichTextAttr &attr)
| Assignment operator. More...
void | operator= (const wxTextAttr &attr)
| Assignment operator. More...
bool | operator== (const wxRichTextAttr &attr) const
| Equality test. More...
bool | EqPartial (const wxRichTextAttr &attr, bool weakTest=true) const
| Partial equality test. More...
bool | Apply (const wxRichTextAttr &style, const wxRichTextAttr *compareWith=NULL)
| Merges the given attributes. More...
void | CollectCommonAttributes (const wxRichTextAttr &attr, wxRichTextAttr &clashingAttr, wxRichTextAttr &absentAttr)
| Collects the attributes that are common to a range of content, building up a note of which attributes are absent in some objects and which clash in some objects. More...
bool | RemoveStyle (const wxRichTextAttr &attr)
| Removes the specified attributes from this object. More...
wxTextBoxAttr & | GetTextBoxAttr ()
| Returns the text box attributes. More...
const wxTextBoxAttr & | GetTextBoxAttr () const
void | SetTextBoxAttr (const wxTextBoxAttr &attr)
| Set the text box attributes. More...
bool | IsDefault () const
| Returns true if no attributes are set. More...
Public Member Functions inherited from wxTextAttr
bool | Apply (const wxTextAttr &style, const wxTextAttr *compareWith=NULL)
| Applies the attributes in style to the original object, but not those attributes from style that are the same as those in compareWith (if passed). More...
void | Merge (const wxTextAttr &overlay)
| Copies all defined/valid properties from overlay to current object. More...
bool | EqPartial (const wxTextAttr &attr, bool weakTest=true) const
| Partial equality test. More...
void | operator= (const wxTextAttr &attr)
| Assignment from a wxTextAttr object. More...
| wxTextAttr ()
| Constructors. More...
| wxTextAttr (const wxColour &colText, const wxColour &colBack=wxNullColour, const wxFont &font=wxNullFont, wxTextAttrAlignment alignment=wxTEXT_ALIGNMENT_DEFAULT)
| Constructors. More...
| wxTextAttr (const wxTextAttr &attr)
| Constructors. More...
wxTextAttrAlignment | GetAlignment () const
| Returns the alignment flags. More...
const wxColour & | GetBackgroundColour () const
| Returns the background colour. More...
const wxString & | GetBulletFont () const
| Returns a string containing the name of the font associated with the bullet symbol. More...
const wxString & | GetBulletName () const
| Returns the standard bullet name, applicable if the bullet style is wxTEXT_ATTR_BULLET_STYLE_STANDARD. More...
int | GetBulletNumber () const
| Returns the bullet number. More...
int | GetBulletStyle () const
| Returns the bullet style. More...
const wxString & | GetBulletText () const
| Returns the bullet text, which could be a symbol, or (for example) cached outline text. More...
const wxString & | GetCharacterStyleName () const
| Returns the name of the character style. More...
long | GetFlags () const
| Returns flags indicating which attributes are applicable. More...
wxFont | GetFont () const
| Creates and returns a font specified by the font attributes in the wxTextAttr object. More...
bool | GetFontAttributes (const wxFont &font, int flags=wxTEXT_ATTR_FONT)
| Gets the font attributes from the given font, using only the attributes specified by flags. More...
wxFontEncoding | GetFontEncoding () const
| Returns the font encoding. More...
const wxString & | GetFontFaceName () const
| Returns the font face name. More...
wxFontFamily | GetFontFamily () const
| Returns the font family. More...
int | GetFontSize () const
| Returns the font size in points. More...
wxFontStyle | GetFontStyle () const
| Returns the font style. More...
bool | GetFontUnderlined () const
| Returns true if the font is underlined. More...
wxTextAttrUnderlineType | GetUnderlineType () const
| Returns the underline type, which is one of the wxTextAttrUnderlineType values. More...
const wxColour & | GetUnderlineColour () const
| Returns the underline color used. More...
wxFontWeight | GetFontWeight () const
| Returns the font weight. More...
long | GetLeftIndent () const
| Returns the left indent in tenths of a millimetre. More...
long | GetLeftSubIndent () const
| Returns the left sub-indent in tenths of a millimetre. More...
int | GetLineSpacing () const
| Returns the line spacing value, one of wxTextAttrLineSpacing values. More...
const wxString & | GetListStyleName () const
| Returns the name of the list style. More...
int | GetOutlineLevel () const
| Returns the outline level. More...
int | GetParagraphSpacingAfter () const
| Returns the space in tenths of a millimeter after the paragraph. More...
int | GetParagraphSpacingBefore () const
| Returns the space in tenths of a millimeter before the paragraph. More...
const wxString & | GetParagraphStyleName () const
| Returns the name of the paragraph style. More...
long | GetRightIndent () const
| Returns the right indent in tenths of a millimeter. More...
const wxArrayInt & | GetTabs () const
| Returns an array of tab stops, each expressed in tenths of a millimeter. More...
const wxColour & | GetTextColour () const
| Returns the text foreground colour. More...
int | GetTextEffectFlags () const
| Returns the text effect bits of interest. More...
int | GetTextEffects () const
| Returns the text effects, a bit list of styles. More...
const wxString & | GetURL () const
| Returns the URL for the content. More...
bool | HasAlignment () const
| Returns true if the attribute object specifies alignment. More...
bool | HasBackgroundColour () const
| Returns true if the attribute object specifies a background colour. More...
bool | HasBulletName () const
| Returns true if the attribute object specifies a standard bullet name. More...
bool | HasBulletNumber () const
| Returns true if the attribute object specifies a bullet number. More...
bool | HasBulletStyle () const
| Returns true if the attribute object specifies a bullet style. More...
bool | HasBulletText () const
| Returns true if the attribute object specifies bullet text (usually specifying a symbol). More...
bool | HasCharacterStyleName () const
| Returns true if the attribute object specifies a character style name. More...
bool | HasFlag (long flag) const
| Returns true if the flag is present in the attribute object's flag bitlist. More...
bool | HasFont () const
| Returns true if the attribute object specifies any font attributes. More...
bool | HasFontEncoding () const
| Returns true if the attribute object specifies an encoding. More...
bool | HasFontFaceName () const
| Returns true if the attribute object specifies a font face name. More...
bool | HasFontFamily () const
| Returns true if the attribute object specifies a font family. More...
bool | HasFontItalic () const
| Returns true if the attribute object specifies italic style. More...
bool | HasFontSize () const
| Returns true if the attribute object specifies a font point or pixel size. More...
bool | HasFontPointSize () const
| Returns true if the attribute object specifies a font point size. More...
bool | HasFontPixelSize () const
| Returns true if the attribute object specifies a font pixel size. More...
bool | HasFontUnderlined () const
| Returns true if the attribute object specifies either underlining or no underlining. More...
bool | HasFontWeight () const
| Returns true if the attribute object specifies font weight (bold, light or normal). More...
bool | HasLeftIndent () const
| Returns true if the attribute object specifies a left indent. More...
bool | HasLineSpacing () const
| Returns true if the attribute object specifies line spacing. More...
bool | HasListStyleName () const
| Returns true if the attribute object specifies a list style name. More...
bool | HasOutlineLevel () const
| Returns true if the attribute object specifies an outline level. More...
bool | HasPageBreak () const
| Returns true if the attribute object specifies a page break before this paragraph. More...
bool | HasParagraphSpacingAfter () const
| Returns true if the attribute object specifies spacing after a paragraph. More...
bool | HasParagraphSpacingBefore () const
| Returns true if the attribute object specifies spacing before a paragraph. More...
bool | HasParagraphStyleName () const
| Returns true if the attribute object specifies a paragraph style name. More...
bool | HasRightIndent () const
| Returns true if the attribute object specifies a right indent. More...
bool | HasTabs () const
| Returns true if the attribute object specifies tab stops. More...
bool | HasTextColour () const
| Returns true if the attribute object specifies a text foreground colour. More...
bool | HasTextEffects () const
| Returns true if the attribute object specifies text effects. More...
bool | HasURL () const
| Returns true if the attribute object specifies a URL. More...
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. More...
bool | IsDefault () const
| Returns false if we have any attributes set, true otherwise. More...
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. More...
void | SetAlignment (wxTextAttrAlignment alignment)
| Sets the paragraph alignment. More...
void | SetBackgroundColour (const wxColour &colBack)
| Sets the background colour. More...
void | SetBulletFont (const wxString &font)
| Sets the name of the font associated with the bullet symbol. More...
void | SetBulletName (const wxString &name)
| Sets the standard bullet name, applicable if the bullet style is wxTEXT_ATTR_BULLET_STYLE_STANDARD. More...
void | SetBulletNumber (int n)
| Sets the bullet number. More...
void | SetBulletStyle (int style)
| Sets the bullet style. More...
void | SetBulletText (const wxString &text)
| Sets the bullet text, which could be a symbol, or (for example) cached outline text. More...
void | SetCharacterStyleName (const wxString &name)
| Sets the character style name. More...
void | SetFlags (long flags)
| Sets the flags determining which styles are being specified. More...
void | SetFont (const wxFont &font, int flags=wxTEXT_ATTR_FONT &~wxTEXT_ATTR_FONT_PIXEL_SIZE)
| Sets the attributes for the given font. More...
void | SetFontEncoding (wxFontEncoding encoding)
| Sets the font encoding. More...
void | SetFontFaceName (const wxString &faceName)
| Sets the font face name. More...
void | SetFontFamily (wxFontFamily family)
| Sets the font family. More...
void | SetFontSize (int pointSize)
| Sets the font size in points. More...
void | SetFontPointSize (int pointSize)
| Sets the font size in points. More...
void | SetFontPixelSize (int pixelSize)
| Sets the font size in pixels. More...
void | SetFontStyle (wxFontStyle fontStyle)
| Sets the font style (normal, italic or slanted). More...
void | SetFontUnderlined (bool underlined)
| Sets the font underlining (solid line, text colour). More...
void | SetFontUnderlined (wxTextAttrUnderlineType type, const wxColour &colour=wxNullColour)
| Sets the font underlining. More...
void | SetFontWeight (wxFontWeight fontWeight)
| Sets the font weight. More...
void | SetLeftIndent (int indent, int subIndent=0)
| Sets the left indent and left subindent in tenths of a millimetre. More...
void | SetLineSpacing (int spacing)
| Sets the line spacing. More...
void | SetListStyleName (const wxString &name)
| Sets the list style name. More...
void | SetOutlineLevel (int level)
| Specifies the outline level. More...
void | SetPageBreak (bool pageBreak=true)
| Specifies a page break before this paragraph. More...
void | SetParagraphSpacingAfter (int spacing)
| Sets the spacing after a paragraph, in tenths of a millimetre. More...
void | SetParagraphSpacingBefore (int spacing)
| Sets the spacing before a paragraph, in tenths of a millimetre. More...
void | SetParagraphStyleName (const wxString &name)
| Sets the name of the paragraph style. More...
void | SetRightIndent (int indent)
| Sets the right indent in tenths of a millimetre. More...
void | SetTabs (const wxArrayInt &tabs)
| Sets the tab stops, expressed in tenths of a millimetre. More...
void | SetTextColour (const wxColour &colText)
| Sets the text foreground colour. More...
void | SetTextEffectFlags (int flags)
| Sets the text effect bits of interest. More...
void | SetTextEffects (int effects)
| Sets the text effects, a bit list of styles. More...
void | SetURL (const wxString &url)
| Sets the URL for the content. More...

## Public Attributes
wxTextBoxAttr | m_textBoxAttr

## Additional Inherited Members
Static Public Member Functions inherited from wxTextAttr
static wxTextAttr | Merge (const wxTextAttr &base, const wxTextAttr &overlay)
| Creates a new `wxTextAttr` which is a merge of base and overlay. More...

## Constructor & Destructor Documentation

## ◆ wxRichTextAttr() [1/3]

wxRichTextAttr::wxRichTextAttr | ( | const wxTextAttr & | attr | ) |
| inline

Constructor taking a wxTextAttr.

## ◆ wxRichTextAttr() [2/3]

wxRichTextAttr::wxRichTextAttr | ( | const wxRichTextAttr & | attr | ) |
| inline

Copy constructor.

## ◆ wxRichTextAttr() [3/3]

wxRichTextAttr::wxRichTextAttr | ( |  | ) |
| inline

Default constructor.

## Member Function Documentation

## ◆ Apply()

bool wxRichTextAttr::Apply | ( | const wxRichTextAttr & | style,
|  | const wxRichTextAttr * | compareWith = `NULL`
| ) |  |

Merges the given attributes.

If compareWith is non-NULL, then it will be used to mask out those attributes that are the same in style and compareWith, for situations where we don't want to explicitly set inherited attributes.

## ◆ CollectCommonAttributes()

void wxRichTextAttr::CollectCommonAttributes | ( | const wxRichTextAttr & | attr,
|  | wxRichTextAttr & | clashingAttr,
|  | wxRichTextAttr & | absentAttr
| ) |  |

Collects the attributes that are common to a range of content, building up a note of which attributes are absent in some objects and which clash in some objects.

## ◆ Copy()

void wxRichTextAttr::Copy | ( | const wxRichTextAttr & | attr | ) |

Copy function.

## ◆ EqPartial()

bool wxRichTextAttr::EqPartial | ( | const wxRichTextAttr & | attr,
|  | bool | weakTest = `true`
| ) |  | const

Partial equality test.

If weakTest is true, attributes of this object do not have to be present if those attributes of attr are present. If weakTest is false, the function will fail if an attribute is present in attr but not in this object.

## ◆ GetTextBoxAttr() [1/2]

wxTextBoxAttr& wxRichTextAttr::GetTextBoxAttr | ( |  | ) |
| inline

Returns the text box attributes.

## ◆ GetTextBoxAttr() [2/2]

const wxTextBoxAttr& wxRichTextAttr::GetTextBoxAttr | ( |  | ) | const
| inline

## ◆ IsDefault()

bool wxRichTextAttr::IsDefault | ( |  | ) | const
| inline

Returns true if no attributes are set.

## ◆ operator=() [1/2]

void wxRichTextAttr::operator= | ( | const wxRichTextAttr & | attr | ) |
| inline

Assignment operator.

## ◆ operator=() [2/2]

void wxRichTextAttr::operator= | ( | const wxTextAttr & | attr | ) |
| inline

Assignment operator.

## ◆ operator==()

bool wxRichTextAttr::operator== | ( | const wxRichTextAttr & | attr | ) | const

Equality test.

## ◆ RemoveStyle()

bool wxRichTextAttr::RemoveStyle | ( | const wxRichTextAttr & | attr | ) |

Removes the specified attributes from this object.

## ◆ SetTextBoxAttr()

void wxRichTextAttr::SetTextBoxAttr | ( | const wxTextBoxAttr & | attr | ) |
| inline

Set the text box attributes.

## Member Data Documentation

## ◆ m_textBoxAttr

wxTextBoxAttr wxRichTextAttr::m_textBoxAttr