1 ////////////////////////////////////////////////////////////////////////////// 2 // Name: SVGRectElement.h 3 // Author: Alex Thuering 4 // Copyright: (c) 2005 Alex Thuering 5 // Licence: wxWindows licence 6 // Notes: generated by generate.py 7 ////////////////////////////////////////////////////////////////////////////// 8 9 #ifndef WX_SVG_RECT_ELEMENT_H 10 #define WX_SVG_RECT_ELEMENT_H 11 12 class wxSVGCanvasItem; 13 14 #include "SVGElement.h" 15 #include "SVGTests.h" 16 #include "SVGLangSpace.h" 17 #include "SVGExternalResourcesRequired.h" 18 #include "SVGStylable.h" 19 #include "SVGTransformable.h" 20 #include "EventTarget.h" 21 #include "SVGAnimatedLength.h" 22 #include "SVGSVGElement.h" 23 #include "String_wxsvg.h" 24 #include "Element.h" 25 #include "SVGAnimatedType.h" 26 27 class wxSVGRectElement: 28 public wxSVGElement, 29 public wxSVGTests, 30 public wxSVGLangSpace, 31 public wxSVGExternalResourcesRequired, 32 public wxSVGStylable, 33 public wxSVGTransformable, 34 public wxEventTarget 35 { 36 protected: 37 wxSVGAnimatedLength m_x; 38 wxSVGAnimatedLength m_y; 39 wxSVGAnimatedLength m_width; 40 wxSVGAnimatedLength m_height; 41 wxSVGAnimatedLength m_rx; 42 wxSVGAnimatedLength m_ry; 43 wxSVGCanvasItem* m_canvasItem; 44 45 public: GetX()46 inline const wxSVGAnimatedLength& GetX() const { WX_SVG_ANIM_LENGTH_CALC_WIDTH(m_x, GetViewportElement()); return m_x; } SetX(const wxSVGAnimatedLength & n)47 inline void SetX(const wxSVGAnimatedLength& n) { m_x = n; } SetX(const wxSVGLength & n)48 inline void SetX(const wxSVGLength& n) { m_x.SetBaseVal(n); } 49 GetY()50 inline const wxSVGAnimatedLength& GetY() const { WX_SVG_ANIM_LENGTH_CALC_HEIGHT(m_y, GetViewportElement()); return m_y; } SetY(const wxSVGAnimatedLength & n)51 inline void SetY(const wxSVGAnimatedLength& n) { m_y = n; } SetY(const wxSVGLength & n)52 inline void SetY(const wxSVGLength& n) { m_y.SetBaseVal(n); } 53 GetWidth()54 inline const wxSVGAnimatedLength& GetWidth() const { WX_SVG_ANIM_LENGTH_CALC_WIDTH(m_width, GetViewportElement()); return m_width; } SetWidth(const wxSVGAnimatedLength & n)55 inline void SetWidth(const wxSVGAnimatedLength& n) { m_width = n; } SetWidth(const wxSVGLength & n)56 inline void SetWidth(const wxSVGLength& n) { m_width.SetBaseVal(n); } 57 GetHeight()58 inline const wxSVGAnimatedLength& GetHeight() const { WX_SVG_ANIM_LENGTH_CALC_HEIGHT(m_height, GetViewportElement()); return m_height; } SetHeight(const wxSVGAnimatedLength & n)59 inline void SetHeight(const wxSVGAnimatedLength& n) { m_height = n; } SetHeight(const wxSVGLength & n)60 inline void SetHeight(const wxSVGLength& n) { m_height.SetBaseVal(n); } 61 GetRx()62 inline const wxSVGAnimatedLength& GetRx() const { WX_SVG_ANIM_LENGTH_CALC_WIDTH(m_rx, GetViewportElement()); return m_rx; } SetRx(const wxSVGAnimatedLength & n)63 inline void SetRx(const wxSVGAnimatedLength& n) { m_rx = n; } SetRx(const wxSVGLength & n)64 inline void SetRx(const wxSVGLength& n) { m_rx.SetBaseVal(n); } 65 GetRy()66 inline const wxSVGAnimatedLength& GetRy() const { WX_SVG_ANIM_LENGTH_CALC_HEIGHT(m_ry, GetViewportElement()); return m_ry; } SetRy(const wxSVGAnimatedLength & n)67 inline void SetRy(const wxSVGAnimatedLength& n) { m_ry = n; } SetRy(const wxSVGLength & n)68 inline void SetRy(const wxSVGLength& n) { m_ry.SetBaseVal(n); } 69 70 public: GetCanvasItem()71 inline wxSVGCanvasItem* GetCanvasItem() { return m_canvasItem; } 72 void SetCanvasItem(wxSVGCanvasItem* canvasItem); 73 74 public: 75 wxSVGRectElement(wxString tagName = wxT("rect")): wxSVGElement(tagName)76 wxSVGElement(tagName), m_canvasItem(NULL) {} 77 wxSVGRectElement(wxSVGRectElement& src); 78 virtual ~wxSVGRectElement(); 79 wxSvgXmlNode* CloneNode(bool deep = true) { return new wxSVGRectElement(*this); } 80 wxSVGRect GetBBox(wxSVG_COORDINATES coordinates = wxSVG_COORDINATES_USER); 81 wxSVGRect GetResultBBox(wxSVG_COORDINATES coordinates = wxSVG_COORDINATES_USER); GetCTM()82 wxSVGMatrix GetCTM() { return wxSVGLocatable::GetCTM(this); } GetScreenCTM()83 wxSVGMatrix GetScreenCTM() { return wxSVGLocatable::GetScreenCTM(this); } 84 bool HasAttribute(const wxString& name) const; 85 wxString GetAttribute(const wxString& name) const; 86 bool SetAttribute(const wxString& name, const wxString& value); 87 wxSvgXmlAttrHash GetAttributes() const; 88 bool SetAnimatedValue(const wxString& name, const wxSVGAnimatedType& value); GetDtd()89 virtual wxSVGDTD GetDtd() const { return wxSVG_RECT_ELEMENT; } 90 }; 91 92 #endif // WX_SVG_RECT_ELEMENT_H 93