1998-05-20 14:01:55 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2011-03-20 00:14:35 +00:00
|
|
|
// Name: wx/gtk/dcmemory.h
|
1998-05-20 14:01:55 +00:00
|
|
|
// Purpose:
|
|
|
|
// Author: Robert Roebling
|
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
|
|
|
|
2007-11-30 13:48:22 +00:00
|
|
|
#include "wx/dcmemory.h"
|
|
|
|
#include "wx/gtk/dcclient.h"
|
1998-05-20 14:01:55 +00:00
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
2007-11-30 13:48:22 +00:00
|
|
|
// wxMemoryDCImpl
|
1998-05-20 14:01:55 +00:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2007-11-30 13:48:22 +00:00
|
|
|
class WXDLLIMPEXP_CORE wxMemoryDCImpl : public wxWindowDCImpl
|
1998-05-20 14:01:55 +00:00
|
|
|
{
|
1998-12-01 12:55:09 +00:00
|
|
|
public:
|
2007-11-30 13:48:22 +00:00
|
|
|
wxMemoryDCImpl( wxMemoryDC *owner );
|
|
|
|
wxMemoryDCImpl( wxMemoryDC *owner, wxBitmap& bitmap );
|
|
|
|
wxMemoryDCImpl( wxMemoryDC *owner, wxDC *dc );
|
2009-08-21 10:41:26 +00:00
|
|
|
|
2007-11-30 13:48:22 +00:00
|
|
|
virtual ~wxMemoryDCImpl();
|
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.
|
2014-03-30 00:02:23 +00:00
|
|
|
virtual void SetPen( const wxPen &pen ) wxOVERRIDE;
|
|
|
|
virtual void SetBrush( const wxBrush &brush ) wxOVERRIDE;
|
|
|
|
virtual void SetBackground( const wxBrush &brush ) wxOVERRIDE;
|
|
|
|
virtual void SetTextForeground( const wxColour &col ) wxOVERRIDE;
|
|
|
|
virtual void SetTextBackground( const wxColour &col ) wxOVERRIDE;
|
2000-01-15 10:39:27 +00:00
|
|
|
|
2007-11-30 13:48:22 +00:00
|
|
|
// overridden from wxDCImpl
|
2014-03-30 00:02:23 +00:00
|
|
|
virtual void DoGetSize( int *width, int *height ) const wxOVERRIDE;
|
|
|
|
virtual wxBitmap DoGetAsBitmap(const wxRect *subrect) const wxOVERRIDE;
|
|
|
|
virtual void* GetHandle() const wxOVERRIDE;
|
2012-07-28 19:31:18 +00:00
|
|
|
|
2007-11-14 14:49:40 +00:00
|
|
|
// overridden for wxMemoryDC Impl
|
2014-03-30 00:02:23 +00:00
|
|
|
virtual void DoSelect(const wxBitmap& bitmap) wxOVERRIDE;
|
2006-10-30 19:41:46 +00:00
|
|
|
|
2014-03-30 00:02:23 +00:00
|
|
|
virtual const wxBitmap& GetSelectedBitmap() const wxOVERRIDE;
|
|
|
|
virtual wxBitmap& GetSelectedBitmap() wxOVERRIDE;
|
2007-11-14 14:49:40 +00:00
|
|
|
|
|
|
|
private:
|
2007-09-23 11:27:41 +00:00
|
|
|
wxBitmap m_selected;
|
2009-08-21 10:41:26 +00:00
|
|
|
|
2006-10-30 19:41:46 +00:00
|
|
|
void Init();
|
2006-02-08 21:47:09 +00:00
|
|
|
|
2015-04-23 11:49:01 +00:00
|
|
|
wxDECLARE_ABSTRACT_CLASS(wxMemoryDCImpl);
|
1998-05-20 14:01:55 +00:00
|
|
|
};
|
|
|
|
|
2009-08-21 10:41:26 +00:00
|
|
|
#endif
|
2007-11-30 13:48:22 +00:00
|
|
|
// _WX_GTK_DCMEMORY_H_
|
|
|
|
|