changeset 493:03e0cacbb994

add css.hh css.cc
author Johannes Hofmann <Johannes.Hofmann@gmx.de>
date Wed, 22 Oct 2008 22:11:10 +0200
parents 914b4bc82300
children db216e0183a1
files src/Makefile.am src/css.cc src/css.hh
diffstat 3 files changed, 42 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/Makefile.am	Wed Oct 22 20:36:44 2008 +0200
+++ b/src/Makefile.am	Wed Oct 22 22:11:10 2008 +0200
@@ -65,6 +65,8 @@
 	dicache.h \
 	capi.c \
 	capi.h \
+	css.cc \
+	css.hh \
 	plain.cc \
 	html.cc \
 	html.hh \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/css.cc	Wed Oct 22 22:11:10 2008 +0200
@@ -0,0 +1,19 @@
+/*
+ * File: css.cc
+ *
+ * Copyright 2008 Jorge Arellano Cid <jcid@dillo.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ */
+
+#include "css.hh"
+
+StyleEngine::StyleEngine (DilloHtml *html) {
+   this->html = html;
+}
+
+StyleEngine::~StyleEngine () {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/css.hh	Wed Oct 22 22:11:10 2008 +0200
@@ -0,0 +1,21 @@
+#ifndef __CSS_HH__
+#define __CSS_HH__
+
+#include "dw/core.hh"
+#include "html_common.hh"
+
+class StyleEngine {
+   private:
+      DilloHtml *html;
+      dw::core::style::Style *currentStyle;
+
+   public:
+      StyleEngine (DilloHtml *html);
+      ~StyleEngine ();
+
+      void startElement (const char *name);
+      void endElement (const char *name);
+      inline dw::core::style::Style *style () { return currentStyle; };
+};
+
+#endif