]> git.saurik.com Git - wxWidgets.git/blame - src/dfb/dcmemory.cpp
Add missing WXK constants for the control keys
[wxWidgets.git] / src / dfb / dcmemory.cpp
CommitLineData
b3c86150
VS
1/////////////////////////////////////////////////////////////////////////////
2// Name: src/dfb/dcmemory.cpp
4a624f6e 3// Purpose: wxMemoryDCImpl implementation
b3c86150
VS
4// Author: Vaclav Slavik
5// Created: 2006-08-16
6// RCS-ID: $Id$
7// Copyright: (c) 2006 REA Elektronik GmbH
8// Licence: wxWindows licence
9/////////////////////////////////////////////////////////////////////////////
10
11// ===========================================================================
12// declarations
13// ===========================================================================
14
15// ---------------------------------------------------------------------------
16// headers
17// ---------------------------------------------------------------------------
18
19// For compilers that support precompilation, includes "wx.h".
20#include "wx/wxprec.h"
21
b3c86150
VS
22#ifndef WX_PRECOMP
23 #include "wx/bitmap.h"
24#endif
25
4d2df97f 26#include "wx/dcmemory.h"
4a624f6e 27#include "wx/dfb/dcmemory.h"
b3c86150
VS
28#include "wx/dfb/private.h"
29
30// ===========================================================================
31// implementation
32// ===========================================================================
33
34//-----------------------------------------------------------------------------
4a624f6e 35// wxMemoryDCImpl
b3c86150
VS
36//-----------------------------------------------------------------------------
37
4a624f6e 38#warning "FIXME: verify/fix that wxMemoryDCImpl works correctly with mono bitmaps"
b3c86150 39
4a624f6e 40IMPLEMENT_ABSTRACT_CLASS(wxMemoryDCImpl, wxDFBDCImpl)
b3c86150 41
4a624f6e 42void wxMemoryDCImpl::Init()
b3c86150
VS
43{
44}
45
4d2df97f
VS
46wxMemoryDCImpl::wxMemoryDCImpl(wxMemoryDC *owner)
47 : wxDFBDCImpl(owner)
48{
49 Init();
50}
51
52wxMemoryDCImpl::wxMemoryDCImpl(wxMemoryDC *owner, wxBitmap& bitmap)
53 : wxDFBDCImpl(owner)
54{
55 Init();
56 DoSelect(bitmap);
57}
58
4a624f6e
VZ
59wxMemoryDCImpl::wxMemoryDCImpl(wxMemoryDC *owner, wxDC *WXUNUSED(dc))
60 : wxDFBDCImpl(owner)
b3c86150
VS
61{
62}
63
4a624f6e 64void wxMemoryDCImpl::DoSelect(const wxBitmap& bitmap)
b3c86150 65{
5942996c
VS
66 m_bmp = bitmap;
67
a1b806b9 68 if ( !bitmap.IsOk() )
b3c86150
VS
69 {
70 // select the bitmap out of the DC
71 m_surface = NULL;
72 return;
73 }
74
75 // init the DC for drawing to this bitmap
c16db850 76 DFBInit(bitmap.GetDirectFBSurface());
b3c86150 77}