1999-07-29 01:11:30 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: dcmemory.h
|
|
|
|
// Purpose: wxMemoryDC class
|
1999-10-05 18:10:56 -04:00
|
|
|
// Author: David Webster
|
1999-07-29 01:11:30 -04:00
|
|
|
// Modified by:
|
1999-10-05 18:10:56 -04:00
|
|
|
// Created: 09/09/99
|
1999-07-29 01:11:30 -04:00
|
|
|
// RCS-ID: $Id$
|
1999-10-05 18:10:56 -04:00
|
|
|
// Copyright: (c) David Webster
|
2004-05-23 16:53:33 -04:00
|
|
|
// Licence: wxWindows licence
|
1999-07-29 01:11:30 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_DCMEMORY_H_
|
|
|
|
#define _WX_DCMEMORY_H_
|
|
|
|
|
2008-01-06 17:37:10 -05:00
|
|
|
#include "wx/dcmemory.h"
|
|
|
|
#include "wx/os2/dc.h"
|
1999-07-29 01:11:30 -04:00
|
|
|
|
2008-03-26 11:06:00 -04:00
|
|
|
class WXDLLIMPEXP_CORE wxMemoryDCImpl: public wxPMDCImpl
|
1999-07-29 01:11:30 -04:00
|
|
|
{
|
2001-03-22 18:23:19 -05:00
|
|
|
public:
|
2008-01-06 17:37:10 -05:00
|
|
|
wxMemoryDCImpl( wxMemoryDC *owner );
|
|
|
|
wxMemoryDCImpl( wxMemoryDC *owner, wxBitmap& bitmap );
|
|
|
|
wxMemoryDCImpl( wxMemoryDC *owner, wxDC* pDC); // Create compatible DC
|
1999-10-01 21:44:39 -04:00
|
|
|
|
2001-04-11 14:04:54 -04:00
|
|
|
// override some base class virtuals
|
2008-01-06 17:37:10 -05:00
|
|
|
virtual void DoGetSize(int* pWidth, int* pHeight) const;
|
2006-10-30 14:41:46 -05:00
|
|
|
virtual void DoSelect(const wxBitmap& bitmap);
|
|
|
|
|
2009-08-21 06:41:26 -04:00
|
|
|
virtual wxBitmap DoGetAsBitmap(const wxRect* subrect) const
|
2008-01-06 17:37:10 -05:00
|
|
|
{ return subrect == NULL ? GetSelectedBitmap() : GetSelectedBitmap().GetSubBitmap(*subrect);}
|
|
|
|
|
|
|
|
protected:
|
2001-04-11 14:04:54 -04:00
|
|
|
// create DC compatible with the given one or screen if dc == NULL
|
|
|
|
bool CreateCompatible(wxDC* pDC);
|
|
|
|
|
|
|
|
// initialize the newly created DC
|
|
|
|
void Init(void);
|
|
|
|
private:
|
2008-01-06 17:37:10 -05:00
|
|
|
DECLARE_CLASS(wxMemoryDCImpl)
|
2009-02-08 06:45:59 -05:00
|
|
|
wxDECLARE_NO_COPY_CLASS(wxMemoryDCImpl);
|
2008-01-06 17:37:10 -05:00
|
|
|
}; // end of CLASS wxMemoryDCImpl
|
1999-07-29 01:11:30 -04:00
|
|
|
|
|
|
|
#endif
|
|
|
|
// _WX_DCMEMORY_H_
|