Cogs.Core
Public Member Functions | Private Attributes | List of all members
litehtml::css_length Class Reference

Public Member Functions

 css_length (const css_length &val)
 
css_lengthoperator= (const css_length &val)
 
css_lengthoperator= (float val)
 
bool is_predefined () const
 
void predef (int val)
 
int predef () const
 
void set_value (float val, css_units units)
 
float val () const
 
css_units units () const
 
int calc_percent (int width) const
 
void fromString (const tstring &str, const tstring &predefs=_t(""), int defValue=0)
 

Private Attributes

union {
   float   m_value
 
   int   m_predef
 
}; 
 
css_units m_units
 
bool m_is_predefined
 

Detailed Description

Definition at line 8 of file css_length.h.

Constructor & Destructor Documentation

◆ css_length() [1/2]

litehtml::css_length::css_length ( )
inline

Definition at line 35 of file css_length.h.

◆ css_length() [2/2]

litehtml::css_length::css_length ( const css_length val)
inline

Definition at line 43 of file css_length.h.

Member Function Documentation

◆ calc_percent()

int litehtml::css_length::calc_percent ( int  width) const
inline

Definition at line 119 of file css_length.h.

◆ fromString()

void litehtml::css_length::fromString ( const tstring &  str,
const tstring &  predefs = _t(""),
int  defValue = 0 
)

Definition at line 4 of file css_length.cpp.

◆ is_predefined()

bool litehtml::css_length::is_predefined ( ) const
inline

Definition at line 78 of file css_length.h.

◆ operator=() [1/2]

css_length & litehtml::css_length::operator= ( const css_length val)
inline

Definition at line 56 of file css_length.h.

◆ operator=() [2/2]

css_length & litehtml::css_length::operator= ( float  val)
inline

Definition at line 70 of file css_length.h.

◆ predef() [1/2]

int litehtml::css_length::predef ( ) const
inline

Definition at line 89 of file css_length.h.

◆ predef() [2/2]

void litehtml::css_length::predef ( int  val)
inline

Definition at line 83 of file css_length.h.

◆ set_value()

void litehtml::css_length::set_value ( float  val,
css_units  units 
)
inline

Definition at line 98 of file css_length.h.

◆ units()

css_units litehtml::css_length::units ( ) const
inline

Definition at line 114 of file css_length.h.

◆ val()

float litehtml::css_length::val ( ) const
inline

Definition at line 105 of file css_length.h.

Member Data Documentation

◆ m_is_predefined

bool litehtml::css_length::m_is_predefined
private

Definition at line 16 of file css_length.h.

◆ m_predef

int litehtml::css_length::m_predef

Definition at line 13 of file css_length.h.

◆ m_units

css_units litehtml::css_length::m_units
private

Definition at line 15 of file css_length.h.

◆ m_value

float litehtml::css_length::m_value

Definition at line 12 of file css_length.h.


The documentation for this class was generated from the following files: