]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/stdrend.cpp
Move code removing "-psn_xxx" command line arguments to common code.
[wxWidgets.git] / src / univ / stdrend.cpp
index 082cf1b88485889ed0a4eadb48c468d06837a1b3..7f5451855dc55501168da3fb6e739f7120834aff 100644 (file)
@@ -3,7 +3,6 @@
 // Purpose:     implementation of wxStdRenderer
 // Author:      Vadim Zeitlin
 // Created:     2006-09-16
-// RCS-ID:      $Id$
 // Copyright:   (c) 2006 Vadim Zeitlin <vadim@wxwindows.org>
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -151,7 +150,7 @@ wxStdRenderer::ArrowDirection wxStdRenderer::GetArrowDirection(wxDirection dir)
             return Arrow_Down;
 
         default:
-            wxFAIL_MSG(_T("unknown arrow direction"));
+            wxFAIL_MSG(wxT("unknown arrow direction"));
     }
 
     return Arrow_Max;
@@ -169,7 +168,7 @@ void wxStdRenderer::DrawBackground(wxDC& dc,
 {
     wxColour colBg;
 
-    if (col.Ok())
+    if (col.IsOk())
     {
         colBg = col;
     }
@@ -413,13 +412,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);
@@ -434,7 +437,7 @@ void wxStdRenderer::DrawBorder(wxDC& dc,
             break;
 
         default:
-            wxFAIL_MSG(_T("unknown border type"));
+            wxFAIL_MSG(wxT("unknown border type"));
             // fall through
 
         case wxBORDER_DEFAULT:
@@ -458,15 +461,16 @@ 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"));
+            wxFAIL_MSG(wxT("unknown border type"));
             // fall through
 
         case wxBORDER_DEFAULT:
@@ -673,7 +677,7 @@ void wxStdRenderer::DrawCheckButton(wxDC& dc,
                                     wxAlignment align,
                                     int indexAccel)
 {
-    if (bitmap.Ok())
+    if (bitmap.IsOk())
         DrawCheckOrRadioButton(dc, label, bitmap, rect, flags, align, indexAccel);
     else
         DrawCheckOrRadioButton(dc, label, GetCheckBitmap(flags), rect, flags, align, indexAccel);
@@ -687,11 +691,11 @@ void wxStdRenderer::DrawRadioButton(wxDC& dc,
                                     wxAlignment align,
                                     int indexAccel)
 {
-    if (bitmap.Ok())
+    if (bitmap.IsOk())
         DrawCheckOrRadioButton(dc, label, bitmap, rect, flags, align, indexAccel);
     else
         DrawCheckOrRadioButton(dc, label, GetRadioBitmap(flags), rect, flags, align, indexAccel);
-    
+
 }
 
 void wxStdRenderer::DrawCheckOrRadioButton(wxDC& dc,
@@ -857,7 +861,7 @@ wxSize wxStdRenderer::GetStatusBarBorders() const
     wxRect flat = GetBorderDimensions(wxBORDER_STATIC);
     wxASSERT_MSG( raised.x == raised.width && raised.y == raised.height &&
                   flat.x == flat.width && flat.y == flat.height,
-                  _T("this code expects uniform borders, you must override GetStatusBarBorders") );
+                  wxT("this code expects uniform borders, you must override GetStatusBarBorders") );
 
     // take the larger of flat/raised values:
     wxSize border(wxMax(raised.x, flat.x), wxMax(raised.y, flat.y));
@@ -887,6 +891,8 @@ void wxStdRenderer::DrawStatusField(wxDC& dc,
         DrawBorder(dc, wxBORDER_RAISED, rect, flags, &rectIn);
     else if ( style != wxSB_FLAT )
         DrawBorder(dc, wxBORDER_STATIC, rect, flags, &rectIn);
+    else
+        rectIn = rect;
 
     rectIn.Deflate(GetStatusBarFieldMargins());
 
@@ -1141,7 +1147,7 @@ void wxStdRenderer::DrawFrameIcon(wxDC& dc,
                                   const wxIcon& icon,
                                   int flags)
 {
-    if ( icon.Ok() )
+    if ( icon.IsOk() )
     {
         wxRect r = GetFrameClientArea(rect, flags & ~wxTOPLEVEL_TITLEBAR);
         dc.DrawIcon(icon, r.x, r.y);
@@ -1167,7 +1173,7 @@ void wxStdRenderer::DrawFrameButton(wxDC& dc,
     }
 
     wxBitmap bmp = GetFrameButtonBitmap(idx);
-    if ( !bmp.Ok() )
+    if ( !bmp.IsOk() )
         return;
 
     wxRect rectBtn(x, y, FRAME_BUTTON_WIDTH, FRAME_BUTTON_HEIGHT);