mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-25 06:10:35 +00:00
Add support for nsButton
This commit is contained in:
parent
31d214b475
commit
c6d4031b61
@ -25,7 +25,7 @@
|
||||
#include "nsToolkit.h"
|
||||
#include "nsWindow.h"
|
||||
#include "nsAppShell.h"
|
||||
//#include "nsButton.h"
|
||||
#include "nsButton.h"
|
||||
//#include "nsScrollbar.h"
|
||||
//#include "nsCheckButton.h"
|
||||
//#include "nsRadioButton.h"
|
||||
@ -142,34 +142,37 @@ nsresult nsWidgetFactory::CreateInstance(nsISupports *aOuter,
|
||||
{
|
||||
inst = new nsWindow(aOuter);
|
||||
}
|
||||
else
|
||||
if (aIID.Equals(kIWidget))
|
||||
{
|
||||
inst = new nsWindow(aOuter);
|
||||
}
|
||||
else
|
||||
if (mClassID.Equals(kCAppShellCID))
|
||||
{
|
||||
nsAppShell *appInst = new nsAppShell();
|
||||
if (appInst == NULL)
|
||||
{
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsresult res = appInst->QueryInterface(aIID, aResult);
|
||||
if (res != NS_OK)
|
||||
{
|
||||
delete appInst;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
else if (aIID.Equals(kIWidget))
|
||||
{
|
||||
inst = new nsWindow(aOuter);
|
||||
}
|
||||
else if (mClassID.Equals(kCAppShellCID))
|
||||
{
|
||||
nsAppShell *appInst = new nsAppShell();
|
||||
if (appInst == NULL)
|
||||
{
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsresult res = appInst->QueryInterface(aIID, aResult);
|
||||
if (res != NS_OK)
|
||||
{
|
||||
delete appInst;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
else if ( mClassID.Equals(kCButtonCID)) {
|
||||
inst = new nsButton(aOuter);
|
||||
}
|
||||
else if (aIID.Equals(kIWidget)) {
|
||||
inst = new nsWindow(aOuter);
|
||||
}
|
||||
else if (mClassID.Equals(kCChild)) {
|
||||
inst = new ChildWindow(aOuter);
|
||||
}
|
||||
#ifdef NOTNOW
|
||||
else if ( mClassID.Equals(kCCheckButtonCID)) {
|
||||
inst = new nsCheckButton(aOuter);
|
||||
}
|
||||
else if ( mClassID.Equals(kCButtonCID)) {
|
||||
inst = new nsButton(aOuter);
|
||||
}
|
||||
else if (mClassID.Equals(kCVertScrollbarCID)) {
|
||||
inst = new nsScrollbar(aOuter, PR_TRUE);
|
||||
}
|
||||
@ -198,12 +201,6 @@ nsresult nsWidgetFactory::CreateInstance(nsISupports *aOuter,
|
||||
else if (mClassID.Equals(kCFileWidgetCID)) {
|
||||
inst = new nsFileWidget(aOuter);
|
||||
}
|
||||
else if (aIID.Equals(kIWidget)) {
|
||||
inst = new nsWindow(aOuter);
|
||||
}
|
||||
else if (mClassID.Equals(kCChild)) {
|
||||
inst = new ChildWindow(aOuter);
|
||||
}
|
||||
else if (mClassID.Equals(kCLookAndFeelCID)) {
|
||||
nsLookAndFeel *laf = new nsLookAndFeel(aOuter);
|
||||
if (laf == NULL) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user