1998-05-20 10:01:55 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2011-03-19 20:14:35 -04:00
|
|
|
// Name: wx/gtk/dcmemory.h
|
1998-05-20 10:01:55 -04:00
|
|
|
// Purpose:
|
|
|
|
// Author: Robert Roebling
|
1998-10-26 05:56:58 -05:00
|
|
|
// Copyright: (c) 1998 Robert Roebling
|
2004-05-23 16:53:33 -04:00
|
|
|
// Licence: wxWindows licence
|
1998-05-20 10:01:55 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2006-12-07 00:44:44 -05:00
|
|
|
#ifndef _WX_GTK_DCMEMORY_H_
|
|
|
|
#define _WX_GTK_DCMEMORY_H_
|
1998-05-20 10:01:55 -04:00
|
|
|
|
2007-11-30 08:48:22 -05:00
|
|
|
#include "wx/dcmemory.h"
|
|
|
|
#include "wx/gtk/dcclient.h"
|
1998-05-20 10:01:55 -04:00
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
2007-11-30 08:48:22 -05:00
|
|
|
// wxMemoryDCImpl
|
1998-05-20 10:01:55 -04:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2007-11-30 08:48:22 -05:00
|
|
|
class WXDLLIMPEXP_CORE wxMemoryDCImpl : public wxWindowDCImpl
|
1998-05-20 10:01:55 -04:00
|
|
|
{
|
1998-12-01 07:55:09 -05:00
|
|
|
public:
|
2007-11-30 08:48:22 -05:00
|
|
|
wxMemoryDCImpl( wxMemoryDC *owner );
|
|
|
|
wxMemoryDCImpl( wxMemoryDC *owner, wxBitmap& bitmap );
|
|
|
|
wxMemoryDCImpl( wxMemoryDC *owner, wxDC *dc );
|
2009-08-21 06:41:26 -04:00
|
|
|
|
2007-11-30 08:48:22 -05:00
|
|
|
virtual ~wxMemoryDCImpl();
|
1998-05-20 10:01:55 -04:00
|
|
|
|
2000-01-15 05:39:27 -05: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-29 20:02:23 -04: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 05:39:27 -05:00
|
|
|
|
2007-11-30 08:48:22 -05:00
|
|
|
// overridden from wxDCImpl
|
2014-03-29 20:02:23 -04: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 15:31:18 -04:00
|
|
|
|
2007-11-14 09:49:40 -05:00
|
|
|
// overridden for wxMemoryDC Impl
|
2014-03-29 20:02:23 -04:00
|
|
|
virtual void DoSelect(const wxBitmap& bitmap) wxOVERRIDE;
|
2006-10-30 14:41:46 -05:00
|
|
|
|
2014-03-29 20:02:23 -04:00
|
|
|
virtual const wxBitmap& GetSelectedBitmap() const wxOVERRIDE;
|
|
|
|
virtual wxBitmap& GetSelectedBitmap() wxOVERRIDE;
|
2007-11-14 09:49:40 -05:00
|
|
|
|
|
|
|
private:
|
2007-09-23 07:27:41 -04:00
|
|
|
wxBitmap m_selected;
|
2009-08-21 06:41:26 -04:00
|
|
|
|
2006-10-30 14:41:46 -05:00
|
|
|
void Init();
|
2006-02-08 16:47:09 -05:00
|
|
|
|
2015-04-23 07:49:01 -04:00
|
|
|
wxDECLARE_ABSTRACT_CLASS(wxMemoryDCImpl);
|
1998-05-20 10:01:55 -04:00
|
|
|
};
|
|
|
|
|
2009-08-21 06:41:26 -04:00
|
|
|
#endif
|
2007-11-30 08:48:22 -05:00
|
|
|
// _WX_GTK_DCMEMORY_H_
|
|
|
|
|