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

#include <types.h>

Public Types

enum  _baseline_type { baseline_type_none , baseline_type_top , baseline_type_bottom }
 

Public Member Functions

 baseline ()
 
 baseline (int _value, _baseline_type _type)
 
int value () const
 
void value (int _value)
 
_baseline_type type () const
 
void type (_baseline_type _type)
 
 operator int () const
 
baselineoperator= (int _value)
 
void set (int _value, _baseline_type _type)
 
int get_offset_from_top (int height) const
 
int get_offset_from_bottom (int height) const
 
void calc (int top, int bottom)
 

Private Attributes

int m_value
 
_baseline_type m_type
 

Member Enumeration Documentation

◆ _baseline_type

Enumerator
baseline_type_none 
baseline_type_top 
baseline_type_bottom 

Constructor & Destructor Documentation

◆ baseline() [1/2]

litehtml::baseline::baseline ( )
inline

◆ baseline() [2/2]

litehtml::baseline::baseline ( int  _value,
_baseline_type  _type 
)
inline

Member Function Documentation

◆ calc()

void litehtml::baseline::calc ( int  top,
int  bottom 
)
inline

Calculate baseline by top and bottom positions of element aligned by baseline == 0

Parameters
top- top of the aligned element
bottom- bottom of the aligned element

◆ get_offset_from_bottom()

int litehtml::baseline::get_offset_from_bottom ( int  height) const
inline

Get baseline offset from bottom of element with specified height

Parameters
height- element height
Returns
baseline offset

◆ get_offset_from_top()

int litehtml::baseline::get_offset_from_top ( int  height) const
inline

Get baseline offset from top of element with specified height

Parameters
height- element height
Returns
baseline offset

◆ operator int()

litehtml::baseline::operator int ( ) const
inline

◆ operator=()

baseline & litehtml::baseline::operator= ( int  _value)
inline

◆ set()

void litehtml::baseline::set ( int  _value,
_baseline_type  _type 
)
inline

◆ type() [1/2]

_baseline_type litehtml::baseline::type ( ) const
inline

◆ type() [2/2]

void litehtml::baseline::type ( _baseline_type  _type)
inline

◆ value() [1/2]

int litehtml::baseline::value ( ) const
inline

◆ value() [2/2]

void litehtml::baseline::value ( int  _value)
inline

Member Data Documentation

◆ m_type

_baseline_type litehtml::baseline::m_type
private

◆ m_value

int litehtml::baseline::m_value
private

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