]>
Commit | Line | Data |
---|---|---|
1 | ///////////////////////////////////////////////////////////////////////////// | |
2 | // Name: 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 | ||
11 | #ifndef __GTKDCMEMORYH__ | |
12 | #define __GTKDCMEMORYH__ | |
13 | ||
14 | #if defined(__GNUG__) && !defined(__APPLE__) | |
15 | #pragma interface | |
16 | #endif | |
17 | ||
18 | #include "wx/defs.h" | |
19 | #include "wx/dcclient.h" | |
20 | ||
21 | //----------------------------------------------------------------------------- | |
22 | // classes | |
23 | //----------------------------------------------------------------------------- | |
24 | ||
25 | class wxMemoryDC; | |
26 | ||
27 | //----------------------------------------------------------------------------- | |
28 | // wxMemoryDC | |
29 | //----------------------------------------------------------------------------- | |
30 | ||
31 | class wxMemoryDC : public wxWindowDC | |
32 | { | |
33 | public: | |
34 | wxMemoryDC(); | |
35 | wxMemoryDC( wxDC *dc ); // Create compatible DC | |
36 | ~wxMemoryDC(); | |
37 | virtual void SelectObject( const wxBitmap& bitmap ); | |
38 | void DoGetSize( int *width, int *height ) const; | |
39 | ||
40 | // these get reimplemented for mono-bitmaps to behave | |
41 | // more like their Win32 couterparts. They now interpret | |
42 | // wxWHITE, wxWHITE_BRUSH and wxWHITE_PEN as drawing 0 | |
43 | // and everything else as drawing 1. | |
44 | virtual void SetPen( const wxPen &pen ); | |
45 | virtual void SetBrush( const wxBrush &brush ); | |
46 | virtual void SetBackground( const wxBrush &brush ); | |
47 | virtual void SetTextForeground( const wxColour &col ); | |
48 | virtual void SetTextBackground( const wxColour &col ); | |
49 | ||
50 | // implementation | |
51 | wxBitmap m_selected; | |
52 | ||
53 | private: | |
54 | DECLARE_DYNAMIC_CLASS(wxMemoryDC) | |
55 | }; | |
56 | ||
57 | #endif | |
58 | // __GTKDCMEMORYH__ | |
59 |