2003-03-21 19:51:47 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: wx/cocoa/dcmemory.h
|
2007-12-04 04:22:16 +00:00
|
|
|
// Purpose: wxMemoryDCImpl class
|
2003-03-21 19:51:47 +00:00
|
|
|
// Author: David Elliott
|
|
|
|
// Modified by:
|
|
|
|
// Created: 2003/03/16
|
2003-07-21 20:55:50 +00:00
|
|
|
// RCS-ID: $Id$
|
2003-03-21 19:51:47 +00:00
|
|
|
// Copyright: (c) 2003 David Elliott
|
2006-10-17 14:44:52 +00:00
|
|
|
// Licence: wxWindows licence
|
2003-03-21 19:51:47 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef __WX_COCOA_DCMEMORY_H__
|
|
|
|
#define __WX_COCOA_DCMEMORY_H__
|
|
|
|
|
2007-12-04 04:22:16 +00:00
|
|
|
#include "wx/cocoa/dc.h"
|
2003-03-21 19:51:47 +00:00
|
|
|
|
2007-12-04 04:22:16 +00:00
|
|
|
#include "wx/dcmemory.h"
|
|
|
|
|
2008-03-26 15:06:00 +00:00
|
|
|
class WXDLLIMPEXP_CORE wxMemoryDCImpl: public wxCocoaDCImpl
|
2003-03-21 19:51:47 +00:00
|
|
|
{
|
2007-12-04 04:22:16 +00:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxMemoryDCImpl)
|
2006-10-30 19:41:46 +00:00
|
|
|
|
2003-03-21 19:51:47 +00:00
|
|
|
public:
|
2007-12-04 04:22:16 +00:00
|
|
|
wxMemoryDCImpl(wxMemoryDC *owner)
|
|
|
|
: wxCocoaDCImpl(owner)
|
|
|
|
{ Init(); }
|
|
|
|
wxMemoryDCImpl(wxMemoryDC *owner, wxBitmap& bitmap)
|
|
|
|
: wxCocoaDCImpl(owner)
|
|
|
|
{ Init();
|
|
|
|
owner->SelectObject(bitmap);
|
|
|
|
}
|
|
|
|
wxMemoryDCImpl(wxMemoryDC *owner, wxDC *dc ); // Create compatible DC
|
|
|
|
virtual ~wxMemoryDCImpl(void);
|
2006-10-30 19:41:46 +00:00
|
|
|
|
2003-03-21 19:51:47 +00:00
|
|
|
virtual void DoGetSize(int *width, int *height) const;
|
2006-10-30 19:41:46 +00:00
|
|
|
virtual void DoSelect(const wxBitmap& bitmap);
|
|
|
|
|
2003-07-21 20:55:50 +00:00
|
|
|
protected:
|
|
|
|
wxBitmap m_selectedBitmap;
|
|
|
|
WX_NSImage m_cocoaNSImage;
|
2003-07-21 17:06:02 +00:00
|
|
|
// DC stack
|
|
|
|
virtual bool CocoaLockFocus();
|
|
|
|
virtual bool CocoaUnlockFocus();
|
2005-01-17 21:30:53 +00:00
|
|
|
virtual bool CocoaGetBounds(void *rectData);
|
2003-07-22 17:40:52 +00:00
|
|
|
// Blitting
|
|
|
|
virtual bool CocoaDoBlitOnFocusedDC(wxCoord xdest, wxCoord ydest,
|
|
|
|
wxCoord width, wxCoord height, wxCoord xsrc, wxCoord ysrc,
|
2009-01-08 14:21:53 +00:00
|
|
|
wxRasterOperationMode logicalFunc, bool useMask, wxCoord xsrcMask, wxCoord ysrcMask);
|
2006-10-30 19:41:46 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
void Init();
|
2003-03-21 19:51:47 +00:00
|
|
|
};
|
|
|
|
|
2006-10-17 14:44:52 +00:00
|
|
|
#endif
|
|
|
|
// __WX_COCOA_DCMEMORY_H__
|