Rename wxRendererNative::DrawRadioButton() to DrawRadioBitmap().

This old name function conflicted with the one in wxRenderer in wxUniv and
also was misleading as this function draws only a bitmap and not the entire
wxRadioButton control.

The old workaround for the warnings about the function names conflict was ugly
and unmaintainable, as proven by the fact that wxRenderer method signature
already became different from the wxRendererNative one.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61715 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-08-20 00:44:22 +00:00
parent 995a95737a
commit 6e6b532c1a
8 changed files with 29 additions and 36 deletions

View File

@@ -277,8 +277,8 @@ public:
const wxRect& rect,
int flags = 0) = 0;
// Draw a native wxRadioButton (just the graphical portion)
virtual void DrawRadioButton(wxWindow* win,
// Draw a native wxRadioButton bitmap
virtual void DrawRadioBitmap(wxWindow* win,
wxDC& dc,
const wxRect& rect,
int flags = 0) = 0;
@@ -443,11 +443,11 @@ public:
int flags = 0)
{ m_rendererNative.DrawTextCtrl( win, dc, rect, flags); }
virtual void DrawRadioButton(wxWindow* win,
virtual void DrawRadioBitmap(wxWindow* win,
wxDC& dc,
const wxRect& rect,
int flags = 0)
{ m_rendererNative.DrawRadioButton( win, dc, rect, flags); }
{ m_rendererNative.DrawRadioBitmap(win, dc, rect, flags); }
virtual wxSplitterRenderParams GetSplitterParams(const wxWindow *win)
{ return m_rendererNative.GetSplitterParams(win); }

View File

@@ -208,13 +208,6 @@ public:
wxAlignment align = wxALIGN_LEFT,
int indexAccel = -1) = 0;
// draw a radio button sans label or bitmap, for wxRenderer API compat.
virtual void DrawRadioButton(wxDC& dc,
const wxRect& rect,
int flags = 0,
wxAlignment align = wxALIGN_LEFT)
{ DrawRadioButton(dc, wxEmptyString, wxNullBitmap, rect, flags, align); }
#if wxUSE_TOOLBAR
// draw a toolbar button (label may be empty, bitmap may be invalid, if
// both conditions are true this function draws a separator)

View File

@@ -409,22 +409,22 @@ public:
/**
Draw a native wxChoice
*/
virtual void DrawChoice(wxWindow* win, wxDC& dc, const wxRect& rect, int flags=0) = 0;
virtual void DrawChoice(wxWindow* win, wxDC& dc, const wxRect& rect, int flags = 0) = 0;
/**
Draw a native wxComboBox
*/
virtual void DrawComboBox(wxWindow* win, wxDC& dc, const wxRect& rect, int flags=0) = 0;
virtual void DrawComboBox(wxWindow* win, wxDC& dc, const wxRect& rect, int flags = 0) = 0;
/**
Draw a native wxTextCtrl frame
*/
virtual void DrawTextCtrl(wxWindow* win, wxDC& dc, const wxRect& rect, int flags=0) = 0;
virtual void DrawTextCtrl(wxWindow* win, wxDC& dc, const wxRect& rect, int flags = 0) = 0;
/**
Draw a native wxRadioButton (just the button image, not the text)
Draw a native wxRadioButton bitmap.
*/
virtual void DrawRadioButton(wxWindow* win, wxDC& dc, const wxRect& rect, int flags=0) = 0;
virtual void DrawRadioBitmap(wxWindow* win, wxDC& dc, const wxRect& rect, int flags = 0) = 0;
/**
Return the currently used renderer.

View File

@@ -118,7 +118,7 @@ public:
virtual void DrawTextCtrl(wxWindow* win, wxDC& dc, const wxRect& rect, int flags=0);
virtual void DrawRadioButton(wxWindow* win, wxDC& dc, const wxRect& rect, int flags=0);
virtual void DrawRadioBitmap(wxWindow* win, wxDC& dc, const wxRect& rect, int flags=0);
virtual wxSplitterRenderParams GetSplitterParams(const wxWindow *win);
@@ -739,10 +739,10 @@ void wxRendererGeneric::DrawComboBox(wxWindow* WXUNUSED(win), wxDC& WXUNUSED(dc)
wxFAIL_MSG("UNIMPLEMENTED: wxRendererGeneric::DrawComboBox");
}
void wxRendererGeneric::DrawRadioButton(wxWindow* WXUNUSED(win), wxDC& WXUNUSED(dc),
void wxRendererGeneric::DrawRadioBitmap(wxWindow* WXUNUSED(win), wxDC& WXUNUSED(dc),
const wxRect& WXUNUSED(rect), int WXUNUSED(flags))
{
wxFAIL_MSG("UNIMPLEMENTED: wxRendererGeneric::DrawRadioButton");
wxFAIL_MSG("UNIMPLEMENTED: wxRendererGeneric::DrawRadioBitmap");
}
void wxRendererGeneric::DrawTextCtrl(wxWindow* WXUNUSED(win), wxDC& WXUNUSED(dc),

View File

@@ -114,7 +114,7 @@ public:
const wxRect& rect,
int flags=0);
virtual void DrawRadioButton(wxWindow* win,
virtual void DrawRadioBitmap(wxWindow* win,
wxDC& dc,
const wxRect& rect,
int flags=0);
@@ -728,7 +728,7 @@ void wxRendererGTK::DrawChoice(wxWindow* win, wxDC& dc,
// Draw a themed radio button
void wxRendererGTK::DrawRadioButton(wxWindow* win, wxDC& dc, const wxRect& rect, int flags)
void wxRendererGTK::DrawRadioBitmap(wxWindow* win, wxDC& dc, const wxRect& rect, int flags)
{
GtkWidget *button = wxGTKPrivate::GetRadioButtonWidget();

View File

@@ -225,7 +225,7 @@ public:
const wxRect& rect,
int flags=0);
virtual void DrawRadioButton(wxWindow* win,
virtual void DrawRadioBitmap(wxWindow* win,
wxDC& dc,
const wxRect& rect,
int flags=0);
@@ -527,7 +527,7 @@ void wxRendererMSW::DrawChoice(wxWindow* win, wxDC& dc,
// Draw a themed radio button
void wxRendererMSW::DrawRadioButton(wxWindow* win, wxDC& dc, const wxRect& rect, int flags)
void wxRendererMSW::DrawRadioBitmap(wxWindow* win, wxDC& dc, const wxRect& rect, int flags)
{
#if wxUSE_UXTHEME
wxUxThemeHandle hTheme(win, L"BUTTON");

View File

@@ -101,7 +101,7 @@ public:
virtual void DrawTextCtrl(wxWindow* win, wxDC& dc, const wxRect& rect, int flags=0);
virtual void DrawRadioButton(wxWindow* win, wxDC& dc, const wxRect& rect, int flags=0);
virtual void DrawRadioBitmap(wxWindow* win, wxDC& dc, const wxRect& rect, int flags=0);
private:
void DrawMacThemeButton(wxWindow *win,
@@ -501,7 +501,7 @@ void wxRendererMac::DrawComboBox(wxWindow* win, wxDC& dc,
DrawMacThemeButton(win, dc, rect, flags, kind, kThemeAdornmentNone);
}
void wxRendererMac::DrawRadioButton(wxWindow* win, wxDC& dc,
void wxRendererMac::DrawRadioBitmap(wxWindow* win, wxDC& dc,
const wxRect& rect, int flags)
{
int kind;

View File

@@ -328,7 +328,7 @@ protected:
wxCoord y1, wxCoord y2);
// draw the radio button bitmap for the given state
void DrawRadioBitmap(wxDC& dc, const wxRect& rect, int flags);
void DrawRadioButtonBitmap(wxDC& dc, const wxRect& rect, int flags);
// common part of DrawMenuItem() and DrawMenuBarItem()
void DoDrawMenuItem(wxDC& dc,
@@ -997,7 +997,7 @@ void wxGTKRenderer::DrawCheckBitmap(wxDC& dc, const wxRect& rectTotal)
dc.DrawRectangle(rect);
}
void wxGTKRenderer::DrawRadioBitmap(wxDC& dc,
void wxGTKRenderer::DrawRadioButtonBitmap(wxDC& dc,
const wxRect& rect,
int flags)
{
@@ -1134,7 +1134,7 @@ wxBitmap wxGTKRenderer::GetRadioBitmap(int flags)
bmp.Create(size.x, size.y);
dc.SelectObject(bmp);
DrawRadioBitmap(dc, size, flags);
DrawRadioButtonBitmap(dc, size, flags);
}
return bmp;