Wed, 31 Dec 2014 07:22:50 +0100
Correct previous dual key logic pending first delivery installment.
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 /**
8 Author:
9 Eric D Vaughan
11 **/
13 #ifndef nsGridCell_h___
14 #define nsGridCell_h___
16 class nsBoxLayoutState;
17 struct nsSize;
18 class nsIFrame;
20 /*
21 * Grid cell is what makes up the cellmap in the grid. Each GridCell contains
22 * 2 pointers. One to the matching box in the columns and one to the matching box
23 * in the rows. Remember that you can put content in both rows and columns.
24 * When asked for preferred/min/max sizes it works like a stack and takes the
25 * biggest sizes.
26 */
28 class nsGridCell
29 {
30 public:
31 nsGridCell();
32 virtual ~nsGridCell();
34 nsSize GetPrefSize(nsBoxLayoutState& aBoxLayoutState);
35 nsSize GetMinSize(nsBoxLayoutState& aBoxLayoutState);
36 nsSize GetMaxSize(nsBoxLayoutState& aBoxLayoutState);
37 bool IsCollapsed();
39 // accessors
40 nsIFrame* GetBoxInColumn() { return mBoxInColumn; }
41 nsIFrame* GetBoxInRow() { return mBoxInRow; }
42 void SetBoxInRow(nsIFrame* aBox) { mBoxInRow = aBox; }
43 void SetBoxInColumn(nsIFrame* aBox) { mBoxInColumn = aBox; }
45 private:
46 nsIFrame* mBoxInColumn;
47 nsIFrame* mBoxInRow;
48 };
50 #endif