Removing unused code that is #ifdef LOSER. r=pavlov.

This commit is contained in:
bryner%uiuc.edu 2000-01-12 00:27:01 +00:00
Родитель c8911f9026
Коммит 1869d08630
9 изменённых файлов: 0 добавлений и 182 удалений

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

@ -679,14 +679,6 @@ class nsIWidget : public nsISupports {
NS_IMETHOD DispatchEvent(nsGUIEvent* event, nsEventStatus & aStatus) = 0;
#ifdef LOSER
/**
* FSets the vertical scrollbar widget
*
*/
NS_IMETHOD SetVerticalScrollbar(nsIWidget * aScrollbar) = 0;
#endif
/**
* For printing and lightweight widgets
*

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

@ -40,12 +40,6 @@
#include "nsComboBox.h"
#include "nsLookAndFeel.h"
#include "nsLabel.h"
#ifdef LOSER
#include "nsMenuBar.h"
#include "nsMenu.h"
#include "nsMenuItem.h"
#include "nsPopUpMenu.h"
#endif
#include "nsFontRetrieverService.h"
// Drag & Drop, Clipboard
@ -72,12 +66,6 @@ static NS_DEFINE_IID(kCAppShell, NS_APPSHELL_CID);
static NS_DEFINE_IID(kCToolkit, NS_TOOLKIT_CID);
static NS_DEFINE_IID(kCLookAndFeel, NS_LOOKANDFEEL_CID);
static NS_DEFINE_IID(kCLabel, NS_LABEL_CID);
#ifdef LOSER
static NS_DEFINE_IID(kCMenuBar, NS_MENUBAR_CID);
static NS_DEFINE_IID(kCMenu, NS_MENU_CID);
static NS_DEFINE_IID(kCMenuItem, NS_MENUITEM_CID);
static NS_DEFINE_IID(kCPopUpMenu, NS_POPUPMENU_CID);
#endif
static NS_DEFINE_IID(kCFontRetrieverService, NS_FONTRETRIEVERSERVICE_CID);
// Drag & Drop, Clipboard
@ -215,20 +203,6 @@ nsresult nsWidgetFactory::CreateInstance(nsISupports *aOuter,
else if (mClassID.Equals(kCLabel)) {
inst = (nsISupports*)(nsWindow *)new nsLabel();
}
#ifdef LOSER
else if (mClassID.Equals(kCMenuBar)) {
inst = (nsISupports*)(nsIMenuBar *)new nsMenuBar();
}
else if (mClassID.Equals(kCMenu)) {
inst = (nsISupports*)(nsIMenu *)new nsMenu();
}
else if (mClassID.Equals(kCMenuItem)) {
inst = (nsISupports*)(nsIMenuItem *)new nsMenuItem();
}
else if (mClassID.Equals(kCPopUpMenu)) {
inst = (nsISupports*)new nsPopUpMenu();
}
#endif
else if (mClassID.Equals(kCSound)) {
nsISound* aSound = nsnull;
NS_NewSound(&aSound);

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

@ -41,13 +41,6 @@
#include "nsComboBox.h"
#include "nsLookAndFeel.h"
#include "nsLabel.h"
#ifdef LOSER
#include "nsMenuBar.h"
#include "nsMenu.h"
#include "nsMenuItem.h"
#include "nsPopUpMenu.h"
#include "nsContextMenu.h"
#endif
#include "nsFontRetrieverService.h"
// Drag & Drop, Clipboard

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

@ -40,12 +40,6 @@
#include "nsComboBox.h"
#include "nsLookAndFeel.h"
#include "nsLabel.h"
#ifdef LOSER
#include "nsMenuBar.h"
#include "nsMenu.h"
#include "nsMenuItem.h"
#include "nsPopUpMenu.h"
#endif
// #include "nsFontRetrieverService.h"
// Drag & Drop, Clipboard
@ -74,12 +68,6 @@ static NS_DEFINE_IID(kCAppShell, NS_APPSHELL_CID);
static NS_DEFINE_IID(kCToolkit, NS_TOOLKIT_CID);
static NS_DEFINE_IID(kCLookAndFeel, NS_LOOKANDFEEL_CID);
static NS_DEFINE_IID(kCLabel, NS_LABEL_CID);
#ifdef LOSER
static NS_DEFINE_IID(kCMenuBar, NS_MENUBAR_CID);
static NS_DEFINE_IID(kCMenu, NS_MENU_CID);
static NS_DEFINE_IID(kCMenuItem, NS_MENUITEM_CID);
static NS_DEFINE_IID(kCPopUpMenu, NS_POPUPMENU_CID);
#endif
static NS_DEFINE_IID(kCFontRetrieverService, NS_FONTRETRIEVERSERVICE_CID);
// Drag & Drop, Clipboard
@ -217,20 +205,6 @@ nsresult nsWidgetFactory::CreateInstance(nsISupports *aOuter,
else if (mClassID.Equals(kCLabel)) {
inst = (nsISupports*)(nsIWidget *)new nsLabel();
}
#ifdef LOSER
else if (mClassID.Equals(kCMenuBar)) {
inst = (nsISupports*)(nsIMenuBar *)new nsMenuBar();
}
else if (mClassID.Equals(kCMenu)) {
inst = (nsISupports*)(nsIMenu *)new nsMenu();
}
else if (mClassID.Equals(kCMenuItem)) {
inst = (nsISupports*)(nsIMenuItem *)new nsMenuItem();
}
else if (mClassID.Equals(kCPopUpMenu)) {
inst = (nsISupports*)new nsPopUpMenu();
}
#endif
else if (mClassID.Equals(kCTransferable)) {
inst = (nsISupports*)new nsTransferable();
}

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

@ -46,11 +46,6 @@
#include "nsButton.h"
#include "nsCheckButton.h"
#include "nsRadioButton.h"
#ifdef LOSER
#include "nsMenuBar.h"
#include "nsMenu.h"
#include "nsMenuItem.h"
#endif
#include "nsTextWidget.h"
#include "nsTextAreaWidget.h"
#include "nsScrollbar.h"
@ -83,13 +78,6 @@ static NS_DEFINE_IID(kCAppShell, NS_APPSHELL_CID);
static NS_DEFINE_IID(kCToolkit, NS_TOOLKIT_CID);
static NS_DEFINE_IID(kCLookAndFeel, NS_LOOKANDFEEL_CID);
static NS_DEFINE_IID(kCLabel, NS_LABEL_CID);
#ifdef LOSER
static NS_DEFINE_IID(kCMenuBar, NS_MENUBAR_CID);
static NS_DEFINE_IID(kCMenu, NS_MENU_CID);
static NS_DEFINE_IID(kCMenuItem, NS_MENUITEM_CID);
static NS_DEFINE_IID(kCMenuButton, NS_MENUBUTTON_CID);
static NS_DEFINE_IID(kCPopUpMenu, NS_POPUPMENU_CID);
#endif
static NS_DEFINE_IID(kCFontRetrieverService, NS_FONTRETRIEVERSERVICE_CID);
static NS_DEFINE_IID(kCImageButton, NS_IMAGEBUTTON_CID);
@ -248,13 +236,6 @@ nsresult nsWidgetFactory::CreateInstance( nsISupports *aOuter,
}
#ifdef LOSER
/* Widget we don't support */
else if (mClassID.Equals(kCPopUpMenu)) {
PR_LOG(PhWidLog, PR_LOG_DEBUG,( "nsWidgetFactory::CreateInstance of PopUpMenu\n" ));
}
#endif
else if (mClassID.Equals(kCAppShell)) {
PR_LOG(PhWidLog, PR_LOG_DEBUG,( "nsWidgetFactory::CreateInstance of nsAppShell\n" ));
inst = (nsISupports*)(nsIAppShell*)new nsAppShell();
@ -267,20 +248,6 @@ nsresult nsWidgetFactory::CreateInstance( nsISupports *aOuter,
PR_LOG(PhWidLog, PR_LOG_DEBUG,( "nsWidgetFactory::CreateInstance of nsLookAndFeel\n" ));
inst = (nsISupports*)new nsLookAndFeel();
}
#ifdef LOSER
else if (mClassID.Equals(kCMenuBar)) {
PR_LOG(PhWidLog, PR_LOG_DEBUG,( "nsWidgetFactory::CreateInstance of nsMenuBar\n" ));
inst = (nsISupports*)(nsIMenuBar *)new nsMenuBar();
}
else if (mClassID.Equals(kCMenu)) {
PR_LOG(PhWidLog, PR_LOG_DEBUG,( "nsWidgetFactory::CreateInstance of nsMenu\n" ));
inst = (nsISupports*)(nsIMenu *)new nsMenu();
}
else if (mClassID.Equals(kCMenuItem)) {
PR_LOG(PhWidLog, PR_LOG_DEBUG,( "nsWidgetFactory::CreateInstance of nsMenuItem\n" ));
inst = (nsISupports*)(nsIMenuItem *)new nsMenuItem();
}
#endif
else if (mClassID.Equals(kCLabel)) {
PR_LOG(PhWidLog, PR_LOG_DEBUG,( "nsWidgetFactory::CreateInstance of nsLabel\n" ));
inst = (nsISupports*)(nsILabel *)new nsLabel();

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

@ -40,12 +40,6 @@
#include "nsComboBox.h"
#include "nsLookAndFeel.h"
#include "nsLabel.h"
#ifdef LOSER
#include "nsMenuBar.h"
#include "nsMenu.h"
#include "nsMenuItem.h"
#include "nsPopUpMenu.h"
#endif
#if 0
#include "nsFontRetrieverService.h"
@ -77,13 +71,6 @@ static NS_DEFINE_IID(kCAppShell, NS_APPSHELL_CID);
static NS_DEFINE_IID(kCToolkit, NS_TOOLKIT_CID);
static NS_DEFINE_IID(kCLookAndFeel, NS_LOOKANDFEEL_CID);
static NS_DEFINE_IID(kCLabel, NS_LABEL_CID);
#ifdef LOSER
static NS_DEFINE_IID(kCMenuBar, NS_MENUBAR_CID);
static NS_DEFINE_IID(kCMenu, NS_MENU_CID);
static NS_DEFINE_IID(kCMenuItem, NS_MENUITEM_CID);
static NS_DEFINE_IID(kCPopUpMenu, NS_POPUPMENU_CID);
static NS_DEFINE_IID(kCMenuButton, NS_MENUBUTTON_CID);
#endif
static NS_DEFINE_IID(kCImageButton, NS_IMAGEBUTTON_CID);
@ -245,24 +232,6 @@ nsresult nsWidgetFactory::CreateInstance(nsISupports *aOuter,
{
inst = (nsISupports*)(nsWidget *)new nsLabel();
}
#ifdef LOSER
else if (mClassID.Equals(kCMenuBar))
{
inst = (nsISupports*)(nsIMenuBar *)new nsMenuBar();
}
else if (mClassID.Equals(kCMenu))
{
inst = (nsISupports*)(nsIMenu *)new nsMenu();
}
else if (mClassID.Equals(kCMenuItem))
{
inst = (nsISupports*)(nsIMenuItem *)new nsMenuItem();
}
else if (mClassID.Equals(kCPopUpMenu))
{
inst = (nsISupports*)new nsPopUpMenu();
}
#endif
else if (mClassID.Equals(kCTransferable))
{
inst = (nsISupports*)new nsTransferable();

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

@ -39,12 +39,6 @@
#include "nsToolkit.h"
#include "nsLookAndFeel.h"
#include "nsLabel.h"
#ifdef LOSER
#include "nsMenuBar.h"
#include "nsMenu.h"
#include "nsMenuItem.h"
#include "nsPopUpMenu.h"
#endif
static NS_DEFINE_IID(kCWindow, NS_WINDOW_CID);
static NS_DEFINE_IID(kCChild, NS_CHILD_CID);
@ -62,12 +56,6 @@ static NS_DEFINE_IID(kCAppShell, NS_APPSHELL_CID);
static NS_DEFINE_IID(kCToolkit, NS_TOOLKIT_CID);
static NS_DEFINE_IID(kCLookAndFeel, NS_LOOKANDFEEL_CID);
static NS_DEFINE_IID(kCLabel, NS_LABEL_CID);
#ifdef LOSER
static NS_DEFINE_IID(kCMenuBar, NS_MENUBAR_CID);
static NS_DEFINE_IID(kCMenu, NS_MENU_CID);
static NS_DEFINE_IID(kCMenuItem, NS_MENUITEM_CID);
static NS_DEFINE_IID(kCPopUpMenu, NS_POPUPMENU_CID);
#endif
static NS_DEFINE_IID(kCImageButton, NS_IMAGEBUTTON_CID);
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
@ -192,20 +180,6 @@ nsresult nsWidgetFactory::CreateInstance(nsISupports* aOuter,
else if (mClassID.Equals(kCLabel)) {
inst = (nsISupports*)(nsWindow*)new nsLabel();
}
#ifdef LOSER
else if (mClassID.Equals(kCMenuBar)) {
inst = (nsISupports*)(nsIMenuBar*) new nsMenuBar();
}
else if (mClassID.Equals(kCMenu)) {
inst = (nsISupports*)(nsIMenu*) new nsMenu();
}
else if (mClassID.Equals(kCMenuItem)) {
inst = (nsISupports*)(nsIMenuItem*) new nsMenuItem();
}
else if (mClassID.Equals(kCPopUpMenu)) {
inst = (nsISupports*)new nsPopUpMenu();
}
#endif
if (inst == NULL) {
return NS_ERROR_OUT_OF_MEMORY;
}

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

@ -72,9 +72,6 @@ nsBaseWidget::nsBaseWidget()
, mIsDestroying(PR_FALSE)
, mOnDestroyCalled(PR_FALSE)
, mBounds(0,0,0,0)
#ifdef LOSER
, mVScrollbar(nsnull)
#endif
, mZIndex(0)
{
#ifdef NOISY_WIDGET_LEAKS
@ -105,9 +102,6 @@ nsBaseWidget::~nsBaseWidget()
#endif
NS_IF_RELEASE(mMenuListener);
#ifdef LOSER
NS_IF_RELEASE(mVScrollbar);
#endif
NS_IF_RELEASE(mToolkit);
NS_IF_RELEASE(mContext);
}
@ -233,9 +227,6 @@ NS_METHOD nsBaseWidget::Destroy()
parent->RemoveChild(this);
NS_RELEASE(parent);
}
#ifdef LOSER
NS_IF_RELEASE(mVScrollbar);
#endif
// disconnect listeners.
NS_IF_RELEASE(mMouseListener);
NS_IF_RELEASE(mEventListener);
@ -701,16 +692,6 @@ NS_IMETHODIMP nsBaseWidget::ScrollRect(nsRect &aRect, PRInt32 aDx, PRInt32 aDy)
return NS_ERROR_FAILURE;
}
#ifdef LOSER
NS_METHOD nsBaseWidget::SetVerticalScrollbar(nsIWidget * aWidget)
{
NS_IF_RELEASE(mVScrollbar);
mVScrollbar = aWidget;
NS_IF_ADDREF(mVScrollbar);
return NS_OK;
}
#endif
NS_METHOD nsBaseWidget::EnableDragDrop(PRBool aEnable)
{
return NS_OK;

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

@ -95,9 +95,6 @@ public:
NS_IMETHOD GetBorderSize(PRInt32 &aWidth, PRInt32 &aHeight);
NS_IMETHOD Paint(nsIRenderingContext& aRenderingContext, const nsRect& aDirtyRect);
NS_IMETHOD ScrollRect(nsRect &aRect, PRInt32 aDx, PRInt32 aDy);
#ifdef LOSER
NS_IMETHOD SetVerticalScrollbar(nsIWidget * aScrollbar);
#endif
NS_IMETHOD EnableDragDrop(PRBool aEnable);
NS_IMETHOD GetAttention();
virtual void ConvertToDeviceCoordinates(nscoord &aX,nscoord &aY) {}
@ -141,9 +138,6 @@ protected:
PRBool mIsDestroying;
PRBool mOnDestroyCalled;
nsRect mBounds;
#ifdef LOSER
nsIWidget *mVScrollbar;
#endif
PRInt32 mZIndex;
// keep the list of children