WIP: Menubar and Popup's
git-svn-id: svn://10.0.0.236/trunk@7414 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
2f5b521dac
commit
702a43e7f8
@ -17,7 +17,7 @@
|
||||
|
||||
DEPTH = ..
|
||||
|
||||
DIRS = public src tests
|
||||
DIRS = public inc src tests
|
||||
|
||||
include $(DEPTH)/config/config.mk
|
||||
|
||||
|
||||
29
mozilla/shell/inc/Makefile
Normal file
29
mozilla/shell/inc/Makefile
Normal file
@ -0,0 +1,29 @@
|
||||
#!gmake
|
||||
#
|
||||
# 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.
|
||||
|
||||
DEPTH = ../..
|
||||
|
||||
MODULE = shell
|
||||
|
||||
EXPORTS = \
|
||||
nsMenuBar.h \
|
||||
nsMenuItem.h \
|
||||
$(NULL)
|
||||
|
||||
include $(DEPTH)/config/config.mk
|
||||
|
||||
include $(DEPTH)/config/rules.mk
|
||||
30
mozilla/shell/inc/makefile.win
Normal file
30
mozilla/shell/inc/makefile.win
Normal file
@ -0,0 +1,30 @@
|
||||
#!nmake
|
||||
#
|
||||
# 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.
|
||||
|
||||
DEPTH=..\..
|
||||
|
||||
IGNORE_MANIFEST=1
|
||||
|
||||
MODULE=shell
|
||||
|
||||
EXPORTS = \
|
||||
nsMenuBar.h \
|
||||
nsMenuItem.h \
|
||||
$(NULL)
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
48
mozilla/shell/inc/nsMenuBar.h
Normal file
48
mozilla/shell/inc/nsMenuBar.h
Normal file
@ -0,0 +1,48 @@
|
||||
/* -*- 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 "nsIMenuBar.h"
|
||||
|
||||
|
||||
class nsMenuBar : public nsIMenuBar
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
* Constructor and Destructor
|
||||
*/
|
||||
|
||||
nsMenuBar();
|
||||
~nsMenuBar();
|
||||
|
||||
/**
|
||||
* ISupports Interface
|
||||
*/
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
/**
|
||||
* Initialize Method
|
||||
* @result The result of the initialization, NS_OK if no errors
|
||||
*/
|
||||
NS_IMETHOD Init();
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
48
mozilla/shell/inc/nsMenuItem.h
Normal file
48
mozilla/shell/inc/nsMenuItem.h
Normal file
@ -0,0 +1,48 @@
|
||||
/* -*- 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 "nsIMenuItem.h"
|
||||
|
||||
|
||||
class nsMenuItem : public nsIMenuItem
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
* Constructor and Destructor
|
||||
*/
|
||||
|
||||
nsMenuItem();
|
||||
~nsMenuItem();
|
||||
|
||||
/**
|
||||
* ISupports Interface
|
||||
*/
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
/**
|
||||
* Initialize Method
|
||||
* @result The result of the initialization, NS_OK if no errors
|
||||
*/
|
||||
NS_IMETHOD Init();
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
@ -18,6 +18,6 @@
|
||||
DEPTH=..
|
||||
IGNORE_MANIFEST=1
|
||||
|
||||
DIRS=public src tests
|
||||
DIRS=public inc src tests
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
@ -22,6 +22,8 @@ MODULE = shell
|
||||
EXPORTS = \
|
||||
nsIApplicationShell.h \
|
||||
nsIShellInstance.h \
|
||||
nsIMenuBar.h \
|
||||
nsIMenuItem.h \
|
||||
nsshell.h \
|
||||
$(NULL)
|
||||
|
||||
|
||||
@ -24,6 +24,8 @@ MODULE=shell
|
||||
EXPORTS = \
|
||||
nsIApplicationShell.h \
|
||||
nsIShellInstance.h \
|
||||
nsIMenuBar.h \
|
||||
nsIMenuItem.h \
|
||||
nsshell.h \
|
||||
$(NULL)
|
||||
|
||||
|
||||
44
mozilla/shell/public/nsIMenuBar.h
Normal file
44
mozilla/shell/public/nsIMenuBar.h
Normal file
@ -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.
|
||||
*/
|
||||
|
||||
#ifndef nsIMenuBar_h___
|
||||
#define nsIMenuBar_h___
|
||||
|
||||
#include "nsISupports.h"
|
||||
|
||||
// 52fb95f0-2cbe-11d2-9246-00805f8a7ab6
|
||||
#define NS_IMENUBAR_IID \
|
||||
{ 0x52fb95f0, 0x2cbe, 0x11d2, \
|
||||
{0x92, 0x46, 0x00, 0x80, 0x5f, 0x8a, 0x7a, 0xb6} }
|
||||
|
||||
class nsIMenuBar : public nsISupports
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
* Initialize the MenuBar
|
||||
* @result The result of the initialization, NS_Ok if no errors
|
||||
*/
|
||||
NS_IMETHOD Init() = 0;
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif /* nsIMenuBar_h___ */
|
||||
|
||||
44
mozilla/shell/public/nsIMenuItem.h
Normal file
44
mozilla/shell/public/nsIMenuItem.h
Normal file
@ -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.
|
||||
*/
|
||||
|
||||
#ifndef nsIMenuItem_h___
|
||||
#define nsIMenuItem_h___
|
||||
|
||||
#include "nsISupports.h"
|
||||
|
||||
// 8a400b00-2cbe-11d2-9246-00805f8a7ab6
|
||||
#define NS_IMENUITEM_IID \
|
||||
{ 0x8a400b00, 0x2cbe, 0x11d2, \
|
||||
{0x92, 0x46, 0x00, 0x80, 0x5f, 0x8a, 0x7a, 0xb6} }
|
||||
|
||||
class nsIMenuItem : public nsISupports
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
* Initialize the MenuBar
|
||||
* @result The result of the initialization, NS_Ok if no errors
|
||||
*/
|
||||
NS_IMETHOD Init() = 0;
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif /* nsIMenuItem_h___ */
|
||||
|
||||
@ -60,11 +60,15 @@ EXPORTS = \
|
||||
CPPSRCS= \
|
||||
nsApplicationManager.cpp \
|
||||
nsShellInstance.cpp \
|
||||
nsMenuItem.cpp \
|
||||
nsMenuBar.cpp \
|
||||
$(NULL)
|
||||
|
||||
CPP_OBJS= \
|
||||
./$(OBJDIR)/nsApplicationManager.o \
|
||||
./$(OBJDIR)/nsShellInstance.o \
|
||||
./$(OBJDIR)/nsMenuItem.o \
|
||||
./$(OBJDIR)/nsMenuBar.o \
|
||||
$(NULL)
|
||||
|
||||
|
||||
|
||||
@ -30,11 +30,15 @@ EXPORTS = \
|
||||
CPPSRCS= \
|
||||
nsApplicationManager.cpp \
|
||||
nsShellInstance.cpp \
|
||||
nsMenuBar.cpp \
|
||||
nsMenuItem.cpp \
|
||||
$(NULL)
|
||||
|
||||
CPP_OBJS= \
|
||||
.\$(OBJDIR)\nsApplicationManager.obj \
|
||||
.\$(OBJDIR)\nsShellInstance.obj \
|
||||
.\$(OBJDIR)\nsMenuBar.obj \
|
||||
.\$(OBJDIR)\nsMenuItem.obj \
|
||||
$(NULL)
|
||||
|
||||
LINCS=-I$(PUBLIC)\xpcom -I$(PUBLIC)\raptor \
|
||||
|
||||
37
mozilla/shell/src/nsMenuBar.cpp
Normal file
37
mozilla/shell/src/nsMenuBar.cpp
Normal file
@ -0,0 +1,37 @@
|
||||
/* -*- 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 "nscore.h"
|
||||
#include "nsMenuBar.h"
|
||||
|
||||
nsMenuBar::nsMenuBar()
|
||||
{
|
||||
}
|
||||
|
||||
nsMenuBar::~nsMenuBar()
|
||||
{
|
||||
}
|
||||
|
||||
NS_DEFINE_IID(kIMenuBarIID, NS_IMENUBAR_IID);
|
||||
NS_IMPL_ISUPPORTS(nsMenuBar,kIMenuBarIID);
|
||||
|
||||
nsresult nsMenuBar::Init()
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
37
mozilla/shell/src/nsMenuItem.cpp
Normal file
37
mozilla/shell/src/nsMenuItem.cpp
Normal file
@ -0,0 +1,37 @@
|
||||
/* -*- 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 "nscore.h"
|
||||
#include "nsMenuItem.h"
|
||||
|
||||
nsMenuItem::nsMenuItem()
|
||||
{
|
||||
}
|
||||
|
||||
nsMenuItem::~nsMenuItem()
|
||||
{
|
||||
}
|
||||
|
||||
NS_DEFINE_IID(kIMenuItemIID, NS_IMENUITEM_IID);
|
||||
NS_IMPL_ISUPPORTS(nsMenuItem,kIMenuItemIID);
|
||||
|
||||
nsresult nsMenuItem::Init()
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user