layout/xul/grid/nsGridCell.h

Fri, 16 Jan 2015 18:13:44 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 16 Jan 2015 18:13:44 +0100
branch
TOR_BUG_9701
changeset 14
925c144e1f1f
permissions
-rw-r--r--

Integrate suggestion from review to improve consistency with existing 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/. */
     6 /**
     8   Author:
     9   Eric D Vaughan
    11 **/
    13 #ifndef nsGridCell_h___
    14 #define nsGridCell_h___
    16 class nsBoxLayoutState;
    17 struct nsSize;
    18 class nsIFrame;
    20 /*
    21  * Grid cell is what makes up the cellmap in the grid. Each GridCell contains
    22  * 2 pointers. One to the matching box in the columns and one to the matching box
    23  * in the rows. Remember that you can put content in both rows and columns.
    24  * When asked for preferred/min/max sizes it works like a stack and takes the 
    25  * biggest sizes.
    26  */
    28 class nsGridCell
    29 {
    30 public:
    31     nsGridCell();
    32     virtual ~nsGridCell();
    34     nsSize      GetPrefSize(nsBoxLayoutState& aBoxLayoutState);
    35     nsSize      GetMinSize(nsBoxLayoutState& aBoxLayoutState);
    36     nsSize      GetMaxSize(nsBoxLayoutState& aBoxLayoutState);
    37     bool        IsCollapsed();
    39 // accessors
    40     nsIFrame*   GetBoxInColumn()               { return mBoxInColumn; }
    41     nsIFrame*   GetBoxInRow()                  { return mBoxInRow; }
    42     void        SetBoxInRow(nsIFrame* aBox)    { mBoxInRow = aBox; }
    43     void        SetBoxInColumn(nsIFrame* aBox) { mBoxInColumn = aBox; }
    45 private:
    46     nsIFrame* mBoxInColumn;
    47     nsIFrame* mBoxInRow;
    48 };
    50 #endif

mercurial