]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/stdrend.cpp
Simplistic tab support is now default (tab focuses editor if unfocused, otherwise...
[wxWidgets.git] / src / univ / stdrend.cpp
index ea50847d707876374cf75ea273e1387eb763d675..0159f76d777e155a4aaf312cf01542c3c342af8c 100644 (file)
@@ -199,7 +199,7 @@ void wxStdRenderer::DrawButtonSurface(wxDC& dc,
 // ----------------------------------------------------------------------------
 
 void
-wxStdRenderer::DrawFocusRect(wxDC& dc, const wxRect& rect, int WXUNUSED(flags))
+wxStdRenderer::DrawFocusRect(wxWindow* WXUNUSED(win), wxDC& dc, const wxRect& rect, int WXUNUSED(flags))
 {
     // draw the pixels manually because the "dots" in wxPen with wxDOT style
     // may be short traits and not really dots
@@ -290,7 +290,7 @@ void wxStdRenderer::DrawButtonLabel(wxDC& dc,
     {
         rectLabel.Inflate(-1);
 
-        DrawFocusRect(dc, rectLabel);
+        DrawFocusRect(NULL, dc, rectLabel);
     }
 }
 
@@ -413,13 +413,17 @@ void wxStdRenderer::DrawBorder(wxDC& dc,
     switch ( border )
     {
         case wxBORDER_SUNKEN:
+        case wxBORDER_THEME:
             DrawSunkenBorder(dc, &rect);
             break;
 
+        // wxBORDER_DOUBLE and wxBORDER_THEME are currently the same value.
+#if 0
         case wxBORDER_DOUBLE:
             DrawAntiSunkenBorder(dc, &rect);
             DrawExtraBorder(dc, &rect);
             break;
+#endif
 
         case wxBORDER_STATIC:
             DrawStaticBorder(dc, &rect);
@@ -458,13 +462,14 @@ wxRect wxStdRenderer::GetBorderDimensions(wxBorder border) const
 
         case wxBORDER_RAISED:
         case wxBORDER_SUNKEN:
+        case wxBORDER_THEME:
             width = 2;
             break;
-
+#if 0
         case wxBORDER_DOUBLE:
             width = 3;
             break;
-
+#endif
         default:
             wxFAIL_MSG(_T("unknown border type"));
             // fall through
@@ -632,7 +637,7 @@ void wxStdRenderer::DrawItem(wxDC& dc,
 
     if ( flags & wxCONTROL_FOCUSED )
     {
-        DrawFocusRect(dc, rect, flags);
+        DrawFocusRect(NULL, dc, rect, flags);
     }
 }
 
@@ -673,9 +678,10 @@ void wxStdRenderer::DrawCheckButton(wxDC& dc,
                                     wxAlignment align,
                                     int indexAccel)
 {
-    wxBitmap bmp(bitmap.Ok() ? bitmap : GetCheckBitmap(flags));
-
-    DrawCheckOrRadioButton(dc, label, bmp, rect, flags, align, indexAccel);
+    if (bitmap.Ok())
+        DrawCheckOrRadioButton(dc, label, bitmap, rect, flags, align, indexAccel);
+    else
+        DrawCheckOrRadioButton(dc, label, GetCheckBitmap(flags), rect, flags, align, indexAccel);
 }
 
 void wxStdRenderer::DrawRadioButton(wxDC& dc,
@@ -686,9 +692,11 @@ void wxStdRenderer::DrawRadioButton(wxDC& dc,
                                     wxAlignment align,
                                     int indexAccel)
 {
-    wxBitmap bmp(bitmap.Ok() ? bitmap : GetRadioBitmap(flags));
+    if (bitmap.Ok())
+        DrawCheckOrRadioButton(dc, label, bitmap, rect, flags, align, indexAccel);
+    else
+        DrawCheckOrRadioButton(dc, label, GetRadioBitmap(flags), rect, flags, align, indexAccel);
 
-    DrawCheckOrRadioButton(dc, label, bmp, rect, flags, align, indexAccel);
 }
 
 void wxStdRenderer::DrawCheckOrRadioButton(wxDC& dc,