]> git.saurik.com Git - wxWidgets.git/blob - include/wx/os2/dcmemory.h
Automatically adjust toolbar's tool size if the provided bitmaps
[wxWidgets.git] / include / wx / os2 / dcmemory.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: dcmemory.h
3 // Purpose: wxMemoryDC class
4 // Author: David Webster
5 // Modified by:
6 // Created: 09/09/99
7 // RCS-ID: $Id$
8 // Copyright: (c) David Webster
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_DCMEMORY_H_
13 #define _WX_DCMEMORY_H_
14
15 #include "wx/dcmemory.h"
16 #include "wx/os2/dc.h"
17
18 class WXDLLIMPEXP_CORE wxMemoryDCImpl: public wxPMDCImpl
19 {
20 public:
21 wxMemoryDCImpl( wxMemoryDC *owner );
22 wxMemoryDCImpl( wxMemoryDC *owner, wxBitmap& bitmap );
23 wxMemoryDCImpl( wxMemoryDC *owner, wxDC* pDC); // Create compatible DC
24
25 // override some base class virtuals
26 virtual void DoGetSize(int* pWidth, int* pHeight) const;
27 virtual void DoSelect(const wxBitmap& bitmap);
28
29 virtual wxBitmap DoGetAsBitmap(const wxRect* subrect) const
30 { return subrect == NULL ? GetSelectedBitmap() : GetSelectedBitmap().GetSubBitmap(*subrect);}
31
32 protected:
33 // create DC compatible with the given one or screen if dc == NULL
34 bool CreateCompatible(wxDC* pDC);
35
36 // initialize the newly created DC
37 void Init(void);
38 private:
39 DECLARE_CLASS(wxMemoryDCImpl)
40 DECLARE_NO_COPY_CLASS(wxMemoryDCImpl)
41 }; // end of CLASS wxMemoryDCImpl
42
43 #endif
44 // _WX_DCMEMORY_H_