Remove unused wxWindow parameter
This commit is contained in:
@@ -153,7 +153,7 @@ wxRendererNative& wxRendererNative::GetDefault()
|
|||||||
#define NULL_RECT
|
#define NULL_RECT
|
||||||
typedef cairo_t wxGTKDrawable;
|
typedef cairo_t wxGTKDrawable;
|
||||||
|
|
||||||
static cairo_t* wxGetGTKDrawable(wxWindow*, const wxDC& dc)
|
static cairo_t* wxGetGTKDrawable(const wxDC& dc)
|
||||||
{
|
{
|
||||||
wxGraphicsContext* gc = dc.GetGraphicsContext();
|
wxGraphicsContext* gc = dc.GetGraphicsContext();
|
||||||
wxCHECK_MSG(gc, NULL, "cannot use wxRendererNative on wxDC of this type");
|
wxCHECK_MSG(gc, NULL, "cannot use wxRendererNative on wxDC of this type");
|
||||||
@@ -170,7 +170,7 @@ static const GtkStateFlags stateTypeToFlags[] = {
|
|||||||
#define NULL_RECT NULL,
|
#define NULL_RECT NULL,
|
||||||
typedef GdkWindow wxGTKDrawable;
|
typedef GdkWindow wxGTKDrawable;
|
||||||
|
|
||||||
static GdkWindow* wxGetGTKDrawable(wxWindow*, wxDC& dc)
|
static GdkWindow* wxGetGTKDrawable(wxDC& dc)
|
||||||
{
|
{
|
||||||
GdkWindow* gdk_window = NULL;
|
GdkWindow* gdk_window = NULL;
|
||||||
|
|
||||||
@@ -235,7 +235,7 @@ wxRendererGTK::DrawHeaderButton(wxWindow *win,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __WXGTK3__
|
#ifdef __WXGTK3__
|
||||||
cairo_t* cr = wxGetGTKDrawable(win, dc);
|
cairo_t* cr = wxGetGTKDrawable(dc);
|
||||||
if (cr == NULL)
|
if (cr == NULL)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
@@ -266,7 +266,7 @@ wxRendererGTK::DrawHeaderButton(wxWindow *win,
|
|||||||
gtk_style_context_restore(sc);
|
gtk_style_context_restore(sc);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
GdkWindow* gdk_window = wxGetGTKDrawable(win, dc);
|
GdkWindow* gdk_window = wxGetGTKDrawable(dc);
|
||||||
gtk_paint_box
|
gtk_paint_box
|
||||||
(
|
(
|
||||||
gtk_widget_get_style(button),
|
gtk_widget_get_style(button),
|
||||||
@@ -308,7 +308,7 @@ void
|
|||||||
wxRendererGTK::DrawTreeItemButton(wxWindow* win,
|
wxRendererGTK::DrawTreeItemButton(wxWindow* win,
|
||||||
wxDC& dc, const wxRect& rect, int flags)
|
wxDC& dc, const wxRect& rect, int flags)
|
||||||
{
|
{
|
||||||
wxGTKDrawable* drawable = wxGetGTKDrawable(win, dc);
|
wxGTKDrawable* drawable = wxGetGTKDrawable(dc);
|
||||||
if (drawable == NULL)
|
if (drawable == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -417,7 +417,7 @@ wxRendererGTK::DrawSplitterSash(wxWindow* win,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxGTKDrawable* drawable = wxGetGTKDrawable(win, dc);
|
wxGTKDrawable* drawable = wxGetGTKDrawable(dc);
|
||||||
if (drawable == NULL)
|
if (drawable == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -458,7 +458,7 @@ wxRendererGTK::DrawSplitterSash(wxWindow* win,
|
|||||||
flags & wxCONTROL_CURRENT ? GTK_STATE_FLAG_PRELIGHT : GTK_STATE_FLAG_NORMAL);
|
flags & wxCONTROL_CURRENT ? GTK_STATE_FLAG_PRELIGHT : GTK_STATE_FLAG_NORMAL);
|
||||||
gtk_render_handle(sc, drawable, rect.x - x_diff, rect.y, rect.width, rect.height);
|
gtk_render_handle(sc, drawable, rect.x - x_diff, rect.y, rect.width, rect.height);
|
||||||
#else
|
#else
|
||||||
GdkWindow* gdk_window = wxGetGTKDrawable(win, dc);
|
GdkWindow* gdk_window = wxGetGTKDrawable(dc);
|
||||||
if (gdk_window == NULL)
|
if (gdk_window == NULL)
|
||||||
return;
|
return;
|
||||||
gtk_paint_handle
|
gtk_paint_handle
|
||||||
@@ -480,7 +480,7 @@ wxRendererGTK::DrawSplitterSash(wxWindow* win,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
wxRendererGTK::DrawDropArrow(wxWindow* win,
|
wxRendererGTK::DrawDropArrow(wxWindow*,
|
||||||
wxDC& dc,
|
wxDC& dc,
|
||||||
const wxRect& rect,
|
const wxRect& rect,
|
||||||
int flags)
|
int flags)
|
||||||
@@ -511,7 +511,7 @@ wxRendererGTK::DrawDropArrow(wxWindow* win,
|
|||||||
state = GTK_STATE_NORMAL;
|
state = GTK_STATE_NORMAL;
|
||||||
|
|
||||||
#ifdef __WXGTK3__
|
#ifdef __WXGTK3__
|
||||||
cairo_t* cr = wxGetGTKDrawable(win, dc);
|
cairo_t* cr = wxGetGTKDrawable(dc);
|
||||||
if (cr)
|
if (cr)
|
||||||
{
|
{
|
||||||
gtk_widget_set_state_flags(button, stateTypeToFlags[state], true);
|
gtk_widget_set_state_flags(button, stateTypeToFlags[state], true);
|
||||||
@@ -519,7 +519,7 @@ wxRendererGTK::DrawDropArrow(wxWindow* win,
|
|||||||
gtk_render_arrow(sc, cr, G_PI, x, y, size);
|
gtk_render_arrow(sc, cr, G_PI, x, y, size);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
GdkWindow* gdk_window = wxGetGTKDrawable(win, dc);
|
GdkWindow* gdk_window = wxGetGTKDrawable(dc);
|
||||||
if (gdk_window == NULL)
|
if (gdk_window == NULL)
|
||||||
return;
|
return;
|
||||||
// draw arrow on button
|
// draw arrow on button
|
||||||
@@ -593,7 +593,7 @@ wxRendererGTK::GetCheckBoxSize(wxWindow *WXUNUSED(win))
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
wxRendererGTK::DrawCheckBox(wxWindow* win,
|
wxRendererGTK::DrawCheckBox(wxWindow*,
|
||||||
wxDC& dc,
|
wxDC& dc,
|
||||||
const wxRect& rect,
|
const wxRect& rect,
|
||||||
int flags )
|
int flags )
|
||||||
@@ -629,7 +629,7 @@ wxRendererGTK::DrawCheckBox(wxWindow* win,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __WXGTK3__
|
#ifdef __WXGTK3__
|
||||||
cairo_t* cr = wxGetGTKDrawable(win, dc);
|
cairo_t* cr = wxGetGTKDrawable(dc);
|
||||||
if (cr == NULL)
|
if (cr == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -677,7 +677,7 @@ wxRendererGTK::DrawCheckBox(wxWindow* win,
|
|||||||
gtk_render_check(sc, cr, x, y, min_width, min_height);
|
gtk_render_check(sc, cr, x, y, min_width, min_height);
|
||||||
gtk_style_context_restore(sc);
|
gtk_style_context_restore(sc);
|
||||||
#else
|
#else
|
||||||
GdkWindow* gdk_window = wxGetGTKDrawable(win, dc);
|
GdkWindow* gdk_window = wxGetGTKDrawable(dc);
|
||||||
if (gdk_window == NULL)
|
if (gdk_window == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -698,7 +698,7 @@ wxRendererGTK::DrawCheckBox(wxWindow* win,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
wxRendererGTK::DrawPushButton(wxWindow* win,
|
wxRendererGTK::DrawPushButton(wxWindow*,
|
||||||
wxDC& dc,
|
wxDC& dc,
|
||||||
const wxRect& rect,
|
const wxRect& rect,
|
||||||
int flags)
|
int flags)
|
||||||
@@ -718,7 +718,7 @@ wxRendererGTK::DrawPushButton(wxWindow* win,
|
|||||||
state = GTK_STATE_NORMAL;
|
state = GTK_STATE_NORMAL;
|
||||||
|
|
||||||
#ifdef __WXGTK3__
|
#ifdef __WXGTK3__
|
||||||
cairo_t* cr = wxGetGTKDrawable(win, dc);
|
cairo_t* cr = wxGetGTKDrawable(dc);
|
||||||
if (cr)
|
if (cr)
|
||||||
{
|
{
|
||||||
GtkStyleContext* sc = gtk_widget_get_style_context(button);
|
GtkStyleContext* sc = gtk_widget_get_style_context(button);
|
||||||
@@ -729,7 +729,7 @@ wxRendererGTK::DrawPushButton(wxWindow* win,
|
|||||||
gtk_style_context_restore(sc);
|
gtk_style_context_restore(sc);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
GdkWindow* gdk_window = wxGetGTKDrawable(win, dc);
|
GdkWindow* gdk_window = wxGetGTKDrawable(dc);
|
||||||
if (gdk_window == NULL)
|
if (gdk_window == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -756,7 +756,7 @@ wxRendererGTK::DrawItemSelectionRect(wxWindow* win,
|
|||||||
const wxRect& rect,
|
const wxRect& rect,
|
||||||
int flags )
|
int flags )
|
||||||
{
|
{
|
||||||
wxGTKDrawable* drawable = wxGetGTKDrawable(win, dc);
|
wxGTKDrawable* drawable = wxGetGTKDrawable(dc);
|
||||||
if (drawable == NULL)
|
if (drawable == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -801,7 +801,7 @@ wxRendererGTK::DrawItemSelectionRect(wxWindow* win,
|
|||||||
|
|
||||||
void wxRendererGTK::DrawFocusRect(wxWindow* win, wxDC& dc, const wxRect& rect, int flags)
|
void wxRendererGTK::DrawFocusRect(wxWindow* win, wxDC& dc, const wxRect& rect, int flags)
|
||||||
{
|
{
|
||||||
wxGTKDrawable* drawable = wxGetGTKDrawable(win, dc);
|
wxGTKDrawable* drawable = wxGetGTKDrawable(dc);
|
||||||
if (drawable == NULL)
|
if (drawable == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -832,9 +832,9 @@ void wxRendererGTK::DrawFocusRect(wxWindow* win, wxDC& dc, const wxRect& rect, i
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Uses the theme to draw the border and fill for something like a wxTextCtrl
|
// Uses the theme to draw the border and fill for something like a wxTextCtrl
|
||||||
void wxRendererGTK::DrawTextCtrl(wxWindow* win, wxDC& dc, const wxRect& rect, int flags)
|
void wxRendererGTK::DrawTextCtrl(wxWindow*, wxDC& dc, const wxRect& rect, int flags)
|
||||||
{
|
{
|
||||||
wxGTKDrawable* drawable = wxGetGTKDrawable(win, dc);
|
wxGTKDrawable* drawable = wxGetGTKDrawable(dc);
|
||||||
if (drawable == NULL)
|
if (drawable == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -880,7 +880,7 @@ void wxRendererGTK::DrawTextCtrl(wxWindow* win, wxDC& dc, const wxRect& rect, in
|
|||||||
// Draw the equivalent of a wxComboBox
|
// Draw the equivalent of a wxComboBox
|
||||||
void wxRendererGTK::DrawComboBox(wxWindow* win, wxDC& dc, const wxRect& rect, int flags)
|
void wxRendererGTK::DrawComboBox(wxWindow* win, wxDC& dc, const wxRect& rect, int flags)
|
||||||
{
|
{
|
||||||
wxGTKDrawable* drawable = wxGetGTKDrawable(win, dc);
|
wxGTKDrawable* drawable = wxGetGTKDrawable(dc);
|
||||||
if (drawable == NULL)
|
if (drawable == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -904,6 +904,7 @@ void wxRendererGTK::DrawComboBox(wxWindow* win, wxDC& dc, const wxRect& rect, in
|
|||||||
r.width = r.height;
|
r.width = r.height;
|
||||||
DrawComboBoxDropButton(win, dc, r, flags);
|
DrawComboBoxDropButton(win, dc, r, flags);
|
||||||
#else
|
#else
|
||||||
|
wxUnusedVar(win);
|
||||||
gtk_paint_shadow
|
gtk_paint_shadow
|
||||||
(
|
(
|
||||||
gtk_widget_get_style(combo),
|
gtk_widget_get_style(combo),
|
||||||
@@ -972,9 +973,9 @@ void wxRendererGTK::DrawChoice(wxWindow* win, wxDC& dc,
|
|||||||
|
|
||||||
|
|
||||||
// Draw a themed radio button
|
// Draw a themed radio button
|
||||||
void wxRendererGTK::DrawRadioBitmap(wxWindow* win, wxDC& dc, const wxRect& rect, int flags)
|
void wxRendererGTK::DrawRadioBitmap(wxWindow*, wxDC& dc, const wxRect& rect, int flags)
|
||||||
{
|
{
|
||||||
wxGTKDrawable* drawable = wxGetGTKDrawable(win, dc);
|
wxGTKDrawable* drawable = wxGetGTKDrawable(dc);
|
||||||
if (drawable == NULL)
|
if (drawable == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user