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