xtd 0.2.0
paint_event_args.h
Go to the documentation of this file.
1 #pragma once
5 #include "../forms_export.h"
6 #include "message.h"
7 #include <xtd/drawing/graphics>
8 #include <xtd/drawing/rectangle>
9 #include <xtd/event_args>
10 
12 namespace xtd {
14  namespace forms {
16  class control;
18 
28  class forms_export_ paint_event_args : public event_args {
29  public:
31 
40  paint_event_args(xtd::drawing::graphics& graphics, const drawing::rectangle& clip_rectangle);
42 
44 
48  const drawing::rectangle& clip_rectangle() const noexcept;
49 
52  drawing::graphics& graphics();
54 
55  private:
56  friend class xtd::forms::control;
57  xtd::forms::control* control_ = nullptr;
58  mutable std::unique_ptr<xtd::drawing::graphics> graphics_;
59  xtd::drawing::rectangle clip_rectangle_;
60  xtd::forms::message message_; // need for xtd::forms::control::on_paint_ xtd::forms::control::on_paint_background to call def_wnd_proc method.
61  };
62  }
63 }
Represents the base class for classes that contain event data, and provides a value to use for events...
Definition: event_args.h:18
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
Contains xtd::forms::message class.
Provides data for the xtd::forms::control::paint event.
Definition: paint_event_args.h:28
Stores a set of four integers that represent the location and size of a rectangle.
Definition: rectangle.h:44
Implements a Windows message.
Definition: message.h:26
Defines the base class for controls, which are components with visual representation.
Definition: control.h:78
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition: about_box.h:13
Defines an object used to draw lines and curves. This class cannot be inherited.
Definition: graphics.h:70
The left or right CTRL modifier key.