Continuing the menu frame's education regarding its separate popup list.

This commit is contained in:
hyatt%netscape.com 1999-07-18 06:44:03 +00:00
Родитель 5978ed3159
Коммит 25daf11eae
2 изменённых файлов: 21 добавлений и 2 удалений

Просмотреть файл

@ -56,6 +56,8 @@ nsMenuFrame::nsMenuFrame()
} // cntr
// The following methods are all overridden to ensure that the xpmenuchildren frame
// is placed in the appropriate list.
NS_IMETHODIMP
nsMenuFrame::FirstChild(nsIAtom* aListName,
nsIFrame** aFirstChild) const
@ -68,3 +70,16 @@ nsMenuFrame::FirstChild(nsIAtom* aListName,
return NS_OK;
}
NS_IMETHODIMP
nsMenuFrame::SetInitialChildList(nsIPresContext& aPresContext,
nsIAtom* aListName,
nsIFrame* aChildList)
{
nsresult rv = NS_OK;
if (nsLayoutAtoms::popupList == aListName) {
mPopupFrames.SetFrames(aChildList);
} else {
rv = nsBoxFrame::SetInitialChildList(aPresContext, aListName, aChildList);
}
return rv;
}

Просмотреть файл

@ -38,8 +38,12 @@ class nsMenuFrame : public nsBoxFrame
public:
nsMenuFrame();
NS_IMETHODIMP FirstChild(nsIAtom* aListName,
nsIFrame** aFirstChild) const;
NS_IMETHOD FirstChild(nsIAtom* aListName,
nsIFrame** aFirstChild) const;
NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext,
nsIAtom* aListName,
nsIFrame* aChildList);
protected:
nsFrameList mPopupFrames;