1998-09-10 23:32:14 +04: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-09-10 23:32:14 +04: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-09-10 23:32:14 +04: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-09-10 23:32:14 +04: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-09-10 23:32:14 +04:00
|
|
|
*/
|
|
|
|
#ifndef nsIStyleFrameConstruction_h___
|
|
|
|
#define nsIStyleFrameConstruction_h___
|
|
|
|
|
1999-02-05 06:55:55 +03:00
|
|
|
#include "nsISupports.h"
|
|
|
|
|
1999-12-05 02:49:50 +03:00
|
|
|
class nsIPresShell;
|
1998-09-10 23:32:14 +04:00
|
|
|
class nsIPresContext;
|
|
|
|
class nsIContent;
|
|
|
|
class nsIFrame;
|
1999-02-05 06:55:55 +03:00
|
|
|
class nsIAtom;
|
|
|
|
class nsIStyleSheet;
|
|
|
|
class nsIStyleRule;
|
1999-03-25 09:33:25 +03:00
|
|
|
class nsStyleChangeList;
|
1999-08-05 07:09:22 +04:00
|
|
|
class nsIFrameManager;
|
1999-12-06 10:44:18 +03:00
|
|
|
class nsILayoutHistoryState;
|
1998-09-10 23:32:14 +04:00
|
|
|
|
|
|
|
// IID for the nsIStyleSet interface {a6cf9066-15b3-11d2-932e-00805f8add32}
|
|
|
|
#define NS_ISTYLE_FRAME_CONSTRUCTION_IID \
|
|
|
|
{0xa6cf9066, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32}}
|
|
|
|
|
|
|
|
class nsIStyleFrameConstruction : public nsISupports {
|
|
|
|
public:
|
|
|
|
/**
|
1998-12-29 06:38:16 +03:00
|
|
|
* Create frames for the root content element and its child content.
|
1998-09-10 23:32:14 +04:00
|
|
|
*/
|
1999-12-05 02:49:50 +03:00
|
|
|
NS_IMETHOD ConstructRootFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
1998-12-29 06:38:16 +03:00
|
|
|
nsIContent* aDocElement,
|
|
|
|
nsIFrame*& aFrameSubTree) = 0;
|
1998-09-10 23:32:14 +04:00
|
|
|
|
1998-11-17 05:14:38 +03:00
|
|
|
// Causes reconstruction of a frame hierarchy rooted by the
|
1999-03-01 19:57:35 +03:00
|
|
|
// document element frame. This is often called when radical style
|
1998-11-17 05:14:38 +03:00
|
|
|
// change precludes incremental reflow.
|
1999-03-01 19:57:35 +03:00
|
|
|
NS_IMETHOD ReconstructDocElementHierarchy(nsIPresContext* aPresContext) = 0;
|
1998-11-17 05:14:38 +03:00
|
|
|
|
1998-09-10 23:32:14 +04:00
|
|
|
NS_IMETHOD ContentAppended(nsIPresContext* aPresContext,
|
|
|
|
nsIContent* aContainer,
|
|
|
|
PRInt32 aNewIndexInContainer) = 0;
|
1998-09-18 21:18:37 +04:00
|
|
|
|
|
|
|
NS_IMETHOD ContentInserted(nsIPresContext* aPresContext,
|
|
|
|
nsIContent* aContainer,
|
|
|
|
nsIContent* aChild,
|
1999-12-06 10:44:18 +03:00
|
|
|
PRInt32 aIndexInContainer,
|
|
|
|
nsILayoutHistoryState* aFrameState) = 0;
|
1998-09-25 09:13:06 +04:00
|
|
|
|
1998-09-26 02:47:00 +04:00
|
|
|
NS_IMETHOD ContentReplaced(nsIPresContext* aPresContext,
|
|
|
|
nsIContent* aContainer,
|
|
|
|
nsIContent* aOldChild,
|
|
|
|
nsIContent* aNewChild,
|
|
|
|
PRInt32 aIndexInContainer) = 0;
|
|
|
|
|
1998-09-25 09:13:06 +04:00
|
|
|
NS_IMETHOD ContentRemoved(nsIPresContext* aPresContext,
|
|
|
|
nsIContent* aContainer,
|
|
|
|
nsIContent* aChild,
|
|
|
|
PRInt32 aIndexInContainer) = 0;
|
1998-09-30 03:41:59 +04:00
|
|
|
|
|
|
|
NS_IMETHOD ContentChanged(nsIPresContext* aPresContext,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsISupports* aSubContent) = 0;
|
|
|
|
|
1999-04-20 04:02:22 +04:00
|
|
|
NS_IMETHOD ContentStatesChanged(nsIPresContext* aPresContext,
|
|
|
|
nsIContent* aContent1,
|
|
|
|
nsIContent* aContent2) = 0;
|
1999-02-27 10:15:09 +03:00
|
|
|
|
1998-09-30 03:41:59 +04:00
|
|
|
NS_IMETHOD AttributeChanged(nsIPresContext* aPresContext,
|
|
|
|
nsIContent* aContent,
|
1999-10-16 03:16:45 +04:00
|
|
|
PRInt32 aNameSpaceID,
|
1998-09-30 03:41:59 +04:00
|
|
|
nsIAtom* aAttribute,
|
|
|
|
PRInt32 aHint) = 0;
|
1998-11-26 04:24:52 +03:00
|
|
|
|
|
|
|
// Style change notifications
|
|
|
|
NS_IMETHOD StyleRuleChanged(nsIPresContext* aPresContext,
|
|
|
|
nsIStyleSheet* aStyleSheet,
|
|
|
|
nsIStyleRule* aStyleRule,
|
|
|
|
PRInt32 aHint) = 0; // See nsStyleConsts fot hint values
|
|
|
|
NS_IMETHOD StyleRuleAdded(nsIPresContext* aPresContext,
|
|
|
|
nsIStyleSheet* aStyleSheet,
|
|
|
|
nsIStyleRule* aStyleRule) = 0;
|
|
|
|
NS_IMETHOD StyleRuleRemoved(nsIPresContext* aPresContext,
|
|
|
|
nsIStyleSheet* aStyleSheet,
|
|
|
|
nsIStyleRule* aStyleRule) = 0;
|
1999-03-25 09:33:25 +03:00
|
|
|
NS_IMETHOD ProcessRestyledFrames(nsStyleChangeList& aRestyleArray,
|
|
|
|
nsIPresContext* aPresContext) = 0;
|
1999-02-04 20:03:46 +03:00
|
|
|
|
|
|
|
// Notification that we were unable to render a replaced element.
|
1999-12-05 02:49:50 +03:00
|
|
|
NS_IMETHOD CantRenderReplacedElement(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
1999-02-04 20:03:46 +03:00
|
|
|
nsIFrame* aFrame) = 0;
|
1999-02-24 07:03:50 +03:00
|
|
|
|
|
|
|
// Request to create a continuing frame
|
1999-12-05 02:49:50 +03:00
|
|
|
NS_IMETHOD CreateContinuingFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
1999-02-24 07:03:50 +03:00
|
|
|
nsIFrame* aFrame,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIFrame** aContinuingFrame) = 0;
|
1999-07-02 08:46:19 +04:00
|
|
|
|
|
|
|
// Request to find the primary frame associated with a given content object.
|
|
|
|
// This is typically called by the pres shell when there is no mapping in
|
|
|
|
// the pres shell hash table
|
1999-08-05 07:09:22 +04:00
|
|
|
NS_IMETHOD FindPrimaryFrameFor(nsIPresContext* aPresContext,
|
|
|
|
nsIFrameManager* aFrameManager,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame** aFrame) = 0;
|
1998-09-10 23:32:14 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* nsIStyleFrameConstruction_h___ */
|