]> git.saurik.com Git - wxWidgets.git/blob - include/wx/osx/dcmemory.h
proper default for iphone
[wxWidgets.git] / include / wx / osx / dcmemory.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/osx/dcmemory.h
3 // Purpose: wxMemoryDC class
4 // Author: Stefan Csomor
5 // Modified by:
6 // Created: 1998-01-01
7 // Copyright: (c) Stefan Csomor
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11 #ifndef _WX_DCMEMORY_H_
12 #define _WX_DCMEMORY_H_
13
14 #include "wx/osx/dcclient.h"
15
16 class WXDLLIMPEXP_CORE wxMemoryDCImpl: public wxPaintDCImpl
17 {
18 public:
19 wxMemoryDCImpl( wxMemoryDC *owner );
20 wxMemoryDCImpl( wxMemoryDC *owner, wxBitmap& bitmap );
21 wxMemoryDCImpl( wxMemoryDC *owner, wxDC *dc );
22
23 virtual ~wxMemoryDCImpl();
24
25 virtual void DoGetSize( int *width, int *height ) const;
26 virtual wxBitmap DoGetAsBitmap(const wxRect *subrect) const
27 { return subrect == NULL ? GetSelectedBitmap() : GetSelectedBitmap().GetSubBitmap(*subrect); }
28 virtual void DoSelect(const wxBitmap& bitmap);
29
30 virtual const wxBitmap& GetSelectedBitmap() const
31 { return m_selected; }
32 virtual wxBitmap& GetSelectedBitmap()
33 { return m_selected; }
34
35 private:
36 void Init();
37
38 wxBitmap m_selected;
39
40 DECLARE_CLASS(wxMemoryDCImpl)
41 wxDECLARE_NO_COPY_CLASS(wxMemoryDCImpl);
42 };
43
44 #endif
45 // _WX_DCMEMORY_H_