Line data Source code
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/. */
5 :
6 : /**
7 :
8 : Author:
9 : Eric D Vaughan
10 :
11 : **/
12 :
13 : #ifndef nsGridCell_h___
14 : #define nsGridCell_h___
15 :
16 : #include "mozilla/Attributes.h"
17 :
18 : class nsBoxLayoutState;
19 : struct nsSize;
20 : class nsIFrame;
21 :
22 : /*
23 : * Grid cell is what makes up the cellmap in the grid. Each GridCell contains
24 : * 2 pointers. One to the matching box in the columns and one to the matching box
25 : * in the rows. Remember that you can put content in both rows and columns.
26 : * When asked for preferred/min/max sizes it works like a stack and takes the
27 : * biggest sizes.
28 : */
29 :
30 : class nsGridCell final
31 : {
32 : public:
33 : nsGridCell();
34 : ~nsGridCell();
35 :
36 : nsSize GetXULPrefSize(nsBoxLayoutState& aBoxLayoutState);
37 : nsSize GetXULMinSize(nsBoxLayoutState& aBoxLayoutState);
38 : nsSize GetXULMaxSize(nsBoxLayoutState& aBoxLayoutState);
39 : bool IsXULCollapsed();
40 :
41 : // accessors
42 : nsIFrame* GetBoxInColumn() { return mBoxInColumn; }
43 : nsIFrame* GetBoxInRow() { return mBoxInRow; }
44 0 : void SetBoxInRow(nsIFrame* aBox) { mBoxInRow = aBox; }
45 0 : void SetBoxInColumn(nsIFrame* aBox) { mBoxInColumn = aBox; }
46 :
47 : private:
48 : nsIFrame* mBoxInColumn;
49 : nsIFrame* mBoxInRow;
50 : };
51 :
52 : #endif
53 :
|