2011-03-20 18:05:19 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: wx/gtk/dcmemory.h
|
|
|
|
// Purpose:
|
|
|
|
// Author: Robert Roebling
|
|
|
|
// Copyright: (c) 1998 Robert Roebling
|
|
|
|
// Licence: wxWindows licence
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_GTK_DCMEMORY_H_
|
|
|
|
#define _WX_GTK_DCMEMORY_H_
|
|
|
|
|
|
|
|
#include "wx/dcmemory.h"
|
|
|
|
#include "wx/gtk/dcclient.h"
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// wxMemoryDCImpl
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class WXDLLIMPEXP_CORE wxMemoryDCImpl : public wxWindowDCImpl
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
wxMemoryDCImpl( wxMemoryDC *owner );
|
|
|
|
wxMemoryDCImpl( wxMemoryDC *owner, wxBitmap& bitmap );
|
|
|
|
wxMemoryDCImpl( wxMemoryDC *owner, wxDC *dc );
|
|
|
|
|
|
|
|
virtual ~wxMemoryDCImpl();
|
|
|
|
|
|
|
|
// 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.
|
2016-06-26 05:25:29 +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;
|
2011-03-20 18:05:19 +00:00
|
|
|
|
|
|
|
// overridden from wxDCImpl
|
2016-06-26 05:25:29 +00:00
|
|
|
virtual void DoGetSize( int *width, int *height ) const wxOVERRIDE;
|
|
|
|
virtual wxBitmap DoGetAsBitmap(const wxRect *subrect) const wxOVERRIDE;
|
|
|
|
virtual void* GetHandle() const wxOVERRIDE;
|
2013-09-22 22:44:55 +00:00
|
|
|
|
2011-03-20 18:05:19 +00:00
|
|
|
// overridden for wxMemoryDC Impl
|
2016-06-26 05:25:29 +00:00
|
|
|
virtual void DoSelect(const wxBitmap& bitmap) wxOVERRIDE;
|
2011-03-20 18:05:19 +00:00
|
|
|
|
2016-06-26 05:25:29 +00:00
|
|
|
virtual const wxBitmap& GetSelectedBitmap() const wxOVERRIDE;
|
|
|
|
virtual wxBitmap& GetSelectedBitmap() wxOVERRIDE;
|
2011-03-20 18:05:19 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
wxBitmap m_selected;
|
|
|
|
|
|
|
|
void Init();
|
|
|
|
|
2016-06-26 05:25:29 +00:00
|
|
|
wxDECLARE_ABSTRACT_CLASS(wxMemoryDCImpl);
|
2011-03-20 18:05:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
// _WX_GTK_DCMEMORY_H_
|
|
|
|
|