Version: 3.2.5
wxTextAttrBorder Class Reference

#include <wx/richtext/richtextbuffer.h>

Detailed Description

A class representing a rich text object border.

Library:  wxRichText
Category:  Rich Text
See also
wxRichTextAttr, wxRichTextCtrl, wxRichTextAttrBorders

Public Member Functions

 wxTextAttrBorder ()
 Default constructor. More...
 
bool operator== (const wxTextAttrBorder &border) const
 Equality operator. More...
 
void Reset ()
 Resets the border style, colour, width and flags. More...
 
bool EqPartial (const wxTextAttrBorder &border, bool weakTest=true) const
 Partial equality test. More...
 
bool Apply (const wxTextAttrBorder &border, const wxTextAttrBorder *compareWith=NULL)
 Applies the border to this object, but not if the same as compareWith. More...
 
bool RemoveStyle (const wxTextAttrBorder &attr)
 Removes the specified attributes from this object. More...
 
void CollectCommonAttributes (const wxTextAttrBorder &attr, wxTextAttrBorder &clashingAttr, wxTextAttrBorder &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...
 
void SetStyle (int style)
 Sets the border style. More...
 
int GetStyle () const
 Gets the border style. More...
 
void SetColour (unsigned long colour)
 Sets the border colour. More...
 
void SetColour (const wxColour &colour)
 Sets the border colour. More...
 
unsigned long GetColourLong () const
 Gets the colour as a long. More...
 
wxColour GetColour () const
 Gets the colour. More...
 
wxTextAttrDimensionGetWidth ()
 Gets the border width. More...
 
const wxTextAttrDimensionGetWidth () const
 
void SetWidth (const wxTextAttrDimension &width)
 Sets the border width. More...
 
void SetWidth (int value, wxTextAttrUnits units=wxTEXT_ATTR_UNITS_TENTHS_MM)
 Sets the border width. More...
 
bool HasStyle () const
 True if the border has a valid style. More...
 
bool HasColour () const
 True if the border has a valid colour. More...
 
bool HasWidth () const
 True if the border has a valid width. More...
 
bool IsValid () const
 True if the border is valid. More...
 
bool IsDefault () const
 True if the border has no attributes set. More...
 
void MakeValid ()
 Set the valid flag for this border. More...
 
int GetFlags () const
 Returns the border flags. More...
 
void SetFlags (int flags)
 Sets the border flags. More...
 
void AddFlag (int flag)
 Adds a border flag. More...
 
void RemoveFlag (int flag)
 Removes a border flag. More...
 

Public Attributes

int m_borderStyle
 
unsigned long m_borderColour
 
wxTextAttrDimension m_borderWidth
 
int m_flags
 

Constructor & Destructor Documentation

◆ wxTextAttrBorder()

wxTextAttrBorder::wxTextAttrBorder ( )
inline

Default constructor.

Member Function Documentation

◆ AddFlag()

void wxTextAttrBorder::AddFlag ( int  flag)
inline

Adds a border flag.

◆ Apply()

bool wxTextAttrBorder::Apply ( const wxTextAttrBorder border,
const wxTextAttrBorder compareWith = NULL 
)

Applies the border to this object, but not if the same as compareWith.

◆ CollectCommonAttributes()

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

◆ EqPartial()

bool wxTextAttrBorder::EqPartial ( const wxTextAttrBorder border,
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 border are present. If weakTest is false, the function will fail if an attribute is present in border but not in this object.

◆ GetColour()

wxColour wxTextAttrBorder::GetColour ( ) const
inline

Gets the colour.

◆ GetColourLong()

unsigned long wxTextAttrBorder::GetColourLong ( ) const
inline

Gets the colour as a long.

◆ GetFlags()

int wxTextAttrBorder::GetFlags ( ) const
inline

Returns the border flags.

◆ GetStyle()

int wxTextAttrBorder::GetStyle ( ) const
inline

Gets the border style.

◆ GetWidth() [1/2]

wxTextAttrDimension& wxTextAttrBorder::GetWidth ( )
inline

Gets the border width.

◆ GetWidth() [2/2]

const wxTextAttrDimension& wxTextAttrBorder::GetWidth ( ) const
inline

◆ HasColour()

bool wxTextAttrBorder::HasColour ( ) const
inline

True if the border has a valid colour.

◆ HasStyle()

bool wxTextAttrBorder::HasStyle ( ) const
inline

True if the border has a valid style.

◆ HasWidth()

bool wxTextAttrBorder::HasWidth ( ) const
inline

True if the border has a valid width.

◆ IsDefault()

bool wxTextAttrBorder::IsDefault ( ) const
inline

True if the border has no attributes set.

◆ IsValid()

bool wxTextAttrBorder::IsValid ( ) const
inline

True if the border is valid.

◆ MakeValid()

void wxTextAttrBorder::MakeValid ( )
inline

Set the valid flag for this border.

◆ operator==()

bool wxTextAttrBorder::operator== ( const wxTextAttrBorder border) const
inline

Equality operator.

◆ RemoveFlag()

void wxTextAttrBorder::RemoveFlag ( int  flag)
inline

Removes a border flag.

◆ RemoveStyle()

bool wxTextAttrBorder::RemoveStyle ( const wxTextAttrBorder attr)

Removes the specified attributes from this object.

◆ Reset()

void wxTextAttrBorder::Reset ( )
inline

Resets the border style, colour, width and flags.

◆ SetColour() [1/2]

void wxTextAttrBorder::SetColour ( const wxColour colour)
inline

Sets the border colour.

◆ SetColour() [2/2]

void wxTextAttrBorder::SetColour ( unsigned long  colour)
inline

Sets the border colour.

◆ SetFlags()

void wxTextAttrBorder::SetFlags ( int  flags)
inline

Sets the border flags.

◆ SetStyle()

void wxTextAttrBorder::SetStyle ( int  style)
inline

Sets the border style.

◆ SetWidth() [1/2]

void wxTextAttrBorder::SetWidth ( const wxTextAttrDimension width)
inline

Sets the border width.

◆ SetWidth() [2/2]

void wxTextAttrBorder::SetWidth ( int  value,
wxTextAttrUnits  units = wxTEXT_ATTR_UNITS_TENTHS_MM 
)
inline

Sets the border width.

Member Data Documentation

◆ m_borderColour

unsigned long wxTextAttrBorder::m_borderColour

◆ m_borderStyle

int wxTextAttrBorder::m_borderStyle

◆ m_borderWidth

wxTextAttrDimension wxTextAttrBorder::m_borderWidth

◆ m_flags

int wxTextAttrBorder::m_flags