/////////////////////////////////////////////////////////////////////////////
-// Name: dcmemory.cpp
+// Name: src/gtk1/dcmemory.cpp
// Purpose:
// Author: Robert Roebling
// RCS-ID: $Id$
IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC,wxWindowDC)
-wxMemoryDC::wxMemoryDC() : wxWindowDC()
+void wxMemoryDC::Init()
{
- m_ok = FALSE;
+ m_ok = false;
m_cmap = gtk_widget_get_default_colormap();
}
wxMemoryDC::wxMemoryDC( wxDC *WXUNUSED(dc) )
- : wxWindowDC()
+ : wxWindowDC()
{
- m_ok = FALSE;
-
- m_cmap = gtk_widget_get_default_colormap();
-
+ Init();
}
wxMemoryDC::~wxMemoryDC()
{
}
-void wxMemoryDC::SelectObject( const wxBitmap& bitmap )
+void wxMemoryDC::DoSelect( const wxBitmap& bitmap )
{
Destroy();
+
m_selected = bitmap;
if (m_selected.Ok())
{
m_window = m_selected.GetBitmap();
}
- m_isMemDC = TRUE;
+ m_isMemDC = true;
SetUpDC();
}
else
{
- m_ok = FALSE;
+ m_ok = false;
m_window = (GdkWindow *) NULL;
}
}
if (height) (*height) = 0;
}
}
-
-