]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/themes/metal.cpp
Applied [ 1223122 ] [wxMSW] Proper repainting when resizing - take 2
[wxWidgets.git] / src / univ / themes / metal.cpp
index 687a6847e3d39643a9e12912faa44f67b2005513..68ccc97db4402d4a3d0a9b8dcc6d75bd0ff24b68 100644 (file)
@@ -79,18 +79,18 @@ class wxMetalRenderer : public wxDelegateRenderer
         Arrow_Normal,
         Arrow_Disabled,
         Arrow_Pressed,
-        Arrow_Inversed,
-        Arrow_InversedDisabled,
+        Arrow_Inverted,
+        Arrow_InvertedDisabled,
         Arrow_StateMax
     };
 public:
     wxMetalRenderer(wxRenderer *renderer, wxColourScheme* scheme);
 
     virtual void DrawButtonSurface(wxDC& dc,
-                                   const wxColour& col,
+                                   const wxColour& WXUNUSED(col),
                                    const wxRect& rect,
-                                   int flags )
-        { DrawMetal( dc, rect ); }
+                                   int WXUNUSED(flags))
+        { DrawMetal(dc, rect); }
 
     virtual void DrawScrollbarThumb(wxDC& dc,
                                     wxOrientation orient,
@@ -122,7 +122,7 @@ protected:
     void DrawShadedRect(wxDC& dc, wxRect *rect,
                         const wxPen& pen1, const wxPen& pen2);
 
-    void DrawArrowBorder(wxDC& dc, wxRect *rect, bool isPressed = FALSE);
+    void DrawArrowBorder(wxDC& dc, wxRect *rect, bool isPressed = false);
 
     void DrawArrow(wxDC& dc, const wxRect& rect,
                    wxArrowDirection arrowDir, wxArrowStyle arrowStyle);
@@ -141,7 +141,7 @@ private:
 // wxMetalTheme
 // ----------------------------------------------------------------------------
 
-WX_DEFINE_ARRAY(wxInputHandler *, wxArrayHandlers);
+WX_DEFINE_ARRAY_PTR(wxInputHandler *, wxArrayHandlers);
 
 class wxMetalTheme : public wxTheme
 {
@@ -163,7 +163,7 @@ private:
 private:
     wxTheme *m_win32Theme;
     wxMetalRenderer *m_renderer;
-    
+
     WX_DECLARE_THEME(Metal)
 };
 
@@ -366,31 +366,31 @@ wxMetalRenderer::wxMetalRenderer(wxRenderer *renderer, wxColourScheme *scheme)
 
         }
 
-        // create the inversed bitmap but only for the right arrow as we only
+        // create the inverted bitmap but only for the right arrow as we only
         // use it for the menus
         if ( n == Arrow_Right )
         {
-            m_bmpArrows[Arrow_Inversed][n].Create(w, h);
-            dcInverse.SelectObject(m_bmpArrows[Arrow_Inversed][n]);
+            m_bmpArrows[Arrow_Inverted][n].Create(w, h);
+            dcInverse.SelectObject(m_bmpArrows[Arrow_Inverted][n]);
             dcInverse.Clear();
             dcInverse.Blit(0, 0, w, h,
                           &dcNormal, 0, 0,
                           wxXOR);
             dcInverse.SelectObject(wxNullBitmap);
 
-            mask = new wxMask(m_bmpArrows[Arrow_Inversed][n], *wxBLACK);
-            m_bmpArrows[Arrow_Inversed][n].SetMask(mask);
+            mask = new wxMask(m_bmpArrows[Arrow_Inverted][n], *wxBLACK);
+            m_bmpArrows[Arrow_Inverted][n].SetMask(mask);
 
-            m_bmpArrows[Arrow_InversedDisabled][n].Create(w, h);
-            dcInverse.SelectObject(m_bmpArrows[Arrow_InversedDisabled][n]);
+            m_bmpArrows[Arrow_InvertedDisabled][n].Create(w, h);
+            dcInverse.SelectObject(m_bmpArrows[Arrow_InvertedDisabled][n]);
             dcInverse.Clear();
             dcInverse.Blit(0, 0, w, h,
                           &dcDisabled, 0, 0,
                           wxXOR);
             dcInverse.SelectObject(wxNullBitmap);
 
-            mask = new wxMask(m_bmpArrows[Arrow_InversedDisabled][n], *wxBLACK);
-            m_bmpArrows[Arrow_InversedDisabled][n].SetMask(mask);
+            mask = new wxMask(m_bmpArrows[Arrow_InvertedDisabled][n], *wxBLACK);
+            m_bmpArrows[Arrow_InvertedDisabled][n].SetMask(mask);
         }
 
         dcNormal.SelectObject(wxNullBitmap);
@@ -406,9 +406,9 @@ wxMetalRenderer::wxMetalRenderer(wxRenderer *renderer, wxColourScheme *scheme)
 }
 
 void wxMetalRenderer::DrawScrollbarThumb(wxDC& dc,
-                                         wxOrientation orient,
+                                         wxOrientation WXUNUSED(orient),
                                          const wxRect& rect,
-                                         int flags)
+                                         int WXUNUSED(flags))
 {
     // we don't use the flags, the thumb never changes appearance
     wxRect rectThumb = rect;
@@ -417,15 +417,15 @@ void wxMetalRenderer::DrawScrollbarThumb(wxDC& dc,
 }
 
 void wxMetalRenderer::DrawScrollbarShaft(wxDC& dc,
-                                         wxOrientation orient,
+                                         wxOrientation WXUNUSED(orient),
                                          const wxRect& rectBar,
-                                         int flags)
+                                         int WXUNUSED(flags))
 {
-    DrawMetal( dc, rectBar );
+    DrawMetal(dc, rectBar);
 }
 
 void wxMetalRenderer::GetComboBitmaps(wxBitmap *bmpNormal,
-                                      wxBitmap *bmpFocus,
+                                      wxBitmap * WXUNUSED(bmpFocus),
                                       wxBitmap *bmpPressed,
                                       wxBitmap *bmpDisabled)
 {
@@ -575,7 +575,7 @@ void wxMetalRenderer::DrawArrow(wxDC& dc,
         x--;
 
     // draw it
-    dc.DrawBitmap(bmp, x, y, TRUE /* use mask */);
+    dc.DrawBitmap(bmp, x, y, true /* use mask */);
 }
 
 // ----------------------------------------------------------------------------
@@ -587,7 +587,7 @@ void wxMetalRenderer::DrawMetal(wxDC &dc, const wxRect &rect )
     dc.SetPen(*wxTRANSPARENT_PEN);
     for (int y = rect.y; y < rect.height+rect.y; y++)
     {
-       int intens = 230 + 80 * (rect.y-y) / rect.height;
+       unsigned char intens = (unsigned char)(230 + 80 * (rect.y-y) / rect.height);
        dc.SetBrush( wxBrush( wxColour(intens,intens,intens), wxSOLID ) );
        dc.DrawRectangle( rect.x, y, rect.width, 1 );
     }