part of 93467 - remove old native radiobutton code. r=blizzard, sr=hyatt.
This commit is contained in:
Родитель
15f827f99c
Коммит
28713918ec
|
@ -14,7 +14,6 @@ nsIListBox.h
|
|||
nsIScrollbar.h
|
||||
nsGUIEvent.h
|
||||
nsEvent.h
|
||||
nsIRadioButton.h
|
||||
nsIMouseListener.h
|
||||
nsIEventListener.h
|
||||
nsIFileWidget.h
|
||||
|
|
|
@ -50,7 +50,6 @@ EXPORTS = \
|
|||
nsIScrollbar.h \
|
||||
nsGUIEvent.h \
|
||||
nsEvent.h \
|
||||
nsIRadioButton.h \
|
||||
nsIMouseListener.h \
|
||||
nsIEventListener.h \
|
||||
nsIMenuListener.h \
|
||||
|
|
|
@ -47,7 +47,6 @@ CPPSRCS = \
|
|||
nsLookAndFeel.cpp \
|
||||
nsObject.cpp \
|
||||
nsPopUpMenu.cpp \
|
||||
nsRadioButton.cpp \
|
||||
nsScrollbar.cpp \
|
||||
nsSound.cpp \
|
||||
nsTextAreaWidget.cpp \
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
#include "nsCheckButton.h"
|
||||
#include "nsTextWidget.h"
|
||||
#include "nsTextAreaWidget.h"
|
||||
#include "nsRadioButton.h"
|
||||
#include "nsFilePicker.h"
|
||||
#include "nsFileWidget.h"
|
||||
#include "nsListBox.h"
|
||||
|
@ -62,7 +61,6 @@ static NS_DEFINE_IID(kCCheckButton, NS_CHECKBUTTON_CID);
|
|||
static NS_DEFINE_IID(kCFileOpen, NS_FILEWIDGET_CID);
|
||||
static NS_DEFINE_IID(kCFilePicker, NS_FILEPICKER_CID);
|
||||
static NS_DEFINE_IID(kCListbox, NS_LISTBOX_CID);
|
||||
static NS_DEFINE_IID(kCRadioButton, NS_RADIOBUTTON_CID);
|
||||
static NS_DEFINE_IID(kCHorzScrollbar, NS_HORZSCROLLBAR_CID);
|
||||
static NS_DEFINE_IID(kCVertScrollbar, NS_VERTSCROLLBAR_CID);
|
||||
static NS_DEFINE_IID(kCTextArea, NS_TEXTAREA_CID);
|
||||
|
@ -176,9 +174,6 @@ nsresult nsWidgetFactory::CreateInstance(nsISupports *aOuter,
|
|||
else if (mClassID.Equals(kCCheckButton)) {
|
||||
inst = (nsISupports*)(nsWindow *)new nsCheckButton();
|
||||
}
|
||||
else if (mClassID.Equals(kCRadioButton)) {
|
||||
inst = (nsISupports*)(nsWindow *)new nsRadioButton();
|
||||
}
|
||||
else if (mClassID.Equals(kCFileOpen)) {
|
||||
inst = (nsISupports*)new nsFileWidget();
|
||||
}
|
||||
|
|
|
@ -37,7 +37,6 @@
|
|||
#include "nsIWidget.h"
|
||||
#include "nsICheckButton.h"
|
||||
#include "nsIScrollbar.h"
|
||||
#include "nsIRadioButton.h"
|
||||
#include "nsITextWidget.h"
|
||||
|
||||
|
||||
|
@ -105,31 +104,6 @@ NS_CreateCheckButton(nsISupports* aParent,
|
|||
|
||||
|
||||
|
||||
NS_WIDGET nsresult
|
||||
NS_CreateRadioButton( nsISupports* aParent,
|
||||
nsIRadioButton* aRadioButton,
|
||||
const nsRect& aRect,
|
||||
EVENT_CALLBACK aHandleEventFunction,
|
||||
const nsFont* aFont)
|
||||
{
|
||||
nsIWidget* parent = nsnull;
|
||||
if (aParent != nsnull)
|
||||
aParent->QueryInterface(kIWidgetIID,(void**)&parent);
|
||||
|
||||
nsIWidget* widget;
|
||||
if (NS_OK == aRadioButton->QueryInterface(kIWidgetIID,(void**)&widget)) {
|
||||
widget->Create(parent, aRect, aHandleEventFunction, NULL);
|
||||
widget->Show(PR_TRUE);
|
||||
if (aFont != nsnull)
|
||||
widget->SetFont(*aFont);
|
||||
NS_IF_RELEASE(widget);
|
||||
}
|
||||
if (aParent != nsnull)
|
||||
NS_IF_RELEASE(parent);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_WIDGET nsresult
|
||||
NS_CreateLabel( nsISupports* aParent,
|
||||
nsILabel* aLabel,
|
||||
|
|
|
@ -64,8 +64,6 @@
|
|||
#if USE_NATIVE_VERSION
|
||||
# include "nsTextAreaWidget.h"
|
||||
# include "nsListBox.h"
|
||||
# include "nsComboBox.h"
|
||||
# include "nsRadioButton.h"
|
||||
# include "nsCheckButton.h"
|
||||
#endif
|
||||
|
||||
|
@ -91,9 +89,7 @@ static NS_DEFINE_CID(kCButton, NS_BUTTON_CID);
|
|||
static NS_DEFINE_CID(kCCheckButton, NS_CHECKBUTTON_CID);
|
||||
static NS_DEFINE_CID(kCFilePicker, NS_FILEPICKER_CID);
|
||||
static NS_DEFINE_CID(kCFileOpen, NS_FILEWIDGET_CID);
|
||||
static NS_DEFINE_CID(kCCombobox, NS_COMBOBOX_CID);
|
||||
static NS_DEFINE_CID(kCListbox, NS_LISTBOX_CID);
|
||||
static NS_DEFINE_CID(kCRadioButton, NS_RADIOBUTTON_CID);
|
||||
static NS_DEFINE_CID(kCHorzScrollbar, NS_HORZSCROLLBAR_CID);
|
||||
static NS_DEFINE_CID(kCVertScrollbar, NS_VERTSCROLLBAR_CID);
|
||||
static NS_DEFINE_CID(kCTextArea, NS_TEXTAREA_CID);
|
||||
|
@ -214,12 +210,6 @@ nsresult nsWidgetFactory::CreateInstance(nsISupports *aOuter,
|
|||
else if (mClassID.Equals(kCCheckButton)) {
|
||||
inst = (nsISupports*)(nsBaseWidget*)(nsWindow*)new nsCheckButton();
|
||||
}
|
||||
else if (mClassID.Equals(kCCombobox)) {
|
||||
inst = (nsISupports*)(nsBaseWidget*)(nsWindow*)new nsComboBox();
|
||||
}
|
||||
else if (mClassID.Equals(kCRadioButton)) {
|
||||
inst = (nsISupports*)(nsBaseWidget*)(nsWindow*)new nsRadioButton();
|
||||
}
|
||||
else if (mClassID.Equals(kCListbox)) {
|
||||
inst = (nsISupports*)(nsBaseWidget*)(nsWindow*)new nsListBox();
|
||||
}
|
||||
|
|
|
@ -37,7 +37,6 @@
|
|||
#include "nsIWidget.h"
|
||||
#include "nsICheckButton.h"
|
||||
#include "nsIScrollbar.h"
|
||||
#include "nsIRadioButton.h"
|
||||
#include "nsITextWidget.h"
|
||||
|
||||
|
||||
|
@ -95,31 +94,6 @@ NS_CreateCheckButton(nsISupports* aParent,
|
|||
|
||||
|
||||
|
||||
NS_WIDGET nsresult
|
||||
NS_CreateRadioButton( nsISupports* aParent,
|
||||
nsIRadioButton* aRadioButton,
|
||||
const nsRect& aRect,
|
||||
EVENT_CALLBACK aHandleEventFunction,
|
||||
const nsFont* aFont)
|
||||
{
|
||||
nsIWidget* parent = nsnull;
|
||||
if (aParent != nsnull)
|
||||
aParent->QueryInterface(NS_GET_IID(nsIWidget),(void**)&parent);
|
||||
|
||||
nsIWidget* widget;
|
||||
if (NS_OK == aRadioButton->QueryInterface(NS_GET_IID(nsIWidget),(void**)&widget)) {
|
||||
widget->Create(parent, aRect, aHandleEventFunction, NULL);
|
||||
widget->Show(PR_TRUE);
|
||||
if (aFont != nsnull)
|
||||
widget->SetFont(*aFont);
|
||||
NS_IF_RELEASE(widget);
|
||||
}
|
||||
if (aParent != nsnull)
|
||||
NS_IF_RELEASE(parent);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_WIDGET nsresult
|
||||
NS_CreateLabel( nsISupports* aParent,
|
||||
nsILabel* aLabel,
|
||||
|
|
|
@ -45,7 +45,6 @@ CPPSRCS = \
|
|||
nsMenuBar.cpp \
|
||||
nsMenuItem.cpp \
|
||||
nsPopUpMenu.cpp \
|
||||
nsRadioButton.cpp \
|
||||
nsScrollbar.cpp \
|
||||
nsTextAreaWidget.cpp \
|
||||
nsTextHelper.cpp \
|
||||
|
|
|
@ -33,7 +33,6 @@
|
|||
#include "nsButton.h"
|
||||
#include "nsScrollbar.h"
|
||||
#include "nsCheckButton.h"
|
||||
#include "nsRadioButton.h"
|
||||
#include "nsTextWidget.h"
|
||||
#include "nsTextAreaWidget.h"
|
||||
#include "nsFileWidget.h"
|
||||
|
@ -63,7 +62,6 @@ static NS_DEFINE_IID(kCButton, NS_BUTTON_CID);
|
|||
static NS_DEFINE_IID(kCCheckButton, NS_CHECKBUTTON_CID);
|
||||
static NS_DEFINE_IID(kCFileOpen, NS_FILEWIDGET_CID);
|
||||
static NS_DEFINE_IID(kCListbox, NS_LISTBOX_CID);
|
||||
static NS_DEFINE_IID(kCRadioButton, NS_RADIOBUTTON_CID);
|
||||
static NS_DEFINE_IID(kCHorzScrollbar, NS_HORZSCROLLBAR_CID);
|
||||
static NS_DEFINE_IID(kCVertScrollbar, NS_VERTSCROLLBAR_CID);
|
||||
static NS_DEFINE_IID(kCTextArea, NS_TEXTAREA_CID);
|
||||
|
@ -178,9 +176,6 @@ nsresult nsWidgetFactory::CreateInstance(nsISupports *aOuter,
|
|||
else if (mClassID.Equals(kCCheckButton)) {
|
||||
inst = (nsISupports*)(nsIWidget *)new nsCheckButton();
|
||||
}
|
||||
else if (mClassID.Equals(kCRadioButton)) {
|
||||
inst = (nsISupports*)(nsIWidget *)new nsRadioButton();
|
||||
}
|
||||
else if (mClassID.Equals(kCFileOpen)) {
|
||||
inst = (nsISupports*)(nsIWidget *)new nsFileWidget();
|
||||
}
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
#include "nsWindow.h"
|
||||
#include "nsTextWidget.h"
|
||||
#include "nsCheckButton.h"
|
||||
#include "nsRadioButton.h"
|
||||
#include "nsFileWidget.h"
|
||||
#include "nsGUIEvent.h"
|
||||
#include "nsIMenuItem.h"
|
||||
|
@ -321,29 +320,6 @@ void nsXtWidget_Toggle_DisArmCallback(Widget w, XtPointer p, XtPointer call_data
|
|||
checkBtn->DisArmed();
|
||||
}
|
||||
|
||||
//==============================================================
|
||||
void nsXtWidget_RadioButton_ArmCallback(Widget w, XtPointer p, XtPointer call_data)
|
||||
{
|
||||
nsRadioButton * radioBtn = (nsRadioButton *) p ;
|
||||
XmToggleButtonCallbackStruct * cbs = (XmToggleButtonCallbackStruct*)call_data;
|
||||
radioBtn->Armed();
|
||||
nsMouseEvent mevent;
|
||||
nsXtWidget_InitNSMouseEvent(cbs->event, p, mevent, NS_MOUSE_LEFT_BUTTON_DOWN);
|
||||
radioBtn->DispatchMouseEvent(mevent);
|
||||
}
|
||||
|
||||
//==============================================================
|
||||
void nsXtWidget_RadioButton_DisArmCallback(Widget w, XtPointer p, XtPointer call_data)
|
||||
{
|
||||
nsRadioButton * radioBtn = (nsRadioButton *) p ;
|
||||
XmToggleButtonCallbackStruct * cbs = (XmToggleButtonCallbackStruct*)call_data;
|
||||
radioBtn->DisArmed();
|
||||
nsMouseEvent mevent;
|
||||
nsXtWidget_InitNSMouseEvent(cbs->event, p, mevent, NS_MOUSE_LEFT_BUTTON_UP);
|
||||
radioBtn->DispatchMouseEvent(mevent);
|
||||
}
|
||||
|
||||
|
||||
//==============================================================
|
||||
void nsXtWidget_Scrollbar_Callback(Widget w, XtPointer p, XtPointer call_data)
|
||||
{
|
||||
|
|
|
@ -9,5 +9,4 @@ moc_nsCheckButton.cpp
|
|||
moc_nsTextWidget.cpp
|
||||
moc_nsTabWidget.cpp
|
||||
moc_nsQEventHandler.cpp
|
||||
moc_nsRadioButton.cpp
|
||||
moc_nsWindow.cpp
|
||||
|
|
|
@ -51,7 +51,6 @@ CPPSRCS = \
|
|||
nsMenuBar.cpp \
|
||||
nsMenuItem.cpp \
|
||||
nsPopUpMenu.cpp \
|
||||
nsRadioButton.cpp \
|
||||
nsScrollBar.cpp \
|
||||
nsSound.cpp \
|
||||
nsTextAreaWidget.cpp \
|
||||
|
|
Загрузка…
Ссылка в новой задаче