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