]>
Commit | Line | Data |
---|---|---|
0e320a79 DW |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: dcmemory.h | |
3 | // Purpose: wxMemoryDC class | |
f0a56ab0 | 4 | // Author: David Webster |
0e320a79 | 5 | // Modified by: |
f0a56ab0 | 6 | // Created: 09/09/99 |
0e320a79 | 7 | // RCS-ID: $Id$ |
f0a56ab0 | 8 | // Copyright: (c) David Webster |
65571936 | 9 | // Licence: wxWindows licence |
0e320a79 DW |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
12 | #ifndef _WX_DCMEMORY_H_ | |
13 | #define _WX_DCMEMORY_H_ | |
14 | ||
2c24e7ad SN |
15 | #include "wx/dcmemory.h" |
16 | #include "wx/os2/dc.h" | |
0e320a79 | 17 | |
53a2db12 | 18 | class WXDLLIMPEXP_CORE wxMemoryDCImpl: public wxPMDCImpl |
0e320a79 | 19 | { |
5afb9458 | 20 | public: |
2c24e7ad SN |
21 | wxMemoryDCImpl( wxMemoryDC *owner ); |
22 | wxMemoryDCImpl( wxMemoryDC *owner, wxBitmap& bitmap ); | |
23 | wxMemoryDCImpl( wxMemoryDC *owner, wxDC* pDC); // Create compatible DC | |
ce44c50e | 24 | |
ac7fb818 | 25 | // override some base class virtuals |
2c24e7ad | 26 | virtual void DoGetSize(int* pWidth, int* pHeight) const; |
fea35690 VZ |
27 | virtual void DoSelect(const wxBitmap& bitmap); |
28 | ||
2c24e7ad SN |
29 | virtual wxBitmap DoGetAsBitmap(const wxRect* subrect) const |
30 | { return subrect == NULL ? GetSelectedBitmap() : GetSelectedBitmap().GetSubBitmap(*subrect);} | |
31 | ||
32 | protected: | |
ac7fb818 DW |
33 | // create DC compatible with the given one or screen if dc == NULL |
34 | bool CreateCompatible(wxDC* pDC); | |
35 | ||
36 | // initialize the newly created DC | |
37 | void Init(void); | |
38 | private: | |
2c24e7ad SN |
39 | DECLARE_CLASS(wxMemoryDCImpl) |
40 | DECLARE_NO_COPY_CLASS(wxMemoryDCImpl) | |
41 | }; // end of CLASS wxMemoryDCImpl | |
0e320a79 DW |
42 | |
43 | #endif | |
44 | // _WX_DCMEMORY_H_ |