]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/dcclient.h
Get SetLabel working again for wxStaticText by overriding SetLabel so that we can...
[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"
888dde65
RR
20#include "wx/msw/dc.h"
21#include "wx/dcclient.h"
4286a5b5 22#include "wx/dynarray.h"
2bda0e17 23
3a5ffa81
VZ
24// ----------------------------------------------------------------------------
25// array types
26// ----------------------------------------------------------------------------
27
28// this one if used by wxPaintDC only
b5dbe15d 29struct WXDLLIMPEXP_FWD_CORE wxPaintDCInfo;
e0272d05 30
a497618a 31WX_DECLARE_EXPORTED_OBJARRAY(wxPaintDCInfo, wxArrayDCInfo);
3a5ffa81
VZ
32
33// ----------------------------------------------------------------------------
34// DC classes
35// ----------------------------------------------------------------------------
36
53a2db12 37class WXDLLIMPEXP_CORE wxWindowDCImpl : public wxMSWDCImpl
2bda0e17 38{
3a5ffa81 39public:
7ba4fbeb 40 // default ctor
888dde65 41 wxWindowDCImpl( wxDC *owner );
2bda0e17 42
3a5ffa81 43 // Create a DC corresponding to the whole window
888dde65 44 wxWindowDCImpl( wxDC *owner, wxWindow *win );
2bda0e17 45
512cfcc3
PC
46 virtual void DoGetSize(int *width, int *height) const;
47
7ba4fbeb 48protected:
3103e8a9 49 // initialize the newly created DC
7ba4fbeb
VZ
50 void InitDC();
51
888dde65 52 DECLARE_CLASS(wxWindowDCImpl)
c0c133e1 53 wxDECLARE_NO_COPY_CLASS(wxWindowDCImpl);
2bda0e17
KB
54};
55
53a2db12 56class WXDLLIMPEXP_CORE wxClientDCImpl : public wxWindowDCImpl
2bda0e17 57{
3a5ffa81 58public:
7ba4fbeb 59 // default ctor
888dde65 60 wxClientDCImpl( wxDC *owner );
2bda0e17 61
3a5ffa81 62 // Create a DC corresponding to the client area of the window
888dde65 63 wxClientDCImpl( wxDC *owner, wxWindow *win );
2bda0e17 64
888dde65 65 virtual ~wxClientDCImpl();
1e6feb95 66
512cfcc3
PC
67 virtual void DoGetSize(int *width, int *height) const;
68
1e6feb95
VZ
69protected:
70 void InitDC();
71
888dde65 72 DECLARE_CLASS(wxClientDCImpl)
c0c133e1 73 wxDECLARE_NO_COPY_CLASS(wxClientDCImpl);
2bda0e17
KB
74};
75
53a2db12 76class WXDLLIMPEXP_CORE wxPaintDCImpl : public wxClientDCImpl
2bda0e17 77{
3a5ffa81 78public:
888dde65 79 wxPaintDCImpl( wxDC *owner );
2bda0e17 80
3a5ffa81 81 // Create a DC corresponding for painting the window in OnPaint()
888dde65 82 wxPaintDCImpl( wxDC *owner, wxWindow *win );
2bda0e17 83
888dde65 84 virtual ~wxPaintDCImpl();
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 94
888dde65 95 DECLARE_CLASS(wxPaintDCImpl)
c0c133e1 96 wxDECLARE_NO_COPY_CLASS(wxPaintDCImpl);
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
53a2db12 105class WXDLLIMPEXP_CORE wxPaintDCEx : public wxPaintDC
c6151f2a
JS
106{
107public:
108 wxPaintDCEx(wxWindow *canvas, WXHDC dc);
888dde65 109
c6151f2a 110 DECLARE_CLASS(wxPaintDCEx)
c0c133e1 111 wxDECLARE_NO_COPY_CLASS(wxPaintDCEx);
c6151f2a
JS
112};
113
2bda0e17 114#endif
bbcdf8bc 115 // _WX_DCCLIENT_H_