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