1998-05-20 14:01:55 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: dcmemory.h
|
|
|
|
// Purpose:
|
|
|
|
// Author: Robert Roebling
|
1998-05-28 19:54:07 +00:00
|
|
|
// RCS-ID: $Id$
|
1998-10-26 10:56:58 +00:00
|
|
|
// Copyright: (c) 1998 Robert Roebling
|
2004-05-23 20:53:33 +00:00
|
|
|
// Licence: wxWindows licence
|
1998-05-20 14:01:55 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2006-12-07 05:44:44 +00:00
|
|
|
#ifndef _WX_GTK_DCMEMORY_H_
|
|
|
|
#define _WX_GTK_DCMEMORY_H_
|
1998-05-20 14:01:55 +00:00
|
|
|
|
|
|
|
#include "wx/dcclient.h"
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// wxMemoryDC
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2007-09-23 11:27:41 +00:00
|
|
|
|
|
|
|
#if wxUSE_NEW_DC
|
|
|
|
class WXDLLIMPEXP_CORE wxGTKMemoryImplDC : public wxGTKWindowImplDC, public wxMemoryImplDCBase
|
|
|
|
#else
|
|
|
|
#define wxGTKMemoryImplDC wxMemoryDC
|
2006-10-30 19:41:46 +00:00
|
|
|
class WXDLLIMPEXP_CORE wxMemoryDC : public wxWindowDC, public wxMemoryDCBase
|
2007-09-23 11:27:41 +00:00
|
|
|
#endif
|
1998-05-20 14:01:55 +00:00
|
|
|
{
|
1998-12-01 12:55:09 +00:00
|
|
|
public:
|
2007-09-23 11:27:41 +00:00
|
|
|
|
|
|
|
#if wxUSE_NEW_DC
|
|
|
|
wxGTKMemoryImplDC( wxMemoryDC *owner );
|
|
|
|
wxGTKMemoryImplDC( wxMemoryDC *owner, wxBitmap& bitmap );
|
|
|
|
wxGTKMemoryImplDC( wxMemoryDC *owner, wxDC *dc );
|
|
|
|
#else
|
|
|
|
wxMemoryDC();
|
|
|
|
wxMemoryDC(wxBitmap& bitmap);
|
|
|
|
wxMemoryDC( wxDC *dc );
|
|
|
|
#endif
|
|
|
|
|
|
|
|
virtual ~wxGTKMemoryImplDC();
|
1998-05-20 14:01:55 +00:00
|
|
|
|
2000-01-15 10:39:27 +00:00
|
|
|
// these get reimplemented for mono-bitmaps to behave
|
|
|
|
// more like their Win32 couterparts. They now interpret
|
|
|
|
// wxWHITE, wxWHITE_BRUSH and wxWHITE_PEN as drawing 0
|
|
|
|
// and everything else as drawing 1.
|
|
|
|
virtual void SetPen( const wxPen &pen );
|
|
|
|
virtual void SetBrush( const wxBrush &brush );
|
2003-05-01 19:31:30 +00:00
|
|
|
virtual void SetBackground( const wxBrush &brush );
|
2000-01-15 10:39:27 +00:00
|
|
|
virtual void SetTextForeground( const wxColour &col );
|
|
|
|
virtual void SetTextBackground( const wxColour &col );
|
|
|
|
|
1999-11-22 19:44:25 +00:00
|
|
|
// implementation
|
2007-03-30 15:27:08 +00:00
|
|
|
wxBitmap GetSelectedBitmap() const { return m_selected; }
|
1998-12-09 17:30:17 +00:00
|
|
|
|
2006-02-08 21:47:09 +00:00
|
|
|
protected:
|
2007-09-23 11:27:41 +00:00
|
|
|
// overridden from wxImplDC
|
|
|
|
virtual void DoGetSize( int *width, int *height ) const;
|
|
|
|
virtual wxBitmap DoGetAsBitmap(const wxRect *subrect) const;
|
|
|
|
|
|
|
|
// overridden from wxMemoryImplDCBase
|
2006-10-30 19:41:46 +00:00
|
|
|
virtual void DoSelect(const wxBitmap& bitmap);
|
2007-09-23 11:27:41 +00:00
|
|
|
virtual const wxBitmap& DoGetSelectedBitmap() const;
|
|
|
|
virtual wxBitmap& DoGetSelectedBitmap();
|
2006-10-30 19:41:46 +00:00
|
|
|
|
2007-09-23 11:27:41 +00:00
|
|
|
wxBitmap m_selected;
|
|
|
|
|
2006-10-30 19:41:46 +00:00
|
|
|
private:
|
|
|
|
void Init();
|
2006-02-08 21:47:09 +00:00
|
|
|
|
2007-09-23 11:27:41 +00:00
|
|
|
DECLARE_ABSTRACT_CLASS(wxGTKMemoryImplDC)
|
1998-05-20 14:01:55 +00:00
|
|
|
};
|
|
|
|
|
2006-12-07 05:44:44 +00:00
|
|
|
#endif // _WX_GTK_DCMEMORY_H_
|