/src/mozilla-central/layout/xul/grid/nsGridCell.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
2 | | /* vim: set ts=8 sts=2 et sw=2 tw=80: */ |
3 | | /* This Source Code Form is subject to the terms of the Mozilla Public |
4 | | * License, v. 2.0. If a copy of the MPL was not distributed with this |
5 | | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
6 | | |
7 | | /** |
8 | | |
9 | | Author: |
10 | | Eric D Vaughan |
11 | | |
12 | | **/ |
13 | | |
14 | | #ifndef nsGridCell_h___ |
15 | | #define nsGridCell_h___ |
16 | | |
17 | | #include "mozilla/Attributes.h" |
18 | | |
19 | | class nsBoxLayoutState; |
20 | | struct nsSize; |
21 | | class nsIFrame; |
22 | | |
23 | | /* |
24 | | * Grid cell is what makes up the cellmap in the grid. Each GridCell contains |
25 | | * 2 pointers. One to the matching box in the columns and one to the matching box |
26 | | * in the rows. Remember that you can put content in both rows and columns. |
27 | | * When asked for preferred/min/max sizes it works like a stack and takes the |
28 | | * biggest sizes. |
29 | | */ |
30 | | |
31 | | class nsGridCell final |
32 | | { |
33 | | public: |
34 | | nsGridCell(); |
35 | | ~nsGridCell(); |
36 | | |
37 | | nsSize GetXULPrefSize(nsBoxLayoutState& aBoxLayoutState); |
38 | | nsSize GetXULMinSize(nsBoxLayoutState& aBoxLayoutState); |
39 | | nsSize GetXULMaxSize(nsBoxLayoutState& aBoxLayoutState); |
40 | | bool IsXULCollapsed(); |
41 | | |
42 | | // accessors |
43 | 0 | nsIFrame* GetBoxInColumn() { return mBoxInColumn; } |
44 | 0 | nsIFrame* GetBoxInRow() { return mBoxInRow; } |
45 | 0 | void SetBoxInRow(nsIFrame* aBox) { mBoxInRow = aBox; } |
46 | 0 | void SetBoxInColumn(nsIFrame* aBox) { mBoxInColumn = aBox; } |
47 | | |
48 | | private: |
49 | | nsIFrame* mBoxInColumn; |
50 | | nsIFrame* mBoxInRow; |
51 | | }; |
52 | | |
53 | | #endif |
54 | | |