]> git.saurik.com Git - wxWidgets.git/blob - include/wx/cocoa/dcmemory.h
Fixes #10443: wxListCtrl::MoveToItem
[wxWidgets.git] / include / wx / cocoa / dcmemory.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/cocoa/dcmemory.h
3 // Purpose: wxMemoryDCImpl class
4 // Author: David Elliott
5 // Modified by:
6 // Created: 2003/03/16
7 // RCS-ID: $Id$
8 // Copyright: (c) 2003 David Elliott
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef __WX_COCOA_DCMEMORY_H__
13 #define __WX_COCOA_DCMEMORY_H__
14
15 #include "wx/cocoa/dc.h"
16
17 #include "wx/dcmemory.h"
18
19 class WXDLLIMPEXP_CORE wxMemoryDCImpl: public wxCocoaDCImpl
20 {
21 DECLARE_DYNAMIC_CLASS(wxMemoryDCImpl)
22
23 public:
24 wxMemoryDCImpl(wxMemoryDC *owner)
25 : wxCocoaDCImpl(owner)
26 { Init(); }
27 wxMemoryDCImpl(wxMemoryDC *owner, wxBitmap& bitmap)
28 : wxCocoaDCImpl(owner)
29 { Init();
30 owner->SelectObject(bitmap);
31 }
32 wxMemoryDCImpl(wxMemoryDC *owner, wxDC *dc ); // Create compatible DC
33 virtual ~wxMemoryDCImpl(void);
34
35 virtual void DoGetSize(int *width, int *height) const;
36 virtual void DoSelect(const wxBitmap& bitmap);
37
38 protected:
39 wxBitmap m_selectedBitmap;
40 WX_NSImage m_cocoaNSImage;
41 // DC stack
42 virtual bool CocoaLockFocus();
43 virtual bool CocoaUnlockFocus();
44 virtual bool CocoaGetBounds(void *rectData);
45 // Blitting
46 virtual bool CocoaDoBlitOnFocusedDC(wxCoord xdest, wxCoord ydest,
47 wxCoord width, wxCoord height, wxCoord xsrc, wxCoord ysrc,
48 wxRasterOperationMode logicalFunc, bool useMask, wxCoord xsrcMask, wxCoord ysrcMask);
49
50 private:
51 void Init();
52 };
53
54 #endif
55 // __WX_COCOA_DCMEMORY_H__