overlay.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. #ifndef _WX_PRIVATE_OVERLAY_H_
  11. #define _WX_PRIVATE_OVERLAY_H_
  12. #include "wx/overlay.h"
  13. #ifdef wxHAS_NATIVE_OVERLAY
  14. #if defined(__WXMAC__)
  15. #include "wx/osx/carbon/private/overlay.h"
  16. #elif defined(__WXDFB__)
  17. #include "wx/dfb/private/overlay.h"
  18. #else
  19. #error "unknown native wxOverlay implementation"
  20. #endif
  21. #else // !wxHAS_NATIVE_OVERLAY
  22. #include "wx/bitmap.h"
  23. class WXDLLIMPEXP_FWD_CORE wxWindow;
  24. // generic implementation of wxOverlay
  25. class wxOverlayImpl
  26. {
  27. public:
  28. wxOverlayImpl();
  29. ~wxOverlayImpl();
  30. // clears the overlay without restoring the former state
  31. // to be done eg when the window content has been changed and repainted
  32. void Reset();
  33. // returns true if it has been setup
  34. bool IsOk();
  35. void Init(wxDC* dc, int x , int y , int width , int height);
  36. void BeginDrawing(wxDC* dc);
  37. void EndDrawing(wxDC* dc);
  38. void Clear(wxDC* dc);
  39. private:
  40. wxBitmap m_bmpSaved ;
  41. int m_x ;
  42. int m_y ;
  43. int m_width ;
  44. int m_height ;
  45. wxWindow* m_window ;
  46. };
  47. #endif // wxHAS_NATIVE_OVERLAY/!wxHAS_NATIVE_OVERLAY
  48. #endif // _WX_PRIVATE_OVERLAY_H_