• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

KHTML

  • khtml
  • svg
SVGSVGElement.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org>
3 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org>
4
5 This file is part of the KDE project
6
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Library 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.
11
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 Library General Public License for more details.
16
17 You should have received a copy of the GNU Library General Public License
18 along with this library; see the file COPYING.LIB. If not, write to
19 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 Boston, MA 02110-1301, USA.
21*/
22
23#ifndef SVGSVGElement_h
24#define SVGSVGElement_h
25
26#if ENABLE(SVG)
27
28#include "FloatRect.h"
29
30#include "IntSize.h"
31#include "SVGExternalResourcesRequired.h"
32#include "SVGFitToViewBox.h"
33#include "SVGLangSpace.h"
34#include "SVGStyledLocatableElement.h"
35#include "SVGTests.h"
36#include "SVGZoomAndPan.h"
37
38namespace WebCore
39{
40 class SVGAngle;
41 class SVGLength;
42 class SVGTransform;
43 class SVGViewSpec;
44 /*class SVGViewElement;
45 class SMILTimeContainer;*/
46 class SVGSVGElement : public SVGStyledLocatableElement,
47 public SVGTests,
48 public SVGLangSpace,
49 public SVGExternalResourcesRequired,
50 public SVGFitToViewBox,
51 public SVGZoomAndPan
52 {
53 public:
54 SVGSVGElement(const QualifiedName&, Document*);
55 virtual ~SVGSVGElement();
56
57 virtual bool isSVG() const { return true; }
58
59 virtual bool isValid() const { return SVGTests::isValid(); }
60
61 // 'SVGSVGElement' functions
62 DOMString contentScriptType() const;
63 void setContentScriptType(const DOMString& type);
64
65 DOMString contentStyleType() const;
66 void setContentStyleType(const DOMString& type);
67
68 FloatRect viewport() const;
69
70 IntSize containerSize() const;
71 bool hasSetContainerSize() const;
72 int relativeWidthValue() const;
73 int relativeHeightValue() const;
74
75 float pixelUnitToMillimeterX() const;
76 float pixelUnitToMillimeterY() const;
77 float screenPixelToMillimeterX() const;
78 float screenPixelToMillimeterY() const;
79
80 bool useCurrentView() const;
81 void setUseCurrentView(bool currentView);
82
83 SVGViewSpec* currentView() const;
84
85 float currentScale() const;
86 void setCurrentScale(float scale);
87
88 FloatPoint currentTranslate() const;
89 void setCurrentTranslate(const FloatPoint&);
90
91 /*SMILTimeContainer* timeContainer() const { return m_timeContainer.get(); }*/
92
93 void pauseAnimations();
94 void unpauseAnimations();
95 bool animationsPaused() const;
96
97 float getCurrentTime() const;
98 void setCurrentTime(float seconds);
99
100 unsigned long suspendRedraw(unsigned long max_wait_milliseconds);
101 void unsuspendRedraw(unsigned long suspend_handle_id, ExceptionCode&);
102 void unsuspendRedrawAll();
103 void forceRedraw();
104
105 DOM::NodeListImpl* getIntersectionList(const FloatRect&, SVGElement* referenceElement);
106 DOM::NodeListImpl* getEnclosureList(const FloatRect&, SVGElement* referenceElement);
107 bool checkIntersection(SVGElement*, const FloatRect&);
108 bool checkEnclosure(SVGElement*, const FloatRect&);
109 void deselectAll();
110
111 static float createSVGNumber();
112 static SVGLength createSVGLength();
113 static SVGAngle* createSVGAngle();
114 static FloatPoint createSVGPoint();
115 static AffineTransform createSVGMatrix();
116 static FloatRect createSVGRect();
117 static SVGTransform createSVGTransform();
118 static SVGTransform createSVGTransformFromMatrix(const AffineTransform&);
119
120 virtual void parseMappedAttribute(MappedAttribute*);
121
122 // 'virtual SVGLocatable' functions
123 virtual AffineTransform getCTM() const;
124 virtual AffineTransform getScreenCTM() const;
125
126 virtual bool rendererIsNeeded(RenderStyle* style) { return StyledElement::rendererIsNeeded(style); }
127 virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
128
129 virtual void insertedIntoDocument();
130 virtual void removedFromDocument();
131
132 virtual void svgAttributeChanged(const QualifiedName&);
133
134 virtual AffineTransform viewBoxToViewTransform(float viewWidth, float viewHeight) const;
135
136 //void inheritViewAttributes(SVGViewElement*);
137
138 // KHTML ElementImpl pure virtual method
139 virtual quint32 id() const;
140 protected:
141 virtual const SVGElement* contextElement() const { return this; }
142
143 friend class RenderSVGRoot;
144 /*friend class RenderSVGViewportContainer;*/
145
146 virtual bool hasRelativeValues() const;
147
148 bool isOutermostSVG() const;
149
150 private:
151 void addSVGWindowEventListener(const AtomicString& eventType, const Attribute* attr);
152
153 ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGExternalResourcesRequired, bool, ExternalResourcesRequired, externalResourcesRequired)
154 ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGFitToViewBox, FloatRect, ViewBox, viewBox)
155 ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGFitToViewBox, SVGPreserveAspectRatio*, PreserveAspectRatio, preserveAspectRatio)
156
157 ANIMATED_PROPERTY_DECLARATIONS(SVGSVGElement, SVGLength, SVGLength, X, x)
158 ANIMATED_PROPERTY_DECLARATIONS(SVGSVGElement, SVGLength, SVGLength, Y, y)
159 ANIMATED_PROPERTY_DECLARATIONS(SVGSVGElement, SVGLength, SVGLength, Width, width)
160 ANIMATED_PROPERTY_DECLARATIONS(SVGSVGElement, SVGLength, SVGLength, Height, height)
161
162 virtual void willSaveToCache();
163 virtual void willRestoreFromCache();
164
165 bool m_useCurrentView;
166 /*RefPtr<SMILTimeContainer> m_timeContainer;*/
167 FloatPoint m_translation;
168 mutable OwnPtr<SVGViewSpec> m_viewSpec;
169 };
170
171} // namespace WebCore
172
173#endif // ENABLE(SVG)
174#endif
175
176// vim:ts=4:noet
FloatRect.h
IntSize.h
SVGExternalResourcesRequired.h
SVGFitToViewBox.h
SVGLangSpace.h
SVGStyledLocatableElement.h
SVGTests.h
SVGZoomAndPan.h
WebCore
Definition: CSSHelper.h:7
X
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KHTML

Skip menu "KHTML"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal