KHTML
SVGTextPathElement.h
Go to the documentation of this file.
00001 /* 00002 Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> 00003 00004 This file is part of the KDE project 00005 00006 This library is free software; you can redistribute it and/or 00007 modify it under the terms of the GNU Library General Public 00008 License as published by the Free Software Foundation; either 00009 version 2 of the License, or (at your option) any later version. 00010 00011 This library is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 Library General Public License for more details. 00015 00016 You should have received a copy of the GNU Library General Public License 00017 along with this library; see the file COPYING.LIB. If not, write to 00018 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00019 Boston, MA 02110-1301, USA. 00020 */ 00021 00022 #ifndef SVGTextPathElement_h 00023 #define SVGTextPathElement_h 00024 00025 #if ENABLE(SVG) 00026 #include "SVGTextContentElement.h" 00027 00028 #include "SVGURIReference.h" 00029 00030 namespace WebCore 00031 { 00032 enum SVGTextPathMethodType { 00033 SVG_TEXTPATH_METHODTYPE_UNKNOWN = 0, 00034 SVG_TEXTPATH_METHODTYPE_ALIGN = 1, 00035 SVG_TEXTPATH_METHODTYPE_STRETCH = 2 00036 }; 00037 00038 enum SVGTextPathSpacingType { 00039 SVG_TEXTPATH_SPACINGTYPE_UNKNOWN = 0, 00040 SVG_TEXTPATH_SPACINGTYPE_AUTO = 1, 00041 SVG_TEXTPATH_SPACINGTYPE_EXACT = 2 00042 }; 00043 00044 class SVGTextPathElement : public SVGTextContentElement, 00045 public SVGURIReference 00046 { 00047 public: 00048 // Forward declare these enums in the w3c naming scheme, for IDL generation 00049 enum { 00050 TEXTPATH_METHODTYPE_UNKNOWN = SVG_TEXTPATH_METHODTYPE_UNKNOWN, 00051 TEXTPATH_METHODTYPE_ALIGN = SVG_TEXTPATH_METHODTYPE_ALIGN, 00052 TEXTPATH_METHODTYPE_STRETCH = SVG_TEXTPATH_METHODTYPE_STRETCH, 00053 TEXTPATH_SPACINGTYPE_UNKNOWN = SVG_TEXTPATH_SPACINGTYPE_UNKNOWN, 00054 TEXTPATH_SPACINGTYPE_AUTO = SVG_TEXTPATH_SPACINGTYPE_AUTO, 00055 TEXTPATH_SPACINGTYPE_EXACT = SVG_TEXTPATH_SPACINGTYPE_EXACT 00056 }; 00057 00058 SVGTextPathElement(const QualifiedName&, Document*); 00059 virtual ~SVGTextPathElement(); 00060 00061 virtual void insertedIntoDocument(); 00062 00063 virtual void parseMappedAttribute(MappedAttribute*); 00064 virtual bool rendererIsNeeded(RenderStyle* style) { return StyledElement::rendererIsNeeded(style); } 00065 virtual RenderObject* createRenderer(RenderArena*, RenderStyle*); 00066 00067 bool childShouldCreateRenderer(Node*) const; 00068 00069 // KHTML ElementImpl pure virtual method 00070 virtual quint32 id() const { return SVGNames::textPathTag.id(); } 00071 protected: 00072 virtual const SVGElement* contextElement() const { return this; } 00073 00074 private: 00075 ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGURIReference, String, Href, href) 00076 00077 ANIMATED_PROPERTY_DECLARATIONS(SVGTextPathElement, SVGLength, SVGLength, StartOffset, startOffset) 00078 ANIMATED_PROPERTY_DECLARATIONS(SVGTextPathElement, int, int, Method, method) 00079 ANIMATED_PROPERTY_DECLARATIONS(SVGTextPathElement, int, int, Spacing, spacing) 00080 }; 00081 00082 } // namespace WebCore 00083 00084 #endif // ENABLE(SVG) 00085 #endif 00086 00087 // vim:ts=4:noet
KDE 4.6 API Reference