fix tricky regression noticed by Vyacheslav Tokarev on Google Reader.
[kdelibs.git] / khtml / svg / SVGTextPathElement.h
blob1fdc4251898396d40d2e663cad09c776301929c3
1 /*
2 Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org>
4 This file is part of the KDE project
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library 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.
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 Library General Public License for more details.
16 You should have received a copy of the GNU Library General Public License
17 along with this library; see the file COPYING.LIB. If not, write to
18 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA.
22 #ifndef SVGTextPathElement_h
23 #define SVGTextPathElement_h
25 #if ENABLE(SVG)
26 #include "SVGTextContentElement.h"
28 #include "SVGURIReference.h"
30 namespace WebCore
32 enum SVGTextPathMethodType {
33 SVG_TEXTPATH_METHODTYPE_UNKNOWN = 0,
34 SVG_TEXTPATH_METHODTYPE_ALIGN = 1,
35 SVG_TEXTPATH_METHODTYPE_STRETCH = 2
38 enum SVGTextPathSpacingType {
39 SVG_TEXTPATH_SPACINGTYPE_UNKNOWN = 0,
40 SVG_TEXTPATH_SPACINGTYPE_AUTO = 1,
41 SVG_TEXTPATH_SPACINGTYPE_EXACT = 2
44 class SVGTextPathElement : public SVGTextContentElement,
45 public SVGURIReference
47 public:
48 // Forward declare these enums in the w3c naming scheme, for IDL generation
49 enum {
50 TEXTPATH_METHODTYPE_UNKNOWN = SVG_TEXTPATH_METHODTYPE_UNKNOWN,
51 TEXTPATH_METHODTYPE_ALIGN = SVG_TEXTPATH_METHODTYPE_ALIGN,
52 TEXTPATH_METHODTYPE_STRETCH = SVG_TEXTPATH_METHODTYPE_STRETCH,
53 TEXTPATH_SPACINGTYPE_UNKNOWN = SVG_TEXTPATH_SPACINGTYPE_UNKNOWN,
54 TEXTPATH_SPACINGTYPE_AUTO = SVG_TEXTPATH_SPACINGTYPE_AUTO,
55 TEXTPATH_SPACINGTYPE_EXACT = SVG_TEXTPATH_SPACINGTYPE_EXACT
58 SVGTextPathElement(const QualifiedName&, Document*);
59 virtual ~SVGTextPathElement();
61 virtual void insertedIntoDocument();
63 virtual void parseMappedAttribute(MappedAttribute*);
64 virtual bool rendererIsNeeded(RenderStyle* style) { return StyledElement::rendererIsNeeded(style); }
65 virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
67 bool childShouldCreateRenderer(Node*) const;
69 // KHTML ElementImpl pure virtual method
70 virtual quint32 id() const { return SVGNames::textPathTag.id(); }
71 virtual DOMString tagName() const { return SVGNames::textPathTag.tagName(); }
73 protected:
74 virtual const SVGElement* contextElement() const { return this; }
76 private:
77 ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGURIReference, String, Href, href)
79 ANIMATED_PROPERTY_DECLARATIONS(SVGTextPathElement, SVGLength, SVGLength, StartOffset, startOffset)
80 ANIMATED_PROPERTY_DECLARATIONS(SVGTextPathElement, int, int, Method, method)
81 ANIMATED_PROPERTY_DECLARATIONS(SVGTextPathElement, int, int, Spacing, spacing)
84 } // namespace WebCore
86 #endif // ENABLE(SVG)
87 #endif
89 // vim:ts=4:noet