1999-07-29 05:11:30 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: dcclient.h
|
1999-09-21 05:16:03 +00:00
|
|
|
// Purpose: wxClientDC class
|
|
|
|
// Author: Julian Smart
|
1999-07-29 05:11:30 +00:00
|
|
|
// Modified by:
|
1999-09-21 05:16:03 +00:00
|
|
|
// Created: 01/02/97
|
1999-07-29 05:11:30 +00:00
|
|
|
// RCS-ID: $Id$
|
1999-09-21 05:16:03 +00:00
|
|
|
// Copyright: (c) Julian Smart and Markus Holzem
|
|
|
|
// Licence: wxWindows license
|
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
|
|
|
#ifdef __GNUG__
|
1999-09-21 05:16:03 +00:00
|
|
|
#pragma interface "dcclient.h"
|
1999-07-29 05:11:30 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#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
|
|
|
DECLARE_DYNAMIC_CLASS(wxWindowDC)
|
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
|
|
|
|
1999-09-21 05:16:03 +00:00
|
|
|
// Create a DC corresponding to the whole window
|
|
|
|
wxWindowDC(wxWindow *win);
|
|
|
|
|
|
|
|
virtual ~wxWindowDC();
|
1999-10-02 01:44:39 +00:00
|
|
|
|
|
|
|
// PM specific stuff
|
|
|
|
HPS m_hPS;
|
|
|
|
private:
|
|
|
|
HAB m_hab;
|
|
|
|
SIZEL m_PageSize;
|
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
|
|
|
DECLARE_DYNAMIC_CLASS(wxClientDC)
|
1999-07-29 05:11:30 +00:00
|
|
|
|
1999-09-21 05:16:03 +00:00
|
|
|
public:
|
|
|
|
wxClientDC();
|
1999-07-29 05:11:30 +00:00
|
|
|
|
1999-09-21 05:16:03 +00:00
|
|
|
// Create a DC corresponding to the client area of the window
|
|
|
|
wxClientDC(wxWindow *win);
|
1999-07-29 05:11:30 +00:00
|
|
|
|
1999-09-21 05:16:03 +00:00
|
|
|
virtual ~wxClientDC();
|
1999-07-29 05:11:30 +00:00
|
|
|
};
|
|
|
|
|
1999-09-21 05:16:03 +00:00
|
|
|
class WXDLLEXPORT wxPaintDC : public wxWindowDC
|
1999-07-29 05:11:30 +00:00
|
|
|
{
|
1999-09-21 05:16:03 +00:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxPaintDC)
|
|
|
|
|
|
|
|
public:
|
|
|
|
wxPaintDC();
|
|
|
|
|
|
|
|
// Create a DC corresponding for painting the window in OnPaint()
|
|
|
|
wxPaintDC(wxWindow *win);
|
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
|
|
|
|
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)
|
|
|
|
wxPaintDCInfo *FindInCache(size_t *index = NULL) const;
|
1999-07-29 05:11:30 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
// _WX_DCCLIENT_H_
|