]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/msw/dcclient.h
fixed the last of the off-by-one errors (some are refixed, again...)
[wxWidgets.git] / include / wx / msw / dcclient.h
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: dcclient.h
3// Purpose: wxClientDC class
4// Author: Julian Smart
5// Modified by:
6// Created: 01/02/97
7// RCS-ID: $Id$
8// Copyright: (c) Julian Smart and Markus Holzem
9// Licence: wxWindows license
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_DCCLIENT_H_
13#define _WX_DCCLIENT_H_
14
15// ----------------------------------------------------------------------------
16// headers
17// ----------------------------------------------------------------------------
18
19#ifdef __GNUG__
20 #pragma interface "dcclient.h"
21#endif
22
23#include "wx/dc.h"
24#include "wx/dynarray.h"
25
26// ----------------------------------------------------------------------------
27// array types
28// ----------------------------------------------------------------------------
29
30// this one if used by wxPaintDC only
31struct WXDLLEXPORT wxPaintDCInfo;
32
33WX_DECLARE_EXPORTED_OBJARRAY(wxPaintDCInfo, wxArrayDCInfo);
34
35// ----------------------------------------------------------------------------
36// DC classes
37// ----------------------------------------------------------------------------
38
39class WXDLLEXPORT wxWindowDC : public wxDC
40{
41public:
42 // default ctor
43 wxWindowDC();
44
45 // Create a DC corresponding to the whole window
46 wxWindowDC(wxWindow *win);
47
48protected:
49 // intiialize the newly created DC
50 void InitDC();
51
52private:
53 DECLARE_DYNAMIC_CLASS(wxWindowDC)
54};
55
56class WXDLLEXPORT wxClientDC : public wxWindowDC
57{
58public:
59 // default ctor
60 wxClientDC();
61
62 // Create a DC corresponding to the client area of the window
63 wxClientDC(wxWindow *win);
64
65 virtual ~wxClientDC();
66
67protected:
68 void InitDC();
69
70private:
71 DECLARE_DYNAMIC_CLASS(wxClientDC)
72};
73
74class WXDLLEXPORT wxPaintDC : public wxClientDC
75{
76public:
77 wxPaintDC();
78
79 // Create a DC corresponding for painting the window in OnPaint()
80 wxPaintDC(wxWindow *win);
81
82 virtual ~wxPaintDC();
83
84 // find the entry for this DC in the cache (keyed by the window)
85 static WXHDC FindDCInCache(wxWindow* win);
86
87protected:
88 static wxArrayDCInfo ms_cache;
89
90 // find the entry for this DC in the cache (keyed by the window)
91 wxPaintDCInfo *FindInCache(size_t *index = NULL) const;
92
93private:
94 DECLARE_DYNAMIC_CLASS(wxPaintDC)
95};
96
97#endif
98 // _WX_DCCLIENT_H_