comparison src/styleengine.hh @ 1742:6ff5d5aeb9a5

inline setNonCssHint()
author Johannes Hofmann <Johannes.Hofmann@gmx.de>
date Thu, 14 Oct 2010 09:04:52 +0200
parents 7974b38cc036
children ef983c0fe908
comparison
equal deleted inserted replaced
1741:b35adbe0366c 1742:6ff5d5aeb9a5
34 Doctree *doctree; 34 Doctree *doctree;
35 int importDepth; 35 int importDepth;
36 36
37 dw::core::style::Style *style0 (int i); 37 dw::core::style::Style *style0 (int i);
38 dw::core::style::Style *wordStyle0 (); 38 dw::core::style::Style *wordStyle0 ();
39 void setNonCssHint(CssPropertyName name, CssValueType type, 39 inline void setNonCssHint(CssPropertyName name, CssValueType type,
40 CssPropertyValue value); 40 CssPropertyValue value) {
41 Node *n = stack->getRef (stack->size () - 1);
42
43 if (!n->nonCssProperties)
44 n->nonCssProperties = new CssPropertyList (true);
45 n->nonCssProperties->set(name, type, value);
46 }
41 void preprocessAttrs (dw::core::style::StyleAttrs *attrs); 47 void preprocessAttrs (dw::core::style::StyleAttrs *attrs);
42 void postprocessAttrs (dw::core::style::StyleAttrs *attrs); 48 void postprocessAttrs (dw::core::style::StyleAttrs *attrs);
43 void apply (int i, dw::core::style::StyleAttrs *attrs, CssPropertyList *props); 49 void apply (int i, dw::core::style::StyleAttrs *attrs, CssPropertyList *props);
44 bool computeValue (int *dest, CssLength value, 50 bool computeValue (int *dest, CssLength value,
45 dw::core::style::Font *font); 51 dw::core::style::Font *font);
63 void setClass (const char *klass); 69 void setClass (const char *klass);
64 void setStyle (const char *style); 70 void setStyle (const char *style);
65 void endElement (int tag); 71 void endElement (int tag);
66 void setPseudoLink (); 72 void setPseudoLink ();
67 void setPseudoVisited (); 73 void setPseudoVisited ();
68 void setNonCssHint(CssPropertyName name, CssValueType type, 74 inline void setNonCssHint(CssPropertyName name, CssValueType type,
69 int value) { 75 int value) {
70 CssPropertyValue v; 76 CssPropertyValue v;
71 v.intVal = value; 77 v.intVal = value;
72 setNonCssHint (name, type, v); 78 setNonCssHint (name, type, v);
73 } 79 }
74 void setNonCssHint(CssPropertyName name, CssValueType type, 80 inline void setNonCssHint(CssPropertyName name, CssValueType type,
75 const char *value) { 81 const char *value) {
76 CssPropertyValue v; 82 CssPropertyValue v;
77 v.strVal = dStrdup(value); 83 v.strVal = dStrdup(value);
78 setNonCssHint (name, type, v); 84 setNonCssHint (name, type, v);
79 } 85 }
80 void inheritNonCssHints (); 86 void inheritNonCssHints ();