]> git.saurik.com Git - wxWidgets.git/blame - include/wx/os2/dcclient.h
safer definitions for wx(U)Int32,16 (taken from intl.cpp)
[wxWidgets.git] / include / wx / os2 / dcclient.h
CommitLineData
0e320a79
DW
1/////////////////////////////////////////////////////////////////////////////
2// Name: dcclient.h
23e4b7d8 3// Purpose: wxClientDC class
f0a56ab0 4// Author: David Webster
0e320a79 5// Modified by:
f0a56ab0 6// Created: 09/12/99
0e320a79 7// RCS-ID: $Id$
f0a56ab0 8// Copyright: (c) David Webster
23e4b7d8 9// Licence: wxWindows license
0e320a79
DW
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_DCCLIENT_H_
13#define _WX_DCCLIENT_H_
14
23e4b7d8
DW
15// ----------------------------------------------------------------------------
16// headers
17// ----------------------------------------------------------------------------
18
0e320a79 19#include "wx/dc.h"
23e4b7d8
DW
20#include "wx/dynarray.h"
21
22// ----------------------------------------------------------------------------
23// array types
24// ----------------------------------------------------------------------------
0e320a79 25
23e4b7d8
DW
26// this one if used by wxPaintDC only
27struct WXDLLEXPORT wxPaintDCInfo;
0e320a79 28
23e4b7d8 29WX_DECLARE_OBJARRAY(wxPaintDCInfo, wxArrayDCInfo);
0e320a79 30
23e4b7d8
DW
31// ----------------------------------------------------------------------------
32// DC classes
33// ----------------------------------------------------------------------------
0e320a79 34
23e4b7d8 35class WXDLLEXPORT wxWindowDC : public wxDC
0e320a79 36{
23e4b7d8
DW
37public:
38 wxWindowDC();
0e320a79 39
bc5a847c 40 //
23e4b7d8 41 // Create a DC corresponding to the whole window
bc5a847c 42 //
ac7fb818 43 wxWindowDC(wxWindow* pWin);
23e4b7d8 44
ac7fb818
DW
45protected:
46 void InitDC(void);
ce44c50e 47
bc5a847c
DW
48 //
49 // Override some base class virtuals
50 //
51 virtual void DoGetSize( int* pWidth
52 ,int* pHeight
53 ) const;
54
ce44c50e 55private:
ce44c50e 56 SIZEL m_PageSize;
ac7fb818
DW
57 DECLARE_DYNAMIC_CLASS(wxWindowDC)
58}; // end of CLASS wxWindowDC
23e4b7d8
DW
59
60class WXDLLEXPORT wxClientDC : public wxWindowDC
0e320a79 61{
23e4b7d8
DW
62public:
63 wxClientDC();
210a651b 64 virtual ~wxClientDC();
0e320a79 65
23e4b7d8 66 wxClientDC(wxWindow *win);
0e320a79 67
210a651b
DW
68protected:
69 void InitDC(void);
70
bc5a847c
DW
71 //
72 // Override some base class virtuals
73 //
74 virtual void DoGetSize( int* pWidth
75 ,int* pHeight
76 ) const;
77
ac7fb818
DW
78private:
79 DECLARE_DYNAMIC_CLASS(wxClientDC)
80}; // end of CLASS wxClientDC
0e320a79 81
210a651b 82class WXDLLEXPORT wxPaintDC : public wxClientDC
0e320a79 83{
23e4b7d8
DW
84public:
85 wxPaintDC();
86
87 // Create a DC corresponding for painting the window in OnPaint()
ac7fb818 88 wxPaintDC(wxWindow* pWin);
0e320a79 89
23e4b7d8 90 virtual ~wxPaintDC();
0e320a79 91
ac7fb818
DW
92 // find the entry for this DC in the cache (keyed by the window)
93 static WXHDC FindDCInCache(wxWindow* pWin);
94
23e4b7d8
DW
95protected:
96 static wxArrayDCInfo ms_cache;
0e320a79 97
23e4b7d8 98 // find the entry for this DC in the cache (keyed by the window)
ac7fb818
DW
99 wxPaintDCInfo* FindInCache(size_t* pIndex = NULL) const;
100private:
101 DECLARE_DYNAMIC_CLASS(wxPaintDC)
102}; // end of wxPaintDC
0e320a79
DW
103
104#endif
105 // _WX_DCCLIENT_H_