1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/xul/grid/nsGridRowGroupLayout.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,51 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +/** 1.10 + 1.11 + Author: 1.12 + Eric D Vaughan 1.13 + 1.14 +**/ 1.15 + 1.16 +#ifndef nsGridRowGroupLayout_h___ 1.17 +#define nsGridRowGroupLayout_h___ 1.18 + 1.19 +#include "mozilla/Attributes.h" 1.20 +#include "nsGridRowLayout.h" 1.21 + 1.22 +/** 1.23 + * The nsBoxLayout implementation for nsGridRowGroupFrame. 1.24 + */ 1.25 +class nsGridRowGroupLayout : public nsGridRowLayout 1.26 +{ 1.27 +public: 1.28 + 1.29 + friend already_AddRefed<nsBoxLayout> NS_NewGridRowGroupLayout(); 1.30 + 1.31 + virtual nsGridRowGroupLayout* CastToRowGroupLayout() MOZ_OVERRIDE { return this; } 1.32 + virtual nsSize GetMinSize(nsIFrame* aBox, nsBoxLayoutState& aBoxLayoutState) MOZ_OVERRIDE; 1.33 + virtual nsSize GetPrefSize(nsIFrame* aBox, nsBoxLayoutState& aBoxLayoutState) MOZ_OVERRIDE; 1.34 + virtual nsSize GetMaxSize(nsIFrame* aBox, nsBoxLayoutState& aBoxLayoutState) MOZ_OVERRIDE; 1.35 + virtual void CountRowsColumns(nsIFrame* aBox, int32_t& aRowCount, int32_t& aComputedColumnCount) MOZ_OVERRIDE; 1.36 + virtual void DirtyRows(nsIFrame* aBox, nsBoxLayoutState& aState) MOZ_OVERRIDE; 1.37 + virtual int32_t BuildRows(nsIFrame* aBox, nsGridRow* aRows) MOZ_OVERRIDE; 1.38 + virtual nsMargin GetTotalMargin(nsIFrame* aBox, bool aIsHorizontal) MOZ_OVERRIDE; 1.39 + virtual int32_t GetRowCount() MOZ_OVERRIDE { return mRowCount; } 1.40 + virtual Type GetType() MOZ_OVERRIDE { return eRowGroup; } 1.41 + 1.42 +protected: 1.43 + nsGridRowGroupLayout(); 1.44 + virtual ~nsGridRowGroupLayout(); 1.45 + 1.46 + virtual void ChildAddedOrRemoved(nsIFrame* aBox, nsBoxLayoutState& aState) MOZ_OVERRIDE; 1.47 + static void AddWidth(nsSize& aSize, nscoord aSize2, bool aIsHorizontal); 1.48 + 1.49 +private: 1.50 + int32_t mRowCount; 1.51 +}; 1.52 + 1.53 +#endif 1.54 +