]>
Commit | Line | Data |
---|---|---|
1 | ///////////////////////////////////////////////////////////////////////////// | |
2 | // Name: wx/dfb/dcmemory.h | |
3 | // Purpose: wxMemoryDC class declaration | |
4 | // Created: 2006-08-10 | |
5 | // Author: Vaclav Slavik | |
6 | // RCS-ID: $Id$ | |
7 | // Copyright: (c) 2006 REA Elektronik GmbH | |
8 | // Licence: wxWindows licence | |
9 | ///////////////////////////////////////////////////////////////////////////// | |
10 | ||
11 | #ifndef _WX_DFB_DCMEMORY_H_ | |
12 | #define _WX_DFB_DCMEMORY_H_ | |
13 | ||
14 | #include "wx/dfb/dc.h" | |
15 | #include "wx/bitmap.h" | |
16 | ||
17 | class WXDLLIMPEXP_CORE wxMemoryDCImpl : public wxDFBDCImpl | |
18 | { | |
19 | public: | |
20 | wxMemoryDCImpl(wxMemoryDC *owner) | |
21 | : wxDFBDCImpl(owner) | |
22 | { | |
23 | Init(); | |
24 | } | |
25 | ||
26 | wxMemoryDCImpl(wxMemoryDC *owner, wxBitmap& bitmap) | |
27 | : wxDFBDCImpl(owner) | |
28 | { | |
29 | Init(); | |
30 | DoSelect(bitmap); | |
31 | } | |
32 | ||
33 | wxMemoryDCImpl(wxMemoryDC *owner, wxDC *dc); // create compatible DC | |
34 | ||
35 | // override wxMemoryDC-specific base class virtual methods | |
36 | virtual const wxBitmap& GetSelectedBitmap() const { return m_bmp; } | |
37 | virtual wxBitmap& GetSelectedBitmap() { return m_bmp; } | |
38 | virtual void DoSelect(const wxBitmap& bitmap); | |
39 | ||
40 | private: | |
41 | void Init(); | |
42 | ||
43 | wxBitmap m_bmp; | |
44 | ||
45 | DECLARE_DYNAMIC_CLASS(wxMemoryDCImpl) | |
46 | }; | |
47 | ||
48 | #endif // _WX_DFB_DCMEMORY_H_ | |
49 |