michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "mozilla/Attributes.h" michael@0: #include "nsBoxFrame.h" michael@0: michael@0: class nsITreeBoxObject; michael@0: michael@0: nsIFrame* NS_NewTreeColFrame(nsIPresShell* aPresShell, michael@0: nsStyleContext* aContext); michael@0: michael@0: class nsTreeColFrame : public nsBoxFrame michael@0: { michael@0: public: michael@0: NS_DECL_FRAMEARENA_HELPERS michael@0: michael@0: nsTreeColFrame(nsIPresShell* aPresShell, michael@0: nsStyleContext* aContext): michael@0: nsBoxFrame(aPresShell, aContext) {} michael@0: michael@0: virtual void Init(nsIContent* aContent, michael@0: nsIFrame* aParent, michael@0: nsIFrame* aPrevInFlow) MOZ_OVERRIDE; michael@0: michael@0: virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE; michael@0: michael@0: virtual void BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder, michael@0: const nsRect& aDirtyRect, michael@0: const nsDisplayListSet& aLists) MOZ_OVERRIDE; michael@0: michael@0: virtual nsresult AttributeChanged(int32_t aNameSpaceID, michael@0: nsIAtom* aAttribute, michael@0: int32_t aModType) MOZ_OVERRIDE; michael@0: michael@0: virtual void SetBounds(nsBoxLayoutState& aBoxLayoutState, const nsRect& aRect, michael@0: bool aRemoveOverflowArea = false) MOZ_OVERRIDE; michael@0: michael@0: friend nsIFrame* NS_NewTreeColFrame(nsIPresShell* aPresShell, michael@0: nsStyleContext* aContext); michael@0: michael@0: protected: michael@0: virtual ~nsTreeColFrame(); michael@0: michael@0: /** michael@0: * @return the tree box object of the tree this column belongs to, or nullptr. michael@0: */ michael@0: nsITreeBoxObject* GetTreeBoxObject(); michael@0: michael@0: /** michael@0: * Helper method that gets the nsITreeColumns object this column belongs to michael@0: * and calls InvalidateColumns() on it. michael@0: */ michael@0: void InvalidateColumns(bool aCanWalkFrameTree = true); michael@0: };