]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/statbmpg.cpp
Disable some wxWebView tests that fail on the buildbot but not locally.
[wxWidgets.git] / src / generic / statbmpg.cpp
index 2a094d91eab9ef124ba46c09a9da73a382f0dec3..735c0b9d32ca8ea8f37766334ccc0f037f5130ba 100644 (file)
@@ -1,6 +1,6 @@
 ///////////////////////////////////////////////////////////////////////////////
-// Name:        src/generic/statbmp.cpp
-// Purpose:     wxGenericStaticBitmap 
+// Name:        src/generic/statbmpg.cpp
+// Purpose:     wxGenericStaticBitmap
 // Author:      Marcin Wojdyr, Stefan Csomor
 // Created:     2008-06-16
 // RCS-ID:      $Id$
 
 #if wxUSE_STATBMP
 
-#include "wx/generic/statbmpg.h"
-
+#ifndef WX_PRECOMP
+    #include "wx/dcclient.h"
+#endif
 
-IMPLEMENT_DYNAMIC_CLASS(wxGenericStaticBitmap, wxStaticBitmapBase)
+#include "wx/generic/statbmpg.h"
 
-bool wxGenericStaticBitmap::Create(wxWindow *parent, wxWindowID id, 
+bool wxGenericStaticBitmap::Create(wxWindow *parent, wxWindowID id,
                                    const wxBitmap& bitmap,
                                    const wxPoint& pos, const wxSize& size,
                                    long style, const wxString& name)
 {
-    if (! wxControl::Create(parent, id, pos, size, style, 
+    if (! wxControl::Create(parent, id, pos, size, style,
                             wxDefaultValidator, name))
         return false;
     SetBitmap(bitmap);
@@ -33,10 +34,16 @@ bool wxGenericStaticBitmap::Create(wxWindow *parent, wxWindowID id,
 void wxGenericStaticBitmap::OnPaint(wxPaintEvent& WXUNUSED(event))
 {
     wxPaintDC dc(this);
-    PrepareDC(dc);
-    if (m_bitmap.Ok())
+    if (m_bitmap.IsOk())
         dc.DrawBitmap(m_bitmap, 0, 0, true);
 }
 
+// under OSX_cocoa is a define, avoid duplicate info
+#ifndef wxGenericStaticBitmap
+
+IMPLEMENT_DYNAMIC_CLASS(wxGenericStaticBitmap, wxStaticBitmapBase)
+
+#endif
+
 #endif // wxUSE_STATBMP