1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxMemoryDC base header
4 // Author: Julian Smart
7 // Copyright: (c) Julian Smart
9 // Licence: wxWindows Licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_DCMEMORY_H_BASE_
13 #define _WX_DCMEMORY_H_BASE_
15 #include "wx/bitmap.h"
17 // NOTE: different native implementations of wxMemoryDC will derive from
18 // different wxDC classes (wxPaintDC, wxWindowDC, etc), so that
19 // we cannot derive wxMemoryDCBase from wxDC and then use it as the
20 // only base class for native impl of wxMemoryDC...
21 class WXDLLEXPORT wxMemoryDCBase
26 // avoid warnings about having virtual functions but non virtual dtor
27 virtual ~wxMemoryDCBase() { }
29 // select the given bitmap to draw on it
30 void SelectObject(wxBitmap
& bmp
)
32 // make sure that the given wxBitmap is not sharing its data with other
33 // wxBitmap instances as its contents will be modified by any drawing
34 // operation done on this DC
41 // select the given bitmap for read-only
42 virtual void SelectObjectAsSource(const wxBitmap
& bmp
)
48 virtual void DoSelect(const wxBitmap
& bmp
) = 0;
51 #if defined(__WXPALMOS__)
52 #include "wx/palmos/dcmemory.h"
53 #elif defined(__WXMSW__)
54 #include "wx/msw/dcmemory.h"
55 #elif defined(__WXMOTIF__)
56 #include "wx/motif/dcmemory.h"
57 #elif defined(__WXGTK20__)
58 #include "wx/gtk/dcmemory.h"
59 #elif defined(__WXGTK__)
60 #include "wx/gtk1/dcmemory.h"
61 #elif defined(__WXX11__)
62 #include "wx/x11/dcmemory.h"
63 #elif defined(__WXMGL__)
64 #include "wx/mgl/dcmemory.h"
65 #elif defined(__WXDFB__)
66 #include "wx/dfb/dcmemory.h"
67 #elif defined(__WXMAC__)
68 #include "wx/mac/dcmemory.h"
69 #elif defined(__WXCOCOA__)
70 #include "wx/cocoa/dcmemory.h"
71 #elif defined(__WXPM__)
72 #include "wx/os2/dcmemory.h"
76 // _WX_DCMEMORY_H_BASE_