]> git.saurik.com Git - wxWidgets.git/blame - src/os2/dcmemory.cpp
wxChoice/wxComboBox background colour change (to get back to where we were);
[wxWidgets.git] / src / os2 / dcmemory.cpp
CommitLineData
0e320a79
DW
1/////////////////////////////////////////////////////////////////////////////
2// Name: dcmemory.cpp
3// Purpose: wxMemoryDC class
fb46a9a6 4// Author: David Webster
0e320a79 5// Modified by:
fb46a9a6 6// Created: 10/14/99
0e320a79 7// RCS-ID: $Id$
fb46a9a6
DW
8// Copyright: (c) David Webster
9// Licence: wxWindows licence
0e320a79
DW
10/////////////////////////////////////////////////////////////////////////////
11
fb46a9a6
DW
12// For compilers that support precompilation, includes "wx.h".
13#include "wx/wxprec.h"
14
15#ifndef WX_PRECOMP
16#include "wx/utils.h"
0e320a79
DW
17#endif
18
fb46a9a6
DW
19#include "wx/os2/private.h"
20
0e320a79
DW
21#include "wx/dcmemory.h"
22
fb46a9a6
DW
23#if !USE_SHARED_LIBRARY
24IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC, wxDC)
25#endif
0e320a79 26
fb46a9a6
DW
27/*
28 * Memory DC
29 *
30 */
0e320a79
DW
31
32wxMemoryDC::wxMemoryDC(void)
33{
fb46a9a6
DW
34 // TODO:
35/*
36 m_hDC = (WXHDC) ::CreateCompatibleDC((HDC) NULL);
37 m_ok = (m_hDC != 0);
38 m_bOwnsDC = TRUE;
0e320a79 39
fb46a9a6
DW
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
50wxMemoryDC::wxMemoryDC(wxDC *old_dc)
0e320a79 51{
fb46a9a6
DW
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}
0e320a79
DW
70
71wxMemoryDC::~wxMemoryDC(void)
72{
73};
74
75void wxMemoryDC::SelectObject( const wxBitmap& bitmap )
76{
fb46a9a6 77 // TODO:
0e320a79
DW
78};
79
fb46a9a6 80void wxMemoryDC::DoGetSize( int *width, int *height ) const
0e320a79 81{
fb46a9a6 82 if (!m_selectedBitmap.Ok())
0e320a79 83 {
fb46a9a6
DW
84 *width = 0; *height = 0;
85 return;
0e320a79 86 }
fb46a9a6
DW
87 *width = m_selectedBitmap.GetWidth();
88 *height = m_selectedBitmap.GetHeight();
0e320a79
DW
89};
90
91