1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/dcmemory.h
3 // Purpose: wxMemoryDC class
4 // Author: Julian Smart
7 // Copyright: (c) Julian Smart
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_DCMEMORY_H_
12 #define _WX_DCMEMORY_H_
14 #include "wx/dcmemory.h"
15 #include "wx/msw/dc.h"
17 class WXDLLIMPEXP_CORE wxMemoryDCImpl
: public wxMSWDCImpl
20 wxMemoryDCImpl( wxMemoryDC
*owner
);
21 wxMemoryDCImpl( wxMemoryDC
*owner
, wxBitmap
& bitmap
);
22 wxMemoryDCImpl( wxMemoryDC
*owner
, wxDC
*dc
); // Create compatible DC
24 // override some base class virtuals
25 virtual void DoDrawRectangle(wxCoord x
, wxCoord y
, wxCoord width
, wxCoord height
);
26 virtual void DoGetSize(int* width
, int* height
) const;
27 virtual void DoSelect(const wxBitmap
& bitmap
);
29 virtual wxBitmap
DoGetAsBitmap(const wxRect
* subrect
) const
30 { return subrect
== NULL
? GetSelectedBitmap() : GetSelectedBitmap().GetSubBitmapOfHDC(*subrect
, GetHDC() );}
33 // create DC compatible with the given one or screen if dc == NULL
34 bool CreateCompatible(wxDC
*dc
);
36 // initialize the newly created DC
39 DECLARE_CLASS(wxMemoryDCImpl
)
40 wxDECLARE_NO_COPY_CLASS(wxMemoryDCImpl
);