]> git.saurik.com Git - wxWidgets.git/blame - include/wx/mac/carbon/dcmemory.h
changed wxDC::GetTextExtent() and related methods to take const wxFont pointer, for...
[wxWidgets.git] / include / wx / mac / carbon / dcmemory.h
CommitLineData
8cf73271
SC
1/////////////////////////////////////////////////////////////////////////////
2// Name: dcmemory.h
3// Purpose: wxMemoryDC class
4// Author: Stefan Csomor
5// Modified by:
6// Created: 1998-01-01
7// RCS-ID: $Id$
8// Copyright: (c) Stefan Csomor
65571936 9// Licence: wxWindows licence
8cf73271
SC
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_DCMEMORY_H_
13#define _WX_DCMEMORY_H_
14
8cf73271
SC
15#include "wx/dcclient.h"
16
fea35690 17class WXDLLEXPORT wxMemoryDC: public wxPaintDC, public wxMemoryDCBase
8cf73271
SC
18{
19 DECLARE_DYNAMIC_CLASS(wxMemoryDC)
20
fea35690
VZ
21public:
22 wxMemoryDC() { Init(); }
23 wxMemoryDC(wxBitmap& bitmap) { Init(); SelectObject(bitmap); }
8cf73271 24 wxMemoryDC( wxDC *dc ); // Create compatible DC
d3c7fc99 25 virtual ~wxMemoryDC(void);
fea35690 26
d888a332
SC
27 const wxBitmap& GetSelectedBitmap() const { return m_selected; }
28 wxBitmap GetSelectedBitmap() { return m_selected; }
29
4a4ab1b6 30 wxBitmap GetSelectedObject() { return GetSelectedBitmap() ; }
6f02a879
VZ
31
32protected:
33 virtual void DoGetSize( int *width, int *height ) const;
d888a332
SC
34 virtual wxBitmap DoGetAsBitmap(const wxRect *subrect) const
35 { return subrect == NULL ? GetSelectedBitmap() : GetSelectedBitmap().GetSubBitmap(*subrect); }
fea35690
VZ
36 virtual void DoSelect(const wxBitmap& bitmap);
37
38private:
39 void Init();
6f02a879 40
8cf73271
SC
41 wxBitmap m_selected;
42};
43
44#endif
45 // _WX_DCMEMORY_H_