/src/mozilla-central/layout/xul/grid/nsGridRowLeafLayout.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 nsGridRowLeafLayout_h___ |
15 | | #define nsGridRowLeafLayout_h___ |
16 | | |
17 | | #include "mozilla/Attributes.h" |
18 | | #include "nsGridRowLayout.h" |
19 | | #include "nsCOMPtr.h" |
20 | | |
21 | | /** |
22 | | * The nsBoxLayout implementation for nsGridRowLeafFrame. |
23 | | */ |
24 | | // XXXldb This needs a better name that indicates that it's for any grid |
25 | | // row. |
26 | | class nsGridRowLeafLayout final : public nsGridRowLayout |
27 | | { |
28 | | public: |
29 | | |
30 | | friend already_AddRefed<nsBoxLayout> NS_NewGridRowLeafLayout(); |
31 | | |
32 | | virtual nsSize GetXULPrefSize(nsIFrame* aBox, nsBoxLayoutState& aBoxLayoutState) override; |
33 | | virtual nsSize GetXULMinSize(nsIFrame* aBox, nsBoxLayoutState& aBoxLayoutState) override; |
34 | | virtual nsSize GetXULMaxSize(nsIFrame* aBox, nsBoxLayoutState& aBoxLayoutState) override; |
35 | | virtual void ChildAddedOrRemoved(nsIFrame* aBox, nsBoxLayoutState& aState) override; |
36 | | NS_IMETHOD XULLayout(nsIFrame* aBox, nsBoxLayoutState& aBoxLayoutState) override; |
37 | | virtual void CountRowsColumns(nsIFrame* aBox, int32_t& aRowCount, int32_t& aComputedColumnCount) override; |
38 | | virtual void DirtyRows(nsIFrame* aBox, nsBoxLayoutState& aState) override; |
39 | | virtual int32_t BuildRows(nsIFrame* aBox, nsGridRow* aRows) override; |
40 | 0 | virtual Type GetType() override { return eRowLeaf; } |
41 | | |
42 | | protected: |
43 | | |
44 | | virtual void PopulateBoxSizes(nsIFrame* aBox, nsBoxLayoutState& aBoxLayoutState, |
45 | | nsBoxSize*& aBoxSizes, nscoord& aMinSize, |
46 | | nscoord& aMaxSize, int32_t& aFlexes) override; |
47 | | virtual void ComputeChildSizes(nsIFrame* aBox, |
48 | | nsBoxLayoutState& aState, |
49 | | nscoord& aGivenSize, |
50 | | nsBoxSize* aBoxSizes, |
51 | | nsComputedBoxSize*& aComputedBoxSizes) override; |
52 | | |
53 | | |
54 | | nsGridRowLeafLayout(); |
55 | | virtual ~nsGridRowLeafLayout(); |
56 | | //virtual void AddBorderAndPadding(nsIFrame* aBox, nsSize& aSize); |
57 | | |
58 | | private: |
59 | | |
60 | | }; // class nsGridRowLeafLayout |
61 | | |
62 | | #endif |
63 | | |