1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/xul/grid/nsGridCell.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 nsGridCell_h___ 1.17 +#define nsGridCell_h___ 1.18 + 1.19 +class nsBoxLayoutState; 1.20 +struct nsSize; 1.21 +class nsIFrame; 1.22 + 1.23 +/* 1.24 + * Grid cell is what makes up the cellmap in the grid. Each GridCell contains 1.25 + * 2 pointers. One to the matching box in the columns and one to the matching box 1.26 + * in the rows. Remember that you can put content in both rows and columns. 1.27 + * When asked for preferred/min/max sizes it works like a stack and takes the 1.28 + * biggest sizes. 1.29 + */ 1.30 + 1.31 +class nsGridCell 1.32 +{ 1.33 +public: 1.34 + nsGridCell(); 1.35 + virtual ~nsGridCell(); 1.36 + 1.37 + nsSize GetPrefSize(nsBoxLayoutState& aBoxLayoutState); 1.38 + nsSize GetMinSize(nsBoxLayoutState& aBoxLayoutState); 1.39 + nsSize GetMaxSize(nsBoxLayoutState& aBoxLayoutState); 1.40 + bool IsCollapsed(); 1.41 + 1.42 +// accessors 1.43 + nsIFrame* GetBoxInColumn() { return mBoxInColumn; } 1.44 + nsIFrame* GetBoxInRow() { return mBoxInRow; } 1.45 + void SetBoxInRow(nsIFrame* aBox) { mBoxInRow = aBox; } 1.46 + void SetBoxInColumn(nsIFrame* aBox) { mBoxInColumn = aBox; } 1.47 + 1.48 +private: 1.49 + nsIFrame* mBoxInColumn; 1.50 + nsIFrame* mBoxInRow; 1.51 +}; 1.52 + 1.53 +#endif 1.54 +