Home | History | Annotate | Download | only in svg
      1 /*
      2  * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann (at) kde.org>
      3  * Copyright (C) 2004, 2005, 2006 Rob Buis <buis (at) 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 
     32 namespace WebCore {
     33 
     34 class SVGCursorElement FINAL : public SVGElement,
     35                                public SVGTests,
     36                                public SVGExternalResourcesRequired,
     37                                public SVGURIReference {
     38 public:
     39     static PassRefPtr<SVGCursorElement> create(const QualifiedName&, Document*);
     40 
     41     virtual ~SVGCursorElement();
     42 
     43     void addClient(SVGElement*);
     44     void removeClient(SVGElement*);
     45     void removeReferencedElement(SVGElement*);
     46 
     47 private:
     48     SVGCursorElement(const QualifiedName&, 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 void addSubresourceAttributeURLs(ListHashSet<KURL>&) const;
     57 
     58     virtual bool rendererIsNeeded(const NodeRenderingContext&) OVERRIDE { return false; }
     59 
     60     BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGCursorElement)
     61         DECLARE_ANIMATED_LENGTH(X, x)
     62         DECLARE_ANIMATED_LENGTH(Y, y)
     63         DECLARE_ANIMATED_STRING(Href, href)
     64         DECLARE_ANIMATED_BOOLEAN(ExternalResourcesRequired, externalResourcesRequired)
     65     END_DECLARE_ANIMATED_PROPERTIES
     66 
     67     // SVGTests
     68     virtual void synchronizeRequiredFeatures() { SVGTests::synchronizeRequiredFeatures(this); }
     69     virtual void synchronizeRequiredExtensions() { SVGTests::synchronizeRequiredExtensions(this); }
     70     virtual void synchronizeSystemLanguage() { SVGTests::synchronizeSystemLanguage(this); }
     71 
     72     HashSet<SVGElement*> m_clients;
     73 };
     74 
     75 } // namespace WebCore
     76 
     77 #endif
     78