1/* 2 * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org> 3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> 4 * 5 * This library is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU Library General Public 7 * License as published by the Free Software Foundation; either 8 * version 2 of the License, or (at your option) any later version. 9 * 10 * This library is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * Library General Public License for more details. 14 * 15 * You should have received a copy of the GNU Library General Public License 16 * along with this library; see the file COPYING.LIB. If not, write to 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 18 * Boston, MA 02110-1301, USA. 19 */ 20 21#ifndef SVGCursorElement_h 22#define SVGCursorElement_h 23 24#include "core/svg/SVGAnimatedBoolean.h" 25#include "core/svg/SVGAnimatedLength.h" 26#include "core/svg/SVGAnimatedString.h" 27#include "core/svg/SVGElement.h" 28#include "core/svg/SVGExternalResourcesRequired.h" 29#include "core/svg/SVGTests.h" 30#include "core/svg/SVGURIReference.h" 31 32namespace WebCore { 33 34class SVGCursorElement FINAL : public SVGElement, 35 public SVGTests, 36 public SVGExternalResourcesRequired, 37 public SVGURIReference { 38public: 39 static PassRefPtr<SVGCursorElement> create(Document&); 40 41 virtual ~SVGCursorElement(); 42 43 void addClient(SVGElement*); 44 void removeClient(SVGElement*); 45 void removeReferencedElement(SVGElement*); 46 47private: 48 explicit SVGCursorElement(Document&); 49 50 virtual bool isValid() const { return SVGTests::isValid(); } 51 52 bool isSupportedAttribute(const QualifiedName&); 53 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 54 virtual void svgAttributeChanged(const QualifiedName&); 55 56 virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE { return false; } 57 58 BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGCursorElement) 59 DECLARE_ANIMATED_LENGTH(X, x) 60 DECLARE_ANIMATED_LENGTH(Y, y) 61 DECLARE_ANIMATED_STRING(Href, href) 62 DECLARE_ANIMATED_BOOLEAN(ExternalResourcesRequired, externalResourcesRequired) 63 END_DECLARE_ANIMATED_PROPERTIES 64 65 // SVGTests 66 virtual void synchronizeRequiredFeatures() { SVGTests::synchronizeRequiredFeatures(this); } 67 virtual void synchronizeRequiredExtensions() { SVGTests::synchronizeRequiredExtensions(this); } 68 virtual void synchronizeSystemLanguage() { SVGTests::synchronizeSystemLanguage(this); } 69 70 HashSet<SVGElement*> m_clients; 71}; 72 73} // namespace WebCore 74 75#endif 76