]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/themes/gtk.cpp
corrected warnings when compiled with -Wall -W
[wxWidgets.git] / src / univ / themes / gtk.cpp
index 0fb2adda78faca0d8cf33afa426fa59afbf66168..ab9a0db5b4a5df946c981a20106404806add9b6d 100644 (file)
@@ -77,7 +77,8 @@ public:
     virtual void DrawBackground(wxDC& dc,
                                 const wxColour& col,
                                 const wxRect& rect,
-                                int flags = 0);
+                                int flags = 0,
+                                wxWindow *window = NULL );
     virtual void DrawLabel(wxDC& dc,
                            const wxString& label,
                            const wxRect& rect,
@@ -256,7 +257,7 @@ public:
     virtual wxSize GetFrameMinSize(int flags) const;
     virtual wxSize GetFrameIconSize() const;
     virtual int HitTestFrame(const wxRect& rect, const wxPoint& pt, int flags) const;
-    
+
     virtual void GetComboBitmaps(wxBitmap *bmpNormal,
                                  wxBitmap *bmpFocus,
                                  wxBitmap *bmpPressed,
@@ -336,7 +337,8 @@ protected:
     // draw the background with any colour, not only the default one(s)
     void DoDrawBackground(wxDC& dc,
                           const wxColour& col,
-                          const wxRect& rect);
+                          const wxRect& rect,
+                          wxWindow *window = NULL);
 
     // DrawBorder() helpers: all of them shift and clip the DC after drawing
     // the border
@@ -599,7 +601,7 @@ private:
     wxInputHandler *GetDefaultInputHandler();
 
     wxGTKRenderer *m_renderer;
-    
+
     wxGTKArtProvider *m_artProvider;
 
     // the names of the already created handlers and the handlers themselves
@@ -629,6 +631,7 @@ wxGTKTheme::wxGTKTheme()
     m_scheme = NULL;
     m_renderer = NULL;
     m_handlerDefault = NULL;
+    m_artProvider = NULL;
 }
 
 wxGTKTheme::~wxGTKTheme()
@@ -643,6 +646,7 @@ wxGTKTheme::~wxGTKTheme()
     delete m_handlerDefault;
     delete m_renderer;
     delete m_scheme;
+    wxArtProvider::RemoveProvider(m_artProvider);
 }
 
 wxRenderer *wxGTKTheme::GetRenderer()
@@ -1322,7 +1326,7 @@ void wxGTKRenderer::DrawCheckItem(wxDC& dc,
     DrawCheckButton(dc, _T(""), bitmap, rectBitmap, flags & ~wxCONTROL_FOCUSED);
 
     wxRect rectLabel = rect;
-    wxCoord shift = rectBitmap.width + 2*GetCheckItemMargin(); 
+    wxCoord shift = rectBitmap.width + 2*GetCheckItemMargin();
     rectLabel.x += shift;
     rectLabel.width -= shift;
     DrawItem(dc, label, rectLabel, flags);
@@ -2280,7 +2284,8 @@ void wxGTKRenderer::GetComboBitmaps(wxBitmap *bmpNormal,
 
 void wxGTKRenderer::DoDrawBackground(wxDC& dc,
                                      const wxColour& col,
-                                     const wxRect& rect)
+                                     const wxRect& rect,
+                                     wxWindow *window )
 {
     wxBrush brush(col, wxSOLID);
     dc.SetBrush(brush);
@@ -2291,10 +2296,11 @@ void wxGTKRenderer::DoDrawBackground(wxDC& dc,
 void wxGTKRenderer::DrawBackground(wxDC& dc,
                                    const wxColour& col,
                                    const wxRect& rect,
-                                   int flags)
+                                   int flags,
+                                   wxWindow *window )
 {
     wxColour colBg = col.Ok() ? col : GetBackgroundColour(flags);
-    DoDrawBackground(dc, colBg, rect);
+    DoDrawBackground(dc, colBg, rect, window );
 }
 
 // ----------------------------------------------------------------------------