+wxDCImpl* wxNativeDCFactory::CreateScreenDC( wxScreenDC *owner )
+{
+ return new wxScreenDCImpl( owner );
+}
+
+#if wxUSE_PRINTING_ARCHITECTURE
+wxDCImpl *wxNativeDCFactory::CreatePrinterDC( wxPrinterDC *owner, const wxPrintData &data )
+{
+ wxPrintFactory *factory = wxPrintFactory::GetFactory();
+ return factory->CreatePrinterDCImpl( owner, data );
+}
+#endif
+
+//-----------------------------------------------------------------------------
+// wxWindowDC
+//-----------------------------------------------------------------------------
+
+IMPLEMENT_ABSTRACT_CLASS(wxWindowDC, wxDC)
+
+wxWindowDC::wxWindowDC(wxWindow *win)
+ : wxDC(wxDCFactory::Get()->CreateWindowDC(this, win))
+{
+}
+
+//-----------------------------------------------------------------------------
+// wxClientDC
+//-----------------------------------------------------------------------------
+
+IMPLEMENT_ABSTRACT_CLASS(wxClientDC, wxWindowDC)
+
+wxClientDC::wxClientDC(wxWindow *win)
+ : wxWindowDC(wxDCFactory::Get()->CreateClientDC(this, win))
+{
+}
+
+//-----------------------------------------------------------------------------
+// wxMemoryDC
+//-----------------------------------------------------------------------------
+
+IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC, wxDC)
+
+wxMemoryDC::wxMemoryDC()
+ : wxDC(wxDCFactory::Get()->CreateMemoryDC(this))
+{
+}
+
+wxMemoryDC::wxMemoryDC(wxBitmap& bitmap)
+ : wxDC(wxDCFactory::Get()->CreateMemoryDC(this, bitmap))
+{
+}
+
+wxMemoryDC::wxMemoryDC(wxDC *dc)
+ : wxDC(wxDCFactory::Get()->CreateMemoryDC(this, dc))
+{
+}
+
+void wxMemoryDC::SelectObject(wxBitmap& bmp)
+{
+ // make sure that the given wxBitmap is not sharing its data with other
+ // wxBitmap instances as its contents will be modified by any drawing
+ // operation done on this DC
+ if (bmp.IsOk())
+ bmp.UnShare();
+
+ GetImpl()->DoSelect(bmp);
+}
+
+void wxMemoryDC::SelectObjectAsSource(const wxBitmap& bmp)
+{
+ GetImpl()->DoSelect(bmp);
+}
+
+const wxBitmap& wxMemoryDC::GetSelectedBitmap() const
+{
+ return GetImpl()->GetSelectedBitmap();
+}
+
+wxBitmap& wxMemoryDC::GetSelectedBitmap()
+{
+ return GetImpl()->GetSelectedBitmap();
+}
+
+
+//-----------------------------------------------------------------------------
+// wxPaintDC
+//-----------------------------------------------------------------------------
+
+IMPLEMENT_ABSTRACT_CLASS(wxPaintDC, wxClientDC)
+
+wxPaintDC::wxPaintDC(wxWindow *win)
+ : wxClientDC(wxDCFactory::Get()->CreatePaintDC(this, win))
+{
+}
+
+//-----------------------------------------------------------------------------
+// wxScreenDC
+//-----------------------------------------------------------------------------
+
+IMPLEMENT_DYNAMIC_CLASS(wxScreenDC, wxWindowDC)
+
+wxScreenDC::wxScreenDC()
+ : wxDC(wxDCFactory::Get()->CreateScreenDC(this))
+{
+}
+
+//-----------------------------------------------------------------------------
+// wxPrinterDC
+//-----------------------------------------------------------------------------
+
+#if wxUSE_PRINTING_ARCHITECTURE
+
+IMPLEMENT_DYNAMIC_CLASS(wxPrinterDC, wxDC)
+
+wxPrinterDC::wxPrinterDC()
+ : wxDC(wxDCFactory::Get()->CreatePrinterDC(this, wxPrintData()))
+{
+}
+
+wxPrinterDC::wxPrinterDC(const wxPrintData& data)
+ : wxDC(wxDCFactory::Get()->CreatePrinterDC(this, data))
+{
+}
+
+wxRect wxPrinterDC::GetPaperRect() const
+{
+ return GetImpl()->GetPaperRect();
+}
+
+int wxPrinterDC::GetResolution() const
+{
+ return GetImpl()->GetResolution();
+}
+
+#endif // wxUSE_PRINTING_ARCHITECTURE
+
+//-----------------------------------------------------------------------------
+// wxDCImpl
+//-----------------------------------------------------------------------------
+
+IMPLEMENT_ABSTRACT_CLASS(wxDCImpl, wxObject)
+
+wxDCImpl::wxDCImpl( wxDC *owner )
+ : m_window(NULL)
+ , m_colour(wxColourDisplay())