comparison src/styleengine.hh @ 1732:3e3630a58627

store style attribute as CssPropertyList instead of a string
author Johannes Hofmann <Johannes.Hofmann@gmx.de>
date Mon, 11 Oct 2010 18:23:33 +0200
parents 92b899247f72
children f39cfc38ea10
comparison
equal deleted inserted replaced
1731:92b899247f72 1732:3e3630a58627
18 * methods. 18 * methods.
19 */ 19 */
20 class StyleEngine { 20 class StyleEngine {
21 private: 21 private:
22 struct Node { 22 struct Node {
23 CssPropertyList *styleAttrProperties;
24 CssPropertyList *nonCssProperties;
23 dw::core::style::Style *style; 25 dw::core::style::Style *style;
24 dw::core::style::Style *wordStyle; 26 dw::core::style::Style *wordStyle;
25 const char *styleAttribute;
26 bool inheritBackgroundColor; 27 bool inheritBackgroundColor;
27 }; 28 };
28 29
29 dw::core::Layout *layout; 30 dw::core::Layout *layout;
30 lout::misc::SimpleVector <Node> *stack; 31 lout::misc::SimpleVector <Node> *stack;
60 void setStyle (const char *style); 61 void setStyle (const char *style);
61 void endElement (int tag); 62 void endElement (int tag);
62 void setPseudoLink (); 63 void setPseudoLink ();
63 void setPseudoVisited (); 64 void setPseudoVisited ();
64 void setNonCssHints (CssPropertyList *nonCssHints); 65 void setNonCssHints (CssPropertyList *nonCssHints);
66 void setNonCssHint(CssPropertyName name, CssPropertyValue value);
65 void inheritBackgroundColor (); /* \todo get rid of this somehow */ 67 void inheritBackgroundColor (); /* \todo get rid of this somehow */
66 dw::core::style::Style *backgroundStyle (); 68 dw::core::style::Style *backgroundStyle ();
67 69
68 inline dw::core::style::Style *style () { 70 inline dw::core::style::Style *style () {
69 dw::core::style::Style *s = stack->getRef (stack->size () - 1)->style; 71 dw::core::style::Style *s = stack->getRef (stack->size () - 1)->style;