]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/mac/carbon/dcmemory.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxMemoryDC class
4 // Author: Stefan Csomor
8 // Copyright: (c) Stefan Csomor
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_DCMEMORY_H_
13 #define _WX_DCMEMORY_H_
15 #include "wx/dcclient.h"
17 class WXDLLEXPORT wxMemoryDC
: public wxPaintDC
, public wxMemoryDCBase
19 DECLARE_DYNAMIC_CLASS(wxMemoryDC
)
22 wxMemoryDC() { Init(); }
23 wxMemoryDC(wxBitmap
& bitmap
) { Init(); SelectObject(bitmap
); }
24 wxMemoryDC( wxDC
*dc
); // Create compatible DC
25 virtual ~wxMemoryDC(void);
27 const wxBitmap
& GetSelectedBitmap() const { return m_selected
; }
28 wxBitmap
GetSelectedBitmap() { return m_selected
; }
30 wxBitmap
GetSelectedObject() { return GetSelectedBitmap() ; }
33 virtual void DoGetSize( int *width
, int *height
) const;
34 virtual wxBitmap
DoGetAsBitmap(const wxRect
*subrect
) const
35 { return subrect
== NULL
? GetSelectedBitmap() : GetSelectedBitmap().GetSubBitmap(*subrect
); }
36 virtual void DoSelect(const wxBitmap
& bitmap
);