1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
10 #ifndef _WX_GTK_DCMEMORY_H_
11 #define _WX_GTK_DCMEMORY_H_
13 #include "wx/dcmemory.h"
14 #include "wx/gtk/dcclient.h"
16 //-----------------------------------------------------------------------------
18 //-----------------------------------------------------------------------------
20 class WXDLLIMPEXP_CORE wxMemoryDCImpl
: public wxWindowDCImpl
23 wxMemoryDCImpl( wxMemoryDC
*owner
);
24 wxMemoryDCImpl( wxMemoryDC
*owner
, wxBitmap
& bitmap
);
25 wxMemoryDCImpl( wxMemoryDC
*owner
, wxDC
*dc
);
27 virtual ~wxMemoryDCImpl();
29 #if wxUSE_GRAPHICS_CONTEXT
30 virtual wxGraphicsContext
* CreateGraphicsContext();
33 // these get reimplemented for mono-bitmaps to behave
34 // more like their Win32 couterparts. They now interpret
35 // wxWHITE, wxWHITE_BRUSH and wxWHITE_PEN as drawing 0
36 // and everything else as drawing 1.
37 virtual void SetPen( const wxPen
&pen
);
38 virtual void SetBrush( const wxBrush
&brush
);
39 virtual void SetBackground( const wxBrush
&brush
);
40 virtual void SetTextForeground( const wxColour
&col
);
41 virtual void SetTextBackground( const wxColour
&col
);
43 // overridden from wxDCImpl
44 virtual void DoGetSize( int *width
, int *height
) const;
45 virtual wxBitmap
DoGetAsBitmap(const wxRect
*subrect
) const;
47 // overridden for wxMemoryDC Impl
48 virtual void DoSelect(const wxBitmap
& bitmap
);
50 virtual const wxBitmap
& GetSelectedBitmap() const;
51 virtual wxBitmap
& GetSelectedBitmap();
58 DECLARE_ABSTRACT_CLASS(wxMemoryDCImpl
)
62 // _WX_GTK_DCMEMORY_H_