]> git.saurik.com Git - wxWidgets.git/commitdiff
Rename wxRendererNative::DrawRadioButton() to DrawRadioBitmap().
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 20 Aug 2009 00:44:22 +0000 (00:44 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 20 Aug 2009 00:44:22 +0000 (00:44 +0000)
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

include/wx/renderer.h
include/wx/univ/renderer.h
interface/wx/renderer.h
src/generic/renderg.cpp
src/gtk/renderer.cpp
src/msw/renderer.cpp
src/osx/carbon/renderer.cpp
src/univ/themes/gtk.cpp

index 16bd75f9bf1ff16701f5369cc3134aa6447711b0..fbe6a105af57dd4ce75b1cb5b8259ebe6613acf2 100644 (file)
@@ -277,11 +277,11 @@ public:
                               const wxRect& rect,
                               int flags = 0) = 0;
 
-    // Draw a native wxRadioButton (just the graphical portion)
-    virtual void DrawRadioButton(wxWindow* win,
-                                  wxDC& dc,
-                                  const wxRect& rect,
-                                  int flags = 0) = 0;
+    // Draw a native wxRadioButton bitmap
+    virtual void DrawRadioBitmap(wxWindow* win,
+                                 wxDC& dc,
+                                 const wxRect& rect,
+                                 int flags = 0) = 0;
 
     // geometry functions
     // ------------------
@@ -443,11 +443,11 @@ public:
                               int flags = 0)
         { m_rendererNative.DrawTextCtrl( win, dc, rect, flags); }
 
-    virtual void DrawRadioButton(wxWindow* win,
-                                  wxDC& dc,
-                                  const wxRect& rect,
-                                  int flags = 0)
-        { m_rendererNative.DrawRadioButton( win, dc, rect, flags); }
+    virtual void DrawRadioBitmap(wxWindow* win,
+                                 wxDC& dc,
+                                 const wxRect& rect,
+                                 int flags = 0)
+        { m_rendererNative.DrawRadioBitmap(win, dc, rect, flags); }
 
     virtual wxSplitterRenderParams GetSplitterParams(const wxWindow *win)
         { return m_rendererNative.GetSplitterParams(win); }
index ddbf384e5acf70cc0b60e45102e21a45f3f06e86..cec9197297d695f5fa1e5a234d61316e75b165f4 100644 (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)
index 0d0803e4f48f0647c44e35fd2f6d9b211e800f2d..b5d3fd3b83c17f6f61ab31d3082f2c3851dbf453 100644 (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.
index c2c74c54bf76082ff6f911b3d68d5e727f471cf7..77dabb8f0b11596c28bbd9090a26c2c0c80e3aa4 100644 (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),
index a70d4e35b70089fb21749fe34d9616768f77ae46..9889c5e4dae1c39c5e778418fb4bf56edfc3e127 100644 (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();
 
index 8c31c761927c3a0cc4684f852283bf37e6efc17f..2408a16dd8ddda0e03ea3940cf4b04ba2021d8dd 100644 (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");
index 49e9c1824498e7b717e687814d88c56b1f07c27e..b0138ca631aba0c03fe230dcca39e76f7b706e06 100644 (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;
index 89d9fd33f1a5b863a365afbe33522172a7b1535e..35d3924f79f1c4fdefd25f0a7049b8da5b02ec44 100644 (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,9 +997,9 @@ void wxGTKRenderer::DrawCheckBitmap(wxDC& dc, const wxRect& rectTotal)
     dc.DrawRectangle(rect);
 }
 
-void wxGTKRenderer::DrawRadioBitmap(wxDC& dc,
-                                    const wxRect& rect,
-                                    int flags)
+void wxGTKRenderer::DrawRadioButtonBitmap(wxDC& dc,
+                                          const wxRect& rect,
+                                          int flags)
 {
     wxCoord x = rect.x,
             y = rect.y,
@@ -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;