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