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