X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/14f355c2b5c71fc7c3d680aea366582d2ac60f7b..c6a6bbbf637a5a580b7ab182483d27522f5e3189:/src/x11/dcmemory.cpp?ds=sidebyside diff --git a/src/x11/dcmemory.cpp b/src/x11/dcmemory.cpp index 65affeed87..f2019230e0 100644 --- a/src/x11/dcmemory.cpp +++ b/src/x11/dcmemory.cpp @@ -1,30 +1,32 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: dcmemory.cpp +// Name: src/x11/dcmemory.cpp // Purpose: wxMemoryDC class // Author: Julian Smart // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ // Copyright: (c) Julian Smart -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma implementation "dcmemory.h" -#endif +// for compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" #include "wx/dcmemory.h" -#include "wx/settings.h" -#include "wx/utils.h" + +#ifndef WX_PRECOMP + #include "wx/utils.h" + #include "wx/settings.h" +#endif #include "wx/x11/private.h" IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC,wxWindowDC) -wxMemoryDC::wxMemoryDC() : wxWindowDC() +void wxMemoryDC::Init() { - m_ok = FALSE; - + m_ok = false; + m_display = (WXDisplay *) wxGlobalDisplay(); int screen = DefaultScreen( wxGlobalDisplay() ); @@ -34,22 +36,17 @@ wxMemoryDC::wxMemoryDC() : wxWindowDC() wxMemoryDC::wxMemoryDC( wxDC *WXUNUSED(dc) ) : wxWindowDC() { - m_ok = FALSE; - - m_display = (WXDisplay *) wxGlobalDisplay(); - - int screen = DefaultScreen( wxGlobalDisplay() ); - m_cmap = (WXColormap) DefaultColormap( wxGlobalDisplay(), screen ); + Init(); } wxMemoryDC::~wxMemoryDC() { } -void wxMemoryDC::SelectObject( const wxBitmap& bitmap ) +void wxMemoryDC::DoSelect( const wxBitmap& bitmap ) { Destroy(); - + m_selected = bitmap; if (m_selected.Ok()) { @@ -62,13 +59,13 @@ void wxMemoryDC::SelectObject( const wxBitmap& bitmap ) m_window = m_selected.GetBitmap(); } - m_isMemDC = TRUE; + m_isMemDC = true; SetUpDC(); } else { - m_ok = FALSE; + m_ok = false; m_window = NULL; } }