2004-06-23 18:14:04 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2004-07-16 18:13:26 +00:00
|
|
|
/* ***** BEGIN LICENSE BLOCK *****
|
2004-06-23 18:14:04 +00:00
|
|
|
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
|
|
*
|
2004-07-16 18:13:26 +00:00
|
|
|
* The contents of this file are subject to the Mozilla Public License Version
|
|
|
|
* 1.1 (the "License"); you may not use this file except in compliance with
|
|
|
|
* the License. You may obtain a copy of the License at
|
2004-06-23 18:14:04 +00:00
|
|
|
* http://www.mozilla.org/MPL/
|
|
|
|
*
|
|
|
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
|
|
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
|
|
* for the specific language governing rights and limitations under the
|
|
|
|
* License.
|
|
|
|
*
|
|
|
|
* The Original Code is the Mozilla SVG project.
|
|
|
|
*
|
2006-06-01 15:31:15 +00:00
|
|
|
* The Initial Developer of the Original Code is IBM Corporation.
|
|
|
|
* Portions created by the Initial Developer are Copyright (C) 2006
|
2004-06-23 18:14:04 +00:00
|
|
|
* the Initial Developer. All Rights Reserved.
|
|
|
|
*
|
|
|
|
* Contributor(s):
|
|
|
|
*
|
|
|
|
* Alternatively, the contents of this file may be used under the terms of
|
2004-07-16 18:13:26 +00:00
|
|
|
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
2004-06-23 18:14:04 +00:00
|
|
|
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
|
|
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
|
|
* of those above. If you wish to allow use of your version of this file only
|
|
|
|
* under the terms of either the GPL or the LGPL, and not to allow others to
|
2004-07-16 18:13:26 +00:00
|
|
|
* use your version of this file under the terms of the MPL, indicate your
|
2004-06-23 18:14:04 +00:00
|
|
|
* decision by deleting the provisions above and replace them with the notice
|
|
|
|
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
|
|
* the provisions above, a recipient may use your version of this file under
|
|
|
|
* the terms of any one of the MPL, the GPL or the LGPL.
|
|
|
|
*
|
2004-07-16 18:13:26 +00:00
|
|
|
* ***** END LICENSE BLOCK ***** */
|
2004-06-23 18:14:04 +00:00
|
|
|
|
2006-06-01 15:31:15 +00:00
|
|
|
#ifndef NS_SVGCONTAINERFRAME_H
|
|
|
|
#define NS_SVGCONTAINERFRAME_H
|
2004-06-23 18:14:04 +00:00
|
|
|
|
|
|
|
#include "nsContainerFrame.h"
|
|
|
|
#include "nsISVGChildFrame.h"
|
2006-06-01 15:31:15 +00:00
|
|
|
#include "nsSVGUtils.h"
|
|
|
|
#include "nsIDOMSVGMatrix.h"
|
|
|
|
#include "nsSVGCoordCtxProvider.h"
|
2004-06-23 18:14:04 +00:00
|
|
|
|
2006-06-01 15:31:15 +00:00
|
|
|
typedef nsContainerFrame nsSVGContainerFrameBase;
|
2004-06-23 18:14:04 +00:00
|
|
|
|
2006-06-01 15:31:15 +00:00
|
|
|
class nsSVGContainerFrame : public nsSVGContainerFrameBase
|
2004-06-23 18:14:04 +00:00
|
|
|
{
|
2006-06-01 15:31:15 +00:00
|
|
|
friend nsIFrame* NS_NewSVGContainerFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsStyleContext* aContext);
|
|
|
|
|
2004-06-23 18:14:04 +00:00
|
|
|
protected:
|
2006-06-01 15:31:15 +00:00
|
|
|
virtual PRBool IsFrameOfType(PRUint32 aFlags) const;
|
2005-04-19 03:48:10 +00:00
|
|
|
NS_IMETHOD InitSVG();
|
2004-06-23 18:14:04 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
NS_IMETHOD_(nsrefcnt) AddRef() { return NS_OK; }
|
|
|
|
NS_IMETHOD_(nsrefcnt) Release() { return NS_OK; }
|
2006-06-01 15:31:15 +00:00
|
|
|
|
2004-06-23 18:14:04 +00:00
|
|
|
public:
|
2006-06-01 15:31:15 +00:00
|
|
|
nsSVGContainerFrame(nsStyleContext* aContext) :
|
|
|
|
nsSVGContainerFrameBase(aContext) {}
|
2004-06-23 18:14:04 +00:00
|
|
|
|
2006-03-26 21:30:36 +00:00
|
|
|
// nsIFrame:
|
2006-06-01 15:31:15 +00:00
|
|
|
NS_IMETHOD AppendFrames(nsIAtom* aListName,
|
|
|
|
nsIFrame* aFrameList);
|
|
|
|
NS_IMETHOD InsertFrames(nsIAtom* aListName,
|
|
|
|
nsIFrame* aPrevFrame,
|
|
|
|
nsIFrame* aFrameList);
|
|
|
|
NS_IMETHOD RemoveFrame(nsIAtom* aListName,
|
|
|
|
nsIFrame* aOldFrame);
|
2006-03-09 18:55:21 +00:00
|
|
|
NS_IMETHOD Init(nsIContent* aContent,
|
2004-06-23 18:14:04 +00:00
|
|
|
nsIFrame* aParent,
|
|
|
|
nsIFrame* aPrevInFlow);
|
2006-03-02 20:22:19 +00:00
|
|
|
|
2006-06-01 15:31:15 +00:00
|
|
|
virtual already_AddRefed<nsIDOMSVGMatrix> GetCanvasTM() { return nsnull; }
|
|
|
|
virtual already_AddRefed<nsSVGCoordCtxProvider> GetCoordContextProvider();
|
|
|
|
};
|
2004-06-23 18:14:04 +00:00
|
|
|
|
2006-06-01 15:31:15 +00:00
|
|
|
class nsSVGDisplayContainerFrame : public nsSVGContainerFrame,
|
|
|
|
public nsISVGChildFrame
|
|
|
|
{
|
|
|
|
protected:
|
|
|
|
NS_IMETHOD InitSVG();
|
|
|
|
|
|
|
|
public:
|
|
|
|
nsSVGDisplayContainerFrame(nsStyleContext* aContext) :
|
|
|
|
nsSVGContainerFrame(aContext) {}
|
|
|
|
|
|
|
|
// nsISupports interface:
|
|
|
|
NS_IMETHOD QueryInterface(const nsIID& aIID, void** aInstancePtr);
|
|
|
|
|
|
|
|
// nsIFrame:
|
|
|
|
NS_IMETHOD InsertFrames(nsIAtom* aListName,
|
|
|
|
nsIFrame* aPrevFrame,
|
|
|
|
nsIFrame* aFrameList);
|
|
|
|
NS_IMETHOD RemoveFrame(nsIAtom* aListName,
|
|
|
|
nsIFrame* aOldFrame);
|
2004-06-23 18:14:04 +00:00
|
|
|
|
|
|
|
// nsISVGChildFrame interface:
|
2006-03-21 15:49:20 +00:00
|
|
|
NS_IMETHOD PaintSVG(nsISVGRendererCanvas* canvas);
|
2005-04-19 03:48:10 +00:00
|
|
|
NS_IMETHOD GetFrameForPointSVG(float x, float y, nsIFrame** hit);
|
2006-06-09 18:08:33 +00:00
|
|
|
NS_IMETHOD_(nsRect) GetCoveredRegion();
|
|
|
|
NS_IMETHOD UpdateCoveredRegion();
|
2004-06-23 18:14:04 +00:00
|
|
|
NS_IMETHOD InitialUpdate();
|
2005-09-06 22:30:40 +00:00
|
|
|
NS_IMETHOD NotifyCanvasTMChanged(PRBool suppressInvalidation);
|
2004-06-23 18:14:04 +00:00
|
|
|
NS_IMETHOD NotifyRedrawSuspended();
|
|
|
|
NS_IMETHOD NotifyRedrawUnsuspended();
|
2004-12-24 16:26:10 +00:00
|
|
|
NS_IMETHOD SetMatrixPropagation(PRBool aPropagate) { return NS_ERROR_FAILURE; }
|
2005-09-06 22:30:40 +00:00
|
|
|
NS_IMETHOD SetOverrideCTM(nsIDOMSVGMatrix *aCTM) { return NS_ERROR_FAILURE; }
|
2004-06-23 18:14:04 +00:00
|
|
|
NS_IMETHOD GetBBox(nsIDOMSVGRect **_retval);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|