michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: /** michael@0: michael@0: Author: michael@0: Eric D Vaughan michael@0: michael@0: **/ michael@0: michael@0: #ifndef nsGridRowGroupLayout_h___ michael@0: #define nsGridRowGroupLayout_h___ michael@0: michael@0: #include "mozilla/Attributes.h" michael@0: #include "nsGridRowLayout.h" michael@0: michael@0: /** michael@0: * The nsBoxLayout implementation for nsGridRowGroupFrame. michael@0: */ michael@0: class nsGridRowGroupLayout : public nsGridRowLayout michael@0: { michael@0: public: michael@0: michael@0: friend already_AddRefed NS_NewGridRowGroupLayout(); michael@0: michael@0: virtual nsGridRowGroupLayout* CastToRowGroupLayout() MOZ_OVERRIDE { return this; } michael@0: virtual nsSize GetMinSize(nsIFrame* aBox, nsBoxLayoutState& aBoxLayoutState) MOZ_OVERRIDE; michael@0: virtual nsSize GetPrefSize(nsIFrame* aBox, nsBoxLayoutState& aBoxLayoutState) MOZ_OVERRIDE; michael@0: virtual nsSize GetMaxSize(nsIFrame* aBox, nsBoxLayoutState& aBoxLayoutState) MOZ_OVERRIDE; michael@0: virtual void CountRowsColumns(nsIFrame* aBox, int32_t& aRowCount, int32_t& aComputedColumnCount) MOZ_OVERRIDE; michael@0: virtual void DirtyRows(nsIFrame* aBox, nsBoxLayoutState& aState) MOZ_OVERRIDE; michael@0: virtual int32_t BuildRows(nsIFrame* aBox, nsGridRow* aRows) MOZ_OVERRIDE; michael@0: virtual nsMargin GetTotalMargin(nsIFrame* aBox, bool aIsHorizontal) MOZ_OVERRIDE; michael@0: virtual int32_t GetRowCount() MOZ_OVERRIDE { return mRowCount; } michael@0: virtual Type GetType() MOZ_OVERRIDE { return eRowGroup; } michael@0: michael@0: protected: michael@0: nsGridRowGroupLayout(); michael@0: virtual ~nsGridRowGroupLayout(); michael@0: michael@0: virtual void ChildAddedOrRemoved(nsIFrame* aBox, nsBoxLayoutState& aState) MOZ_OVERRIDE; michael@0: static void AddWidth(nsSize& aSize, nscoord aSize2, bool aIsHorizontal); michael@0: michael@0: private: michael@0: int32_t mRowCount; michael@0: }; michael@0: michael@0: #endif michael@0: