]> git.saurik.com Git - wxWidgets.git/blame - include/wx/palmos/dcclient.h
Blindly added wxImageList::replace( int, bitmap, mask )
[wxWidgets.git] / include / wx / palmos / dcclient.h
CommitLineData
ffecfa5a 1/////////////////////////////////////////////////////////////////////////////
e1d63b79 2// Name: wx/palmos/dcclient.h
ffecfa5a 3// Purpose: wxClientDC class
e1d63b79 4// Author: William Osborne - minimal working wxPalmOS port
ffecfa5a
JS
5// Modified by:
6// Created: 10/13/04
e1d63b79 7// RCS-ID: $Id$
ffecfa5a
JS
8// Copyright: (c) William Osborne
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_DCCLIENT_H_
13#define _WX_DCCLIENT_H_
14
15// ----------------------------------------------------------------------------
16// headers
17// ----------------------------------------------------------------------------
18
ffecfa5a
JS
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_EXPORTED_OBJARRAY(wxPaintDCInfo, wxArrayDCInfo);
30
31// ----------------------------------------------------------------------------
32// DC classes
33// ----------------------------------------------------------------------------
34
35class WXDLLEXPORT wxWindowDC : public wxDC
36{
37public:
38 // default ctor
39 wxWindowDC();
40
41 // Create a DC corresponding to the whole window
42 wxWindowDC(wxWindow *win);
43
44protected:
3103e8a9 45 // initialize the newly created DC
ffecfa5a
JS
46 void InitDC();
47
48 // override some base class virtuals
49 virtual void DoGetSize(int *width, int *height) const;
50
51private:
52 DECLARE_DYNAMIC_CLASS_NO_COPY(wxWindowDC)
53};
54
55class WXDLLEXPORT wxClientDC : public wxWindowDC
56{
57public:
58 // default ctor
59 wxClientDC();
60
61 // Create a DC corresponding to the client area of the window
62 wxClientDC(wxWindow *win);
63
64 virtual ~wxClientDC();
65
66protected:
67 void InitDC();
68
69 // override some base class virtuals
70 virtual void DoGetSize(int *width, int *height) const;
71
72private:
73 DECLARE_DYNAMIC_CLASS_NO_COPY(wxClientDC)
74};
75
76class WXDLLEXPORT wxPaintDC : public wxClientDC
77{
78public:
79 wxPaintDC();
80
81 // Create a DC corresponding for painting the window in OnPaint()
82 wxPaintDC(wxWindow *win);
83
84 virtual ~wxPaintDC();
85
86 // find the entry for this DC in the cache (keyed by the window)
87 static WXHDC FindDCInCache(wxWindow* win);
88
89protected:
90 static wxArrayDCInfo ms_cache;
91
92 // find the entry for this DC in the cache (keyed by the window)
93 wxPaintDCInfo *FindInCache(size_t *index = NULL) const;
94
95private:
96 DECLARE_DYNAMIC_CLASS_NO_COPY(wxPaintDC)
97};
98
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
117#endif
118 // _WX_DCCLIENT_H_