aboutsummaryrefslogtreecommitdiff
path: root/src/styleengine.hh
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2008-12-04 18:39:19 +0100
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2008-12-04 18:39:19 +0100
commitef2a0c6c92693ba98b2c2d78fe58fc3decc4d039 (patch)
tree5b639ec1f036ffb894645cf68604f8521764abec /src/styleengine.hh
parent5b731bd8a0147e6ff9f2a69339312a9a1e08ae2e (diff)
add wordStyle() method to StyleEngine
Diffstat (limited to 'src/styleengine.hh')
-rw-r--r--src/styleengine.hh10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/styleengine.hh b/src/styleengine.hh
index a9440aa7..8257c994 100644
--- a/src/styleengine.hh
+++ b/src/styleengine.hh
@@ -11,6 +11,7 @@ class StyleEngine : public Doctree {
class Node : public DoctreeNode {
public:
dw::core::style::Style *style;
+ dw::core::style::Style *wordStyle;
const char *styleAttribute;
bool inheritBackgroundColor;
};
@@ -20,6 +21,7 @@ class StyleEngine : public Doctree {
CssContext *cssContext;
dw::core::style::Style *style0 (CssPropertyList *nonCssHints = NULL);
+ dw::core::style::Style *wordStyle0 (CssPropertyList *nonCssHints = NULL);
void apply (dw::core::style::StyleAttrs *attrs, CssPropertyList *props);
int computeValue (CssLength value, dw::core::style::Font *font);
@@ -56,6 +58,14 @@ class StyleEngine : public Doctree {
else
return style0 ();
};
+ inline dw::core::style::Style *wordStyle () {
+ dw::core::style::Style *s = stack->getRef (stack->size () - 1)->wordStyle;
+ if (s)
+ return s;
+ else
+ return wordStyle0 ();
+ };
+
};
#endif