4 * Copyright (C) 2004 Zack Rusin <zack@kde.org>
5 * Copyright (C) 2004 Apple Computer, Inc.
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
22 #ifndef CSS_COMPUTEDSTYLE_H
23 #define CSS_COMPUTEDSTYLE_H
25 #include "css/css_valueimpl.h"
26 #include "dom/dom_string.h"
35 class CSSStyleDeclarationImpl;
40 enum EUpdateLayout { DoNotUpdateLayout = false, UpdateLayout = true };
42 class CSSComputedStyleDeclarationImpl : public CSSStyleDeclarationImpl
45 CSSComputedStyleDeclarationImpl(NodeImpl *node);
46 virtual ~CSSComputedStyleDeclarationImpl();
48 virtual DOMString cssText() const;
49 virtual void setCssText(const DOMString &);
51 virtual CSSValueImpl *getPropertyCSSValue(int propertyID) const;
52 CSSValueImpl *getPropertyCSSValue(int propertyID, bool updateLayout) const;
53 virtual DOMString getPropertyValue(int propertyID) const;
54 virtual bool getPropertyPriority(int propertyID) const;
56 virtual DOMString removeProperty(int propertyID);
57 virtual bool setProperty(int propertyId, const DOMString &value, bool important = false);
58 virtual void setProperty(int propertyId, int value, bool important = false);
59 virtual void setLengthProperty(int id, const DOMString &value, bool important, bool multiLength = false);
61 virtual void setProperty(const DOMString &propertyString);
62 virtual DOMString item(unsigned long index) const;
64 CSSStyleDeclarationImpl *copyInheritableProperties() const;
66 CSSValueImpl* getPositionOffsetValue(int propertyID) const;
69 CSSProperty property(int id) const;
71 khtml::RenderObject *m_renderer;