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 nsGridCell_h___ michael@0: #define nsGridCell_h___ michael@0: michael@0: class nsBoxLayoutState; michael@0: struct nsSize; michael@0: class nsIFrame; michael@0: michael@0: /* michael@0: * Grid cell is what makes up the cellmap in the grid. Each GridCell contains michael@0: * 2 pointers. One to the matching box in the columns and one to the matching box michael@0: * in the rows. Remember that you can put content in both rows and columns. michael@0: * When asked for preferred/min/max sizes it works like a stack and takes the michael@0: * biggest sizes. michael@0: */ michael@0: michael@0: class nsGridCell michael@0: { michael@0: public: michael@0: nsGridCell(); michael@0: virtual ~nsGridCell(); michael@0: michael@0: nsSize GetPrefSize(nsBoxLayoutState& aBoxLayoutState); michael@0: nsSize GetMinSize(nsBoxLayoutState& aBoxLayoutState); michael@0: nsSize GetMaxSize(nsBoxLayoutState& aBoxLayoutState); michael@0: bool IsCollapsed(); michael@0: michael@0: // accessors michael@0: nsIFrame* GetBoxInColumn() { return mBoxInColumn; } michael@0: nsIFrame* GetBoxInRow() { return mBoxInRow; } michael@0: void SetBoxInRow(nsIFrame* aBox) { mBoxInRow = aBox; } michael@0: void SetBoxInColumn(nsIFrame* aBox) { mBoxInColumn = aBox; } michael@0: michael@0: private: michael@0: nsIFrame* mBoxInColumn; michael@0: nsIFrame* mBoxInRow; michael@0: }; michael@0: michael@0: #endif michael@0: