KHTML
SVGViewSpec.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef SVGViewSpec_h
00023 #define SVGViewSpec_h
00024
00025 #if ENABLE(SVG)
00026 #include "SVGFitToViewBox.h"
00027 #include "SVGZoomAndPan.h"
00028
00029 #include <wtf/RefPtr.h>
00030
00031 namespace WebCore {
00032
00033 class SVGElement;
00034 class SVGSVGElement;
00035 class SVGTransformList;
00036
00037 class SVGViewSpec : public SVGFitToViewBox,
00038 public SVGZoomAndPan {
00039 public:
00040 SVGViewSpec(const SVGSVGElement*);
00041 virtual ~SVGViewSpec();
00042
00043 bool parseViewSpec(const String&);
00044
00045 void setTransform(const String&);
00046 SVGTransformList* transform() const { return m_transform.get(); }
00047
00048 void setViewBoxString(const String&);
00049
00050 void setPreserveAspectRatioString(const String&);
00051
00052 void setViewTargetString(const String&);
00053 String viewTargetString() const { return m_viewTargetString; }
00054 SVGElement* viewTarget() const;
00055
00056 protected:
00057 virtual const SVGElement* contextElement() const;
00058
00059 private:
00060 mutable RefPtr<SVGTransformList> m_transform;
00061 const SVGSVGElement* m_contextElement;
00062 String m_viewTargetString;
00063 };
00064
00065 }
00066
00067 #endif // ENABLE(SVG)
00068 #endif