2001-06-26 17:05:06 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: dcmemory.h
|
|
|
|
// Purpose:
|
|
|
|
// Author: Vaclav Slavik
|
|
|
|
// RCS-ID: $Id$
|
2002-02-14 15:30:34 -05:00
|
|
|
// Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com)
|
2004-05-23 16:53:33 -04:00
|
|
|
// Licence: wxWindows licence
|
2001-06-26 17:05:06 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef __WX_DCMEMORY_H__
|
|
|
|
#define __WX_DCMEMORY_H__
|
|
|
|
|
|
|
|
#include "wx/defs.h"
|
|
|
|
#include "wx/dcclient.h"
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// classes
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2007-07-09 06:09:52 -04:00
|
|
|
class WXDLLIMPEXP_FWD_CORE wxMemoryDC;
|
2001-06-26 17:05:06 -04:00
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// wxMemoryDC
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2008-03-26 11:06:00 -04:00
|
|
|
class WXDLLIMPEXP_CORE wxMemoryDC : public wxDC, public wxMemoryDCBase
|
2001-06-26 17:05:06 -04:00
|
|
|
{
|
|
|
|
public:
|
2006-10-30 14:41:46 -05:00
|
|
|
wxMemoryDC() { Init(); }
|
|
|
|
wxMemoryDC(wxBitmap& bitmap) { Init(); SelectObject(bitmap); }
|
2001-06-26 17:05:06 -04:00
|
|
|
wxMemoryDC(wxDC *dc); // Create compatible DC
|
2006-09-05 16:47:48 -04:00
|
|
|
virtual ~wxMemoryDC();
|
2001-06-26 17:05:06 -04: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);
|
|
|
|
virtual void SetTextForeground(const wxColour &col);
|
|
|
|
virtual void SetTextBackground(const wxColour &col);
|
|
|
|
|
|
|
|
// implementation
|
|
|
|
wxBitmap m_selected;
|
2009-08-21 06:41:26 -04:00
|
|
|
|
2001-06-26 17:05:06 -04:00
|
|
|
wxBitmap GetSelectedObject() const { return m_selected; }
|
|
|
|
|
2006-10-30 14:41:46 -05:00
|
|
|
protected:
|
|
|
|
virtual void DoSelect(const wxBitmap& bitmap);
|
|
|
|
|
2001-06-26 17:05:06 -04:00
|
|
|
private:
|
2006-10-30 14:41:46 -05:00
|
|
|
void Init();
|
|
|
|
|
2001-06-26 17:05:06 -04:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxMemoryDC)
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
// __WX_DCMEMORY_H__
|
|
|
|
|