layout/xul/tree/nsTreeColFrame.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/xul/tree/nsTreeColFrame.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,56 @@
     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 +#include "mozilla/Attributes.h"
    1.10 +#include "nsBoxFrame.h"
    1.11 +
    1.12 +class nsITreeBoxObject;
    1.13 +
    1.14 +nsIFrame* NS_NewTreeColFrame(nsIPresShell* aPresShell, 
    1.15 +                             nsStyleContext* aContext);
    1.16 +
    1.17 +class nsTreeColFrame : public nsBoxFrame
    1.18 +{
    1.19 +public:
    1.20 +  NS_DECL_FRAMEARENA_HELPERS
    1.21 +
    1.22 +  nsTreeColFrame(nsIPresShell* aPresShell,
    1.23 +                 nsStyleContext* aContext):
    1.24 +    nsBoxFrame(aPresShell, aContext) {}
    1.25 +
    1.26 +  virtual void Init(nsIContent*      aContent,
    1.27 +                    nsIFrame*        aParent,
    1.28 +                    nsIFrame*        aPrevInFlow) MOZ_OVERRIDE;
    1.29 +
    1.30 +  virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE;
    1.31 +
    1.32 +  virtual void BuildDisplayListForChildren(nsDisplayListBuilder*   aBuilder,
    1.33 +                                           const nsRect&           aDirtyRect,
    1.34 +                                           const nsDisplayListSet& aLists) MOZ_OVERRIDE;
    1.35 +
    1.36 +  virtual nsresult AttributeChanged(int32_t aNameSpaceID,
    1.37 +                                    nsIAtom* aAttribute,
    1.38 +                                    int32_t aModType) MOZ_OVERRIDE;
    1.39 +
    1.40 +  virtual void SetBounds(nsBoxLayoutState& aBoxLayoutState, const nsRect& aRect,
    1.41 +                         bool aRemoveOverflowArea = false) MOZ_OVERRIDE;
    1.42 +
    1.43 +  friend nsIFrame* NS_NewTreeColFrame(nsIPresShell* aPresShell,
    1.44 +                                      nsStyleContext* aContext);
    1.45 +
    1.46 +protected:
    1.47 +  virtual ~nsTreeColFrame();
    1.48 +
    1.49 +  /**
    1.50 +   * @return the tree box object of the tree this column belongs to, or nullptr.
    1.51 +   */
    1.52 +  nsITreeBoxObject* GetTreeBoxObject();
    1.53 +
    1.54 +  /**
    1.55 +   * Helper method that gets the nsITreeColumns object this column belongs to
    1.56 +   * and calls InvalidateColumns() on it.
    1.57 +   */
    1.58 +  void InvalidateColumns(bool aCanWalkFrameTree = true);
    1.59 +};

mercurial