]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/dcclient.h
Warning fixes after char->wxChar in wxVariant.
[wxWidgets.git] / include / wx / msw / dcclient.h
CommitLineData
2bda0e17
KB
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$
371a5b4e 8// Copyright: (c) Julian Smart
65571936 9// Licence: wxWindows licence
2bda0e17
KB
10/////////////////////////////////////////////////////////////////////////////
11
bbcdf8bc
JS
12#ifndef _WX_DCCLIENT_H_
13#define _WX_DCCLIENT_H_
2bda0e17 14
3a5ffa81
VZ
15// ----------------------------------------------------------------------------
16// headers
17// ----------------------------------------------------------------------------
18
2bda0e17 19#include "wx/dc.h"
4286a5b5 20#include "wx/dynarray.h"
2bda0e17 21
3a5ffa81
VZ
22// ----------------------------------------------------------------------------
23// array types
24// ----------------------------------------------------------------------------
25
26// this one if used by wxPaintDC only
27struct WXDLLEXPORT wxPaintDCInfo;
e0272d05 28
a497618a 29WX_DECLARE_EXPORTED_OBJARRAY(wxPaintDCInfo, wxArrayDCInfo);
3a5ffa81
VZ
30
31// ----------------------------------------------------------------------------
32// DC classes
33// ----------------------------------------------------------------------------
34
35class WXDLLEXPORT wxWindowDC : public wxDC
2bda0e17 36{
3a5ffa81 37public:
7ba4fbeb 38 // default ctor
3a5ffa81 39 wxWindowDC();
2bda0e17 40
3a5ffa81
VZ
41 // Create a DC corresponding to the whole window
42 wxWindowDC(wxWindow *win);
2bda0e17 43
7ba4fbeb 44protected:
3103e8a9 45 // initialize the newly created DC
7ba4fbeb
VZ
46 void InitDC();
47
994a3786
VZ
48 // override some base class virtuals
49 virtual void DoGetSize(int *width, int *height) const;
50
7ba4fbeb 51private:
fc7a2a60 52 DECLARE_DYNAMIC_CLASS_NO_COPY(wxWindowDC)
2bda0e17
KB
53};
54
3a5ffa81 55class WXDLLEXPORT wxClientDC : public wxWindowDC
2bda0e17 56{
3a5ffa81 57public:
7ba4fbeb 58 // default ctor
3a5ffa81 59 wxClientDC();
2bda0e17 60
3a5ffa81
VZ
61 // Create a DC corresponding to the client area of the window
62 wxClientDC(wxWindow *win);
2bda0e17 63
1e6feb95
VZ
64 virtual ~wxClientDC();
65
66protected:
67 void InitDC();
68
994a3786
VZ
69 // override some base class virtuals
70 virtual void DoGetSize(int *width, int *height) const;
71
7ba4fbeb 72private:
fc7a2a60 73 DECLARE_DYNAMIC_CLASS_NO_COPY(wxClientDC)
2bda0e17
KB
74};
75
1e6feb95 76class WXDLLEXPORT wxPaintDC : public wxClientDC
2bda0e17 77{
3a5ffa81
VZ
78public:
79 wxPaintDC();
2bda0e17 80
3a5ffa81
VZ
81 // Create a DC corresponding for painting the window in OnPaint()
82 wxPaintDC(wxWindow *win);
2bda0e17 83
3a5ffa81 84 virtual ~wxPaintDC();
2bda0e17 85
63da7df7
JS
86 // find the entry for this DC in the cache (keyed by the window)
87 static WXHDC FindDCInCache(wxWindow* win);
88
3a5ffa81
VZ
89protected:
90 static wxArrayDCInfo ms_cache;
2bda0e17 91
3a5ffa81
VZ
92 // find the entry for this DC in the cache (keyed by the window)
93 wxPaintDCInfo *FindInCache(size_t *index = NULL) const;
7ba4fbeb
VZ
94
95private:
fc7a2a60 96 DECLARE_DYNAMIC_CLASS_NO_COPY(wxPaintDC)
2bda0e17
KB
97};
98
c6151f2a
JS
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
2bda0e17 117#endif
bbcdf8bc 118 // _WX_DCCLIENT_H_