00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039 #ifndef __NS_SVGPATHGEOMETRYFRAME_H__
00040 #define __NS_SVGPATHGEOMETRYFRAME_H__
00041
00042 #include "nsFrame.h"
00043 #include "nsISVGChildFrame.h"
00044 #include "nsISVGPathGeometrySource.h"
00045 #include "nsISVGRendererPathGeometry.h"
00046 #include "nsWeakReference.h"
00047 #include "nsISVGValue.h"
00048 #include "nsISVGValueObserver.h"
00049 #include "nsISVGOuterSVGFrame.h"
00050
00051 class nsIPresContext;
00052 class nsIDOMSVGMatrix;
00053 class nsISVGRendererRegion;
00054
00055 typedef nsFrame nsSVGPathGeometryFrameBase;
00056
00057 class nsSVGPathGeometryFrame : public nsSVGPathGeometryFrameBase,
00058 public nsISVGValueObserver,
00059 public nsSupportsWeakReference,
00060 public nsISVGPathGeometrySource,
00061 public nsISVGChildFrame
00062 {
00063 protected:
00064 nsSVGPathGeometryFrame();
00065 virtual ~nsSVGPathGeometryFrame();
00066
00067 public:
00068
00069 NS_IMETHOD QueryInterface(const nsIID& aIID, void** aInstancePtr);
00070 NS_IMETHOD_(nsrefcnt) AddRef() { return NS_OK; }
00071 NS_IMETHOD_(nsrefcnt) Release() { return NS_OK; }
00072
00073
00074 NS_IMETHOD
00075 Init(nsIPresContext* aPresContext,
00076 nsIContent* aContent,
00077 nsIFrame* aParent,
00078 nsStyleContext* aContext,
00079 nsIFrame* aPrevInFlow);
00080
00081 NS_IMETHOD AttributeChanged(nsIPresContext* aPresContext,
00082 nsIContent* aChild,
00083 PRInt32 aNameSpaceID,
00084 nsIAtom* aAttribute,
00085 PRInt32 aModType,
00086 PRInt32 aHint);
00087
00088 NS_IMETHOD DidSetStyleContext(nsIPresContext* aPresContext);
00089
00090
00091 NS_IMETHOD WillModifySVGObservable(nsISVGValue* observable);
00092 NS_IMETHOD DidModifySVGObservable (nsISVGValue* observable);
00093
00094
00095 NS_IMETHOD Paint(nsISVGRendererCanvas* canvas, const nsRect& dirtyRectTwips);
00096 NS_IMETHOD GetFrameForPoint(float x, float y, nsIFrame** hit);
00097 NS_IMETHOD_(already_AddRefed<nsISVGRendererRegion>) GetCoveredRegion();
00098 NS_IMETHOD InitialUpdate();
00099 NS_IMETHOD NotifyCTMChanged();
00100 NS_IMETHOD NotifyRedrawSuspended();
00101 NS_IMETHOD NotifyRedrawUnsuspended();
00102 NS_IMETHOD GetBBox(nsIDOMSVGRect **_retval);
00103
00104
00105
00106
00107
00108 NS_DECL_NSISVGGEOMETRYSOURCE
00109
00110
00111 NS_IMETHOD GetHittestMask(PRUint16 *aHittestMask);
00112
00113
00114
00115 protected:
00116 virtual nsresult Init();
00117 void UpdateGraphic(PRUint32 flags);
00118 nsISVGOuterSVGFrame *GetOuterSVGFrame();
00119 nsISVGRendererPathGeometry *GetGeometry();
00120
00121 private:
00122 nsCOMPtr<nsISVGRendererPathGeometry> mGeometry;
00123 PRUint32 mUpdateFlags;
00124 };
00125
00126 #endif // __NS_SVGPATHGEOMETRYFRAME_H__