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

#include <style.h>

Public Types

typedef std::shared_ptr< styleptr
 
typedef std::vector< style::ptrvector
 

Public Member Functions

void add (const css_token_vector &tokens, const string &baseurl="", document_container *container=nullptr)
 
void add (const string &txt, const string &baseurl="", document_container *container=nullptr)
 
void add_property (string_id name, const css_token_vector &tokens, const string &baseurl="", bool important=false, document_container *container=nullptr)
 
void add_property (string_id name, const string &val, const string &baseurl="", bool important=false, document_container *container=nullptr)
 
const property_valueget_property (string_id name) const
 
void combine (const style &src)
 
void clear ()
 
void subst_vars (const html_tag *el)
 

Private Member Functions

void inherit_property (string_id name, bool important)
 
void parse_background (const css_token_vector &tokens, const string &baseurl, bool important, document_container *container)
 
bool parse_bg_layer (const css_token_vector &tokens, document_container *container, background &bg, bool final_layer)
 
void parse_background_image (const css_token_vector &tokens, const string &baseurl, bool important, document_container *container)
 
void parse_keyword_comma_list (string_id name, const css_token_vector &tokens, bool important)
 
void parse_background_position (const css_token_vector &tokens, bool important)
 
void parse_background_size (const css_token_vector &tokens, bool important)
 
void parse_border (const css_token_vector &tokens, bool important, document_container *container)
 
void parse_border_side (string_id name, const css_token_vector &tokens, bool important, document_container *container)
 
void parse_border_radius (const css_token_vector &tokens, bool important)
 
bool parse_list_style_image (const css_token &tok, string &url)
 
void parse_list_style (const css_token_vector &tokens, string baseurl, bool important)
 
void parse_font (css_token_vector tokens, bool important)
 
void parse_flex_flow (const css_token_vector &tokens, bool important)
 
void parse_flex (const css_token_vector &tokens, bool important)
 
void parse_align_self (string_id name, const css_token_vector &tokens, bool important)
 
void add_parsed_property (string_id name, const property_value &propval)
 
void add_length_property (string_id name, css_token val, string keywords, int options, bool important)
 
template<class T >
void add_four_properties (string_id top_name, T val[4], int n, bool important)
 
void remove_property (string_id name, bool important)
 

Private Attributes

props_map m_properties
 

Static Private Attributes

static std::map< string_id, string > m_valid_values
 

Member Typedef Documentation

◆ ptr

◆ vector

Member Function Documentation

◆ add() [1/2]

void litehtml::style::add ( const css_token_vector tokens,
const string &  baseurl = "",
document_container container = nullptr 
)

◆ add() [2/2]

void litehtml::style::add ( const string &  txt,
const string &  baseurl = "",
document_container container = nullptr 
)

◆ add_four_properties()

template<class T >
void litehtml::style::add_four_properties ( string_id  top_name,
T  val[4],
int  n,
bool  important 
)
private

◆ add_length_property()

void litehtml::style::add_length_property ( string_id  name,
css_token  val,
string  keywords,
int  options,
bool  important 
)
private

◆ add_parsed_property()

void litehtml::style::add_parsed_property ( string_id  name,
const property_value propval 
)
private

◆ add_property() [1/2]

void litehtml::style::add_property ( string_id  name,
const css_token_vector tokens,
const string &  baseurl = "",
bool  important = false,
document_container container = nullptr 
)

◆ add_property() [2/2]

void litehtml::style::add_property ( string_id  name,
const string &  val,
const string &  baseurl = "",
bool  important = false,
document_container container = nullptr 
)

◆ clear()

void litehtml::style::clear ( )
inline

◆ combine()

void litehtml::style::combine ( const style src)

◆ get_property()

const property_value & litehtml::style::get_property ( string_id  name) const

◆ inherit_property()

void litehtml::style::inherit_property ( string_id  name,
bool  important 
)
private

◆ parse_align_self()

void litehtml::style::parse_align_self ( string_id  name,
const css_token_vector tokens,
bool  important 
)
private

◆ parse_background()

void litehtml::style::parse_background ( const css_token_vector tokens,
const string &  baseurl,
bool  important,
document_container container 
)
private

◆ parse_background_image()

void litehtml::style::parse_background_image ( const css_token_vector tokens,
const string &  baseurl,
bool  important,
document_container container 
)
private

◆ parse_background_position()

void litehtml::style::parse_background_position ( const css_token_vector tokens,
bool  important 
)
private

◆ parse_background_size()

void litehtml::style::parse_background_size ( const css_token_vector tokens,
bool  important 
)
private

◆ parse_bg_layer()

bool litehtml::style::parse_bg_layer ( const css_token_vector tokens,
document_container container,
background bg,
bool  final_layer 
)
private

◆ parse_border()

void litehtml::style::parse_border ( const css_token_vector tokens,
bool  important,
document_container container 
)
private

◆ parse_border_radius()

void litehtml::style::parse_border_radius ( const css_token_vector tokens,
bool  important 
)
private

◆ parse_border_side()

void litehtml::style::parse_border_side ( string_id  name,
const css_token_vector tokens,
bool  important,
document_container container 
)
private

◆ parse_flex()

void litehtml::style::parse_flex ( const css_token_vector tokens,
bool  important 
)
private

◆ parse_flex_flow()

void litehtml::style::parse_flex_flow ( const css_token_vector tokens,
bool  important 
)
private

◆ parse_font()

void litehtml::style::parse_font ( css_token_vector  tokens,
bool  important 
)
private

◆ parse_keyword_comma_list()

void litehtml::style::parse_keyword_comma_list ( string_id  name,
const css_token_vector tokens,
bool  important 
)
private

◆ parse_list_style()

void litehtml::style::parse_list_style ( const css_token_vector tokens,
string  baseurl,
bool  important 
)
private

◆ parse_list_style_image()

bool litehtml::style::parse_list_style_image ( const css_token tok,
string &  url 
)
private

◆ remove_property()

void litehtml::style::remove_property ( string_id  name,
bool  important 
)
private

◆ subst_vars()

void litehtml::style::subst_vars ( const html_tag el)

Member Data Documentation

◆ m_properties

props_map litehtml::style::m_properties
private

◆ m_valid_values

std::map< string_id, string > litehtml::style::m_valid_values
staticprivate

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