зеркало из https://github.com/mozilla/gecko-dev.git
added back in the label and checkbutton classes to support the viewer's testing dialogs
b=26195 r=dcone
This commit is contained in:
Родитель
67f68abf0e
Коммит
98b27da727
|
@ -25,13 +25,10 @@
|
||||||
#include "nsdefs.h"
|
#include "nsdefs.h"
|
||||||
#include "nsWidgetsCID.h"
|
#include "nsWidgetsCID.h"
|
||||||
|
|
||||||
#include "nsButton.h"
|
|
||||||
#include "nsFileWidget.h"
|
#include "nsFileWidget.h"
|
||||||
#include "nsFileSpecWithUIImpl.h"
|
#include "nsFileSpecWithUIImpl.h"
|
||||||
#include "nsLookAndFeel.h"
|
#include "nsLookAndFeel.h"
|
||||||
#include "nsScrollbar.h"
|
#include "nsScrollbar.h"
|
||||||
#include "nsTextHelper.h"
|
|
||||||
#include "nsTextWidget.h"
|
|
||||||
#include "nsToolkit.h"
|
#include "nsToolkit.h"
|
||||||
#include "nsWindow.h"
|
#include "nsWindow.h"
|
||||||
#include "nsAppShell.h"
|
#include "nsAppShell.h"
|
||||||
|
@ -39,6 +36,20 @@
|
||||||
#include "nsFontRetrieverService.h"
|
#include "nsFontRetrieverService.h"
|
||||||
#include "nsSound.h"
|
#include "nsSound.h"
|
||||||
|
|
||||||
|
//---------------------------
|
||||||
|
// needed for viewer only
|
||||||
|
#include "nsButton.h"
|
||||||
|
#include "nsTextHelper.h"
|
||||||
|
#include "nsTextWidget.h"
|
||||||
|
#include "nsCheckButton.h"
|
||||||
|
#include "nsLabel.h"
|
||||||
|
|
||||||
|
static NS_DEFINE_IID(kCButton, NS_BUTTON_CID);
|
||||||
|
static NS_DEFINE_IID(kCTextField, NS_TEXTFIELD_CID);
|
||||||
|
static NS_DEFINE_IID(kCLabel, NS_LABEL_CID);
|
||||||
|
static NS_DEFINE_IID(kCCheckButton, NS_CHECKBUTTON_CID);
|
||||||
|
//---------------------------
|
||||||
|
|
||||||
#include "nsWindowsTimer.h"
|
#include "nsWindowsTimer.h"
|
||||||
#include "nsTimerManager.h"
|
#include "nsTimerManager.h"
|
||||||
|
|
||||||
|
@ -50,11 +61,9 @@
|
||||||
|
|
||||||
static NS_DEFINE_IID(kCWindow, NS_WINDOW_CID);
|
static NS_DEFINE_IID(kCWindow, NS_WINDOW_CID);
|
||||||
static NS_DEFINE_IID(kCChild, NS_CHILD_CID);
|
static NS_DEFINE_IID(kCChild, NS_CHILD_CID);
|
||||||
static NS_DEFINE_IID(kCButton, NS_BUTTON_CID);
|
|
||||||
static NS_DEFINE_IID(kCFileOpen, NS_FILEWIDGET_CID);
|
static NS_DEFINE_IID(kCFileOpen, NS_FILEWIDGET_CID);
|
||||||
static NS_DEFINE_IID(kCHorzScrollbar, NS_HORZSCROLLBAR_CID);
|
static NS_DEFINE_IID(kCHorzScrollbar, NS_HORZSCROLLBAR_CID);
|
||||||
static NS_DEFINE_IID(kCVertScrollbar, NS_VERTSCROLLBAR_CID);
|
static NS_DEFINE_IID(kCVertScrollbar, NS_VERTSCROLLBAR_CID);
|
||||||
static NS_DEFINE_IID(kCTextField, NS_TEXTFIELD_CID);
|
|
||||||
static NS_DEFINE_IID(kCAppShell, NS_APPSHELL_CID);
|
static NS_DEFINE_IID(kCAppShell, NS_APPSHELL_CID);
|
||||||
static NS_DEFINE_IID(kCToolkit, NS_TOOLKIT_CID);
|
static NS_DEFINE_IID(kCToolkit, NS_TOOLKIT_CID);
|
||||||
static NS_DEFINE_IID(kCLookAndFeel, NS_LOOKANDFEEL_CID);
|
static NS_DEFINE_IID(kCLookAndFeel, NS_LOOKANDFEEL_CID);
|
||||||
|
@ -162,9 +171,6 @@ nsresult nsWidgetFactory::CreateInstance( nsISupports* aOuter,
|
||||||
else if (mClassID.Equals(kCChild)) {
|
else if (mClassID.Equals(kCChild)) {
|
||||||
inst = (nsISupports*)(nsBaseWidget*)new ChildWindow();
|
inst = (nsISupports*)(nsBaseWidget*)new ChildWindow();
|
||||||
}
|
}
|
||||||
else if (mClassID.Equals(kCButton)) {
|
|
||||||
inst = (nsISupports*)(nsBaseWidget*)(nsWindow*)new nsButton();
|
|
||||||
}
|
|
||||||
else if (mClassID.Equals(kCFileOpen)) {
|
else if (mClassID.Equals(kCFileOpen)) {
|
||||||
inst = (nsISupports*)new nsFileWidget();
|
inst = (nsISupports*)new nsFileWidget();
|
||||||
}
|
}
|
||||||
|
@ -174,9 +180,6 @@ nsresult nsWidgetFactory::CreateInstance( nsISupports* aOuter,
|
||||||
else if (mClassID.Equals(kCVertScrollbar)) {
|
else if (mClassID.Equals(kCVertScrollbar)) {
|
||||||
inst = (nsISupports*)(nsBaseWidget*)(nsWindow*)new nsScrollbar(PR_TRUE);
|
inst = (nsISupports*)(nsBaseWidget*)(nsWindow*)new nsScrollbar(PR_TRUE);
|
||||||
}
|
}
|
||||||
else if (mClassID.Equals(kCTextField)) {
|
|
||||||
inst = (nsISupports*)(nsBaseWidget*)(nsWindow*)new nsTextWidget();
|
|
||||||
}
|
|
||||||
else if (mClassID.Equals(kCAppShell)) {
|
else if (mClassID.Equals(kCAppShell)) {
|
||||||
inst = (nsISupports*)new nsAppShell();
|
inst = (nsISupports*)new nsAppShell();
|
||||||
}
|
}
|
||||||
|
@ -214,6 +217,21 @@ nsresult nsWidgetFactory::CreateInstance( nsISupports* aOuter,
|
||||||
else if (mClassID.Equals(kCTimerManager)) {
|
else if (mClassID.Equals(kCTimerManager)) {
|
||||||
inst = (nsISupports*)(nsITimerQueue*) new nsTimerManager();
|
inst = (nsISupports*)(nsITimerQueue*) new nsTimerManager();
|
||||||
}
|
}
|
||||||
|
///////////////////////////////////////
|
||||||
|
// These are needed for Viewer only
|
||||||
|
///////////////////////////////////////
|
||||||
|
else if (mClassID.Equals(kCButton)) {
|
||||||
|
inst = (nsISupports*)(nsBaseWidget*)(nsWindow*)new nsButton();
|
||||||
|
}
|
||||||
|
else if (mClassID.Equals(kCTextField)) {
|
||||||
|
inst = (nsISupports*)(nsBaseWidget*)(nsWindow*)new nsTextWidget();
|
||||||
|
}
|
||||||
|
else if (mClassID.Equals(kCLabel)) {
|
||||||
|
inst = (nsISupports*)(nsBaseWidget*)(nsWindow*)new nsLabel();
|
||||||
|
}
|
||||||
|
else if (mClassID.Equals(kCCheckButton)) {
|
||||||
|
inst = (nsISupports*)(nsBaseWidget*)(nsWindow*)new nsCheckButton();
|
||||||
|
}
|
||||||
|
|
||||||
if (inst == NULL) {
|
if (inst == NULL) {
|
||||||
return NS_ERROR_OUT_OF_MEMORY;
|
return NS_ERROR_OUT_OF_MEMORY;
|
||||||
|
|
|
@ -37,15 +37,17 @@ CPPSRCS = \
|
||||||
nsDataObjCollection.cpp \
|
nsDataObjCollection.cpp \
|
||||||
nsClipboard.cpp \
|
nsClipboard.cpp \
|
||||||
nsWindow.cpp \
|
nsWindow.cpp \
|
||||||
nsButton.cpp \
|
|
||||||
nsTextWidget.cpp \
|
|
||||||
nsTextHelper.cpp \
|
|
||||||
nsFileWidget.cpp \
|
nsFileWidget.cpp \
|
||||||
nsScrollbar.cpp \
|
nsScrollbar.cpp \
|
||||||
nsAppShell.cpp \
|
nsAppShell.cpp \
|
||||||
nsLookAndFeel.cpp \
|
nsLookAndFeel.cpp \
|
||||||
nsToolkit.cpp \
|
nsToolkit.cpp \
|
||||||
nsSound.cpp \
|
nsSound.cpp \
|
||||||
|
nsButton.cpp \
|
||||||
|
nsTextWidget.cpp \
|
||||||
|
nsTextHelper.cpp \
|
||||||
|
nsLabel.cpp \
|
||||||
|
nsCheckButton.cpp \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
MODULE=raptor
|
MODULE=raptor
|
||||||
|
@ -61,15 +63,17 @@ OBJS = \
|
||||||
.\$(OBJDIR)\nsDataObjCollection.obj \
|
.\$(OBJDIR)\nsDataObjCollection.obj \
|
||||||
.\$(OBJDIR)\nsClipboard.obj \
|
.\$(OBJDIR)\nsClipboard.obj \
|
||||||
.\$(OBJDIR)\nsWindow.obj \
|
.\$(OBJDIR)\nsWindow.obj \
|
||||||
.\$(OBJDIR)\nsButton.obj \
|
|
||||||
.\$(OBJDIR)\nsTextWidget.obj \
|
|
||||||
.\$(OBJDIR)\nsTextHelper.obj \
|
|
||||||
.\$(OBJDIR)\nsFileWidget.obj \
|
.\$(OBJDIR)\nsFileWidget.obj \
|
||||||
.\$(OBJDIR)\nsScrollbar.obj \
|
.\$(OBJDIR)\nsScrollbar.obj \
|
||||||
.\$(OBJDIR)\nsAppShell.obj \
|
.\$(OBJDIR)\nsAppShell.obj \
|
||||||
.\$(OBJDIR)\nsLookAndFeel.obj \
|
.\$(OBJDIR)\nsLookAndFeel.obj \
|
||||||
.\$(OBJDIR)\nsToolkit.obj \
|
.\$(OBJDIR)\nsToolkit.obj \
|
||||||
.\$(OBJDIR)\nsSound.obj \
|
.\$(OBJDIR)\nsSound.obj \
|
||||||
|
.\$(OBJDIR)\nsButton.obj \
|
||||||
|
.\$(OBJDIR)\nsTextWidget.obj \
|
||||||
|
.\$(OBJDIR)\nsTextHelper.obj \
|
||||||
|
.\$(OBJDIR)\nsLabel.obj \
|
||||||
|
.\$(OBJDIR)\nsCheckButton.obj \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
LINCS= \
|
LINCS= \
|
||||||
|
|
Загрузка…
Ссылка в новой задаче