comparison src/styleengine.hh @ 1734:90feb0de4310

add StyleEngine::restyle()
author Johannes Hofmann <Johannes.Hofmann@gmx.de>
date Mon, 11 Oct 2010 21:50:13 +0200
parents f39cfc38ea10
children 7974b38cc036
comparison
equal deleted inserted replaced
1733:f39cfc38ea10 1734:90feb0de4310
31 lout::misc::SimpleVector <Node> *stack; 31 lout::misc::SimpleVector <Node> *stack;
32 CssContext *cssContext; 32 CssContext *cssContext;
33 Doctree *doctree; 33 Doctree *doctree;
34 int importDepth; 34 int importDepth;
35 35
36 dw::core::style::Style *style0 (); 36 dw::core::style::Style *style0 (int i);
37 dw::core::style::Style *wordStyle0 (); 37 dw::core::style::Style *wordStyle0 ();
38 void setNonCssHint(CssPropertyName name, CssValueType type, 38 void setNonCssHint(CssPropertyName name, CssValueType type,
39 CssPropertyValue value); 39 CssPropertyValue value);
40 void preprocessAttrs (dw::core::style::StyleAttrs *attrs); 40 void preprocessAttrs (dw::core::style::StyleAttrs *attrs);
41 void postprocessAttrs (dw::core::style::StyleAttrs *attrs); 41 void postprocessAttrs (dw::core::style::StyleAttrs *attrs);
76 v.strVal = dStrdup(value); 76 v.strVal = dStrdup(value);
77 setNonCssHint (name, type, v); 77 setNonCssHint (name, type, v);
78 } 78 }
79 void inheritNonCssHints (); 79 void inheritNonCssHints ();
80 void clearNonCssHints (); 80 void clearNonCssHints ();
81 void restyle ();
81 void inheritBackgroundColor (); /* \todo get rid of this somehow */ 82 void inheritBackgroundColor (); /* \todo get rid of this somehow */
82 dw::core::style::Style *backgroundStyle (); 83 dw::core::style::Style *backgroundStyle ();
83 84
84 inline dw::core::style::Style *style () { 85 inline dw::core::style::Style *style () {
85 dw::core::style::Style *s = stack->getRef (stack->size () - 1)->style; 86 dw::core::style::Style *s = stack->getRef (stack->size () - 1)->style;
86 if (s) 87 if (s)
87 return s; 88 return s;
88 else 89 else
89 return style0 (); 90 return style0 (stack->size () - 1);
90 }; 91 };
91 92
92 inline dw::core::style::Style *wordStyle () { 93 inline dw::core::style::Style *wordStyle () {
93 dw::core::style::Style *s = stack->getRef(stack->size()-1)->wordStyle; 94 dw::core::style::Style *s = stack->getRef(stack->size()-1)->wordStyle;
94 if (s) 95 if (s)