]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/os2/dcclient.h
extracted wxGtkString in a separate file, it's also needed by wxX11
[wxWidgets.git] / include / wx / os2 / dcclient.h
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: dcclient.h
3// Purpose: wxClientDC class
4// Author: David Webster
5// Modified by:
6// Created: 09/12/99
7// RCS-ID: $Id$
8// Copyright: (c) David Webster
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_OBJARRAY(wxPaintDCInfo, wxArrayDCInfo);
30
31// ----------------------------------------------------------------------------
32// DC classes
33// ----------------------------------------------------------------------------
34
35class WXDLLEXPORT wxWindowDC : public wxDC
36{
37public:
38 wxWindowDC();
39
40 //
41 // Create a DC corresponding to the whole window
42 //
43 wxWindowDC(wxWindow* pWin);
44
45protected:
46 void InitDC(void);
47
48 //
49 // Override some base class virtuals
50 //
51 virtual void DoGetSize( int* pWidth
52 ,int* pHeight
53 ) const;
54
55private:
56 SIZEL m_PageSize;
57 DECLARE_DYNAMIC_CLASS(wxWindowDC)
58}; // end of CLASS wxWindowDC
59
60class WXDLLEXPORT wxClientDC : public wxWindowDC
61{
62public:
63 wxClientDC();
64 virtual ~wxClientDC();
65
66 wxClientDC(wxWindow *win);
67
68protected:
69 void InitDC(void);
70
71 //
72 // Override some base class virtuals
73 //
74 virtual void DoGetSize( int* pWidth
75 ,int* pHeight
76 ) const;
77
78private:
79 DECLARE_DYNAMIC_CLASS(wxClientDC)
80}; // end of CLASS wxClientDC
81
82class WXDLLEXPORT wxPaintDC : public wxClientDC
83{
84public:
85 wxPaintDC();
86
87 // Create a DC corresponding for painting the window in OnPaint()
88 wxPaintDC(wxWindow* pWin);
89
90 virtual ~wxPaintDC();
91
92 // find the entry for this DC in the cache (keyed by the window)
93 static WXHDC FindDCInCache(wxWindow* pWin);
94
95protected:
96 static wxArrayDCInfo ms_cache;
97
98 // find the entry for this DC in the cache (keyed by the window)
99 wxPaintDCInfo* FindInCache(size_t* pIndex = NULL) const;
100private:
101 DECLARE_DYNAMIC_CLASS(wxPaintDC)
102}; // end of wxPaintDC
103
104#endif
105 // _WX_DCCLIENT_H_