]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/dcmemory.h
added wxNotificationMessage and implemented it generically and natively for Maemo
[wxWidgets.git] / include / wx / gtk / dcmemory.h
CommitLineData
c801d85f
KB
1/////////////////////////////////////////////////////////////////////////////
2// Name: dcmemory.h
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
3498362e
PC
10#ifndef _WX_GTK_DCMEMORY_H_
11#define _WX_GTK_DCMEMORY_H_
c801d85f 12
c801d85f
KB
13#include "wx/dcclient.h"
14
c801d85f
KB
15//-----------------------------------------------------------------------------
16// wxMemoryDC
17//-----------------------------------------------------------------------------
18
ab171e95
RR
19
20#if wxUSE_NEW_DC
4f37154e 21class WXDLLIMPEXP_CORE wxGTKMemoryImplDC : public wxGTKWindowImplDC
ab171e95
RR
22#else
23#define wxGTKMemoryImplDC wxMemoryDC
fea35690 24class WXDLLIMPEXP_CORE wxMemoryDC : public wxWindowDC, public wxMemoryDCBase
ab171e95 25#endif
c801d85f 26{
ec758a20 27public:
ab171e95
RR
28
29#if wxUSE_NEW_DC
30 wxGTKMemoryImplDC( wxMemoryDC *owner );
31 wxGTKMemoryImplDC( wxMemoryDC *owner, wxBitmap& bitmap );
32 wxGTKMemoryImplDC( wxMemoryDC *owner, wxDC *dc );
33#else
34 wxMemoryDC();
35 wxMemoryDC(wxBitmap& bitmap);
36 wxMemoryDC( wxDC *dc );
37#endif
38
39 virtual ~wxGTKMemoryImplDC();
c801d85f 40
41fbc841
RR
41 // these get reimplemented for mono-bitmaps to behave
42 // more like their Win32 couterparts. They now interpret
43 // wxWHITE, wxWHITE_BRUSH and wxWHITE_PEN as drawing 0
44 // and everything else as drawing 1.
45 virtual void SetPen( const wxPen &pen );
46 virtual void SetBrush( const wxBrush &brush );
8ab40c52 47 virtual void SetBackground( const wxBrush &brush );
41fbc841
RR
48 virtual void SetTextForeground( const wxColour &col );
49 virtual void SetTextBackground( const wxColour &col );
50
6f02a879 51protected:
ab171e95
RR
52 // overridden from wxImplDC
53 virtual void DoGetSize( int *width, int *height ) const;
54 virtual wxBitmap DoGetAsBitmap(const wxRect *subrect) const;
55
4f37154e 56 // overridden for wxMemoryDC Impl
fea35690
VZ
57 virtual void DoSelect(const wxBitmap& bitmap);
58
4f37154e
RR
59public:
60 virtual const wxBitmap& GetSelectedBitmap() const;
61 virtual wxBitmap& GetSelectedBitmap();
62
63private:
ab171e95
RR
64 wxBitmap m_selected;
65
fea35690
VZ
66private:
67 void Init();
6f02a879 68
ab171e95 69 DECLARE_ABSTRACT_CLASS(wxGTKMemoryImplDC)
c801d85f
KB
70};
71
3498362e 72#endif // _WX_GTK_DCMEMORY_H_