]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/msw/dcclient.h
Small typo fix
[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
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_DCCLIENT_H_
13#define _WX_DCCLIENT_H_
14
15// ----------------------------------------------------------------------------
16// headers
17// ----------------------------------------------------------------------------
18
19#include "wx/dc.h"
20#include "wx/dynarray.h"
21
22// ----------------------------------------------------------------------------
23// array types
24// ----------------------------------------------------------------------------
25
26// this one if used by wxPaintDC only
27struct WXDLLEXPORT wxPaintDCInfo;
28
29WX_DECLARE_EXPORTED_OBJARRAY(wxPaintDCInfo, wxArrayDCInfo);
30
31// ----------------------------------------------------------------------------
32// DC classes
33// ----------------------------------------------------------------------------
34
35class WXDLLEXPORT wxWindowDC : public wxDC
36{
37public:
38 // default ctor
39 wxWindowDC();
40
41 // Create a DC corresponding to the whole window
42 wxWindowDC(wxWindow *win);
43
44protected:
45 // initialize the newly created DC
46 void InitDC();
47
48 // override some base class virtuals
49 virtual void DoGetSize(int *width, int *height) const;
50
51private:
52 DECLARE_DYNAMIC_CLASS_NO_COPY(wxWindowDC)
53};
54
55class WXDLLEXPORT wxClientDC : public wxWindowDC
56{
57public:
58 // default ctor
59 wxClientDC();
60
61 // Create a DC corresponding to the client area of the window
62 wxClientDC(wxWindow *win);
63
64 virtual ~wxClientDC();
65
66protected:
67 void InitDC();
68
69 // override some base class virtuals
70 virtual void DoGetSize(int *width, int *height) const;
71
72private:
73 DECLARE_DYNAMIC_CLASS_NO_COPY(wxClientDC)
74};
75
76class WXDLLEXPORT wxPaintDC : public wxClientDC
77{
78public:
79 wxPaintDC();
80
81 // Create a DC corresponding for painting the window in OnPaint()
82 wxPaintDC(wxWindow *win);
83
84 virtual ~wxPaintDC();
85
86 // find the entry for this DC in the cache (keyed by the window)
87 static WXHDC FindDCInCache(wxWindow* win);
88
89protected:
90 static wxArrayDCInfo ms_cache;
91
92 // find the entry for this DC in the cache (keyed by the window)
93 wxPaintDCInfo *FindInCache(size_t *index = NULL) const;
94
95private:
96 DECLARE_DYNAMIC_CLASS_NO_COPY(wxPaintDC)
97};
98
99/*
100 * wxPaintDCEx
101 * This class is used when an application sends an HDC with the WM_PAINT
102 * message. It is used in HandlePaint and need not be used by an application.
103 */
104
105class WXDLLEXPORT wxPaintDCEx : public wxPaintDC
106{
107public:
108 wxPaintDCEx(wxWindow *canvas, WXHDC dc);
109 virtual ~wxPaintDCEx();
110private:
111 int saveState;
112
113 DECLARE_CLASS(wxPaintDCEx)
114 DECLARE_NO_COPY_CLASS(wxPaintDCEx)
115};
116
117#endif
118 // _WX_DCCLIENT_H_