]> git.saurik.com Git - wxWidgets.git/blobdiff - src/dfb/dcmemory.cpp
Rename wxWebHistoryItem to wxWebViewHistoryItem.
[wxWidgets.git] / src / dfb / dcmemory.cpp
index 435667e3cd9794bf7ea4ef89b4cffd5a6254351e..8929ca41ce5501fb559dce2e8165998431937f68 100644 (file)
@@ -1,6 +1,6 @@
 /////////////////////////////////////////////////////////////////////////////
 // Name:        src/dfb/dcmemory.cpp
-// Purpose:     wxMemoryDC implementation
+// Purpose:     wxMemoryDCImpl implementation
 // Author:      Vaclav Slavik
 // Created:     2006-08-16
 // RCS-ID:      $Id$
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
-#include "wx/dcmemory.h"
-
 #ifndef WX_PRECOMP
     #include "wx/bitmap.h"
 #endif
 
+#include "wx/dcmemory.h"
+#include "wx/dfb/dcmemory.h"
 #include "wx/dfb/private.h"
 
 // ===========================================================================
 // ===========================================================================
 
 //-----------------------------------------------------------------------------
-// wxMemoryDC
+// wxMemoryDCImpl
 //-----------------------------------------------------------------------------
 
-#warning "FIXME: verify/fix that wxMemoryDC works correctly with mono bitmaps"
+#warning "FIXME: verify/fix that wxMemoryDCImpl works correctly with mono bitmaps"
+
+IMPLEMENT_ABSTRACT_CLASS(wxMemoryDCImpl, wxDFBDCImpl)
+
+void wxMemoryDCImpl::Init()
+{
+}
 
-IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC, wxDC)
+wxMemoryDCImpl::wxMemoryDCImpl(wxMemoryDC *owner)
+              : wxDFBDCImpl(owner)
+{
+    Init();
+}
 
-wxMemoryDC::wxMemoryDC()
+wxMemoryDCImpl::wxMemoryDCImpl(wxMemoryDC *owner, wxBitmap& bitmap)
+              : wxDFBDCImpl(owner)
 {
+    Init();
+    DoSelect(bitmap);
 }
 
-wxMemoryDC::wxMemoryDC(wxDC *WXUNUSED(dc))
+wxMemoryDCImpl::wxMemoryDCImpl(wxMemoryDC *owner, wxDC *WXUNUSED(dc))
+              : wxDFBDCImpl(owner)
 {
 }
 
-void wxMemoryDC::SelectObject(const wxBitmap& bitmap)
+void wxMemoryDCImpl::DoSelect(const wxBitmap& bitmap)
 {
-    if ( !bitmap.Ok() )
+    m_bmp = bitmap;
+
+    if ( !bitmap.IsOk() )
     {
         // select the bitmap out of the DC
         m_surface = NULL;
@@ -57,5 +73,5 @@ void wxMemoryDC::SelectObject(const wxBitmap& bitmap)
     }
 
     // init the DC for drawing to this bitmap
-    Init(bitmap.GetDirectFBSurface());
+    DFBInit(bitmap.GetDirectFBSurface());
 }