SVGTextPositioningElement.h 1.6 KB

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