dcscreen.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: dcscreen.h
  3. // Purpose: interface of wxScreenDC
  4. // Author: wxWidgets team
  5. // Licence: wxWindows licence
  6. /////////////////////////////////////////////////////////////////////////////
  7. /**
  8. @class wxScreenDC
  9. A wxScreenDC can be used to paint on the screen. This should normally be
  10. constructed as a temporary stack object; don't store a wxScreenDC object.
  11. @library{wxcore}
  12. @category{dc}
  13. @see wxDC, wxMemoryDC, wxPaintDC, wxClientDC, wxWindowDC
  14. */
  15. class wxScreenDC : public wxDC
  16. {
  17. public:
  18. /**
  19. Constructor.
  20. */
  21. wxScreenDC();
  22. /**
  23. Use this in conjunction with StartDrawingOnTop().
  24. This function destroys the temporary window created to implement on-top
  25. drawing (X only).
  26. */
  27. static bool EndDrawingOnTop();
  28. /**
  29. Use this in conjunction with EndDrawingOnTop() to ensure that drawing
  30. to the screen occurs on top of existing windows. Without this, some
  31. window systems (such as X) only allow drawing to take place underneath
  32. other windows.
  33. This version of StartDrawingOnTop() is used to specify that the area
  34. that will be drawn on coincides with the given window. It is
  35. recommended that an area of the screen is specified with
  36. StartDrawingOnTop(wxRect*) because with large regions, flickering
  37. effects are noticeable when destroying the temporary transparent window
  38. used to implement this feature.
  39. You might use this function when implementing a drag feature, for
  40. example as in the wxSplitterWindow implementation.
  41. @remarks This function is probably obsolete since the X implementations
  42. allow drawing directly on the screen now. However, the fact
  43. that this function allows the screen to be refreshed
  44. afterwards, may be useful to some applications.
  45. */
  46. static bool StartDrawingOnTop(wxWindow* window);
  47. /**
  48. Use this in conjunction with EndDrawingOnTop() to ensure that drawing
  49. to the screen occurs on top of existing windows. Without this, some
  50. window systems (such as X) only allow drawing to take place underneath
  51. other windows.
  52. This version of StartDrawingOnTop() is used to specify an area of the
  53. screen which is to be drawn on. If @NULL is passed, the whole screen is
  54. available. It is recommended that an area of the screen is specified
  55. with this function rather than with StartDrawingOnTop(wxWindow*),
  56. because with large regions, flickering effects are noticeable when
  57. destroying the temporary transparent window used to implement this
  58. feature.
  59. You might use this function when implementing a drag feature, for
  60. example as in the wxSplitterWindow implementation.
  61. @remarks This function is probably obsolete since the X implementations
  62. allow drawing directly on the screen now. However, the fact
  63. that this function allows the screen to be refreshed
  64. afterwards, may be useful to some applications.
  65. */
  66. static bool StartDrawingOnTop(wxRect* rect = NULL);
  67. };