Version: 2.9.4
Public Member Functions | Public Attributes
wxTextAttrDimension Class Reference

#include </home/zeitlin/src/wx/github/interface/wx/richtext/richtextbuffer.h>


Detailed Description

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

Library:  wxRichText
Category:  Rich Text
参照:
wxRichTextAttr, wxRichTextCtrl, wxTextAttrDimensions

Public Member Functions

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

Public Attributes

int m_value
wxTextAttrDimensionFlags m_flags

List of all members.


Constructor & Destructor Documentation

wxTextAttrDimension::wxTextAttrDimension ( ) [inline]

Default constructor.

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

Constructor taking value and units flag.


Member Function Documentation

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

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

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.

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.

wxTextAttrDimensionFlags wxTextAttrDimension::GetFlags ( ) const [inline]

Gets the dimension flags.

wxTextBoxAttrPosition wxTextAttrDimension::GetPosition ( ) const [inline]

Gets the position flags.

wxTextAttrUnits wxTextAttrDimension::GetUnits ( ) const [inline]

Gets the units of the dimension.

int wxTextAttrDimension::GetValue ( ) const [inline]

Returns the integer value of the dimension.

float wxTextAttrDimension::GetValueMM ( ) const [inline]

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

bool wxTextAttrDimension::IsValid ( ) const [inline]

Returns true if the dimension is valid.

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

Equality operator.

void wxTextAttrDimension::Reset ( ) [inline]

Resets the dimension value and flags.

void wxTextAttrDimension::SetFlags ( wxTextAttrDimensionFlags  flags) [inline]

Sets the dimension flags.

void wxTextAttrDimension::SetPosition ( wxTextBoxAttrPosition  pos) [inline]

Sets the position flags.

void wxTextAttrDimension::SetUnits ( wxTextAttrUnits  units) [inline]

Sets the units of the dimension.

void wxTextAttrDimension::SetValid ( bool  b) [inline]

Sets the valid flag.

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

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

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

Sets the integer value and units.

void wxTextAttrDimension::SetValue ( int  value) [inline]

Sets the integer value of the dimension.

void wxTextAttrDimension::SetValue ( const wxTextAttrDimension dim) [inline]

Sets the dimension.

void wxTextAttrDimension::SetValueMM ( float  value) [inline]

Sets the value of the dimension in mm.


Member Data Documentation

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines