1998-11-05 02:21:50 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
*
|
1999-11-06 06:40:37 +03:00
|
|
|
* The contents of this file are subject to the Netscape 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 http://www.mozilla.org/NPL/
|
1998-11-05 02:21:50 +03:00
|
|
|
*
|
1999-11-06 06:40:37 +03:00
|
|
|
* 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.
|
1998-11-05 02:21:50 +03:00
|
|
|
*
|
1999-11-06 06:40:37 +03:00
|
|
|
* The Original Code is mozilla.org code.
|
|
|
|
*
|
|
|
|
* The Initial Developer of the Original Code is Netscape
|
1998-11-05 02:21:50 +03:00
|
|
|
* Communications Corporation. Portions created by Netscape are
|
1999-11-06 06:40:37 +03:00
|
|
|
* Copyright (C) 1998 Netscape Communications Corporation. All
|
|
|
|
* Rights Reserved.
|
|
|
|
*
|
|
|
|
* Contributor(s):
|
1998-11-05 02:21:50 +03:00
|
|
|
*/
|
|
|
|
#ifndef nsSimplePageSequence_h___
|
|
|
|
#define nsSimplePageSequence_h___
|
|
|
|
|
|
|
|
#include "nsHTMLContainerFrame.h"
|
1998-12-07 06:43:02 +03:00
|
|
|
#include "nsIPageSequenceFrame.h"
|
1998-11-05 02:21:50 +03:00
|
|
|
|
|
|
|
// Simple page sequence frame class. Used when we're in paginated mode
|
1998-12-07 06:43:02 +03:00
|
|
|
class nsSimplePageSequenceFrame : public nsContainerFrame,
|
|
|
|
public nsIPageSequenceFrame {
|
1998-11-05 02:21:50 +03:00
|
|
|
public:
|
1999-05-12 02:03:29 +04:00
|
|
|
friend nsresult NS_NewSimplePageSequenceFrame(nsIFrame** aResult);
|
|
|
|
|
1998-12-07 06:43:02 +03:00
|
|
|
// nsISupports
|
|
|
|
NS_IMETHOD QueryInterface(const nsIID& aIID, void** aInstancePtr);
|
|
|
|
|
|
|
|
// nsIFrameReflow
|
1999-11-24 09:03:41 +03:00
|
|
|
NS_IMETHOD Reflow(nsIPresContext* aPresContext,
|
1998-11-05 02:21:50 +03:00
|
|
|
nsHTMLReflowMetrics& aDesiredSize,
|
|
|
|
const nsHTMLReflowState& aMaxSize,
|
|
|
|
nsReflowStatus& aStatus);
|
|
|
|
|
1998-12-07 06:43:02 +03:00
|
|
|
// nsIFrame
|
1999-11-24 09:03:41 +03:00
|
|
|
NS_IMETHOD Paint(nsIPresContext* aPresContext,
|
1998-11-05 09:13:55 +03:00
|
|
|
nsIRenderingContext& aRenderingContext,
|
1998-12-18 18:54:23 +03:00
|
|
|
const nsRect& aDirtyRect,
|
|
|
|
nsFramePaintLayer aWhichLayer);
|
1998-11-05 09:13:55 +03:00
|
|
|
|
1998-12-07 06:43:02 +03:00
|
|
|
// nsIPageSequenceFrame
|
1999-11-24 09:03:41 +03:00
|
|
|
NS_IMETHOD Print(nsIPresContext* aPresContext,
|
1998-12-07 06:43:02 +03:00
|
|
|
const nsPrintOptions& aPrintOptions,
|
|
|
|
nsIPrintStatusCallback* aStatusCallback);
|
|
|
|
|
1999-11-02 01:12:45 +03:00
|
|
|
#ifdef DEBUG
|
1998-11-05 02:21:50 +03:00
|
|
|
// Debugging
|
1998-11-19 20:22:29 +03:00
|
|
|
NS_IMETHOD GetFrameName(nsString& aResult) const;
|
1999-11-02 01:12:45 +03:00
|
|
|
#endif
|
1998-12-07 06:43:02 +03:00
|
|
|
|
|
|
|
protected:
|
1999-05-12 02:03:29 +04:00
|
|
|
nsSimplePageSequenceFrame();
|
1999-11-24 09:03:41 +03:00
|
|
|
virtual void PaintChild(nsIPresContext* aPresContext,
|
1998-12-07 06:43:02 +03:00
|
|
|
nsIRenderingContext& aRenderingContext,
|
|
|
|
const nsRect& aDirtyRect,
|
1998-12-18 18:54:23 +03:00
|
|
|
nsIFrame* aFrame,
|
|
|
|
nsFramePaintLayer aWhichLayer);
|
1998-12-07 06:43:02 +03:00
|
|
|
|
1999-11-24 09:03:41 +03:00
|
|
|
nsresult IncrementalReflow(nsIPresContext* aPresContext,
|
1999-07-03 06:22:10 +04:00
|
|
|
const nsHTMLReflowState& aReflowState,
|
|
|
|
nsSize& aPageSize,
|
|
|
|
nscoord aX,
|
|
|
|
nscoord& aY);
|
|
|
|
|
1999-11-24 09:03:41 +03:00
|
|
|
nsresult CreateContinuingPageFrame(nsIPresContext* aPresContext,
|
1999-07-03 06:22:10 +04:00
|
|
|
nsIFrame* aPageFrame,
|
|
|
|
nsIFrame** aContinuingFrame);
|
|
|
|
|
1998-12-07 06:43:02 +03:00
|
|
|
NS_IMETHOD_(nsrefcnt) AddRef(void) {return nsContainerFrame::AddRef();}
|
|
|
|
NS_IMETHOD_(nsrefcnt) Release(void) {return nsContainerFrame::Release();}
|
1998-11-05 02:21:50 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* nsSimplePageSequence_h___ */
|
|
|
|
|