]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk1/dcmemory.h
Make SaveFile and LoadFile virtual so they can be overridden
[wxWidgets.git] / include / wx / gtk1 / dcmemory.h
CommitLineData
c801d85f 1/////////////////////////////////////////////////////////////////////////////
8ef94bfc 2// Name: wx/gtk1/dcmemory.h
c801d85f
KB
3// Purpose:
4// Author: Robert Roebling
6f65e337 5// RCS-ID: $Id$
dbf858b5 6// Copyright: (c) 1998 Robert Roebling
65571936 7// Licence: wxWindows licence
c801d85f
KB
8/////////////////////////////////////////////////////////////////////////////
9
c801d85f
KB
10#ifndef __GTKDCMEMORYH__
11#define __GTKDCMEMORYH__
12
c801d85f
KB
13#include "wx/defs.h"
14#include "wx/dcclient.h"
15
16//-----------------------------------------------------------------------------
17// classes
18//-----------------------------------------------------------------------------
19
b5dbe15d 20class WXDLLIMPEXP_FWD_CORE wxMemoryDC;
c801d85f
KB
21
22//-----------------------------------------------------------------------------
23// wxMemoryDC
24//-----------------------------------------------------------------------------
25
fea35690 26class WXDLLIMPEXP_CORE wxMemoryDC : public wxWindowDC, public wxMemoryDCBase
c801d85f 27{
ec758a20 28public:
fea35690
VZ
29 wxMemoryDC() { Init(); }
30 wxMemoryDC(wxBitmap& bitmap) { Init(); SelectObject(bitmap); }
20e05ffb 31 wxMemoryDC( wxDC *dc ); // Create compatible DC
d3c7fc99 32 virtual ~wxMemoryDC();
20e05ffb 33 void DoGetSize( int *width, int *height ) const;
c801d85f 34
41fbc841
RR
35 // these get reimplemented for mono-bitmaps to behave
36 // more like their Win32 couterparts. They now interpret
37 // wxWHITE, wxWHITE_BRUSH and wxWHITE_PEN as drawing 0
38 // and everything else as drawing 1.
39 virtual void SetPen( const wxPen &pen );
40 virtual void SetBrush( const wxBrush &brush );
8ab40c52 41 virtual void SetBackground( const wxBrush &brush );
41fbc841
RR
42 virtual void SetTextForeground( const wxColour &col );
43 virtual void SetTextBackground( const wxColour &col );
44
20e05ffb
RR
45 // implementation
46 wxBitmap m_selected;
8bbe427f 47
fea35690
VZ
48protected:
49 virtual void DoSelect(const wxBitmap& bitmap);
50
20e05ffb 51private:
fea35690
VZ
52 void Init();
53
20e05ffb 54 DECLARE_DYNAMIC_CLASS(wxMemoryDC)
c801d85f
KB
55};
56
57#endif
58 // __GTKDCMEMORYH__
59