Loading widget/src/gtk/nsCheckButton.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ NS_IMPL_RELEASE(nsCheckButton) nsCheckButton::nsCheckButton() : nsWidget() , nsICheckButton() { NS_INIT_REFCNT(); mLabel = nsnull; } //------------------------------------------------------------------------- Loading widget/src/gtk/nsComboBox.cpp +15 −35 Original line number Diff line number Diff line Loading @@ -63,38 +63,6 @@ nsComboBox::~nsComboBox() } } //------------------------------------------------------------------------- // // Set the foreground color // //------------------------------------------------------------------------- NS_METHOD nsComboBox::SetForegroundColor(const nscolor &aColor) { #if 0 nsWindow::SetForegroundColor(aColor); PRUint32 pixel; mContext->ConvertPixel(aColor, pixel); XtVaSetValues(mOptionMenu, XtNforeground, pixel, nsnull); #endif return NS_OK; } //------------------------------------------------------------------------- // // Set the background color // //------------------------------------------------------------------------- NS_METHOD nsComboBox::SetBackgroundColor(const nscolor &aColor) { #if 0 nsWindow::SetForegroundColor(aColor); PRUint32 pixel; mContext->ConvertPixel(aColor, pixel); XtVaSetValues(mOptionMenu, XtNbackground, pixel, nsnull); #endif return NS_OK; } //------------------------------------------------------------------------- // // initializer Loading Loading @@ -377,14 +345,26 @@ NS_METHOD nsComboBox::Create(nsIWidget *aParent, GtkWidget *parentWidget = nsnull; if (aParent) { parentWidget = (Widget) aParent->GetNativeData(NS_NATIVE_WIDGET); parentWidget = GTK_WIDGET(aParent->GetNativeData(NS_NATIVE_WIDGET)); } else if (aAppShell) { parentWidget = (Widget) aAppShell->GetNativeData(NS_NATIVE_SHELL); parentWidget = GTK_WIDGET(aAppShell->GetNativeData(NS_NATIVE_SHELL)); } InitToolkit(aToolkit, aParent); InitDeviceContext(aContext, parentWidget); mWidget = gtk_combo_new(); gtk_layout_put(GTK_LAYOUT(parentWidget), mWidget, aRect.x, aRect.y); gtk_widget_set_usize(mWidget, aRect.width, aRect.height); gtk_widget_show(mWidget); mEventCallback = aHandleEventFunction; //InitCallbacks(); #endif return NS_OK; /* Arg args[30]; int argc; Loading Loading @@ -418,9 +398,9 @@ NS_METHOD nsComboBox::Create(nsIWidget *aParent, // save the event callback function mEventCallback = aHandleEventFunction; #endif //InitCallbacks(); return NS_OK; */ } //------------------------------------------------------------------------- Loading widget/src/gtk/nsComboBox.h +0 −3 Original line number Diff line number Diff line Loading @@ -66,9 +66,6 @@ public: nsIToolkit *aToolkit = nsnull, nsWidgetInitData *aInitData = nsnull); NS_IMETHOD SetForegroundColor(const nscolor &aColor); NS_IMETHOD SetBackgroundColor(const nscolor &aColor); virtual PRBool OnMove(PRInt32 aX, PRInt32 aY); virtual PRBool OnPaint(nsPaintEvent & aEvent); virtual PRBool OnResize(nsSizeEvent &aEvent); Loading Loading
widget/src/gtk/nsCheckButton.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ NS_IMPL_RELEASE(nsCheckButton) nsCheckButton::nsCheckButton() : nsWidget() , nsICheckButton() { NS_INIT_REFCNT(); mLabel = nsnull; } //------------------------------------------------------------------------- Loading
widget/src/gtk/nsComboBox.cpp +15 −35 Original line number Diff line number Diff line Loading @@ -63,38 +63,6 @@ nsComboBox::~nsComboBox() } } //------------------------------------------------------------------------- // // Set the foreground color // //------------------------------------------------------------------------- NS_METHOD nsComboBox::SetForegroundColor(const nscolor &aColor) { #if 0 nsWindow::SetForegroundColor(aColor); PRUint32 pixel; mContext->ConvertPixel(aColor, pixel); XtVaSetValues(mOptionMenu, XtNforeground, pixel, nsnull); #endif return NS_OK; } //------------------------------------------------------------------------- // // Set the background color // //------------------------------------------------------------------------- NS_METHOD nsComboBox::SetBackgroundColor(const nscolor &aColor) { #if 0 nsWindow::SetForegroundColor(aColor); PRUint32 pixel; mContext->ConvertPixel(aColor, pixel); XtVaSetValues(mOptionMenu, XtNbackground, pixel, nsnull); #endif return NS_OK; } //------------------------------------------------------------------------- // // initializer Loading Loading @@ -377,14 +345,26 @@ NS_METHOD nsComboBox::Create(nsIWidget *aParent, GtkWidget *parentWidget = nsnull; if (aParent) { parentWidget = (Widget) aParent->GetNativeData(NS_NATIVE_WIDGET); parentWidget = GTK_WIDGET(aParent->GetNativeData(NS_NATIVE_WIDGET)); } else if (aAppShell) { parentWidget = (Widget) aAppShell->GetNativeData(NS_NATIVE_SHELL); parentWidget = GTK_WIDGET(aAppShell->GetNativeData(NS_NATIVE_SHELL)); } InitToolkit(aToolkit, aParent); InitDeviceContext(aContext, parentWidget); mWidget = gtk_combo_new(); gtk_layout_put(GTK_LAYOUT(parentWidget), mWidget, aRect.x, aRect.y); gtk_widget_set_usize(mWidget, aRect.width, aRect.height); gtk_widget_show(mWidget); mEventCallback = aHandleEventFunction; //InitCallbacks(); #endif return NS_OK; /* Arg args[30]; int argc; Loading Loading @@ -418,9 +398,9 @@ NS_METHOD nsComboBox::Create(nsIWidget *aParent, // save the event callback function mEventCallback = aHandleEventFunction; #endif //InitCallbacks(); return NS_OK; */ } //------------------------------------------------------------------------- Loading
widget/src/gtk/nsComboBox.h +0 −3 Original line number Diff line number Diff line Loading @@ -66,9 +66,6 @@ public: nsIToolkit *aToolkit = nsnull, nsWidgetInitData *aInitData = nsnull); NS_IMETHOD SetForegroundColor(const nscolor &aColor); NS_IMETHOD SetBackgroundColor(const nscolor &aColor); virtual PRBool OnMove(PRInt32 aX, PRInt32 aY); virtual PRBool OnPaint(nsPaintEvent & aEvent); virtual PRBool OnResize(nsSizeEvent &aEvent); Loading