dcclient.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: dcclient.h
  3. // Purpose: interface of wxClientDC and wxPaintDC
  4. // Author: wxWidgets team
  5. // Licence: wxWindows licence
  6. /////////////////////////////////////////////////////////////////////////////
  7. /**
  8. @class wxPaintDC
  9. A wxPaintDC must be constructed if an application wishes to paint on the
  10. client area of a window from within an EVT_PAINT() event handler. This
  11. should normally be constructed as a temporary stack object; don't store a
  12. wxPaintDC object. If you have an EVT_PAINT() handler, you @e must create a
  13. wxPaintDC object within it even if you don't actually use it.
  14. Using wxPaintDC within your EVT_PAINT() handler is important because it
  15. automatically sets the clipping area to the damaged area of the window.
  16. Attempts to draw outside this area do not appear.
  17. To draw on a window from outside your EVT_PAINT() handler, construct a
  18. wxClientDC object.
  19. To draw on the whole window including decorations, construct a wxWindowDC
  20. object (Windows only).
  21. A wxPaintDC object is initialized to use the same font and colours as the
  22. window it is associated with.
  23. @library{wxcore}
  24. @category{dc}
  25. @see wxDC, wxClientDC, wxMemoryDC, wxWindowDC, wxScreenDC
  26. */
  27. class wxPaintDC : public wxClientDC
  28. {
  29. public:
  30. /**
  31. Constructor. Pass a pointer to the window on which you wish to paint.
  32. */
  33. wxPaintDC(wxWindow* window);
  34. };
  35. /**
  36. @class wxClientDC
  37. A wxClientDC must be constructed if an application wishes to paint on the
  38. client area of a window from outside an EVT_PAINT() handler. This should
  39. normally be constructed as a temporary stack object; don't store a
  40. wxClientDC object.
  41. To draw on a window from within an EVT_PAINT() handler, construct a
  42. wxPaintDC object instead.
  43. To draw on the whole window including decorations, construct a wxWindowDC
  44. object (Windows only).
  45. A wxClientDC object is initialized to use the same font and colours as the
  46. window it is associated with.
  47. @library{wxcore}
  48. @category{dc}
  49. @see wxDC, wxMemoryDC, wxPaintDC, wxWindowDC, wxScreenDC
  50. */
  51. class wxClientDC : public wxWindowDC
  52. {
  53. public:
  54. /**
  55. Constructor. Pass a pointer to the window on which you wish to paint.
  56. */
  57. wxClientDC(wxWindow* window);
  58. };
  59. /**
  60. @class wxWindowDC
  61. A wxWindowDC must be constructed if an application wishes to paint on the
  62. whole area of a window (client and decorations). This should normally be
  63. constructed as a temporary stack object; don't store a wxWindowDC object.
  64. To draw on a window from inside an EVT_PAINT() handler, construct a
  65. wxPaintDC object instead.
  66. To draw on the client area of a window from outside an EVT_PAINT() handler,
  67. construct a wxClientDC object.
  68. A wxWindowDC object is initialized to use the same font and colours as the
  69. window it is associated with.
  70. @library{wxcore}
  71. @category{dc}
  72. @see wxDC, wxMemoryDC, wxPaintDC, wxClientDC, wxScreenDC
  73. */
  74. class wxWindowDC : public wxDC
  75. {
  76. public:
  77. /**
  78. Constructor. Pass a pointer to the window on which you wish to paint.
  79. */
  80. wxWindowDC(wxWindow* window);
  81. };