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 nsGridRowGroupLayout_h___
14 : #define nsGridRowGroupLayout_h___
15 :
16 : #include "mozilla/Attributes.h"
17 : #include "nsGridRowLayout.h"
18 :
19 : /**
20 : * The nsBoxLayout implementation for nsGridRowGroupFrame.
21 : */
22 : class nsGridRowGroupLayout : public nsGridRowLayout
23 : {
24 : public:
25 :
26 : friend already_AddRefed<nsBoxLayout> NS_NewGridRowGroupLayout();
27 :
28 0 : virtual nsGridRowGroupLayout* CastToRowGroupLayout() override { return this; }
29 : virtual nsSize GetXULMinSize(nsIFrame* aBox, nsBoxLayoutState& aBoxLayoutState) override;
30 : virtual nsSize GetXULPrefSize(nsIFrame* aBox, nsBoxLayoutState& aBoxLayoutState) override;
31 : virtual nsSize GetXULMaxSize(nsIFrame* aBox, nsBoxLayoutState& aBoxLayoutState) override;
32 : virtual void CountRowsColumns(nsIFrame* aBox, int32_t& aRowCount, int32_t& aComputedColumnCount) override;
33 : virtual void DirtyRows(nsIFrame* aBox, nsBoxLayoutState& aState) override;
34 : virtual int32_t BuildRows(nsIFrame* aBox, nsGridRow* aRows) override;
35 : virtual nsMargin GetTotalMargin(nsIFrame* aBox, bool aIsHorizontal) override;
36 0 : virtual int32_t GetRowCount() override { return mRowCount; }
37 0 : virtual Type GetType() override { return eRowGroup; }
38 :
39 : protected:
40 : nsGridRowGroupLayout();
41 : virtual ~nsGridRowGroupLayout();
42 :
43 : virtual void ChildAddedOrRemoved(nsIFrame* aBox, nsBoxLayoutState& aState) override;
44 : static void AddWidth(nsSize& aSize, nscoord aSize2, bool aIsHorizontal);
45 :
46 : private:
47 : int32_t mRowCount;
48 : };
49 :
50 : #endif
51 :
|