2006-08-27 09:42:42 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: wx/dfb/dcclient.h
|
2007-12-14 22:41:07 +00:00
|
|
|
// Purpose: wxWindowDCImpl, wxClientDCImpl and wxPaintDCImpl
|
2006-08-27 09:42:42 +00:00
|
|
|
// Author: Vaclav Slavik
|
|
|
|
// Created: 2006-08-10
|
|
|
|
// Copyright: (c) 2006 REA Elektronik GmbH
|
|
|
|
// Licence: wxWindows licence
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_DFB_DCCLIENT_H_
|
|
|
|
#define _WX_DFB_DCCLIENT_H_
|
|
|
|
|
2007-12-14 22:41:07 +00:00
|
|
|
#include "wx/dfb/dc.h"
|
2006-08-27 09:42:42 +00:00
|
|
|
|
2007-07-09 10:09:52 +00:00
|
|
|
class WXDLLIMPEXP_FWD_CORE wxWindow;
|
2006-08-27 09:42:42 +00:00
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
2007-12-14 22:41:07 +00:00
|
|
|
// wxWindowDCImpl
|
2006-08-27 09:42:42 +00:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2007-12-14 22:41:07 +00:00
|
|
|
class WXDLLIMPEXP_CORE wxWindowDCImpl : public wxDFBDCImpl
|
2006-08-27 09:42:42 +00:00
|
|
|
{
|
|
|
|
public:
|
2007-12-14 22:41:07 +00:00
|
|
|
wxWindowDCImpl(wxDC *owner) : wxDFBDCImpl(owner), m_shouldFlip(false) { }
|
|
|
|
wxWindowDCImpl(wxDC *owner, wxWindow *win);
|
|
|
|
virtual ~wxWindowDCImpl();
|
2006-08-27 09:42:42 +00:00
|
|
|
|
|
|
|
protected:
|
2006-09-08 17:39:27 +00: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 09:42:42 +00:00
|
|
|
|
2006-09-13 09:50:02 +00:00
|
|
|
private:
|
2006-10-24 12:29:14 +00:00
|
|
|
wxRect m_winRect; // rectangle of the window being painted
|
|
|
|
|
2006-09-19 14:14:21 +00:00
|
|
|
bool m_shouldFlip; // flip the surface when done?
|
2006-09-13 09:50:02 +00:00
|
|
|
|
2006-10-24 12:29:14 +00:00
|
|
|
friend class wxOverlayImpl; // for m_shouldFlip;
|
|
|
|
|
2015-04-23 11:49:01 +00:00
|
|
|
wxDECLARE_DYNAMIC_CLASS(wxWindowDCImpl);
|
2009-02-08 11:45:59 +00:00
|
|
|
wxDECLARE_NO_COPY_CLASS(wxWindowDCImpl);
|
2006-08-27 09:42:42 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
2007-12-14 22:41:07 +00:00
|
|
|
// wxClientDCImpl
|
2006-08-27 09:42:42 +00:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2007-12-14 22:41:07 +00:00
|
|
|
class WXDLLIMPEXP_CORE wxClientDCImpl : public wxWindowDCImpl
|
2006-08-27 09:42:42 +00:00
|
|
|
{
|
|
|
|
public:
|
2007-12-14 22:41:07 +00:00
|
|
|
wxClientDCImpl(wxDC *owner) : wxWindowDCImpl(owner) { }
|
|
|
|
wxClientDCImpl(wxDC *owner, wxWindow *win);
|
2006-08-27 09:42:42 +00:00
|
|
|
|
2015-04-23 11:49:01 +00:00
|
|
|
wxDECLARE_DYNAMIC_CLASS(wxClientDCImpl);
|
2009-02-08 11:45:59 +00:00
|
|
|
wxDECLARE_NO_COPY_CLASS(wxClientDCImpl);
|
2006-08-27 09:42:42 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
2007-12-14 22:41:07 +00:00
|
|
|
// wxPaintDCImpl
|
2006-08-27 09:42:42 +00:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2007-12-14 22:41:07 +00:00
|
|
|
class WXDLLIMPEXP_CORE wxPaintDCImpl : public wxClientDCImpl
|
2006-08-27 09:42:42 +00:00
|
|
|
{
|
|
|
|
public:
|
2007-12-14 22:41:07 +00:00
|
|
|
wxPaintDCImpl(wxDC *owner) : wxClientDCImpl(owner) { }
|
|
|
|
wxPaintDCImpl(wxDC *owner, wxWindow *win) : wxClientDCImpl(owner, win) { }
|
2006-08-27 09:42:42 +00:00
|
|
|
|
2015-04-23 11:49:01 +00:00
|
|
|
wxDECLARE_DYNAMIC_CLASS(wxPaintDCImpl);
|
2009-02-08 11:45:59 +00:00
|
|
|
wxDECLARE_NO_COPY_CLASS(wxPaintDCImpl);
|
2006-08-27 09:42:42 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _WX_DFB_DCCLIENT_H_
|