overlay.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/dfb/private/overlay.h
  3. // Purpose: wxOverlayImpl declaration
  4. // Author: Vaclav Slavik
  5. // Created: 2006-10-20
  6. // Copyright: (c) wxWidgets team
  7. // Licence: wxWindows licence
  8. /////////////////////////////////////////////////////////////////////////////
  9. #ifndef _WX_DFB_PRIVATE_OVERLAY_H_
  10. #define _WX_DFB_PRIVATE_OVERLAY_H_
  11. #include "wx/dfb/dfbptr.h"
  12. #include "wx/gdicmn.h"
  13. wxDFB_DECLARE_INTERFACE(IDirectFBSurface);
  14. class WXDLLIMPEXP_FWD_CORE wxWindow;
  15. class WXDLLIMPEXP_FWD_CORE wxDC;
  16. class wxOverlayImpl
  17. {
  18. public:
  19. wxOverlayImpl();
  20. ~wxOverlayImpl();
  21. void Reset();
  22. bool IsOk();
  23. void Init(wxDC* dc, int x , int y , int width , int height);
  24. void BeginDrawing(wxDC* dc);
  25. void EndDrawing(wxDC* dc);
  26. void Clear(wxDC* dc);
  27. // wxDFB specific methods:
  28. bool IsEmpty() const { return m_isEmpty; }
  29. wxRect GetRect() const { return m_rect; }
  30. wxIDirectFBSurfacePtr GetDirectFBSurface() const { return m_surface; }
  31. public:
  32. // window the overlay is associated with
  33. wxWindow *m_window;
  34. // rectangle covered by the overlay, in m_window's window coordinates
  35. wxRect m_rect;
  36. // surface of the overlay, same size as m_rect
  37. wxIDirectFBSurfacePtr m_surface;
  38. // this flag is set to true if nothing was drawn on the overlay (either
  39. // initially or Clear() was called)
  40. bool m_isEmpty;
  41. };
  42. #endif // _WX_DFB_PRIVATE_OVERLAY_H_