SVGTextPositioningElement.h (1719B)
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */ 3 /* This Source Code Form is subject to the terms of the Mozilla Public 4 * License, v. 2.0. If a copy of the MPL was not distributed with this 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 6 7 #ifndef DOM_SVG_SVGTEXTPOSITIONINGELEMENT_H_ 8 #define DOM_SVG_SVGTEXTPOSITIONINGELEMENT_H_ 9 10 #include "SVGAnimatedLengthList.h" 11 #include "SVGAnimatedNumberList.h" 12 #include "mozilla/dom/SVGTextContentElement.h" 13 14 namespace mozilla { 15 class SVGAnimatedLengthList; 16 17 namespace dom { 18 class DOMSVGAnimatedLengthList; 19 class DOMSVGAnimatedNumberList; 20 using SVGTextPositioningElementBase = SVGTextContentElement; 21 22 class SVGTextPositioningElement : public SVGTextPositioningElementBase { 23 public: 24 // WebIDL 25 already_AddRefed<DOMSVGAnimatedLengthList> X(); 26 already_AddRefed<DOMSVGAnimatedLengthList> Y(); 27 already_AddRefed<DOMSVGAnimatedLengthList> Dx(); 28 already_AddRefed<DOMSVGAnimatedLengthList> Dy(); 29 already_AddRefed<DOMSVGAnimatedNumberList> Rotate(); 30 31 protected: 32 explicit SVGTextPositioningElement( 33 already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo) 34 : SVGTextPositioningElementBase(std::move(aNodeInfo)) {} 35 36 LengthListAttributesInfo GetLengthListInfo() override; 37 NumberListAttributesInfo GetNumberListInfo() override; 38 39 enum { ATTR_X, ATTR_Y, ATTR_DX, ATTR_DY }; 40 SVGAnimatedLengthList mLengthListAttributes[4]; 41 static LengthListInfo sLengthListInfo[4]; 42 43 enum { ROTATE }; 44 SVGAnimatedNumberList mNumberListAttributes[1]; 45 static NumberListInfo sNumberListInfo[1]; 46 }; 47 48 } // namespace dom 49 } // namespace mozilla 50 51 #endif // DOM_SVG_SVGTEXTPOSITIONINGELEMENT_H_