]>
git.saurik.com Git - wxWidgets.git/blob - src/mgl/dcclient.cpp
f3bef5fbd7648c6995f80e8592242149a5a8e0f0
1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Vaclav Slavik
6 // Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com)
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
11 #pragma implementation "dcclient.h"
14 // For compilers that support precompilation, includes "wx.h".
15 #include "wx/wxprec.h"
22 #include "wx/dcclient.h"
23 #include "wx/window.h"
28 IMPLEMENT_DYNAMIC_CLASS(wxWindowDC
, wxDC
)
29 IMPLEMENT_DYNAMIC_CLASS(wxPaintDC
, wxClientDC
)
30 IMPLEMENT_DYNAMIC_CLASS(wxClientDC
,wxWindowDC
)
32 wxWindowDC::wxWindowDC(wxWindow
*win
) : m_wnd(win
)
34 MGLDC
*dc
= MGL_wmBeginPaint(m_wnd
->GetHandle());
35 SetMGLDC(new MGLDevCtx(dc
), FALSE
);
36 // FIXME_MGL -- correctly handle setting device origin and
40 wxWindowDC::~wxWindowDC()
42 MGL_wmEndPaint(m_wnd
->GetHandle());
45 wxClientDC::wxClientDC(wxWindow
*win
) : wxWindowDC(win
)
47 wxRect r
= m_wnd
->GetClientRect();
49 SetDeviceOrigin(r
.x
, r
.y
);