2001-09-28 20:14:13 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* ***** BEGIN LICENSE BLOCK *****
|
2004-04-18 14:30:37 +00:00
|
|
|
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
2000-03-02 03:01:30 +00:00
|
|
|
*
|
2004-04-18 14:30:37 +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
|
|
|
|
* http://www.mozilla.org/MPL/
|
2000-03-02 03:01:30 +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.
|
2000-03-02 03:01:30 +00:00
|
|
|
*
|
|
|
|
* The Original Code is Mozilla Communicator client code.
|
|
|
|
*
|
2004-04-18 14:30:37 +00:00
|
|
|
* The Initial Developer of the Original Code is
|
2001-09-28 20:14:13 +00:00
|
|
|
* Netscape Communications Corporation.
|
|
|
|
* Portions created by the Initial Developer are Copyright (C) 1998
|
|
|
|
* the Initial Developer. All Rights Reserved.
|
2000-03-02 03:01:30 +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
|
2004-04-18 14:30:37 +00:00
|
|
|
* either of 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"),
|
2001-09-28 20:14:13 +00:00
|
|
|
* 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-04-18 14:30:37 +00:00
|
|
|
* use your version of this file under the terms of the MPL, indicate your
|
2001-09-28 20:14:13 +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
|
2004-04-18 14:30:37 +00:00
|
|
|
* the terms of any one of the MPL, the GPL or the LGPL.
|
2001-09-28 20:14:13 +00:00
|
|
|
*
|
|
|
|
* ***** END LICENSE BLOCK ***** */
|
2000-03-31 07:02:06 +00:00
|
|
|
#ifndef nsLeafBoxFrame_h___
|
|
|
|
#define nsLeafBoxFrame_h___
|
2000-03-02 03:01:30 +00:00
|
|
|
|
|
|
|
#include "nsLeafFrame.h"
|
2000-03-31 07:02:06 +00:00
|
|
|
#include "nsBox.h"
|
2000-03-02 03:01:30 +00:00
|
|
|
|
|
|
|
class nsAccessKeyInfo;
|
|
|
|
|
2000-03-31 07:02:06 +00:00
|
|
|
class nsLeafBoxFrame : public nsLeafFrame, public nsBox
|
2000-03-02 03:01:30 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
2000-03-31 07:02:06 +00:00
|
|
|
friend nsresult NS_NewLeafBoxFrame(nsIPresShell* aPresShell, nsIFrame** aNewFrame);
|
2000-03-02 03:01:30 +00:00
|
|
|
|
2000-04-05 06:41:27 +00:00
|
|
|
NS_DECL_ISUPPORTS_INHERITED
|
2000-03-02 03:01:30 +00:00
|
|
|
|
2000-03-31 07:02:06 +00:00
|
|
|
// nsIBox frame interface
|
|
|
|
NS_IMETHOD GetFrame(nsIFrame** aFrame);
|
2000-03-02 03:01:30 +00:00
|
|
|
|
2001-09-15 00:45:54 +00:00
|
|
|
#ifdef DEBUG
|
2001-11-14 01:33:42 +00:00
|
|
|
NS_IMETHOD GetFrameName(nsAString& aResult) const;
|
2001-09-15 00:45:54 +00:00
|
|
|
#endif
|
2000-03-02 03:01:30 +00:00
|
|
|
|
|
|
|
// nsIHTMLReflow overrides
|
2004-07-31 23:15:21 +00:00
|
|
|
NS_IMETHOD Reflow(nsPresContext* aPresContext,
|
2000-03-02 03:01:30 +00:00
|
|
|
nsHTMLReflowMetrics& aDesiredSize,
|
|
|
|
const nsHTMLReflowState& aReflowState,
|
|
|
|
nsReflowStatus& aStatus);
|
2000-03-31 07:02:06 +00:00
|
|
|
|
2004-07-31 23:15:21 +00:00
|
|
|
NS_IMETHOD CharacterDataChanged(nsPresContext* aPresContext,
|
2004-02-20 21:38:31 +00:00
|
|
|
nsIContent* aChild,
|
|
|
|
PRBool aAppend);
|
2000-03-02 03:01:30 +00:00
|
|
|
|
2004-07-31 23:15:21 +00:00
|
|
|
NS_IMETHOD DidReflow(nsPresContext* aPresContext,
|
2001-12-07 14:51:12 +00:00
|
|
|
const nsHTMLReflowState* aReflowState,
|
|
|
|
nsDidReflowStatus aStatus);
|
2000-03-31 07:02:06 +00:00
|
|
|
|
2004-07-31 23:15:21 +00:00
|
|
|
NS_IMETHOD Init(nsPresContext* aPresContext,
|
2000-03-31 07:02:06 +00:00
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParent,
|
2003-02-22 00:32:13 +00:00
|
|
|
nsStyleContext* aContext,
|
2000-03-31 07:02:06 +00:00
|
|
|
nsIFrame* asPrevInFlow);
|
|
|
|
|
2004-07-31 23:15:21 +00:00
|
|
|
NS_IMETHOD GetFrameForPoint(nsPresContext* aPresContext,
|
2000-03-31 07:02:06 +00:00
|
|
|
const nsPoint& aPoint,
|
|
|
|
nsFramePaintLayer aWhichLayer,
|
|
|
|
nsIFrame** aFrame);
|
2001-12-03 23:41:13 +00:00
|
|
|
|
2004-07-31 23:15:21 +00:00
|
|
|
NS_IMETHOD AttributeChanged(nsPresContext* aPresContext,
|
2001-12-03 23:41:13 +00:00
|
|
|
nsIContent* aChild,
|
|
|
|
PRInt32 aNameSpaceID,
|
|
|
|
nsIAtom* aAttribute,
|
2003-07-11 21:16:12 +00:00
|
|
|
PRInt32 aModType);
|
2000-03-02 03:01:30 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
|
2002-09-09 21:32:33 +00:00
|
|
|
#ifdef DEBUG_LAYOUT
|
2000-05-15 04:12:31 +00:00
|
|
|
virtual void GetBoxName(nsAutoString& aName);
|
2002-09-09 21:32:33 +00:00
|
|
|
#endif
|
2000-05-15 04:12:31 +00:00
|
|
|
|
2004-07-31 23:15:21 +00:00
|
|
|
virtual void GetDesiredSize(nsPresContext* aPresContext,
|
2000-03-02 03:01:30 +00:00
|
|
|
const nsHTMLReflowState& aReflowState,
|
2000-03-31 07:02:06 +00:00
|
|
|
nsHTMLReflowMetrics& aDesiredSize) {}
|
2000-03-02 03:01:30 +00:00
|
|
|
|
2000-03-31 07:02:06 +00:00
|
|
|
nsLeafBoxFrame(nsIPresShell* aShell);
|
2000-03-02 03:01:30 +00:00
|
|
|
|
2001-12-03 23:41:13 +00:00
|
|
|
|
2000-03-02 03:01:30 +00:00
|
|
|
private:
|
|
|
|
|
2001-12-03 23:41:13 +00:00
|
|
|
void UpdateMouseThrough();
|
|
|
|
|
|
|
|
|
2000-03-31 07:02:06 +00:00
|
|
|
}; // class nsLeafBoxFrame
|
2000-03-02 03:01:30 +00:00
|
|
|
|
2000-03-31 07:02:06 +00:00
|
|
|
#endif /* nsLeafBoxFrame_h___ */
|