aboutsummaryrefslogtreecommitdiff
path: root/src/styleengine.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/styleengine.hh')
-rw-r--r--src/styleengine.hh20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/styleengine.hh b/src/styleengine.hh
index 94792250..97d6c8ae 100644
--- a/src/styleengine.hh
+++ b/src/styleengine.hh
@@ -3,38 +3,46 @@
#include "dw/core.hh"
#include "doctree.hh"
+#include "css.hh"
class StyleEngine : public Doctree {
private:
class Node : public DoctreeNode {
public:
dw::core::style::Style *style;
-
-
};
lout::misc::SimpleVector <Node> *stack;
+ dw::core::style::Style *style0 ();
+
public:
StyleEngine ();
~StyleEngine ();
/* Doctree interface */
- const DoctreeNode *top () {
+ inline const DoctreeNode *top () {
return stack->getRef (stack->size () - 1);
};
- const DoctreeNode *parent (const DoctreeNode *n) {
+
+ inline const DoctreeNode *parent (const DoctreeNode *n) {
if (n->depth > 0)
return stack->getRef (n->depth - 1);
else
return NULL;
};
- void startElement (int tag, const char *id, const char *klass, const char *style);
+ void startElement (int tag, const char *id, const char *klass,
+ const char *style);
void endElement (int tag);
+ void setNonCssProperties (CssPropertyList *props);
inline dw::core::style::Style *style () {
- return stack->getRef (stack->size () - 1)->style;
+ dw::core::style::Style *s = stack->getRef (stack->size () - 1)->style;
+ if (s)
+ return s;
+ else
+ return style0 ();
};
};