]> git.saurik.com Git - wxWidgets.git/blame - include/wx/os2/dcclient.h
use 6px as the default wxSizer border in wxGTK to be a little bit closer to GNOME HIG
[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
65571936 9// Licence: wxWindows licence
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"
2c24e7ad
SN
20#include "wx/os2/dc.h"
21#include "wx/dcclient.h"
23e4b7d8
DW
22#include "wx/dynarray.h"
23
24// ----------------------------------------------------------------------------
25// array types
26// ----------------------------------------------------------------------------
0e320a79 27
23e4b7d8 28// this one if used by wxPaintDC only
b5dbe15d 29struct WXDLLIMPEXP_FWD_CORE wxPaintDCInfo;
0e320a79 30
2c24e7ad 31WX_DECLARE_EXPORTED_OBJARRAY(wxPaintDCInfo, wxArrayDCInfo);
0e320a79 32
23e4b7d8
DW
33// ----------------------------------------------------------------------------
34// DC classes
35// ----------------------------------------------------------------------------
0e320a79 36
2c24e7ad 37class WXDLLEXPORT wxWindowDCImpl : public wxPMDCImpl
0e320a79 38{
23e4b7d8 39public:
2c24e7ad
SN
40 // default ctor
41 wxWindowDCImpl( wxDC *owner );
0e320a79 42
23e4b7d8 43 // Create a DC corresponding to the whole window
2c24e7ad
SN
44 wxWindowDCImpl( wxDC *owner, wxWindow *pWin );
45
46 virtual void DoGetSize(int *pWidth, int *pHeight) const;
23e4b7d8 47
ac7fb818 48protected:
2c24e7ad 49 // initialize the newly created DC
ac7fb818 50 void InitDC(void);
ce44c50e 51
ce44c50e 52private:
ce44c50e 53 SIZEL m_PageSize;
2c24e7ad
SN
54 DECLARE_CLASS(wxWindowDCImpl)
55 DECLARE_NO_COPY_CLASS(wxWindowDCImpl)
ac7fb818 56}; // end of CLASS wxWindowDC
23e4b7d8 57
2c24e7ad 58class WXDLLEXPORT wxClientDCImpl : public wxWindowDCImpl
0e320a79 59{
23e4b7d8 60public:
2c24e7ad
SN
61 // default ctor
62 wxClientDCImpl( wxDC *owner );
63
64 // Create a DC corresponding to the client area of the window
65 wxClientDCImpl( wxDC *owner, wxWindow *pWin );
0e320a79 66
2c24e7ad
SN
67 virtual ~wxClientDCImpl();
68
69 virtual void DoGetSize(int *pWidth, int *pHeight) const;
0e320a79 70
210a651b
DW
71protected:
72 void InitDC(void);
73
ac7fb818 74private:
2c24e7ad
SN
75 DECLARE_CLASS(wxClientDCImpl)
76 DECLARE_NO_COPY_CLASS(wxClientDCImpl)
ac7fb818 77}; // end of CLASS wxClientDC
0e320a79 78
2c24e7ad 79class WXDLLEXPORT wxPaintDCImpl : public wxClientDCImpl
0e320a79 80{
23e4b7d8 81public:
2c24e7ad 82 wxPaintDCImpl( wxDC *owner );
23e4b7d8
DW
83
84 // Create a DC corresponding for painting the window in OnPaint()
2c24e7ad 85 wxPaintDCImpl( wxDC *owner, wxWindow *pWin );
0e320a79 86
2c24e7ad 87 virtual ~wxPaintDCImpl();
0e320a79 88
ac7fb818
DW
89 // find the entry for this DC in the cache (keyed by the window)
90 static WXHDC FindDCInCache(wxWindow* pWin);
91
23e4b7d8
DW
92protected:
93 static wxArrayDCInfo ms_cache;
0e320a79 94
23e4b7d8 95 // find the entry for this DC in the cache (keyed by the window)
ac7fb818
DW
96 wxPaintDCInfo* FindInCache(size_t* pIndex = NULL) const;
97private:
2c24e7ad
SN
98 DECLARE_CLASS(wxPaintDCImpl)
99 DECLARE_NO_COPY_CLASS(wxPaintDCImpl)
ac7fb818 100}; // end of wxPaintDC
0e320a79
DW
101
102#endif
103 // _WX_DCCLIENT_H_