layout/xul/nsPopupSetFrame.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/xul/nsPopupSetFrame.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,63 @@
     1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
     1.5 + *
     1.6 + * This Source Code Form is subject to the terms of the Mozilla Public
     1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.9 +
    1.10 +#ifndef nsPopupSetFrame_h__
    1.11 +#define nsPopupSetFrame_h__
    1.12 +
    1.13 +#include "mozilla/Attributes.h"
    1.14 +#include "nsIAtom.h"
    1.15 +#include "nsBoxFrame.h"
    1.16 +
    1.17 +nsIFrame* NS_NewPopupSetFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
    1.18 +
    1.19 +class nsPopupSetFrame : public nsBoxFrame
    1.20 +{
    1.21 +public:
    1.22 +  NS_DECL_FRAMEARENA_HELPERS
    1.23 +
    1.24 +  nsPopupSetFrame(nsIPresShell* aShell, nsStyleContext* aContext):
    1.25 +    nsBoxFrame(aShell, aContext) {}
    1.26 +
    1.27 +  ~nsPopupSetFrame() {}
    1.28 +  
    1.29 +  virtual void Init(nsIContent*      aContent,
    1.30 +                    nsIFrame*        aParent,
    1.31 +                    nsIFrame*        aPrevInFlow) MOZ_OVERRIDE;
    1.32 +  virtual nsresult AppendFrames(ChildListID     aListID,
    1.33 +                                nsFrameList&    aFrameList) MOZ_OVERRIDE;
    1.34 +  virtual nsresult RemoveFrame(ChildListID     aListID,
    1.35 +                               nsIFrame*       aOldFrame) MOZ_OVERRIDE;
    1.36 +  virtual nsresult InsertFrames(ChildListID     aListID,
    1.37 +                                nsIFrame*       aPrevFrame,
    1.38 +                                nsFrameList&    aFrameList) MOZ_OVERRIDE;
    1.39 +  virtual nsresult  SetInitialChildList(ChildListID  aListID,
    1.40 +                                        nsFrameList& aChildList) MOZ_OVERRIDE;
    1.41 +
    1.42 +  virtual const nsFrameList& GetChildList(ChildListID aList) const MOZ_OVERRIDE;
    1.43 +  virtual void GetChildLists(nsTArray<ChildList>* aLists) const MOZ_OVERRIDE;
    1.44 +
    1.45 +  NS_IMETHOD DoLayout(nsBoxLayoutState& aBoxLayoutState) MOZ_OVERRIDE;
    1.46 +
    1.47 +  // Used to destroy our popup frames.
    1.48 +  virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE;
    1.49 +
    1.50 +  virtual nsIAtom* GetType() const MOZ_OVERRIDE;
    1.51 +
    1.52 +#ifdef DEBUG_FRAME_DUMP
    1.53 +  virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE
    1.54 +  {
    1.55 +      return MakeFrameName(NS_LITERAL_STRING("PopupSet"), aResult);
    1.56 +  }
    1.57 +#endif
    1.58 +
    1.59 +protected:
    1.60 +  void AddPopupFrameList(nsFrameList& aPopupFrameList);
    1.61 +  void RemovePopupFrame(nsIFrame* aPopup);
    1.62 +  
    1.63 +  nsFrameList mPopupList;
    1.64 +};
    1.65 +
    1.66 +#endif

mercurial