]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk1/dcmemory.h
listctrl generic is used outside of osx-carbon
[wxWidgets.git] / include / wx / gtk1 / dcmemory.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk1/dcmemory.h
3 // Purpose:
4 // Author: Robert Roebling
5 // RCS-ID: $Id$
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
9
10 #ifndef __GTKDCMEMORYH__
11 #define __GTKDCMEMORYH__
12
13 #include "wx/dcmemory.h"
14 #include "wx/gtk1/dcclient.h"
15
16 //-----------------------------------------------------------------------------
17 // classes
18 //-----------------------------------------------------------------------------
19
20 class WXDLLIMPEXP_FWD_CORE wxMemoryDCImpl;
21
22 //-----------------------------------------------------------------------------
23 // wxMemoryDCImpl
24 //-----------------------------------------------------------------------------
25
26 class WXDLLIMPEXP_CORE wxMemoryDCImpl : public wxWindowDCImpl
27 {
28 public:
29 wxMemoryDCImpl(wxMemoryDC *owner)
30 : wxWindowDCImpl(owner)
31 {
32 Init();
33 }
34
35 wxMemoryDCImpl(wxMemoryDC *owner, wxBitmap& bitmap)
36 : wxWindowDCImpl(owner)
37 {
38 Init();
39
40 DoSelect(bitmap);
41 }
42
43 wxMemoryDCImpl(wxMemoryDC *owner, wxDC *dc);
44 virtual ~wxMemoryDCImpl();
45
46 virtual void DoSelect(const wxBitmap& bitmap);
47 virtual void DoGetSize( int *width, int *height ) const;
48
49 // these get reimplemented for mono-bitmaps to behave
50 // more like their Win32 couterparts. They now interpret
51 // wxWHITE, wxWHITE_BRUSH and wxWHITE_PEN as drawing 0
52 // and everything else as drawing 1.
53 virtual void SetPen( const wxPen &pen );
54 virtual void SetBrush( const wxBrush &brush );
55 virtual void SetBackground( const wxBrush &brush );
56 virtual void SetTextForeground( const wxColour &col );
57 virtual void SetTextBackground( const wxColour &col );
58
59 // implementation
60 wxBitmap m_selected;
61
62 private:
63 void Init();
64
65 DECLARE_DYNAMIC_CLASS(wxMemoryDCImpl)
66 };
67
68 #endif // __GTKDCMEMORYH__
69