# wxTextBoxAttr Class Reference
[Rich Text]

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

## Detailed Description

A class representing the box attributes of a rich text object.

##

Library: wxRichText

Category: Rich Text

See also:
  wxRichTextAttr, wxRichTextCtrl

## Public Member Functions
| wxTextBoxAttr ()
| Default constructor.
| wxTextBoxAttr (const wxTextBoxAttr &attr)
| Copy constructor.
void | Init ()
| Initialises this object.
void | Reset ()
| Resets this object.
bool | operator== (const wxTextBoxAttr &attr) const
| Equality test.
bool | EqPartial (const wxTextBoxAttr &attr) const
| Partial equality test, ignoring unset attributes.
bool | Apply (const wxTextBoxAttr &style, const wxTextBoxAttr *compareWith=NULL)
| Merges the given attributes.
void | CollectCommonAttributes (const wxTextBoxAttr &attr, wxTextBoxAttr &clashingAttr, wxTextBoxAttr &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.
bool | RemoveStyle (const wxTextBoxAttr &attr)
| Removes the specified attributes from this object.
void | SetFlags (int flags)
| Sets the flags.
int | GetFlags () const
| Returns the flags.
bool | HasFlag (wxTextBoxAttrFlags flag) const
| Is this flag present?
void | RemoveFlag (wxTextBoxAttrFlags flag)
| Removes this flag.
void | AddFlag (wxTextBoxAttrFlags flag)
| Adds this flag.
bool | IsDefault () const
| Returns true if no attributes are set.
wxTextBoxAttrFloatStyle | GetFloatMode () const
| Returns the float mode.
void | SetFloatMode (wxTextBoxAttrFloatStyle mode)
| Sets the float mode.
bool | HasFloatMode () const
| Returns true if float mode is active.
bool | IsFloating () const
| Returns true if this object is floating.
wxTextBoxAttrClearStyle | GetClearMode () const
| Returns the clear mode - whether to wrap text after object.
void | SetClearMode (wxTextBoxAttrClearStyle mode)
| Set the clear mode.
bool | HasClearMode () const
| Returns true if we have a clear flag.
wxTextBoxAttrCollapseMode | GetCollapseBorders () const
| Returns the collapse mode - whether to collapse borders.
void | SetCollapseBorders (wxTextBoxAttrCollapseMode collapse)
| Sets the collapse mode - whether to collapse borders.
bool | HasCollapseBorders () const
| Returns true if the collapse borders flag is present.
wxTextBoxAttrVerticalAlignment | GetVerticalAlignment () const
| Returns the vertical alignment.
void | SetVerticalAlignment (wxTextBoxAttrVerticalAlignment verticalAlignment)
| Sets the vertical alignment.
bool | HasVerticalAlignment () const
| Returns true if a vertical alignment flag is present.
wxTextAttrDimensions & | GetMargins ()
| Returns the margin values.
const wxTextAttrDimensions & | GetMargins () const
wxTextAttrDimension & | GetLeftMargin ()
| Returns the left margin.
const wxTextAttrDimension & | GetLeftMargin () const
wxTextAttrDimension & | GetRightMargin ()
| Returns the right margin.
const wxTextAttrDimension & | GetRightMargin () const
wxTextAttrDimension & | GetTopMargin ()
| Returns the top margin.
const wxTextAttrDimension & | GetTopMargin () const
wxTextAttrDimension & | GetBottomMargin ()
| Returns the bottom margin.
const wxTextAttrDimension & | GetBottomMargin () const
wxTextAttrDimensions & | GetPosition ()
| Returns the position.
const wxTextAttrDimensions & | GetPosition () const
wxTextAttrDimension & | GetLeft ()
| Returns the left position.
const wxTextAttrDimension & | GetLeft () const
wxTextAttrDimension & | GetRight ()
| Returns the right position.
const wxTextAttrDimension & | GetRight () const
wxTextAttrDimension & | GetTop ()
| Returns the top position.
const wxTextAttrDimension & | GetTop () const
wxTextAttrDimension & | GetBottom ()
| Returns the bottom position.
const wxTextAttrDimension & | GetBottom () const
wxTextAttrDimensions & | GetPadding ()
| Returns the padding values.
const wxTextAttrDimensions & | GetPadding () const
wxTextAttrDimension & | GetLeftPadding ()
| Returns the left padding value.
const wxTextAttrDimension & | GetLeftPadding () const
wxTextAttrDimension & | GetRightPadding ()
| Returns the right padding value.
const wxTextAttrDimension & | GetRightPadding () const
wxTextAttrDimension & | GetTopPadding ()
| Returns the top padding value.
const wxTextAttrDimension & | GetTopPadding () const
wxTextAttrDimension & | GetBottomPadding ()
| Returns the bottom padding value.
const wxTextAttrDimension & | GetBottomPadding () const
wxTextAttrBorders & | GetBorder ()
| Returns the borders.
const wxTextAttrBorders & | GetBorder () const
wxTextAttrBorder & | GetLeftBorder ()
| Returns the left border.
const wxTextAttrBorder & | GetLeftBorder () const
wxTextAttrBorder & | GetTopBorder ()
| Returns the top border.
const wxTextAttrBorder & | GetTopBorder () const
wxTextAttrBorder & | GetRightBorder ()
| Returns the right border.
const wxTextAttrBorder & | GetRightBorder () const
wxTextAttrBorder & | GetBottomBorder ()
| Returns the bottom border.
const wxTextAttrBorder & | GetBottomBorder () const
wxTextAttrBorders & | GetOutline ()
| Returns the outline.
const wxTextAttrBorders & | GetOutline () const
wxTextAttrBorder & | GetLeftOutline ()
| Returns the left outline.
const wxTextAttrBorder & | GetLeftOutline () const
wxTextAttrBorder & | GetTopOutline ()
| Returns the top outline.
const wxTextAttrBorder & | GetTopOutline () const
wxTextAttrBorder & | GetRightOutline ()
| Returns the right outline.
const wxTextAttrBorder & | GetRightOutline () const
wxTextAttrBorder & | GetBottomOutline ()
| Returns the bottom outline.
const wxTextAttrBorder & | GetBottomOutline () const
wxTextAttrSize & | GetSize ()
| Returns the object size.
const wxTextAttrSize & | GetSize () const
void | SetSize (const wxTextAttrSize &sz)
| Sets the object size.
wxTextAttrDimension & | GetWidth ()
| Returns the object width.
const wxTextAttrDimension & | GetWidth () const
wxTextAttrDimension & | GetHeight ()
| Returns the object height.
const wxTextAttrDimension & | GetHeight () const
## Public Attributes
int | m_flags
wxTextAttrDimensions | m_margins
wxTextAttrDimensions | m_padding
wxTextAttrDimensions | m_position
wxTextAttrSize | m_size
wxTextAttrBorders | m_border
wxTextAttrBorders | m_outline
wxTextBoxAttrFloatStyle | m_floatMode
wxTextBoxAttrClearStyle | m_clearMode
wxTextBoxAttrCollapseMode | m_collapseMode
wxTextBoxAttrVerticalAlignment | m_verticalAlignment

List of all members.

## Constructor & Destructor Documentation

wxTextBoxAttr::wxTextBoxAttr | ( |  | ) | `[inline]`

Default constructor.

wxTextBoxAttr::wxTextBoxAttr | ( | const wxTextBoxAttr & | attr | ) | `[inline]`

Copy constructor.

## Member Function Documentation

void wxTextBoxAttr::AddFlag | ( | wxTextBoxAttrFlags | flag | ) | `[inline]`

Adds this flag.

bool wxTextBoxAttr::Apply | ( | const wxTextBoxAttr & | style,
|  | const wxTextBoxAttr * | 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.

void wxTextBoxAttr::CollectCommonAttributes | ( | const wxTextBoxAttr & | attr,
|  | wxTextBoxAttr & | clashingAttr,
|  | wxTextBoxAttr & | 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.

bool wxTextBoxAttr::EqPartial | ( | const wxTextBoxAttr & | attr | ) | const

Partial equality test, ignoring unset attributes.

const wxTextAttrBorders& wxTextBoxAttr::GetBorder | ( |  | ) | const`[inline]`

wxTextAttrBorders& wxTextBoxAttr::GetBorder | ( |  | ) | `[inline]`

Returns the borders.

const wxTextAttrDimension& wxTextBoxAttr::GetBottom | ( |  | ) | const`[inline]`

wxTextAttrDimension& wxTextBoxAttr::GetBottom | ( |  | ) | `[inline]`

Returns the bottom position.

const wxTextAttrBorder& wxTextBoxAttr::GetBottomBorder | ( |  | ) | const`[inline]`

wxTextAttrBorder& wxTextBoxAttr::GetBottomBorder | ( |  | ) | `[inline]`

Returns the bottom border.

const wxTextAttrDimension& wxTextBoxAttr::GetBottomMargin | ( |  | ) | const`[inline]`

wxTextAttrDimension& wxTextBoxAttr::GetBottomMargin | ( |  | ) | `[inline]`

Returns the bottom margin.

const wxTextAttrBorder& wxTextBoxAttr::GetBottomOutline | ( |  | ) | const`[inline]`

wxTextAttrBorder& wxTextBoxAttr::GetBottomOutline | ( |  | ) | `[inline]`

Returns the bottom outline.

const wxTextAttrDimension& wxTextBoxAttr::GetBottomPadding | ( |  | ) | const`[inline]`

wxTextAttrDimension& wxTextBoxAttr::GetBottomPadding | ( |  | ) | `[inline]`

Returns the bottom padding value.

wxTextBoxAttrClearStyle wxTextBoxAttr::GetClearMode | ( |  | ) | const`[inline]`

Returns the clear mode - whether to wrap text after object.

Currently unimplemented.

wxTextBoxAttrCollapseMode wxTextBoxAttr::GetCollapseBorders | ( |  | ) | const`[inline]`

Returns the collapse mode - whether to collapse borders.

Currently unimplemented.

int wxTextBoxAttr::GetFlags | ( |  | ) | const`[inline]`

Returns the flags.

wxTextBoxAttrFloatStyle wxTextBoxAttr::GetFloatMode | ( |  | ) | const`[inline]`

Returns the float mode.

const wxTextAttrDimension& wxTextBoxAttr::GetHeight | ( |  | ) | const`[inline]`

wxTextAttrDimension& wxTextBoxAttr::GetHeight | ( |  | ) | `[inline]`

Returns the object height.

const wxTextAttrDimension& wxTextBoxAttr::GetLeft | ( |  | ) | const`[inline]`

wxTextAttrDimension& wxTextBoxAttr::GetLeft | ( |  | ) | `[inline]`

Returns the left position.

const wxTextAttrBorder& wxTextBoxAttr::GetLeftBorder | ( |  | ) | const`[inline]`

wxTextAttrBorder& wxTextBoxAttr::GetLeftBorder | ( |  | ) | `[inline]`

Returns the left border.

const wxTextAttrDimension& wxTextBoxAttr::GetLeftMargin | ( |  | ) | const`[inline]`

wxTextAttrDimension& wxTextBoxAttr::GetLeftMargin | ( |  | ) | `[inline]`

Returns the left margin.

const wxTextAttrBorder& wxTextBoxAttr::GetLeftOutline | ( |  | ) | const`[inline]`

wxTextAttrBorder& wxTextBoxAttr::GetLeftOutline | ( |  | ) | `[inline]`

Returns the left outline.

const wxTextAttrDimension& wxTextBoxAttr::GetLeftPadding | ( |  | ) | const`[inline]`

wxTextAttrDimension& wxTextBoxAttr::GetLeftPadding | ( |  | ) | `[inline]`

Returns the left padding value.

const wxTextAttrDimensions& wxTextBoxAttr::GetMargins | ( |  | ) | const`[inline]`

wxTextAttrDimensions& wxTextBoxAttr::GetMargins | ( |  | ) | `[inline]`

Returns the margin values.

const wxTextAttrBorders& wxTextBoxAttr::GetOutline | ( |  | ) | const`[inline]`

wxTextAttrBorders& wxTextBoxAttr::GetOutline | ( |  | ) | `[inline]`

Returns the outline.

const wxTextAttrDimensions& wxTextBoxAttr::GetPadding | ( |  | ) | const`[inline]`

wxTextAttrDimensions& wxTextBoxAttr::GetPadding | ( |  | ) | `[inline]`

Returns the padding values.

const wxTextAttrDimensions& wxTextBoxAttr::GetPosition | ( |  | ) | const`[inline]`

wxTextAttrDimensions& wxTextBoxAttr::GetPosition | ( |  | ) | `[inline]`

Returns the position.

const wxTextAttrDimension& wxTextBoxAttr::GetRight | ( |  | ) | const`[inline]`

wxTextAttrDimension& wxTextBoxAttr::GetRight | ( |  | ) | `[inline]`

Returns the right position.

const wxTextAttrBorder& wxTextBoxAttr::GetRightBorder | ( |  | ) | const`[inline]`

wxTextAttrBorder& wxTextBoxAttr::GetRightBorder | ( |  | ) | `[inline]`

Returns the right border.

const wxTextAttrDimension& wxTextBoxAttr::GetRightMargin | ( |  | ) | const`[inline]`

wxTextAttrDimension& wxTextBoxAttr::GetRightMargin | ( |  | ) | `[inline]`

Returns the right margin.

const wxTextAttrBorder& wxTextBoxAttr::GetRightOutline | ( |  | ) | const`[inline]`

wxTextAttrBorder& wxTextBoxAttr::GetRightOutline | ( |  | ) | `[inline]`

Returns the right outline.

const wxTextAttrDimension& wxTextBoxAttr::GetRightPadding | ( |  | ) | const`[inline]`

wxTextAttrDimension& wxTextBoxAttr::GetRightPadding | ( |  | ) | `[inline]`

Returns the right padding value.

const wxTextAttrSize& wxTextBoxAttr::GetSize | ( |  | ) | const`[inline]`

wxTextAttrSize& wxTextBoxAttr::GetSize | ( |  | ) | `[inline]`

Returns the object size.

const wxTextAttrDimension& wxTextBoxAttr::GetTop | ( |  | ) | const`[inline]`

wxTextAttrDimension& wxTextBoxAttr::GetTop | ( |  | ) | `[inline]`

Returns the top position.

const wxTextAttrBorder& wxTextBoxAttr::GetTopBorder | ( |  | ) | const`[inline]`

wxTextAttrBorder& wxTextBoxAttr::GetTopBorder | ( |  | ) | `[inline]`

Returns the top border.

const wxTextAttrDimension& wxTextBoxAttr::GetTopMargin | ( |  | ) | const`[inline]`

wxTextAttrDimension& wxTextBoxAttr::GetTopMargin | ( |  | ) | `[inline]`

Returns the top margin.

const wxTextAttrBorder& wxTextBoxAttr::GetTopOutline | ( |  | ) | const`[inline]`

wxTextAttrBorder& wxTextBoxAttr::GetTopOutline | ( |  | ) | `[inline]`

Returns the top outline.

const wxTextAttrDimension& wxTextBoxAttr::GetTopPadding | ( |  | ) | const`[inline]`

wxTextAttrDimension& wxTextBoxAttr::GetTopPadding | ( |  | ) | `[inline]`

Returns the top padding value.

wxTextBoxAttrVerticalAlignment wxTextBoxAttr::GetVerticalAlignment | ( |  | ) | const`[inline]`

Returns the vertical alignment.

const wxTextAttrDimension& wxTextBoxAttr::GetWidth | ( |  | ) | const`[inline]`

wxTextAttrDimension& wxTextBoxAttr::GetWidth | ( |  | ) | `[inline]`

Returns the object width.

bool wxTextBoxAttr::HasClearMode | ( |  | ) | const`[inline]`

Returns true if we have a clear flag.

bool wxTextBoxAttr::HasCollapseBorders | ( |  | ) | const`[inline]`

Returns true if the collapse borders flag is present.

bool wxTextBoxAttr::HasFlag | ( | wxTextBoxAttrFlags | flag | ) | const`[inline]`

Is this flag present?

bool wxTextBoxAttr::HasFloatMode | ( |  | ) | const`[inline]`

Returns true if float mode is active.

bool wxTextBoxAttr::HasVerticalAlignment | ( |  | ) | const`[inline]`

Returns true if a vertical alignment flag is present.

void wxTextBoxAttr::Init | ( |  | ) | `[inline]`

Initialises this object.

bool wxTextBoxAttr::IsDefault | ( |  | ) | const

Returns true if no attributes are set.

bool wxTextBoxAttr::IsFloating | ( |  | ) | const`[inline]`

Returns true if this object is floating.

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

Equality test.

void wxTextBoxAttr::RemoveFlag | ( | wxTextBoxAttrFlags | flag | ) | `[inline]`

Removes this flag.

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

Removes the specified attributes from this object.

void wxTextBoxAttr::Reset | ( |  | ) |

Resets this object.

void wxTextBoxAttr::SetClearMode | ( | wxTextBoxAttrClearStyle | mode | ) | `[inline]`

Set the clear mode.

Currently unimplemented.

void wxTextBoxAttr::SetCollapseBorders | ( | wxTextBoxAttrCollapseMode | collapse | ) | `[inline]`

Sets the collapse mode - whether to collapse borders.

Currently unimplemented.

void wxTextBoxAttr::SetFlags | ( | int | flags | ) | `[inline]`

Sets the flags.

void wxTextBoxAttr::SetFloatMode | ( | wxTextBoxAttrFloatStyle | mode | ) | `[inline]`

Sets the float mode.

void wxTextBoxAttr::SetSize | ( | const wxTextAttrSize & | sz | ) | `[inline]`

Sets the object size.

void wxTextBoxAttr::SetVerticalAlignment | ( | wxTextBoxAttrVerticalAlignment | verticalAlignment | ) | `[inline]`

Sets the vertical alignment.

## Member Data Documentation

wxTextAttrBorders wxTextBoxAttr::m_border

wxTextBoxAttrClearStyle wxTextBoxAttr::m_clearMode

wxTextBoxAttrCollapseMode wxTextBoxAttr::m_collapseMode

int wxTextBoxAttr::m_flags

wxTextBoxAttrFloatStyle wxTextBoxAttr::m_floatMode

wxTextAttrDimensions wxTextBoxAttr::m_margins

wxTextAttrBorders wxTextBoxAttr::m_outline

wxTextAttrDimensions wxTextBoxAttr::m_padding

wxTextAttrDimensions wxTextBoxAttr::m_position

wxTextAttrSize wxTextBoxAttr::m_size

wxTextBoxAttrVerticalAlignment wxTextBoxAttr::m_verticalAlignment

|  | [ top ]