overlay.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: overlay.h
  3. // Purpose: interface of wxOverlay
  4. // Author: wxWidgets team
  5. // Licence: wxWindows licence
  6. /////////////////////////////////////////////////////////////////////////////
  7. /**
  8. @class wxOverlay
  9. Creates an overlay over an existing window, allowing for manipulations like
  10. rubberbanding, etc. On wxOSX the overlay is implemented with native
  11. platform APIs, on the other platforms it is simulated using wxMemoryDC.
  12. @library{wxcore}
  13. @see wxDCOverlay, wxDC
  14. */
  15. class wxOverlay
  16. {
  17. public:
  18. wxOverlay();
  19. ~wxOverlay();
  20. /**
  21. Clears the overlay without restoring the former state. To be done, for
  22. example, when the window content has been changed and repainted.
  23. */
  24. void Reset();
  25. };
  26. /**
  27. @class wxDCOverlay
  28. Connects an overlay with a drawing DC.
  29. @library{wxcore}
  30. @see wxOverlay, wxDC
  31. */
  32. class wxDCOverlay
  33. {
  34. public:
  35. /**
  36. Connects this overlay to the corresponding drawing dc, if the overlay is
  37. not initialized yet this call will do so.
  38. */
  39. wxDCOverlay(wxOverlay &overlay, wxDC *dc, int x , int y , int width , int height);
  40. /**
  41. Convenience wrapper that behaves the same using the entire area of the dc.
  42. */
  43. wxDCOverlay(wxOverlay &overlay, wxDC *dc);
  44. /**
  45. Removes the connection between the overlay and the dc.
  46. */
  47. virtual ~wxDCOverlay();
  48. /**
  49. Clears the layer, restoring the state at the last init.
  50. */
  51. void Clear();
  52. };