2006-08-27 05:42:42 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: wx/dfb/dcclient.h
|
|
|
|
// Purpose: wxWindowDC, wxClientDC and wxPaintDC
|
|
|
|
// 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_
|
|
|
|
|
|
|
|
#include "wx/dc.h"
|
|
|
|
|
2007-07-09 06:09:52 -04:00
|
|
|
class WXDLLIMPEXP_FWD_CORE wxWindow;
|
2006-08-27 05:42:42 -04:00
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// wxWindowDC
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class WXDLLIMPEXP_CORE wxWindowDC : public wxDC
|
|
|
|
{
|
|
|
|
public:
|
2006-09-19 10:14:21 -04:00
|
|
|
wxWindowDC() : m_shouldFlip(false) {}
|
2006-08-27 05:42:42 -04:00
|
|
|
wxWindowDC(wxWindow *win);
|
2006-09-13 05:50:02 -04:00
|
|
|
virtual ~wxWindowDC();
|
2006-08-27 05:42:42 -04:00
|
|
|
|
2006-10-24 08:29:14 -04:00
|
|
|
virtual wxWindow *GetWindow() const { return m_win; }
|
|
|
|
|
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
|
|
|
wxWindow *m_win;
|
|
|
|
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;
|
|
|
|
|
2006-08-27 05:42:42 -04:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxWindowDC)
|
|
|
|
DECLARE_NO_COPY_CLASS(wxWindowDC)
|
|
|
|
};
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// wxClientDC
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2006-09-13 05:50:02 -04:00
|
|
|
class WXDLLIMPEXP_CORE wxClientDC : public wxWindowDC
|
2006-08-27 05:42:42 -04:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
wxClientDC() {}
|
2006-09-13 05:50:02 -04:00
|
|
|
wxClientDC(wxWindow *win);
|
2006-08-27 05:42:42 -04:00
|
|
|
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxClientDC)
|
|
|
|
DECLARE_NO_COPY_CLASS(wxClientDC)
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// wxPaintDC
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2006-09-13 05:50:02 -04:00
|
|
|
class WXDLLIMPEXP_CORE wxPaintDC : public wxClientDC
|
2006-08-27 05:42:42 -04:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
wxPaintDC() {}
|
2006-09-13 05:50:02 -04:00
|
|
|
wxPaintDC(wxWindow *win) : wxClientDC(win) {}
|
2006-08-27 05:42:42 -04:00
|
|
|
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxPaintDC)
|
|
|
|
DECLARE_NO_COPY_CLASS(wxPaintDC)
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _WX_DFB_DCCLIENT_H_
|