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