2001-10-09 00:37:56 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2001-10-09 00:37:56 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
Author:
|
|
|
|
Eric D Vaughan
|
|
|
|
|
|
|
|
**/
|
|
|
|
|
|
|
|
#ifndef nsGridRowLayout_h___
|
|
|
|
#define nsGridRowLayout_h___
|
|
|
|
|
2012-09-14 20:10:08 +04:00
|
|
|
#include "mozilla/Attributes.h"
|
2001-10-09 00:37:56 +04:00
|
|
|
#include "nsSprocketLayout.h"
|
|
|
|
#include "nsIGridPart.h"
|
|
|
|
class nsGridRowGroupLayout;
|
|
|
|
class nsGridLayout2;
|
|
|
|
class nsBoxLayoutState;
|
|
|
|
class nsGrid;
|
|
|
|
|
2005-11-22 08:52:34 +03:00
|
|
|
/**
|
2011-07-11 18:05:10 +04:00
|
|
|
* A common base class for nsGridRowLeafLayout (the nsBoxLayout object
|
|
|
|
* for a grid row or column) and nsGridRowGroupLayout (the nsBoxLayout
|
2005-11-22 08:52:34 +03:00
|
|
|
* object for a grid row group or column group).
|
|
|
|
*/
|
Bug 300030: Move intrinsic width computation out of nsIFrame::Reflow and into its own methods on nsIFrame. Replace reflow reasons, types, and commands with dirty bits/notifications. Thanks to bzbarsky for almost all of the HTML form controls (mozilla/layout/forms) changes, and many others for help testing and patching. For detailed commit logs, see REFLOW_YYYYMMDD_BRANCH, where YYYYMMDD is one of 20061031, 20060830, 20060603, 20060302, 20060119, 20051011, 20050804, 20050429, 20050315, 20050111, and 20041213.
2006-12-08 08:38:33 +03:00
|
|
|
// XXXldb This needs a name that indicates that it's a base class for
|
|
|
|
// both row and rows (row-group).
|
2001-10-09 00:37:56 +04:00
|
|
|
class nsGridRowLayout : public nsSprocketLayout,
|
|
|
|
public nsIGridPart
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS_INHERITED
|
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual nsGridRowGroupLayout* CastToRowGroupLayout() override { return nullptr; }
|
|
|
|
virtual nsGridLayout2* CastToGridLayout() override { return nullptr; }
|
|
|
|
virtual nsGrid* GetGrid(nsIFrame* aBox, int32_t* aIndex, nsGridRowLayout* aRequestor=nullptr) override;
|
|
|
|
virtual nsIGridPart* GetParentGridPart(nsIFrame* aBox, nsIFrame** aParentBox) override;
|
2012-08-06 07:00:57 +04:00
|
|
|
virtual void ChildrenInserted(nsIFrame* aBox, nsBoxLayoutState& aState,
|
|
|
|
nsIFrame* aPrevBox,
|
2015-03-21 19:28:04 +03:00
|
|
|
const nsFrameList::Slice& aNewChildren) override;
|
2012-08-06 07:00:57 +04:00
|
|
|
virtual void ChildrenAppended(nsIFrame* aBox, nsBoxLayoutState& aState,
|
2015-03-21 19:28:04 +03:00
|
|
|
const nsFrameList::Slice& aNewChildren) override;
|
|
|
|
virtual void ChildrenRemoved(nsIFrame* aBox, nsBoxLayoutState& aState, nsIFrame* aChildList) override;
|
|
|
|
virtual void ChildrenSet(nsIFrame* aBox, nsBoxLayoutState& aState, nsIFrame* aChildList) override;
|
|
|
|
virtual nsMargin GetTotalMargin(nsIFrame* aBox, bool aIsHorizontal) override;
|
2001-10-09 00:37:56 +04:00
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual nsIGridPart* AsGridPart() override { return this; }
|
2011-07-04 18:39:10 +04:00
|
|
|
|
2001-10-09 00:37:56 +04:00
|
|
|
protected:
|
2012-08-06 07:00:57 +04:00
|
|
|
virtual void ChildAddedOrRemoved(nsIFrame* aBox, nsBoxLayoutState& aState)=0;
|
2001-10-09 00:37:56 +04:00
|
|
|
|
2009-01-19 21:31:33 +03:00
|
|
|
nsGridRowLayout();
|
2014-07-09 01:23:18 +04:00
|
|
|
virtual ~nsGridRowLayout();
|
2001-10-09 00:37:56 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|