diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2008-11-15 21:57:55 +0100 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2008-11-15 21:57:55 +0100 |
commit | 4426e3e296dc1c6726b37bfd6f5d4436eb8b02c2 (patch) | |
tree | 207b428a11ac2867f9cea05069351d37ec7bb2a8 /src/css.hh | |
parent | 706d17ffc5759ef01df79e0cbaf2c1b5ad653cb4 (diff) |
add comments
Diffstat (limited to 'src/css.hh')
-rw-r--r-- | src/css.hh | 24 |
1 files changed, 22 insertions, 2 deletions
@@ -43,6 +43,9 @@ enum { #define CSS_LENGTH_VALUE(l) ( ( (float)((l) & ~7) ) / (1 << 19) ) #define CSS_LENGTH_TYPE(l) ((l) & 7) +/** + * \brief This class holds a CSS property and value pair. + */ class CssProperty { public: typedef union { @@ -158,6 +161,9 @@ class CssProperty { void print (); }; +/** + * \brief A list of CssProperty objects. + */ class CssPropertyList : public lout::misc::SimpleVector <CssProperty> { int refCount; @@ -186,7 +192,10 @@ class CssPropertyList : public lout::misc::SimpleVector <CssProperty> { inline void unref () { if(--refCount == 0) delete this; } }; -/** \todo proper implementation */ +/** + * \brief CSS selector class. + * \todo Implement missing selector options. + */ class CssSelector { private: int refCount; @@ -203,7 +212,11 @@ class CssSelector { inline void unref () { if(--refCount == 0) delete this; } }; -class CssRule { +/** + * \brief A CssSelector CssPropertyList pair. + * The CssPropertyList is applied if the CssSelector matches. + */ +lass CssRule { private: CssSelector *selector; CssPropertyList *props; @@ -216,6 +229,10 @@ class CssRule { void print (); }; +/** + * \brief A list of CssRules. + * In apply () all matching rules are applied. + */ class CssStyleSheet : lout::misc::SimpleVector <CssRule*> { public: CssStyleSheet() : lout::misc::SimpleVector <CssRule*> (1) {}; @@ -225,6 +242,9 @@ class CssStyleSheet : lout::misc::SimpleVector <CssRule*> { void apply (CssPropertyList *props, Doctree *docTree); }; +/** + * \brief A set of CssStyleSheets. + */ class CssContext { private: static CssStyleSheet *userAgentStyle; |