1998-05-20 14:12:05 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2001-04-09 01:22:48 +00:00
|
|
|
// Name: wx/msw/dcmemory.h
|
1998-05-20 14:12:05 +00:00
|
|
|
// Purpose: wxMemoryDC class
|
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 01/02/97
|
1998-08-07 23:52:45 +00:00
|
|
|
// Copyright: (c) Julian Smart
|
2004-05-23 20:53:33 +00:00
|
|
|
// Licence: wxWindows licence
|
1998-05-20 14:12:05 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
1998-08-07 23:52:45 +00:00
|
|
|
#ifndef _WX_DCMEMORY_H_
|
|
|
|
#define _WX_DCMEMORY_H_
|
1998-05-20 14:12:05 +00:00
|
|
|
|
2007-11-30 13:48:22 +00:00
|
|
|
#include "wx/dcmemory.h"
|
|
|
|
#include "wx/msw/dc.h"
|
1998-05-20 14:12:05 +00:00
|
|
|
|
2008-03-26 15:06:00 +00:00
|
|
|
class WXDLLIMPEXP_CORE wxMemoryDCImpl: public wxMSWDCImpl
|
1998-05-20 14:12:05 +00:00
|
|
|
{
|
1999-10-18 15:14:52 +00:00
|
|
|
public:
|
2007-11-30 13:48:22 +00:00
|
|
|
wxMemoryDCImpl( wxMemoryDC *owner );
|
|
|
|
wxMemoryDCImpl( wxMemoryDC *owner, wxBitmap& bitmap );
|
|
|
|
wxMemoryDCImpl( wxMemoryDC *owner, wxDC *dc ); // Create compatible DC
|
1998-05-20 14:12:05 +00:00
|
|
|
|
2001-04-09 01:22:48 +00:00
|
|
|
// override some base class virtuals
|
|
|
|
virtual void DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
|
1999-10-18 15:14:52 +00:00
|
|
|
virtual void DoGetSize(int* width, int* height) const;
|
2006-10-30 19:41:46 +00:00
|
|
|
virtual void DoSelect(const wxBitmap& bitmap);
|
1999-10-18 15:14:52 +00:00
|
|
|
|
2009-08-21 10:41:26 +00:00
|
|
|
virtual wxBitmap DoGetAsBitmap(const wxRect* subrect) const
|
2007-08-20 23:26:35 +00:00
|
|
|
{ return subrect == NULL ? GetSelectedBitmap() : GetSelectedBitmap().GetSubBitmapOfHDC(*subrect, GetHDC() );}
|
|
|
|
|
2007-12-06 16:22:00 +00:00
|
|
|
protected:
|
2001-04-09 01:22:48 +00:00
|
|
|
// create DC compatible with the given one or screen if dc == NULL
|
|
|
|
bool CreateCompatible(wxDC *dc);
|
|
|
|
|
|
|
|
// initialize the newly created DC
|
|
|
|
void Init();
|
|
|
|
|
2015-04-23 11:49:01 +00:00
|
|
|
wxDECLARE_CLASS(wxMemoryDCImpl);
|
2009-02-08 11:45:59 +00:00
|
|
|
wxDECLARE_NO_COPY_CLASS(wxMemoryDCImpl);
|
1998-05-20 14:12:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
1998-08-07 23:52:45 +00:00
|
|
|
// _WX_DCMEMORY_H_
|