Version: 3.2.7
wxTextAttrDimension Class Reference

#include <wx/richtext/richtextbuffer.h>

Detailed Description

A class representing a rich text dimension, including units and position.

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

Public Member Functions

 wxTextAttrDimension ()
 Default constructor. More...
 
 wxTextAttrDimension (int value, wxTextAttrUnits units=wxTEXT_ATTR_UNITS_TENTHS_MM)
 Constructor taking value and units flag. More...
 
void Reset ()
 Resets the dimension value and flags. More...
 
bool EqPartial (const wxTextAttrDimension &dim, bool weakTest=true) const
 Partial equality test. More...
 
bool Apply (const wxTextAttrDimension &dim, const wxTextAttrDimension *compareWith=NULL)
 Apply the dimension, but not those identical to compareWith if present. More...
 
void CollectCommonAttributes (const wxTextAttrDimension &attr, wxTextAttrDimension &clashingAttr, wxTextAttrDimension &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 operator== (const wxTextAttrDimension &dim) const
 Equality operator. More...
 
int GetValue () const
 Returns the integer value of the dimension. More...
 
float GetValueMM () const
 Returns the floating-pointing value of the dimension in mm. More...
 
void SetValueMM (float value)
 Sets the value of the dimension in mm. More...
 
void SetValue (int value)
 Sets the integer value of the dimension. More...
 
void SetValue (int value, wxTextAttrDimensionFlags flags)
 Sets the integer value of the dimension, passing dimension flags. More...
 
void SetValue (int value, wxTextAttrUnits units)
 Sets the integer value and units. More...
 
void SetValue (const wxTextAttrDimension &dim)
 Sets the dimension. More...
 
wxTextAttrUnits GetUnits () const
 Gets the units of the dimension. More...
 
void SetUnits (wxTextAttrUnits units)
 Sets the units of the dimension. More...
 
wxTextBoxAttrPosition GetPosition () const
 Gets the position flags. More...
 
void SetPosition (wxTextBoxAttrPosition pos)
 Sets the position flags. More...
 
bool IsValid () const
 Returns true if the dimension is valid. More...
 
void SetValid (bool b)
 Sets the valid flag. More...
 
wxTextAttrDimensionFlags GetFlags () const
 Gets the dimension flags. More...
 
void SetFlags (wxTextAttrDimensionFlags flags)
 Sets the dimension flags. More...
 

Public Attributes

int m_value
 
wxTextAttrDimensionFlags m_flags
 

Constructor & Destructor Documentation

◆ wxTextAttrDimension() [1/2]

wxTextAttrDimension::wxTextAttrDimension ( )
inline

Default constructor.

◆ wxTextAttrDimension() [2/2]

wxTextAttrDimension::wxTextAttrDimension ( int  value,
wxTextAttrUnits  units = wxTEXT_ATTR_UNITS_TENTHS_MM 
)
inline

Constructor taking value and units flag.

Member Function Documentation

◆ Apply()

bool wxTextAttrDimension::Apply ( const wxTextAttrDimension dim,
const wxTextAttrDimension compareWith = NULL 
)

Apply the dimension, but not those identical to compareWith if present.

◆ CollectCommonAttributes()

void wxTextAttrDimension::CollectCommonAttributes ( const wxTextAttrDimension attr,
wxTextAttrDimension clashingAttr,
wxTextAttrDimension 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 wxTextAttrDimension::EqPartial ( const wxTextAttrDimension dim,
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 dim are present. If weakTest is false, the function will fail if an attribute is present in dim but not in this object.

◆ GetFlags()

wxTextAttrDimensionFlags wxTextAttrDimension::GetFlags ( ) const
inline

Gets the dimension flags.

◆ GetPosition()

wxTextBoxAttrPosition wxTextAttrDimension::GetPosition ( ) const
inline

Gets the position flags.

◆ GetUnits()

wxTextAttrUnits wxTextAttrDimension::GetUnits ( ) const
inline

Gets the units of the dimension.

◆ GetValue()

int wxTextAttrDimension::GetValue ( ) const
inline

Returns the integer value of the dimension.

◆ GetValueMM()

float wxTextAttrDimension::GetValueMM ( ) const
inline

Returns the floating-pointing value of the dimension in mm.

◆ IsValid()

bool wxTextAttrDimension::IsValid ( ) const
inline

Returns true if the dimension is valid.

◆ operator==()

bool wxTextAttrDimension::operator== ( const wxTextAttrDimension dim) const
inline

Equality operator.

◆ Reset()

void wxTextAttrDimension::Reset ( )
inline

Resets the dimension value and flags.

◆ SetFlags()

void wxTextAttrDimension::SetFlags ( wxTextAttrDimensionFlags  flags)
inline

Sets the dimension flags.

◆ SetPosition()

void wxTextAttrDimension::SetPosition ( wxTextBoxAttrPosition  pos)
inline

Sets the position flags.

◆ SetUnits()

void wxTextAttrDimension::SetUnits ( wxTextAttrUnits  units)
inline

Sets the units of the dimension.

◆ SetValid()

void wxTextAttrDimension::SetValid ( bool  b)
inline

Sets the valid flag.

◆ SetValue() [1/4]

void wxTextAttrDimension::SetValue ( const wxTextAttrDimension dim)
inline

Sets the dimension.

◆ SetValue() [2/4]

void wxTextAttrDimension::SetValue ( int  value)
inline

Sets the integer value of the dimension.

◆ SetValue() [3/4]

void wxTextAttrDimension::SetValue ( int  value,
wxTextAttrDimensionFlags  flags 
)
inline

Sets the integer value of the dimension, passing dimension flags.

◆ SetValue() [4/4]

void wxTextAttrDimension::SetValue ( int  value,
wxTextAttrUnits  units 
)
inline

Sets the integer value and units.

◆ SetValueMM()

void wxTextAttrDimension::SetValueMM ( float  value)
inline

Sets the value of the dimension in mm.

Member Data Documentation

◆ m_flags

wxTextAttrDimensionFlags wxTextAttrDimension::m_flags

◆ m_value

int wxTextAttrDimension::m_value