X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d888a332db4d457178b2def6a0726113aab51a89..fba05595e6cca40763f8ead119c7ad61cb01e0e4:/include/wx/mac/carbon/dcmemory.h?ds=inline diff --git a/include/wx/mac/carbon/dcmemory.h b/include/wx/mac/carbon/dcmemory.h index 58a26fee28..d2eb3d4acc 100644 --- a/include/wx/mac/carbon/dcmemory.h +++ b/include/wx/mac/carbon/dcmemory.h @@ -14,15 +14,16 @@ #include "wx/dcclient.h" -class WXDLLEXPORT wxMemoryDC: public wxPaintDC +class WXDLLEXPORT wxMemoryDC: public wxPaintDC, public wxMemoryDCBase { DECLARE_DYNAMIC_CLASS(wxMemoryDC) - public: - wxMemoryDC( const wxBitmap& bitmap = wxNullBitmap ); +public: + wxMemoryDC() { Init(); } + wxMemoryDC(wxBitmap& bitmap) { Init(); SelectObject(bitmap); } wxMemoryDC( wxDC *dc ); // Create compatible DC virtual ~wxMemoryDC(void); - virtual void SelectObject( const wxBitmap& bitmap ); + const wxBitmap& GetSelectedBitmap() const { return m_selected; } wxBitmap GetSelectedBitmap() { return m_selected; } @@ -32,8 +33,11 @@ protected: virtual void DoGetSize( int *width, int *height ) const; virtual wxBitmap DoGetAsBitmap(const wxRect *subrect) const { return subrect == NULL ? GetSelectedBitmap() : GetSelectedBitmap().GetSubBitmap(*subrect); } + virtual void DoSelect(const wxBitmap& bitmap); + +private: + void Init(); - private: wxBitmap m_selected; };