]> git.saurik.com Git - wxWidgets.git/blame - src/mgl/dcclient.cpp
don't draw the selected item background if we don't have the focus
[wxWidgets.git] / src / mgl / dcclient.cpp
CommitLineData
32b8ec41 1/////////////////////////////////////////////////////////////////////////////
8f7b34a8 2// Name: dcclient.cpp
32b8ec41 3// Purpose:
8f7b34a8 4// Author: Vaclav Slavik
32b8ec41 5// RCS-ID: $Id$
8f7b34a8 6// Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com)
32b8ec41
VZ
7// Licence: wxWindows licence
8/////////////////////////////////////////////////////////////////////////////
9
10#ifdef __GNUG__
11#pragma implementation "dcclient.h"
12#endif
13
a4bbc9f7
VS
14// For compilers that support precompilation, includes "wx.h".
15#include "wx/wxprec.h"
16
17#ifdef __BORLANDC__
18 #pragma hdrstop
19#endif
20
21#ifndef WX_PRECOMP
22 #include "wx/dcclient.h"
23 #include "wx/window.h"
24#endif
25
26#include <mgraph.hpp>
32b8ec41
VZ
27
28IMPLEMENT_DYNAMIC_CLASS(wxWindowDC, wxDC)
29IMPLEMENT_DYNAMIC_CLASS(wxPaintDC, wxClientDC)
30IMPLEMENT_DYNAMIC_CLASS(wxClientDC,wxWindowDC)
a4bbc9f7
VS
31
32wxWindowDC::wxWindowDC(wxWindow *win) : m_wnd(win)
33{
34 MGLDC *dc = MGL_wmBeginPaint(m_wnd->GetHandle());
35 SetMGLDC(new MGLDevCtx(dc), FALSE);
36 // FIXME_MGL -- correctly handle setting device origin and
37 // clipping regions
38}
39
40wxWindowDC::~wxWindowDC()
41{
42 MGL_wmEndPaint(m_wnd->GetHandle());
43}
44
45wxClientDC::wxClientDC(wxWindow *win) : wxWindowDC(win)
46{
47 wxRect r = m_wnd->GetClientRect();
48 SetClippingRegion(r);
49 SetDeviceOrigin(r.x, r.y);
50}