]> git.saurik.com Git - wxWidgets.git/blob - src/palmos/dcmemory.cpp
implement wxGTK wxBitmapButton in terms of wxButton
[wxWidgets.git] / src / palmos / dcmemory.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/palmos/dcmemory.cpp
3 // Purpose: wxMemoryDC class
4 // Author: William Osborne - minimal working wxPalmOS port
5 // Modified by:
6 // Created: 10/13/04
7 // RCS-ID: $Id$
8 // Copyright: (c) William Osborne
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 // ============================================================================
13 // declarations
14 // ============================================================================
15
16 // ----------------------------------------------------------------------------
17 // headers
18 // ----------------------------------------------------------------------------
19
20 // For compilers that support precompilation, includes "wx.h".
21 #include "wx/wxprec.h"
22
23 #ifdef __BORLANDC__
24 #pragma hdrstop
25 #endif
26
27 #include "wx/dcmemory.h"
28 #include "wx/palmos/dcmemory.h"
29
30 #ifndef WX_PRECOMP
31 #include "wx/utils.h"
32 #include "wx/log.h"
33 #endif
34
35 // ----------------------------------------------------------------------------
36 // wxMemoryDCImpl
37 // ----------------------------------------------------------------------------
38
39 IMPLEMENT_ABSTRACT_CLASS(wxMemoryDCImpl, wxPalmDCImpl)
40
41 wxMemoryDCImpl::wxMemoryDCImpl( wxMemoryDC *owner )
42 : wxPalmDCImpl( owner )
43 {
44 CreateCompatible(NULL);
45 Init();
46 }
47
48 wxMemoryDCImpl::wxMemoryDCImpl( wxMemoryDC *owner, wxBitmap& bitmap )
49 : wxPalmDCImpl( owner )
50 {
51 CreateCompatible(NULL);
52 Init();
53 DoSelect(bitmap);
54 }
55
56 wxMemoryDCImpl::wxMemoryDCImpl( wxMemoryDC *owner, wxDC *dc )
57 : wxPalmDCImpl( owner )
58 {
59 wxCHECK_RET( dc, _T("NULL dc in wxMemoryDC ctor") );
60
61 CreateCompatible(dc);
62
63 Init();
64 }
65
66 void wxMemoryDCImpl::Init()
67 {
68 }
69
70 bool wxMemoryDCImpl::CreateCompatible(wxDC *dc)
71 {
72 wxDCImpl *impl = dc ? dc->GetImpl() : NULL ;
73 wxPalmDCImpl *msw_impl = wxDynamicCast( impl, wxPalmDCImpl );
74 if ( dc && !msw_impl)
75 {
76 m_ok = false;
77 return false;
78 }
79
80 return false;
81 }
82
83 void wxMemoryDCImpl::DoSelect( const wxBitmap& bitmap )
84 {
85 }
86
87 void wxMemoryDCImpl::DoGetSize(int *width, int *height) const
88 {
89 }
90
91 wxBitmap wxMemoryDCImpl::DoGetAsBitmap(const wxRect* subrect) const
92 {
93 }