2004-03-23 17:35:05 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: dcmemory.h
|
|
|
|
// Purpose: wxMemoryDC class
|
|
|
|
// Author: Stefan Csomor
|
|
|
|
// Modified by:
|
|
|
|
// Created: 1998-01-01
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) Stefan Csomor
|
2004-05-23 20:53:33 +00:00
|
|
|
// Licence: wxWindows licence
|
2004-03-23 17:35:05 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_DCMEMORY_H_
|
|
|
|
#define _WX_DCMEMORY_H_
|
|
|
|
|
2007-11-30 13:48:22 +00:00
|
|
|
#include "wx/mac/carbon/dcclient.h"
|
2004-03-23 17:35:05 +00:00
|
|
|
|
2007-11-30 13:48:22 +00:00
|
|
|
class WXDLLEXPORT wxMemoryDCImpl: public wxPaintDCImpl
|
2004-03-23 17:35:05 +00:00
|
|
|
{
|
2006-10-30 19:41:46 +00:00
|
|
|
public:
|
2007-11-30 13:48:22 +00:00
|
|
|
wxMemoryDCImpl( wxMemoryDC *owner );
|
|
|
|
wxMemoryDCImpl( wxMemoryDC *owner, wxBitmap& bitmap );
|
|
|
|
wxMemoryDCImpl( wxMemoryDC *owner, wxDC *dc );
|
|
|
|
|
|
|
|
virtual ~wxMemoryDCImpl();
|
2006-02-08 21:47:09 +00:00
|
|
|
|
|
|
|
virtual void DoGetSize( int *width, int *height ) const;
|
2006-10-29 10:46:49 +00:00
|
|
|
virtual wxBitmap DoGetAsBitmap(const wxRect *subrect) const
|
2007-11-30 13:48:22 +00:00
|
|
|
{ return subrect == NULL ? GetSelectedBitmap() : GetSelectedBitmap().GetSubBitmap(*subrect); }
|
2006-10-30 19:41:46 +00:00
|
|
|
virtual void DoSelect(const wxBitmap& bitmap);
|
|
|
|
|
2007-12-10 20:03:31 +00:00
|
|
|
virtual const wxBitmap& GetSelectedBitmap() const
|
|
|
|
{ return m_selected; }
|
|
|
|
virtual wxBitmap& GetSelectedBitmap()
|
|
|
|
{ return m_selected; }
|
|
|
|
|
2006-10-30 19:41:46 +00:00
|
|
|
private:
|
|
|
|
void Init();
|
2006-02-08 21:47:09 +00:00
|
|
|
|
2004-03-23 17:35:05 +00:00
|
|
|
wxBitmap m_selected;
|
2007-11-30 13:48:22 +00:00
|
|
|
|
|
|
|
DECLARE_CLASS(wxMemoryDCImpl)
|
|
|
|
DECLARE_NO_COPY_CLASS(wxMemoryDCImpl)
|
2004-03-23 17:35:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
// _WX_DCMEMORY_H_
|