Photon 1.0.0
Loading...
Searching...
No Matches
litehtml::css_length Class Reference

#include <css_length.h>

Public Member Functions

 css_length ()
 
 css_length (float val, css_units units=css_units_px)
 
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
 
bool from_token (const css_token &token, int options, const string &predefined_keywords="")
 
string to_string () const
 

Static Public Member Functions

static css_length predef_value (int val=0)
 

Private Attributes

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

Constructor & Destructor Documentation

◆ css_length() [1/2]

litehtml::css_length::css_length ( )
inline

◆ css_length() [2/2]

litehtml::css_length::css_length ( float  val,
css_units  units = css_units_px 
)
inline

Member Function Documentation

◆ calc_percent()

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

◆ from_token()

bool litehtml::css_length::from_token ( const css_token token,
int  options,
const string &  predefined_keywords = "" 
)

◆ is_predefined()

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

◆ operator=()

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

◆ predef() [1/2]

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

◆ predef() [2/2]

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

◆ predef_value()

css_length litehtml::css_length::predef_value ( int  val = 0)
static

◆ set_value()

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

◆ to_string()

string litehtml::css_length::to_string ( ) const

◆ units()

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

◆ val()

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

Member Data Documentation

◆ [union]

union { ... } litehtml::css_length

◆ m_is_predefined

bool litehtml::css_length::m_is_predefined
private

◆ m_predef

int litehtml::css_length::m_predef

◆ m_units

css_units litehtml::css_length::m_units
private

◆ m_value

float litehtml::css_length::m_value

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