1999-07-29 01:11:30 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: dcclient.h
|
1999-09-21 01:16:03 -04:00
|
|
|
// Purpose: wxClientDC class
|
1999-10-05 18:10:56 -04:00
|
|
|
// Author: David Webster
|
1999-07-29 01:11:30 -04:00
|
|
|
// Modified by:
|
1999-10-05 18:10:56 -04:00
|
|
|
// Created: 09/12/99
|
1999-07-29 01:11:30 -04:00
|
|
|
// RCS-ID: $Id$
|
1999-10-05 18:10:56 -04:00
|
|
|
// Copyright: (c) David Webster
|
2004-05-23 16:53:33 -04:00
|
|
|
// Licence: wxWindows licence
|
1999-07-29 01:11:30 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_DCCLIENT_H_
|
|
|
|
#define _WX_DCCLIENT_H_
|
|
|
|
|
1999-09-21 01:16:03 -04:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// headers
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
1999-07-29 01:11:30 -04:00
|
|
|
#include "wx/dc.h"
|
1999-09-21 01:16:03 -04:00
|
|
|
#include "wx/dynarray.h"
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// array types
|
|
|
|
// ----------------------------------------------------------------------------
|
1999-07-29 01:11:30 -04:00
|
|
|
|
1999-09-21 01:16:03 -04:00
|
|
|
// this one if used by wxPaintDC only
|
2007-07-09 06:09:52 -04:00
|
|
|
struct WXDLLIMPEXP_FWD_CORE wxPaintDCInfo;
|
1999-07-29 01:11:30 -04:00
|
|
|
|
1999-09-21 01:16:03 -04:00
|
|
|
WX_DECLARE_OBJARRAY(wxPaintDCInfo, wxArrayDCInfo);
|
1999-07-29 01:11:30 -04:00
|
|
|
|
1999-09-21 01:16:03 -04:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// DC classes
|
|
|
|
// ----------------------------------------------------------------------------
|
1999-07-29 01:11:30 -04:00
|
|
|
|
1999-09-21 01:16:03 -04:00
|
|
|
class WXDLLEXPORT wxWindowDC : public wxDC
|
1999-07-29 01:11:30 -04:00
|
|
|
{
|
1999-09-21 01:16:03 -04:00
|
|
|
public:
|
|
|
|
wxWindowDC();
|
1999-07-29 01:11:30 -04:00
|
|
|
|
2002-03-01 14:50:08 -05:00
|
|
|
//
|
1999-09-21 01:16:03 -04:00
|
|
|
// Create a DC corresponding to the whole window
|
2002-03-01 14:50:08 -05:00
|
|
|
//
|
2001-04-11 14:04:54 -04:00
|
|
|
wxWindowDC(wxWindow* pWin);
|
1999-09-21 01:16:03 -04:00
|
|
|
|
2001-04-11 14:04:54 -04:00
|
|
|
protected:
|
|
|
|
void InitDC(void);
|
1999-10-01 21:44:39 -04:00
|
|
|
|
2002-03-01 14:50:08 -05:00
|
|
|
//
|
|
|
|
// Override some base class virtuals
|
|
|
|
//
|
|
|
|
virtual void DoGetSize( int* pWidth
|
|
|
|
,int* pHeight
|
|
|
|
) const;
|
|
|
|
|
1999-10-01 21:44:39 -04:00
|
|
|
private:
|
|
|
|
SIZEL m_PageSize;
|
2001-04-11 14:04:54 -04:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxWindowDC)
|
|
|
|
}; // end of CLASS wxWindowDC
|
1999-09-21 01:16:03 -04:00
|
|
|
|
|
|
|
class WXDLLEXPORT wxClientDC : public wxWindowDC
|
1999-07-29 01:11:30 -04:00
|
|
|
{
|
1999-09-21 01:16:03 -04:00
|
|
|
public:
|
|
|
|
wxClientDC();
|
2001-07-06 17:45:11 -04:00
|
|
|
virtual ~wxClientDC();
|
1999-07-29 01:11:30 -04:00
|
|
|
|
1999-09-21 01:16:03 -04:00
|
|
|
wxClientDC(wxWindow *win);
|
1999-07-29 01:11:30 -04:00
|
|
|
|
2001-07-06 17:45:11 -04:00
|
|
|
protected:
|
|
|
|
void InitDC(void);
|
|
|
|
|
2002-03-01 14:50:08 -05:00
|
|
|
//
|
|
|
|
// Override some base class virtuals
|
|
|
|
//
|
|
|
|
virtual void DoGetSize( int* pWidth
|
|
|
|
,int* pHeight
|
|
|
|
) const;
|
|
|
|
|
2001-04-11 14:04:54 -04:00
|
|
|
private:
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxClientDC)
|
|
|
|
}; // end of CLASS wxClientDC
|
1999-07-29 01:11:30 -04:00
|
|
|
|
2001-07-06 17:45:11 -04:00
|
|
|
class WXDLLEXPORT wxPaintDC : public wxClientDC
|
1999-07-29 01:11:30 -04:00
|
|
|
{
|
1999-09-21 01:16:03 -04:00
|
|
|
public:
|
|
|
|
wxPaintDC();
|
|
|
|
|
|
|
|
// Create a DC corresponding for painting the window in OnPaint()
|
2001-04-11 14:04:54 -04:00
|
|
|
wxPaintDC(wxWindow* pWin);
|
1999-07-29 01:11:30 -04:00
|
|
|
|
1999-09-21 01:16:03 -04:00
|
|
|
virtual ~wxPaintDC();
|
1999-07-29 01:11:30 -04:00
|
|
|
|
2001-04-11 14:04:54 -04:00
|
|
|
// find the entry for this DC in the cache (keyed by the window)
|
|
|
|
static WXHDC FindDCInCache(wxWindow* pWin);
|
|
|
|
|
1999-09-21 01:16:03 -04:00
|
|
|
protected:
|
|
|
|
static wxArrayDCInfo ms_cache;
|
1999-07-29 01:11:30 -04:00
|
|
|
|
1999-09-21 01:16:03 -04:00
|
|
|
// find the entry for this DC in the cache (keyed by the window)
|
2001-04-11 14:04:54 -04:00
|
|
|
wxPaintDCInfo* FindInCache(size_t* pIndex = NULL) const;
|
|
|
|
private:
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxPaintDC)
|
|
|
|
}; // end of wxPaintDC
|
1999-07-29 01:11:30 -04:00
|
|
|
|
|
|
|
#endif
|
|
|
|
// _WX_DCCLIENT_H_
|