KHtml

css_renderstyledeclarationimpl.h
1 /*
2  * css_renderstyleimpl.h
3  *
4  * Copyright 2004 Zack Rusin <[email protected]>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19  * 02110-1301 USA
20  */
21 #ifndef CSS_RENDERSTYLEIMPL_H
22 #define CSS_RENDERSTYLEIMPL_H
23 
24 #include "css/css_valueimpl.h"
25 #include "dom/dom_string.h"
26 #include "rendering/render_style.h"
27 
28 namespace DOM
29 {
30 class NodeImpl;
31 }
32 
33 namespace khtml
34 {
35 
36 // Used by DOM::Counter::listStyle()
37 DOM::DOMString stringForListStyleType(khtml::EListStyleType type);
38 
39 class RenderStyleDeclarationImpl : public DOM::CSSStyleDeclarationImpl
40 {
41 public:
42  RenderStyleDeclarationImpl(DOM::NodeImpl *node);
43  virtual ~RenderStyleDeclarationImpl();
44 
45  DOM::DOMString cssText() const;
46  void setCssText(DOM::DOMString str);
47 
48  DOM::CSSValueImpl *getPropertyCSSValue(int propertyID) const override;
49  DOM::DOMString getPropertyValue(int propertyID) const override;
50  bool getPropertyPriority(int propertyID) const override;
51  unsigned long length() const override;
52 
53  void removeProperty(int propertyID, DOM::DOMString *old = nullptr) override;
54  bool removePropertiesInSet(const int *set, unsigned length) override;
55  bool isPropertyImplicit(int /*propertyID*/) const override
56  {
57  return false;
58  }
59  bool setProperty(int propertyId, const DOM::DOMString &value, bool important, int &ec) override;
60  bool setProperty(int propertyId, const DOM::DOMString &value, bool important = false) override;
61  void setProperty(int propertyId, int value, bool important = false) override;
62  void setLengthProperty(int id, const DOM::DOMString &value, bool important, bool multiLength = false) override;
63 
64  void setProperty(const DOM::DOMString &propertyString) override;
65  DOM::DOMString item(unsigned long index) const override;
66 
67 protected:
68  DOM::CSSProperty property(int id) const;
69 
70 protected:
71  SharedPtr<DOM::NodeImpl> m_node;
72 };
73 
74 }
75 
76 #endif
This file is part of the HTML rendering engine for KDE.
This class implements the basic string we use in the DOM.
Definition: dom_string.h:44
This library provides a full-featured HTML parser and widget.
QCA_EXPORT void setProperty(const QString &name, const QVariant &value)
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sat Oct 16 2021 22:47:51 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.