]> git.saurik.com Git - wxWidgets.git/blob - src/os2/dcmemory.cpp
OnEnter/OnDragOver API update (compiles, links, somewhat runs under wxGTK)
[wxWidgets.git] / src / os2 / dcmemory.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: dcmemory.cpp
3 // Purpose: wxMemoryDC class
4 // Author: David Webster
5 // Modified by:
6 // Created: 10/14/99
7 // RCS-ID: $Id$
8 // Copyright: (c) David Webster
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 // For compilers that support precompilation, includes "wx.h".
13 #include "wx/wxprec.h"
14
15 #ifndef WX_PRECOMP
16 #include "wx/utils.h"
17 #endif
18
19 #include "wx/os2/private.h"
20
21 #include "wx/dcmemory.h"
22
23 #if !USE_SHARED_LIBRARY
24 IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC, wxDC)
25 #endif
26
27 /*
28 * Memory DC
29 *
30 */
31
32 wxMemoryDC::wxMemoryDC(void)
33 {
34 // TODO:
35 /*
36 m_hDC = (WXHDC) ::CreateCompatibleDC((HDC) NULL);
37 m_ok = (m_hDC != 0);
38 m_bOwnsDC = TRUE;
39
40 SetBrush(*wxWHITE_BRUSH);
41 SetPen(*wxBLACK_PEN);
42
43 // the background mode is only used for text background
44 // and is set in DrawText() to OPAQUE as required, other-
45 // wise always TRANSPARENT, RR
46 ::SetBkMode( GetHdc(), TRANSPARENT );
47 */
48 }
49
50 wxMemoryDC::wxMemoryDC(wxDC *old_dc)
51 {
52 // TODO:
53 /*
54 old_dc->BeginDrawing();
55
56 m_hDC = (WXHDC) ::CreateCompatibleDC((HDC) old_dc->GetHDC());
57 m_ok = (m_hDC != 0);
58
59 old_dc->EndDrawing();
60
61 SetBrush(*wxWHITE_BRUSH);
62 SetPen(*wxBLACK_PEN);
63
64 // the background mode is only used for text background
65 // and is set in DrawText() to OPAQUE as required, other-
66 // wise always TRANSPARENT, RR
67 ::SetBkMode( GetHdc(), TRANSPARENT );
68 */
69 }
70
71 wxMemoryDC::~wxMemoryDC(void)
72 {
73 };
74
75 void wxMemoryDC::SelectObject( const wxBitmap& bitmap )
76 {
77 // TODO:
78 };
79
80 void wxMemoryDC::DoGetSize( int *width, int *height ) const
81 {
82 if (!m_selectedBitmap.Ok())
83 {
84 *width = 0; *height = 0;
85 return;
86 }
87 *width = m_selectedBitmap.GetWidth();
88 *height = m_selectedBitmap.GetHeight();
89 };
90
91