Version: 3.0.3
wxTextBoxAttr Class Reference

#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. More...
 
 wxTextBoxAttr (const wxTextBoxAttr &attr)
 Copy constructor. More...
 
void Init ()
 Initialises this object. More...
 
void Reset ()
 Resets this object. More...
 
bool operator== (const wxTextBoxAttr &attr) const
 Equality test. More...
 
bool EqPartial (const wxTextBoxAttr &attr, bool weakTest=true) const
 Partial equality test, ignoring unset attributes. More...
 
bool Apply (const wxTextBoxAttr &style, const wxTextBoxAttr *compareWith=NULL)
 Merges the given attributes. More...
 
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. More...
 
bool RemoveStyle (const wxTextBoxAttr &attr)
 Removes the specified attributes from this object. More...
 
void SetFlags (int flags)
 Sets the flags. More...
 
int GetFlags () const
 Returns the flags. More...
 
bool HasFlag (wxTextBoxAttrFlags flag) const
 Is this flag present? More...
 
void RemoveFlag (wxTextBoxAttrFlags flag)
 Removes this flag. More...
 
void AddFlag (wxTextBoxAttrFlags flag)
 Adds this flag. More...
 
bool IsDefault () const
 Returns true if no attributes are set. More...
 
wxTextBoxAttrFloatStyle GetFloatMode () const
 Returns the float mode. More...
 
void SetFloatMode (wxTextBoxAttrFloatStyle mode)
 Sets the float mode. More...
 
bool HasFloatMode () const
 Returns true if float mode is active. More...
 
bool IsFloating () const
 Returns true if this object is floating. More...
 
wxTextBoxAttrClearStyle GetClearMode () const
 Returns the clear mode - whether to wrap text after object. More...
 
void SetClearMode (wxTextBoxAttrClearStyle mode)
 Set the clear mode. More...
 
bool HasClearMode () const
 Returns true if we have a clear flag. More...
 
wxTextBoxAttrCollapseMode GetCollapseBorders () const
 Returns the collapse mode - whether to collapse borders. More...
 
void SetCollapseBorders (wxTextBoxAttrCollapseMode collapse)
 Sets the collapse mode - whether to collapse borders. More...
 
bool HasCollapseBorders () const
 Returns true if the collapse borders flag is present. More...
 
wxTextBoxAttrVerticalAlignment GetVerticalAlignment () const
 Returns the vertical alignment. More...
 
void SetVerticalAlignment (wxTextBoxAttrVerticalAlignment verticalAlignment)
 Sets the vertical alignment. More...
 
bool HasVerticalAlignment () const
 Returns true if a vertical alignment flag is present. More...
 
wxTextAttrDimensionsGetMargins ()
 Returns the margin values. More...
 
const wxTextAttrDimensionsGetMargins () const
 
wxTextAttrDimensionGetLeftMargin ()
 Returns the left margin. More...
 
const wxTextAttrDimensionGetLeftMargin () const
 
wxTextAttrDimensionGetRightMargin ()
 Returns the right margin. More...
 
const wxTextAttrDimensionGetRightMargin () const
 
wxTextAttrDimensionGetTopMargin ()
 Returns the top margin. More...
 
const wxTextAttrDimensionGetTopMargin () const
 
wxTextAttrDimensionGetBottomMargin ()
 Returns the bottom margin. More...
 
const wxTextAttrDimensionGetBottomMargin () const
 
wxTextAttrDimensionsGetPosition ()
 Returns the position. More...
 
const wxTextAttrDimensionsGetPosition () const
 
wxTextAttrDimensionGetLeft ()
 Returns the left position. More...
 
const wxTextAttrDimensionGetLeft () const
 
wxTextAttrDimensionGetRight ()
 Returns the right position. More...
 
const wxTextAttrDimensionGetRight () const
 
wxTextAttrDimensionGetTop ()
 Returns the top position. More...
 
const wxTextAttrDimensionGetTop () const
 
wxTextAttrDimensionGetBottom ()
 Returns the bottom position. More...
 
const wxTextAttrDimensionGetBottom () const
 
wxTextAttrDimensionsGetPadding ()
 Returns the padding values. More...
 
const wxTextAttrDimensionsGetPadding () const
 
wxTextAttrDimensionGetLeftPadding ()
 Returns the left padding value. More...
 
const wxTextAttrDimensionGetLeftPadding () const
 
wxTextAttrDimensionGetRightPadding ()
 Returns the right padding value. More...
 
const wxTextAttrDimensionGetRightPadding () const
 
wxTextAttrDimensionGetTopPadding ()
 Returns the top padding value. More...
 
const wxTextAttrDimensionGetTopPadding () const
 
wxTextAttrDimensionGetBottomPadding ()
 Returns the bottom padding value. More...
 
const wxTextAttrDimensionGetBottomPadding () const
 
wxTextAttrBordersGetBorder ()
 Returns the borders. More...
 
const wxTextAttrBordersGetBorder () const
 
wxTextAttrBorderGetLeftBorder ()
 Returns the left border. More...
 
const wxTextAttrBorderGetLeftBorder () const
 
wxTextAttrBorderGetTopBorder ()
 Returns the top border. More...
 
const wxTextAttrBorderGetTopBorder () const
 
wxTextAttrBorderGetRightBorder ()
 Returns the right border. More...
 
const wxTextAttrBorderGetRightBorder () const
 
wxTextAttrBorderGetBottomBorder ()
 Returns the bottom border. More...
 
const wxTextAttrBorderGetBottomBorder () const
 
wxTextAttrBordersGetOutline ()
 Returns the outline. More...
 
const wxTextAttrBordersGetOutline () const
 
wxTextAttrBorderGetLeftOutline ()
 Returns the left outline. More...
 
const wxTextAttrBorderGetLeftOutline () const
 
wxTextAttrBorderGetTopOutline ()
 Returns the top outline. More...
 
const wxTextAttrBorderGetTopOutline () const
 
wxTextAttrBorderGetRightOutline ()
 Returns the right outline. More...
 
const wxTextAttrBorderGetRightOutline () const
 
wxTextAttrBorderGetBottomOutline ()
 Returns the bottom outline. More...
 
const wxTextAttrBorderGetBottomOutline () const
 
wxTextAttrSizeGetSize ()
 Returns the object size. More...
 
const wxTextAttrSizeGetSize () const
 
wxTextAttrSizeGetMinSize ()
 Returns the object minimum size. More...
 
const wxTextAttrSizeGetMinSize () const
 
wxTextAttrSizeGetMaxSize ()
 Returns the object maximum size. More...
 
const wxTextAttrSizeGetMaxSize () const
 
void SetSize (const wxTextAttrSize &sz)
 Sets the object size. More...
 
void SetMinSize (const wxTextAttrSize &sz)
 Sets the object minimum size. More...
 
void SetMaxSize (const wxTextAttrSize &sz)
 Sets the object maximum size. More...
 
wxTextAttrDimensionGetWidth ()
 Returns the object width. More...
 
const wxTextAttrDimensionGetWidth () const
 
wxTextAttrDimensionGetHeight ()
 Returns the object height. More...
 
const wxTextAttrDimensionGetHeight () const
 
const wxStringGetBoxStyleName () const
 Returns the box style name. More...
 
void SetBoxStyleName (const wxString &name)
 Sets the box style name. More...
 
bool HasBoxStyleName () const
 Returns true if the box style name is present. More...
 

Public Attributes

int m_flags
 
wxTextAttrDimensions m_margins
 
wxTextAttrDimensions m_padding
 
wxTextAttrDimensions m_position
 
wxTextAttrSize m_size
 
wxTextAttrSize m_minSize
 
wxTextAttrSize m_maxSize
 
wxTextAttrBorders m_border
 
wxTextAttrBorders m_outline
 
wxTextBoxAttrFloatStyle m_floatMode
 
wxTextBoxAttrClearStyle m_clearMode
 
wxTextBoxAttrCollapseMode m_collapseMode
 
wxTextBoxAttrVerticalAlignment m_verticalAlignment
 
wxString m_boxStyleName
 

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,
bool  weakTest = true 
) const

Partial equality test, ignoring unset attributes.

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.

wxTextAttrBorders& wxTextBoxAttr::GetBorder ( )
inline

Returns the borders.

const wxTextAttrBorders& wxTextBoxAttr::GetBorder ( ) const
inline
wxTextAttrDimension& wxTextBoxAttr::GetBottom ( )
inline

Returns the bottom position.

const wxTextAttrDimension& wxTextBoxAttr::GetBottom ( ) const
inline
wxTextAttrBorder& wxTextBoxAttr::GetBottomBorder ( )
inline

Returns the bottom border.

const wxTextAttrBorder& wxTextBoxAttr::GetBottomBorder ( ) const
inline
wxTextAttrDimension& wxTextBoxAttr::GetBottomMargin ( )
inline

Returns the bottom margin.

const wxTextAttrDimension& wxTextBoxAttr::GetBottomMargin ( ) const
inline
wxTextAttrBorder& wxTextBoxAttr::GetBottomOutline ( )
inline

Returns the bottom outline.

const wxTextAttrBorder& wxTextBoxAttr::GetBottomOutline ( ) const
inline
wxTextAttrDimension& wxTextBoxAttr::GetBottomPadding ( )
inline

Returns the bottom padding value.

const wxTextAttrDimension& wxTextBoxAttr::GetBottomPadding ( ) const
inline
const wxString& wxTextBoxAttr::GetBoxStyleName ( ) const
inline

Returns the box style name.

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.

int wxTextBoxAttr::GetFlags ( ) const
inline

Returns the flags.

wxTextBoxAttrFloatStyle wxTextBoxAttr::GetFloatMode ( ) const
inline

Returns the float mode.

wxTextAttrDimension& wxTextBoxAttr::GetHeight ( )
inline

Returns the object height.

const wxTextAttrDimension& wxTextBoxAttr::GetHeight ( ) const
inline
wxTextAttrDimension& wxTextBoxAttr::GetLeft ( )
inline

Returns the left position.

const wxTextAttrDimension& wxTextBoxAttr::GetLeft ( ) const
inline
wxTextAttrBorder& wxTextBoxAttr::GetLeftBorder ( )
inline

Returns the left border.

const wxTextAttrBorder& wxTextBoxAttr::GetLeftBorder ( ) const
inline
wxTextAttrDimension& wxTextBoxAttr::GetLeftMargin ( )
inline

Returns the left margin.

const wxTextAttrDimension& wxTextBoxAttr::GetLeftMargin ( ) const
inline
wxTextAttrBorder& wxTextBoxAttr::GetLeftOutline ( )
inline

Returns the left outline.

const wxTextAttrBorder& wxTextBoxAttr::GetLeftOutline ( ) const
inline
wxTextAttrDimension& wxTextBoxAttr::GetLeftPadding ( )
inline

Returns the left padding value.

const wxTextAttrDimension& wxTextBoxAttr::GetLeftPadding ( ) const
inline
wxTextAttrDimensions& wxTextBoxAttr::GetMargins ( )
inline

Returns the margin values.

const wxTextAttrDimensions& wxTextBoxAttr::GetMargins ( ) const
inline
wxTextAttrSize& wxTextBoxAttr::GetMaxSize ( )
inline

Returns the object maximum size.

const wxTextAttrSize& wxTextBoxAttr::GetMaxSize ( ) const
inline
wxTextAttrSize& wxTextBoxAttr::GetMinSize ( )
inline

Returns the object minimum size.

const wxTextAttrSize& wxTextBoxAttr::GetMinSize ( ) const
inline
wxTextAttrBorders& wxTextBoxAttr::GetOutline ( )
inline

Returns the outline.

const wxTextAttrBorders& wxTextBoxAttr::GetOutline ( ) const
inline
wxTextAttrDimensions& wxTextBoxAttr::GetPadding ( )
inline

Returns the padding values.

const wxTextAttrDimensions& wxTextBoxAttr::GetPadding ( ) const
inline
wxTextAttrDimensions& wxTextBoxAttr::GetPosition ( )
inline

Returns the position.

const wxTextAttrDimensions& wxTextBoxAttr::GetPosition ( ) const
inline
wxTextAttrDimension& wxTextBoxAttr::GetRight ( )
inline

Returns the right position.

const wxTextAttrDimension& wxTextBoxAttr::GetRight ( ) const
inline
wxTextAttrBorder& wxTextBoxAttr::GetRightBorder ( )
inline

Returns the right border.

const wxTextAttrBorder& wxTextBoxAttr::GetRightBorder ( ) const
inline
wxTextAttrDimension& wxTextBoxAttr::GetRightMargin ( )
inline

Returns the right margin.

const wxTextAttrDimension& wxTextBoxAttr::GetRightMargin ( ) const
inline
wxTextAttrBorder& wxTextBoxAttr::GetRightOutline ( )
inline

Returns the right outline.

const wxTextAttrBorder& wxTextBoxAttr::GetRightOutline ( ) const
inline
wxTextAttrDimension& wxTextBoxAttr::GetRightPadding ( )
inline

Returns the right padding value.

const wxTextAttrDimension& wxTextBoxAttr::GetRightPadding ( ) const
inline
wxTextAttrSize& wxTextBoxAttr::GetSize ( )
inline

Returns the object size.

const wxTextAttrSize& wxTextBoxAttr::GetSize ( ) const
inline
wxTextAttrDimension& wxTextBoxAttr::GetTop ( )
inline

Returns the top position.

const wxTextAttrDimension& wxTextBoxAttr::GetTop ( ) const
inline
wxTextAttrBorder& wxTextBoxAttr::GetTopBorder ( )
inline

Returns the top border.

const wxTextAttrBorder& wxTextBoxAttr::GetTopBorder ( ) const
inline
wxTextAttrDimension& wxTextBoxAttr::GetTopMargin ( )
inline

Returns the top margin.

const wxTextAttrDimension& wxTextBoxAttr::GetTopMargin ( ) const
inline
wxTextAttrBorder& wxTextBoxAttr::GetTopOutline ( )
inline

Returns the top outline.

const wxTextAttrBorder& wxTextBoxAttr::GetTopOutline ( ) const
inline
wxTextAttrDimension& wxTextBoxAttr::GetTopPadding ( )
inline

Returns the top padding value.

const wxTextAttrDimension& wxTextBoxAttr::GetTopPadding ( ) const
inline
wxTextBoxAttrVerticalAlignment wxTextBoxAttr::GetVerticalAlignment ( ) const
inline

Returns the vertical alignment.

wxTextAttrDimension& wxTextBoxAttr::GetWidth ( )
inline

Returns the object width.

const wxTextAttrDimension& wxTextBoxAttr::GetWidth ( ) const
inline
bool wxTextBoxAttr::HasBoxStyleName ( ) const
inline

Returns true if the box style name is present.

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::SetBoxStyleName ( const wxString name)
inline

Sets the box style name.

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.

void wxTextBoxAttr::SetFlags ( int  flags)
inline

Sets the flags.

void wxTextBoxAttr::SetFloatMode ( wxTextBoxAttrFloatStyle  mode)
inline

Sets the float mode.

void wxTextBoxAttr::SetMaxSize ( const wxTextAttrSize sz)
inline

Sets the object maximum size.

void wxTextBoxAttr::SetMinSize ( const wxTextAttrSize sz)
inline

Sets the object minimum size.

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
wxString wxTextBoxAttr::m_boxStyleName
wxTextBoxAttrClearStyle wxTextBoxAttr::m_clearMode
wxTextBoxAttrCollapseMode wxTextBoxAttr::m_collapseMode
int wxTextBoxAttr::m_flags
wxTextBoxAttrFloatStyle wxTextBoxAttr::m_floatMode
wxTextAttrDimensions wxTextBoxAttr::m_margins
wxTextAttrSize wxTextBoxAttr::m_maxSize
wxTextAttrSize wxTextBoxAttr::m_minSize
wxTextAttrBorders wxTextBoxAttr::m_outline
wxTextAttrDimensions wxTextBoxAttr::m_padding
wxTextAttrDimensions wxTextBoxAttr::m_position
wxTextAttrSize wxTextBoxAttr::m_size
wxTextBoxAttrVerticalAlignment wxTextBoxAttr::m_verticalAlignment