layout/xul/grid/nsGridRowLeafLayout.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/xul/grid/nsGridRowLeafLayout.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,62 @@
     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 nsGridRowLeafLayout_h___
    1.17 +#define nsGridRowLeafLayout_h___
    1.18 +
    1.19 +#include "mozilla/Attributes.h"
    1.20 +#include "nsGridRowLayout.h"
    1.21 +#include "nsCOMPtr.h"
    1.22 +
    1.23 +/**
    1.24 + * The nsBoxLayout implementation for nsGridRowLeafFrame.
    1.25 + */
    1.26 +// XXXldb This needs a better name that indicates that it's for any grid
    1.27 +// row.
    1.28 +class nsGridRowLeafLayout : public nsGridRowLayout
    1.29 +{
    1.30 +public:
    1.31 +
    1.32 +  friend already_AddRefed<nsBoxLayout> NS_NewGridRowLeafLayout();
    1.33 +
    1.34 +  virtual nsSize GetPrefSize(nsIFrame* aBox, nsBoxLayoutState& aBoxLayoutState) MOZ_OVERRIDE;
    1.35 +  virtual nsSize GetMinSize(nsIFrame* aBox, nsBoxLayoutState& aBoxLayoutState) MOZ_OVERRIDE;
    1.36 +  virtual nsSize GetMaxSize(nsIFrame* aBox, nsBoxLayoutState& aBoxLayoutState) MOZ_OVERRIDE;
    1.37 +  virtual void ChildAddedOrRemoved(nsIFrame* aBox, nsBoxLayoutState& aState) MOZ_OVERRIDE;
    1.38 +  NS_IMETHOD Layout(nsIFrame* aBox, nsBoxLayoutState& aBoxLayoutState) MOZ_OVERRIDE;
    1.39 +  virtual void CountRowsColumns(nsIFrame* aBox, int32_t& aRowCount, int32_t& aComputedColumnCount) MOZ_OVERRIDE;
    1.40 +  virtual void DirtyRows(nsIFrame* aBox, nsBoxLayoutState& aState) MOZ_OVERRIDE;
    1.41 +  virtual int32_t BuildRows(nsIFrame* aBox, nsGridRow* aRows) MOZ_OVERRIDE;
    1.42 +  virtual Type GetType() MOZ_OVERRIDE { return eRowLeaf; }
    1.43 +
    1.44 +protected:
    1.45 +
    1.46 +  virtual void PopulateBoxSizes(nsIFrame* aBox, nsBoxLayoutState& aBoxLayoutState,
    1.47 +                                nsBoxSize*& aBoxSizes, nscoord& aMinSize,
    1.48 +                                nscoord& aMaxSize, int32_t& aFlexes) MOZ_OVERRIDE;
    1.49 +  virtual void ComputeChildSizes(nsIFrame* aBox,
    1.50 +                                 nsBoxLayoutState& aState,
    1.51 +                                 nscoord& aGivenSize,
    1.52 +                                 nsBoxSize* aBoxSizes,
    1.53 +                                 nsComputedBoxSize*& aComputedBoxSizes) MOZ_OVERRIDE;
    1.54 +
    1.55 +
    1.56 +  nsGridRowLeafLayout();
    1.57 +  virtual ~nsGridRowLeafLayout();
    1.58 +  //virtual void AddBorderAndPadding(nsIFrame* aBox, nsSize& aSize);
    1.59 +
    1.60 +private:
    1.61 +
    1.62 +}; // class nsGridRowLeafLayout
    1.63 +
    1.64 +#endif
    1.65 +

mercurial