2 #include "attributes.h"
\r
15 m_important = false;
\r
17 property_value(const tchar_t* val, bool imp)
\r
22 property_value(const property_value& val)
\r
24 m_value = val.m_value;
\r
25 m_important = val.m_important;
\r
28 property_value& operator=(const property_value& val)
\r
30 m_value = val.m_value;
\r
31 m_important = val.m_important;
\r
36 typedef std::map<tstring, property_value> props_map;
\r
41 typedef std::shared_ptr<style> ptr;
\r
42 typedef std::vector<style::ptr> vector;
\r
44 props_map m_properties;
\r
45 static string_map m_valid_values;
\r
48 style(const style& val);
\r
51 void operator=(const style& val)
\r
53 m_properties = val.m_properties;
\r
56 void add(const tchar_t* txt, const tchar_t* baseurl)
\r
58 parse(txt, baseurl);
\r
61 void add_property(const tchar_t* name, const tchar_t* val, const tchar_t* baseurl, bool important);
\r
63 const tchar_t* get_property(const tchar_t* name) const
\r
67 props_map::const_iterator f = m_properties.find(name);
\r
68 if(f != m_properties.end())
\r
70 return f->second.m_value.c_str();
\r
76 void combine(const litehtml::style& src);
\r
79 m_properties.clear();
\r
83 void parse_property(const tstring& txt, const tchar_t* baseurl);
\r
84 void parse(const tchar_t* txt, const tchar_t* baseurl);
\r
85 void parse_short_border(const tstring& prefix, const tstring& val, bool important);
\r
86 void parse_short_background(const tstring& val, const tchar_t* baseurl, bool important);
\r
87 void parse_short_font(const tstring& val, bool important);
\r
88 void add_parsed_property(const tstring& name, const tstring& val, bool important);
\r
89 void remove_property(const tstring& name, bool important);
\r