layout/xul/grid/nsGridRowLeafFrame.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/xul/grid/nsGridRowLeafFrame.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,55 @@
     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 +  Eric D Vaughan
    1.12 +  A frame that can have multiple children. Only one child may be displayed at one time. So the
    1.13 +  can be flipped though like a deck of cards.
    1.14 + 
    1.15 +**/
    1.16 +
    1.17 +#ifndef nsGridRowLeafFrame_h___
    1.18 +#define nsGridRowLeafFrame_h___
    1.19 +
    1.20 +#include "mozilla/Attributes.h"
    1.21 +#include "nsBoxFrame.h"
    1.22 +
    1.23 +/**
    1.24 + * A frame representing a grid row (or column).  Grid row (and column)
    1.25 + * elements are the children of row group (or column group) elements,
    1.26 + * and their children are placed one to a cell.
    1.27 + */
    1.28 +// XXXldb This needs a better name that indicates that it's for any grid
    1.29 +// row.
    1.30 +class nsGridRowLeafFrame : public nsBoxFrame
    1.31 +{
    1.32 +public:
    1.33 +  NS_DECL_FRAMEARENA_HELPERS
    1.34 +
    1.35 +  friend nsIFrame* NS_NewGridRowLeafFrame(nsIPresShell* aPresShell,
    1.36 +                                          nsStyleContext* aContext);
    1.37 +
    1.38 +#ifdef DEBUG_FRAME_DUMP
    1.39 +  virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE
    1.40 +  {
    1.41 +      return MakeFrameName(NS_LITERAL_STRING("nsGridRowLeaf"), aResult);
    1.42 +  }
    1.43 +#endif
    1.44 +
    1.45 +  nsGridRowLeafFrame(nsIPresShell* aPresShell,
    1.46 +                     nsStyleContext* aContext,
    1.47 +                     bool aIsRoot,
    1.48 +                     nsBoxLayout* aLayoutManager):
    1.49 +    nsBoxFrame(aPresShell, aContext, aIsRoot, aLayoutManager) {}
    1.50 +
    1.51 +  virtual nsresult GetBorderAndPadding(nsMargin& aBorderAndPadding) MOZ_OVERRIDE;
    1.52 +
    1.53 +}; // class nsGridRowLeafFrame
    1.54 +
    1.55 +
    1.56 +
    1.57 +#endif
    1.58 +

mercurial