This commit is contained in:
hyatt%netscape.com 1999-07-18 07:07:55 +00:00
Родитель 0630e7557f
Коммит 422e5c0df7
6 изменённых файлов: 115 добавлений и 2 удалений

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

@ -130,6 +130,10 @@ NS_NewMenuPopupFrame ( nsIFrame** aNewFrame );
nsresult
NS_NewMenuFrame ( nsIFrame** aNewFrame );
nsresult
NS_NewMenuBarFrame ( nsIFrame** aNewFrame );
#endif
//static NS_DEFINE_IID(kIStyleRuleIID, NS_ISTYLE_RULE_IID);
@ -3035,7 +3039,7 @@ nsCSSFrameConstructor::ConstructXULFrame(nsIPresContext* aPresContext,
else if (aTag == nsXULAtoms::xpmenubar) {
// XXX Will be a derived class toolbar frame.
processChildren = PR_TRUE;
rv = NS_NewToolbarFrame(&newFrame);
rv = NS_NewMenuBarFrame(&newFrame);
}
else if (aTag == nsXULAtoms::xpmenubutton) {
// XXX Will be a derived class titledbutton frame

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

@ -130,6 +130,10 @@ NS_NewMenuPopupFrame ( nsIFrame** aNewFrame );
nsresult
NS_NewMenuFrame ( nsIFrame** aNewFrame );
nsresult
NS_NewMenuBarFrame ( nsIFrame** aNewFrame );
#endif
//static NS_DEFINE_IID(kIStyleRuleIID, NS_ISTYLE_RULE_IID);
@ -3035,7 +3039,7 @@ nsCSSFrameConstructor::ConstructXULFrame(nsIPresContext* aPresContext,
else if (aTag == nsXULAtoms::xpmenubar) {
// XXX Will be a derived class toolbar frame.
processChildren = PR_TRUE;
rv = NS_NewToolbarFrame(&newFrame);
rv = NS_NewMenuBarFrame(&newFrame);
}
else if (aTag == nsXULAtoms::xpmenubutton) {
// XXX Will be a derived class titledbutton frame

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

@ -60,6 +60,7 @@ CPPSRCS = \
nsToolbarItemFrame.cpp \
nsMenuPopupFrame.cpp \
nsMenuFrame.cpp \
nsMenuBarFrame.cpp \
$(NULL)
include $(topsrcdir)/config/config.mk

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

@ -48,6 +48,7 @@ CPPSRCS= \
nsFontPickerFrame.cpp \
nsMenuPopupFrame.cpp \
nsMenuFrame.cpp \
nsMenuBarFrame.cpp \
$(NULL)
CPP_OBJS= \
@ -75,6 +76,7 @@ CPP_OBJS= \
.\$(OBJDIR)\nsFontPickerFrame.obj \
.\$(OBJDIR)\nsMenuPopupFrame.obj \
.\$(OBJDIR)\nsMenuFrame.obj \
.\$(OBJDIR)\nsMenuBarFrame.obj \
$(NULL)
EXPORTS = \

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

@ -0,0 +1,58 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "nsMenuBarFrame.h"
#include "nsIContent.h"
#include "prtypes.h"
#include "nsIAtom.h"
#include "nsIPresContext.h"
#include "nsIStyleContext.h"
#include "nsCSSRendering.h"
#include "nsINameSpaceManager.h"
//
// NS_NewMenuBarFrame
//
// Wrapper for creating a new menu Bar container
//
nsresult
NS_NewMenuBarFrame(nsIFrame** aNewFrame)
{
NS_PRECONDITION(aNewFrame, "null OUT ptr");
if (nsnull == aNewFrame) {
return NS_ERROR_NULL_POINTER;
}
nsMenuBarFrame* it = new nsMenuBarFrame;
if ( !it )
return NS_ERROR_OUT_OF_MEMORY;
*aNewFrame = it;
return NS_OK;
}
//
// nsMenuBarFrame cntr
//
nsMenuBarFrame::nsMenuBarFrame()
{
} // cntr

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

@ -0,0 +1,44 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
//
// nsMenuBarFrame
//
#ifndef nsMenuBarFrame_h__
#define nsMenuBarFrame_h__
#include "prtypes.h"
#include "nsIAtom.h"
#include "nsCOMPtr.h"
#include "nsToolbarFrame.h"
nsresult NS_NewMenuBarFrame(nsIFrame** aResult) ;
class nsMenuBarFrame : public nsToolbarFrame
{
public:
nsMenuBarFrame();
protected:
}; // class nsMenuBarFrame
#endif