2001-09-28 20:14:13 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* ***** BEGIN LICENSE BLOCK *****
|
|
|
|
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
1998-04-13 20:24:54 +00:00
|
|
|
*
|
2001-09-28 20:14:13 +00: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-04-13 20:24:54 +00:00
|
|
|
*
|
2001-09-28 20:14:13 +00: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-04-13 20:24:54 +00:00
|
|
|
*
|
1999-11-06 03:40:37 +00:00
|
|
|
* The Original Code is mozilla.org code.
|
|
|
|
*
|
2001-09-28 20:14:13 +00:00
|
|
|
* The Initial Developer of the Original Code is
|
|
|
|
* Netscape Communications Corporation.
|
|
|
|
* Portions created by the Initial Developer are Copyright (C) 1998
|
|
|
|
* the Initial Developer. All Rights Reserved.
|
1999-11-06 03:40:37 +00:00
|
|
|
*
|
2001-09-28 20:14:13 +00:00
|
|
|
* Contributor(s):
|
|
|
|
*
|
|
|
|
* Alternatively, the contents of this file may be used under the terms of
|
|
|
|
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
|
|
|
* 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
|
|
|
|
* use your version of this file under the terms of the NPL, indicate your
|
|
|
|
* 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 NPL, the GPL or the LGPL.
|
|
|
|
*
|
|
|
|
* ***** END LICENSE BLOCK ***** */
|
1998-04-13 20:24:54 +00:00
|
|
|
#ifndef nsPlaceholderFrame_h___
|
|
|
|
#define nsPlaceholderFrame_h___
|
|
|
|
|
2002-05-28 22:50:43 +00:00
|
|
|
#include "nsSplittableFrame.h"
|
1998-04-13 20:24:54 +00:00
|
|
|
|
2002-01-10 14:16:05 +00:00
|
|
|
nsresult NS_NewPlaceholderFrame(nsIPresShell* aPresShell, nsIFrame** aInstancePtrResult);
|
|
|
|
|
1998-11-14 19:26:57 +00:00
|
|
|
/**
|
1999-04-23 14:34:48 +00:00
|
|
|
* Implementation of a frame that's used as a placeholder for a frame that
|
|
|
|
* has been moved out of the flow
|
1998-11-14 19:26:57 +00:00
|
|
|
*/
|
2002-05-28 22:50:43 +00:00
|
|
|
class nsPlaceholderFrame : public nsSplittableFrame {
|
1998-04-13 20:24:54 +00:00
|
|
|
public:
|
|
|
|
/**
|
|
|
|
* Create a new placeholder frame
|
|
|
|
*/
|
1999-12-04 23:49:50 +00:00
|
|
|
friend nsresult NS_NewPlaceholderFrame(nsIPresShell* aPresShell, nsIFrame** aInstancePtrResult);
|
2002-09-24 22:13:20 +00:00
|
|
|
nsPlaceholderFrame();
|
|
|
|
virtual ~nsPlaceholderFrame();
|
1998-04-13 20:24:54 +00:00
|
|
|
|
1999-04-23 14:34:48 +00:00
|
|
|
// Get/Set the associated out of flow frame
|
1999-05-03 20:54:24 +00:00
|
|
|
nsIFrame* GetOutOfFlowFrame() const {return mOutOfFlowFrame;}
|
|
|
|
void SetOutOfFlowFrame(nsIFrame* aFrame) {mOutOfFlowFrame = aFrame;}
|
1998-04-13 20:24:54 +00:00
|
|
|
|
1998-10-03 04:28:05 +00:00
|
|
|
// nsIHTMLReflow overrides
|
1999-11-24 06:03:41 +00:00
|
|
|
NS_IMETHOD Reflow(nsIPresContext* aPresContext,
|
1998-10-03 04:28:05 +00:00
|
|
|
nsHTMLReflowMetrics& aDesiredSize,
|
|
|
|
const nsHTMLReflowState& aReflowState,
|
|
|
|
nsReflowStatus& aStatus);
|
|
|
|
|
|
|
|
// nsIFrame overrides
|
1999-11-01 22:12:45 +00:00
|
|
|
#ifdef DEBUG
|
2001-09-19 12:35:19 +00:00
|
|
|
NS_IMETHOD Paint(nsIPresContext* aPresContext,
|
1998-07-16 23:32:04 +00:00
|
|
|
nsIRenderingContext& aRenderingContext,
|
2001-09-19 12:35:19 +00:00
|
|
|
const nsRect& aDirtyRect,
|
|
|
|
nsFramePaintLayer aWhichLayer,
|
|
|
|
PRUint32 aFlags = 0);
|
1999-10-26 04:44:41 +00:00
|
|
|
NS_IMETHOD List(nsIPresContext* aPresContext, FILE* out, PRInt32 aIndent) const;
|
1999-11-01 22:12:45 +00:00
|
|
|
#endif
|
1998-06-30 21:35:07 +00:00
|
|
|
|
1999-04-23 14:34:48 +00:00
|
|
|
/**
|
|
|
|
* Get the "type" of the frame
|
|
|
|
*
|
|
|
|
* @see nsLayoutAtoms::placeholderFrame
|
|
|
|
*/
|
|
|
|
NS_IMETHOD GetFrameType(nsIAtom** aType) const;
|
|
|
|
|
1999-09-01 01:02:16 +00:00
|
|
|
#ifdef DEBUG
|
2001-11-14 01:33:42 +00:00
|
|
|
NS_IMETHOD GetFrameName(nsAString& aResult) const;
|
1999-09-01 01:02:16 +00:00
|
|
|
#endif
|
1998-04-13 20:24:54 +00:00
|
|
|
|
2002-06-25 21:16:17 +00:00
|
|
|
NS_IMETHOD IsEmpty(nsCompatibility aCompatMode,
|
|
|
|
PRBool aIsPre,
|
|
|
|
PRBool *aResult);
|
2001-10-25 01:08:40 +00:00
|
|
|
|
1998-04-13 20:24:54 +00:00
|
|
|
protected:
|
1999-04-23 14:34:48 +00:00
|
|
|
nsIFrame* mOutOfFlowFrame;
|
1998-04-13 20:24:54 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* nsPlaceholderFrame_h___ */
|