]> git.saurik.com Git - wxWidgets.git/blob - include/wx/private/overlay.h
Fix wxPropertyGrid::GetPropertyRect when the last item is collapsed.
[wxWidgets.git] / include / wx / private / overlay.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/private/overlay.h
3 // Purpose: wxOverlayImpl declaration
4 // Author: Stefan Csomor
5 // Modified by:
6 // Created: 2006-10-20
7 // Copyright: (c) wxWidgets team
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11 #ifndef _WX_PRIVATE_OVERLAY_H_
12 #define _WX_PRIVATE_OVERLAY_H_
13
14 #include "wx/overlay.h"
15
16 #ifdef wxHAS_NATIVE_OVERLAY
17
18 #if defined(__WXMAC__)
19 #include "wx/osx/carbon/private/overlay.h"
20 #elif defined(__WXDFB__)
21 #include "wx/dfb/private/overlay.h"
22 #else
23 #error "unknown native wxOverlay implementation"
24 #endif
25
26 #else // !wxHAS_NATIVE_OVERLAY
27
28 #include "wx/bitmap.h"
29
30 class WXDLLIMPEXP_FWD_CORE wxWindow;
31
32 // generic implementation of wxOverlay
33 class wxOverlayImpl
34 {
35 public:
36 wxOverlayImpl();
37 ~wxOverlayImpl();
38
39
40 // clears the overlay without restoring the former state
41 // to be done eg when the window content has been changed and repainted
42 void Reset();
43
44 // returns true if it has been setup
45 bool IsOk();
46
47 void Init(wxDC* dc, int x , int y , int width , int height);
48
49 void BeginDrawing(wxDC* dc);
50
51 void EndDrawing(wxDC* dc);
52
53 void Clear(wxDC* dc);
54
55 private:
56 wxBitmap m_bmpSaved ;
57 int m_x ;
58 int m_y ;
59 int m_width ;
60 int m_height ;
61 wxWindow* m_window ;
62 };
63
64 #endif // wxHAS_NATIVE_OVERLAY/!wxHAS_NATIVE_OVERLAY
65
66 #endif // _WX_PRIVATE_OVERLAY_H_