]> git.saurik.com Git - wxWidgets.git/commitdiff
Restore DrawRadioButton to the main wxRenderer API, create a method overload for...
authorKevin Ollivier <kevino@theolliviers.com>
Thu, 12 Feb 2009 01:06:53 +0000 (01:06 +0000)
committerKevin Ollivier <kevino@theolliviers.com>
Thu, 12 Feb 2009 01:06:53 +0000 (01:06 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58825 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

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

index fed5b7f699d6bca86dd8ddf68c793cf6fc56422a..16bd75f9bf1ff16701f5369cc3134aa6447711b0 100644 (file)
@@ -278,7 +278,7 @@ public:
                               int flags = 0) = 0;
 
     // Draw a native wxRadioButton (just the graphical portion)
-    virtual void DrawOptionButton(wxWindow* win,
+    virtual void DrawRadioButton(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 DrawOptionButton(wxWindow* win,
+    virtual void DrawRadioButton(wxWindow* win,
                                   wxDC& dc,
                                   const wxRect& rect,
                                   int flags = 0)
-        { m_rendererNative.DrawOptionButton( win, dc, rect, flags); }
+        { m_rendererNative.DrawRadioButton( win, dc, rect, flags); }
 
     virtual wxSplitterRenderParams GetSplitterParams(const wxWindow *win)
         { return m_rendererNative.GetSplitterParams(win); }
index cec9197297d695f5fa1e5a234d61316e75b165f4..ddbf384e5acf70cc0b60e45102e21a45f3f06e86 100644 (file)
@@ -208,6 +208,13 @@ 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 b055226017e367a2fa55c1608ca80148a870b721..4fcd52f56f57e2eaa33d46bd6ccca1436d8ce2d9 100644 (file)
@@ -118,7 +118,7 @@ public:
 
     virtual void DrawTextCtrl(wxWindow* win, wxDC& dc, const wxRect& rect, int flags=0);
 
-    virtual void DrawOptionButton(wxWindow* win, wxDC& dc, const wxRect& rect, int flags=0);
+    virtual void DrawRadioButton(wxWindow* win, wxDC& dc, const wxRect& rect, int flags=0);
 
     virtual wxSplitterRenderParams GetSplitterParams(const wxWindow *win);
 
@@ -743,7 +743,7 @@ void wxRendererGeneric::DrawComboBox(wxWindow* WXUNUSED(win), wxDC& WXUNUSED(dc)
     wxFAIL_MSG("UNIMPLEMENTED: wxRendererGeneric::DrawComboBox");
 }
 
-void wxRendererGeneric::DrawOptionButton(wxWindow* WXUNUSED(win), wxDC& WXUNUSED(dc),
+void wxRendererGeneric::DrawRadioButton(wxWindow* WXUNUSED(win), wxDC& WXUNUSED(dc),
                            const wxRect& WXUNUSED(rect), int WXUNUSED(flags))
 {
     wxFAIL_MSG("UNIMPLEMENTED: wxRendererGeneric::DrawRadioButton");
index 2411e870adc55aab84f836c142405ed474fc42be..a70d4e35b70089fb21749fe34d9616768f77ae46 100644 (file)
@@ -114,7 +114,7 @@ public:
                                 const wxRect& rect,
                                 int flags=0);
 
-    virtual void DrawOptionButton(wxWindow* win,
+    virtual void DrawRadioButton(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::DrawOptionButton(wxWindow* win, wxDC& dc, const wxRect& rect, int flags)
+void wxRendererGTK::DrawRadioButton(wxWindow* win, wxDC& dc, const wxRect& rect, int flags)
 {
     GtkWidget *button = wxGTKPrivate::GetRadioButtonWidget();
 
index cc98ee5651f900b920adf7ea6492c3eacba9ae40..f8e770f4254746d2ccf853e718b52c2d7d2a0aac 100644 (file)
@@ -100,7 +100,7 @@ public:
 
     virtual void DrawTextCtrl(wxWindow* win, wxDC& dc, const wxRect& rect, int flags=0);
 
-    virtual void DrawOptionButton(wxWindow* win, wxDC& dc, const wxRect& rect, int flags=0);
+    virtual void DrawRadioButton(wxWindow* win, wxDC& dc, const wxRect& rect, int flags=0);
 
 private:
     void DrawMacThemeButton(wxWindow *win,
@@ -500,7 +500,7 @@ void wxRendererMac::DrawComboBox(wxWindow* win, wxDC& dc,
     DrawMacThemeButton(win, dc, rect, flags, kind, kThemeAdornmentNone);
 }
 
-void wxRendererMac::DrawOptionButton(wxWindow* win, wxDC& dc,
+void wxRendererMac::DrawRadioButton(wxWindow* win, wxDC& dc,
                                 const wxRect& rect, int flags)
 {
     int kind;