1998-12-18 17:54:54 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
*
|
1999-11-06 03:40:37 +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-12-18 17:54:54 +00:00
|
|
|
*
|
1999-11-06 03:40:37 +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-12-18 17:54:54 +00:00
|
|
|
*
|
1999-11-06 03:40:37 +00:00
|
|
|
* The Original Code is mozilla.org code.
|
|
|
|
*
|
|
|
|
* The Initial Developer of the Original Code is Netscape
|
1998-12-18 17:54:54 +00:00
|
|
|
* Communications Corporation. Portions created by Netscape are
|
1999-11-06 03:40:37 +00:00
|
|
|
* Copyright (C) 1998 Netscape Communications Corporation. All
|
|
|
|
* Rights Reserved.
|
|
|
|
*
|
|
|
|
* Contributor(s):
|
1998-12-18 17:54:54 +00:00
|
|
|
*/
|
|
|
|
#ifndef nsAreaFrame_h___
|
|
|
|
#define nsAreaFrame_h___
|
|
|
|
|
|
|
|
#include "nsBlockFrame.h"
|
|
|
|
#include "nsVoidArray.h"
|
1999-01-18 17:27:27 +00:00
|
|
|
#include "nsIAreaFrame.h"
|
1999-04-16 01:42:51 +00:00
|
|
|
#include "nsAbsoluteContainingBlock.h"
|
1998-12-18 17:54:54 +00:00
|
|
|
|
|
|
|
class nsSpaceManager;
|
|
|
|
|
|
|
|
struct nsStyleDisplay;
|
|
|
|
struct nsStylePosition;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Child list name indices
|
|
|
|
* @see #GetAdditionalChildListName()
|
|
|
|
*/
|
|
|
|
#define NS_AREA_FRAME_ABSOLUTE_LIST_INDEX (NS_BLOCK_FRAME_LAST_LIST_INDEX + 1)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The area frame has an additional named child list:
|
|
|
|
* - "Absolute-list" which contains the absolutely positioned frames
|
|
|
|
*
|
|
|
|
* @see nsLayoutAtoms::absoluteList
|
|
|
|
*/
|
1999-01-18 17:27:27 +00:00
|
|
|
class nsAreaFrame : public nsBlockFrame, public nsIAreaFrame
|
1998-12-18 17:54:54 +00:00
|
|
|
{
|
|
|
|
public:
|
1999-05-11 22:03:29 +00:00
|
|
|
friend nsresult NS_NewAreaFrame(nsIFrame** aResult, PRUint32 aFlags);
|
1998-12-18 17:54:54 +00:00
|
|
|
|
1999-01-18 17:27:27 +00:00
|
|
|
// nsISupports
|
|
|
|
NS_IMETHOD QueryInterface(const nsIID& aIID, void** aInstancePtr);
|
|
|
|
|
1998-12-18 17:54:54 +00:00
|
|
|
// nsIFrame
|
1999-11-24 06:03:41 +00:00
|
|
|
NS_IMETHOD Destroy(nsIPresContext* aPresContext);
|
1998-12-18 17:54:54 +00:00
|
|
|
|
1999-11-24 06:03:41 +00:00
|
|
|
NS_IMETHOD SetInitialChildList(nsIPresContext* aPresContext,
|
1998-12-29 03:38:16 +00:00
|
|
|
nsIAtom* aListName,
|
|
|
|
nsIFrame* aChildList);
|
1999-11-24 06:03:41 +00:00
|
|
|
NS_IMETHOD AppendFrames(nsIPresContext* aPresContext,
|
1999-07-24 02:37:45 +00:00
|
|
|
nsIPresShell& aPresShell,
|
|
|
|
nsIAtom* aListName,
|
|
|
|
nsIFrame* aFrameList);
|
1999-11-24 06:03:41 +00:00
|
|
|
NS_IMETHOD InsertFrames(nsIPresContext* aPresContext,
|
1999-07-24 02:37:45 +00:00
|
|
|
nsIPresShell& aPresShell,
|
|
|
|
nsIAtom* aListName,
|
|
|
|
nsIFrame* aPrevFrame,
|
|
|
|
nsIFrame* aFrameList);
|
1999-11-24 06:03:41 +00:00
|
|
|
NS_IMETHOD RemoveFrame(nsIPresContext* aPresContext,
|
1999-07-24 02:37:45 +00:00
|
|
|
nsIPresShell& aPresShell,
|
|
|
|
nsIAtom* aListName,
|
|
|
|
nsIFrame* aOldFrame);
|
1998-12-29 03:38:16 +00:00
|
|
|
|
1998-12-18 17:54:54 +00:00
|
|
|
NS_IMETHOD GetAdditionalChildListName(PRInt32 aIndex,
|
1999-02-10 02:25:01 +00:00
|
|
|
nsIAtom** aListName) const;
|
1998-12-18 17:54:54 +00:00
|
|
|
|
1999-02-10 02:25:01 +00:00
|
|
|
NS_IMETHOD FirstChild(nsIAtom* aListName, nsIFrame** aFirstChild) const;
|
1998-12-18 17:54:54 +00:00
|
|
|
|
1999-11-24 06:03:41 +00:00
|
|
|
NS_IMETHOD Reflow(nsIPresContext* aPresContext,
|
1998-12-18 17:54:54 +00:00
|
|
|
nsHTMLReflowMetrics& aDesiredSize,
|
|
|
|
const nsHTMLReflowState& aReflowState,
|
|
|
|
nsReflowStatus& aStatus);
|
|
|
|
|
1999-02-14 03:47:33 +00:00
|
|
|
/**
|
|
|
|
* Get the "type" of the frame
|
|
|
|
*
|
|
|
|
* @see nsLayoutAtoms::areaFrame
|
|
|
|
*/
|
|
|
|
NS_IMETHOD GetFrameType(nsIAtom** aType) const;
|
|
|
|
|
1999-09-01 01:02:16 +00:00
|
|
|
#ifdef DEBUG
|
1999-11-01 22:12:45 +00:00
|
|
|
NS_IMETHOD GetFrameName(nsString& aResult) const;
|
1999-08-31 03:09:40 +00:00
|
|
|
NS_IMETHOD SizeOf(nsISizeOfHandler* aHandler, PRUint32* aResult) const;
|
1999-09-01 01:02:16 +00:00
|
|
|
#endif
|
1999-08-31 03:09:40 +00:00
|
|
|
|
1999-01-18 17:27:27 +00:00
|
|
|
// nsIAreaFrame
|
|
|
|
NS_IMETHOD GetPositionedInfo(nscoord& aXMost, nscoord& aYMost) const;
|
|
|
|
|
1998-12-18 17:54:54 +00:00
|
|
|
protected:
|
|
|
|
nsAreaFrame();
|
|
|
|
|
|
|
|
private:
|
1999-04-16 01:42:51 +00:00
|
|
|
nsAbsoluteContainingBlock mAbsoluteContainer;
|
1999-06-29 03:41:58 +00:00
|
|
|
nsRect mCombinedArea;
|
1998-12-18 17:54:54 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* nsAreaFrame_h___ */
|