2006-08-27 05:42:42 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: wx/dfb/dcclient.h
|
2007-12-14 17:41:07 -05:00
|
|
|
// Purpose: wxWindowDCImpl, wxClientDCImpl and wxPaintDCImpl
|
2006-08-27 05:42:42 -04:00
|
|
|
// Author: Vaclav Slavik
|
|
|
|
// Created: 2006-08-10
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) 2006 REA Elektronik GmbH
|
|
|
|
// Licence: wxWindows licence
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_DFB_DCCLIENT_H_
|
|
|
|
#define _WX_DFB_DCCLIENT_H_
|
|
|
|
|
2007-12-14 17:41:07 -05:00
|
|
|
#include "wx/dfb/dc.h"
|
2006-08-27 05:42:42 -04:00
|
|
|
|
2007-07-09 06:09:52 -04:00
|
|
|
class WXDLLIMPEXP_FWD_CORE wxWindow;
|
2006-08-27 05:42:42 -04:00
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
2007-12-14 17:41:07 -05:00
|
|
|
// wxWindowDCImpl
|
2006-08-27 05:42:42 -04:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2007-12-14 17:41:07 -05:00
|
|
|
class WXDLLIMPEXP_CORE wxWindowDCImpl : public wxDFBDCImpl
|
2006-08-27 05:42:42 -04:00
|
|
|
{
|
|
|
|
public:
|
2007-12-14 17:41:07 -05:00
|
|
|
wxWindowDCImpl(wxDC *owner) : wxDFBDCImpl(owner), m_shouldFlip(false) { }
|
|
|
|
wxWindowDCImpl(wxDC *owner, wxWindow *win);
|
|
|
|
virtual ~wxWindowDCImpl();
|
2006-08-27 05:42:42 -04:00
|
|
|
|
|
|
|
protected:
|
2006-09-08 13:39:27 -04:00
|
|
|
// initializes the DC for painting on given window; if rect!=NULL, then
|
|
|
|
// for painting only on the given region of the window
|
|
|
|
void InitForWin(wxWindow *win, const wxRect *rect);
|
2006-08-27 05:42:42 -04:00
|
|
|
|
2006-09-13 05:50:02 -04:00
|
|
|
private:
|
2006-10-24 08:29:14 -04:00
|
|
|
wxRect m_winRect; // rectangle of the window being painted
|
|
|
|
|
2006-09-19 10:14:21 -04:00
|
|
|
bool m_shouldFlip; // flip the surface when done?
|
2006-09-13 05:50:02 -04:00
|
|
|
|
2006-10-24 08:29:14 -04:00
|
|
|
friend class wxOverlayImpl; // for m_shouldFlip;
|
|
|
|
|
2007-12-14 17:41:07 -05:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxWindowDCImpl)
|
2009-02-08 06:45:59 -05:00
|
|
|
wxDECLARE_NO_COPY_CLASS(wxWindowDCImpl);
|
2006-08-27 05:42:42 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
2007-12-14 17:41:07 -05:00
|
|
|
// wxClientDCImpl
|
2006-08-27 05:42:42 -04:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2007-12-14 17:41:07 -05:00
|
|
|
class WXDLLIMPEXP_CORE wxClientDCImpl : public wxWindowDCImpl
|
2006-08-27 05:42:42 -04:00
|
|
|
{
|
|
|
|
public:
|
2007-12-14 17:41:07 -05:00
|
|
|
wxClientDCImpl(wxDC *owner) : wxWindowDCImpl(owner) { }
|
|
|
|
wxClientDCImpl(wxDC *owner, wxWindow *win);
|
2006-08-27 05:42:42 -04:00
|
|
|
|
2007-12-14 17:41:07 -05:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxClientDCImpl)
|
2009-02-08 06:45:59 -05:00
|
|
|
wxDECLARE_NO_COPY_CLASS(wxClientDCImpl);
|
2006-08-27 05:42:42 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
2007-12-14 17:41:07 -05:00
|
|
|
// wxPaintDCImpl
|
2006-08-27 05:42:42 -04:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2007-12-14 17:41:07 -05:00
|
|
|
class WXDLLIMPEXP_CORE wxPaintDCImpl : public wxClientDCImpl
|
2006-08-27 05:42:42 -04:00
|
|
|
{
|
|
|
|
public:
|
2007-12-14 17:41:07 -05:00
|
|
|
wxPaintDCImpl(wxDC *owner) : wxClientDCImpl(owner) { }
|
|
|
|
wxPaintDCImpl(wxDC *owner, wxWindow *win) : wxClientDCImpl(owner, win) { }
|
2006-08-27 05:42:42 -04:00
|
|
|
|
2007-12-14 17:41:07 -05:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxPaintDCImpl)
|
2009-02-08 06:45:59 -05:00
|
|
|
wxDECLARE_NO_COPY_CLASS(wxPaintDCImpl);
|
2006-08-27 05:42:42 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _WX_DFB_DCCLIENT_H_
|