2007-03-22 10:30:00 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
*
|
2012-05-21 04:12:37 -07:00
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
#ifndef nsPopupSetFrame_h__
|
|
|
|
#define nsPopupSetFrame_h__
|
|
|
|
|
2012-09-14 09:10:08 -07:00
|
|
|
#include "mozilla/Attributes.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
#include "nsIAtom.h"
|
|
|
|
#include "nsBoxFrame.h"
|
|
|
|
|
|
|
|
nsIFrame* NS_NewPopupSetFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
|
|
|
|
2007-07-04 08:49:38 -07:00
|
|
|
class nsPopupSetFrame : public nsBoxFrame
|
2007-03-22 10:30:00 -07:00
|
|
|
{
|
|
|
|
public:
|
2009-09-12 09:49:24 -07:00
|
|
|
NS_DECL_FRAMEARENA_HELPERS
|
|
|
|
|
2015-01-06 01:27:56 -08:00
|
|
|
explicit nsPopupSetFrame(nsStyleContext* aContext):
|
|
|
|
nsBoxFrame(aContext) {}
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2007-07-04 08:49:38 -07:00
|
|
|
~nsPopupSetFrame() {}
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2014-05-24 15:20:40 -07:00
|
|
|
virtual void Init(nsIContent* aContent,
|
|
|
|
nsContainerFrame* aParent,
|
2015-03-21 09:28:04 -07:00
|
|
|
nsIFrame* aPrevInFlow) override;
|
2014-05-28 12:36:58 -07:00
|
|
|
|
|
|
|
virtual void SetInitialChildList(ChildListID aListID,
|
2015-03-21 09:28:04 -07:00
|
|
|
nsFrameList& aChildList) override;
|
2014-05-28 12:36:58 -07:00
|
|
|
virtual void AppendFrames(ChildListID aListID,
|
2015-03-21 09:28:04 -07:00
|
|
|
nsFrameList& aFrameList) override;
|
2014-05-28 12:36:58 -07:00
|
|
|
virtual void RemoveFrame(ChildListID aListID,
|
2015-03-21 09:28:04 -07:00
|
|
|
nsIFrame* aOldFrame) override;
|
2014-05-28 12:36:58 -07:00
|
|
|
virtual void InsertFrames(ChildListID aListID,
|
2014-05-28 12:36:58 -07:00
|
|
|
nsIFrame* aPrevFrame,
|
2015-03-21 09:28:04 -07:00
|
|
|
nsFrameList& aFrameList) override;
|
2007-07-04 08:49:38 -07:00
|
|
|
|
2015-03-21 09:28:04 -07:00
|
|
|
virtual const nsFrameList& GetChildList(ChildListID aList) const override;
|
|
|
|
virtual void GetChildLists(nsTArray<ChildList>* aLists) const override;
|
2013-11-04 08:22:20 -08:00
|
|
|
|
2015-03-21 09:28:04 -07:00
|
|
|
NS_IMETHOD DoLayout(nsBoxLayoutState& aBoxLayoutState) override;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
// Used to destroy our popup frames.
|
2015-03-21 09:28:04 -07:00
|
|
|
virtual void DestroyFrom(nsIFrame* aDestructRoot) override;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2015-03-21 09:28:04 -07:00
|
|
|
virtual nsIAtom* GetType() const override;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2014-01-05 15:31:14 -08:00
|
|
|
#ifdef DEBUG_FRAME_DUMP
|
2015-03-21 09:28:04 -07:00
|
|
|
virtual nsresult GetFrameName(nsAString& aResult) const override
|
2007-03-22 10:30:00 -07:00
|
|
|
{
|
|
|
|
return MakeFrameName(NS_LITERAL_STRING("PopupSet"), aResult);
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
protected:
|
2010-02-09 08:05:19 -08:00
|
|
|
void AddPopupFrameList(nsFrameList& aPopupFrameList);
|
|
|
|
void RemovePopupFrame(nsIFrame* aPopup);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2010-02-09 08:05:19 -08:00
|
|
|
nsFrameList mPopupList;
|
|
|
|
};
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
#endif
|