]>
Commit | Line | Data |
---|---|---|
32b8ec41 VZ |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: dcmemory.h | |
3 | // Purpose: | |
4 | // Author: Vaclav Slavik | |
5 | // RCS-ID: $Id$ | |
52750c2e | 6 | // Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com) |
65571936 | 7 | // Licence: wxWindows licence |
32b8ec41 VZ |
8 | ///////////////////////////////////////////////////////////////////////////// |
9 | ||
32b8ec41 VZ |
10 | #ifndef __WX_DCMEMORY_H__ |
11 | #define __WX_DCMEMORY_H__ | |
12 | ||
32b8ec41 VZ |
13 | #include "wx/defs.h" |
14 | #include "wx/dcclient.h" | |
15 | ||
16 | //----------------------------------------------------------------------------- | |
17 | // classes | |
18 | //----------------------------------------------------------------------------- | |
19 | ||
20 | class WXDLLEXPORT wxMemoryDC; | |
21 | ||
22 | //----------------------------------------------------------------------------- | |
23 | // wxMemoryDC | |
24 | //----------------------------------------------------------------------------- | |
25 | ||
fea35690 | 26 | class WXDLLEXPORT wxMemoryDC : public wxDC, public wxMemoryDCBase |
32b8ec41 VZ |
27 | { |
28 | public: | |
fea35690 VZ |
29 | wxMemoryDC() { Init(); } |
30 | wxMemoryDC(wxBitmap& bitmap) { Init(); SelectObject(bitmap); } | |
32b8ec41 | 31 | wxMemoryDC(wxDC *dc); // Create compatible DC |
d3c7fc99 | 32 | virtual ~wxMemoryDC(); |
32b8ec41 VZ |
33 | |
34 | // these get reimplemented for mono-bitmaps to behave | |
35 | // more like their Win32 couterparts. They now interpret | |
36 | // wxWHITE, wxWHITE_BRUSH and wxWHITE_PEN as drawing 0 | |
37 | // and everything else as drawing 1. | |
38 | virtual void SetPen(const wxPen &pen); | |
39 | virtual void SetBrush(const wxBrush &brush); | |
40 | virtual void SetTextForeground(const wxColour &col); | |
41 | virtual void SetTextBackground(const wxColour &col); | |
42 | ||
43 | // implementation | |
44 | wxBitmap m_selected; | |
45 | ||
46 | wxBitmap GetSelectedObject() const { return m_selected; } | |
47 | ||
fea35690 VZ |
48 | protected: |
49 | virtual void DoSelect(const wxBitmap& bitmap); | |
50 | ||
32b8ec41 | 51 | private: |
fea35690 VZ |
52 | void Init(); |
53 | ||
32b8ec41 VZ |
54 | DECLARE_DYNAMIC_CLASS(wxMemoryDC) |
55 | }; | |
56 | ||
57 | #endif | |
58 | // __WX_DCMEMORY_H__ | |
59 |