layout/xul/grid/nsGridRowGroupLayout.h

branch
TOR_BUG_9701
changeset 10
ac0c01689b40
equal deleted inserted replaced
-1:000000000000 0:b41517da0281
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 virtual nsGridRowGroupLayout* CastToRowGroupLayout() MOZ_OVERRIDE { return this; }
29 virtual nsSize GetMinSize(nsIFrame* aBox, nsBoxLayoutState& aBoxLayoutState) MOZ_OVERRIDE;
30 virtual nsSize GetPrefSize(nsIFrame* aBox, nsBoxLayoutState& aBoxLayoutState) MOZ_OVERRIDE;
31 virtual nsSize GetMaxSize(nsIFrame* aBox, nsBoxLayoutState& aBoxLayoutState) MOZ_OVERRIDE;
32 virtual void CountRowsColumns(nsIFrame* aBox, int32_t& aRowCount, int32_t& aComputedColumnCount) MOZ_OVERRIDE;
33 virtual void DirtyRows(nsIFrame* aBox, nsBoxLayoutState& aState) MOZ_OVERRIDE;
34 virtual int32_t BuildRows(nsIFrame* aBox, nsGridRow* aRows) MOZ_OVERRIDE;
35 virtual nsMargin GetTotalMargin(nsIFrame* aBox, bool aIsHorizontal) MOZ_OVERRIDE;
36 virtual int32_t GetRowCount() MOZ_OVERRIDE { return mRowCount; }
37 virtual Type GetType() MOZ_OVERRIDE { return eRowGroup; }
38
39 protected:
40 nsGridRowGroupLayout();
41 virtual ~nsGridRowGroupLayout();
42
43 virtual void ChildAddedOrRemoved(nsIFrame* aBox, nsBoxLayoutState& aState) MOZ_OVERRIDE;
44 static void AddWidth(nsSize& aSize, nscoord aSize2, bool aIsHorizontal);
45
46 private:
47 int32_t mRowCount;
48 };
49
50 #endif
51

mercurial