xtd - Reference Guide  0.1.0
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
Loading...
Searching...
No Matches
paint_event_args.h
Go to the documentation of this file.
1
4#pragma once
5
6#include <xtd/event_args.h>
9#include "../forms_export.h"
10
12namespace xtd {
14 namespace forms {
16 class control;
18
27 public:
31 paint_event_args(xtd::forms::control& control, const drawing::rectangle& clip_rectangle) : control_(&control), clip_rectangle_(clip_rectangle) {};
35 paint_event_args(xtd::drawing::graphics& graphics, const drawing::rectangle& clip_rectangle) : graphics_(&graphics), clip_rectangle_(clip_rectangle) {};
39
42 const drawing::rectangle& clip_rectangle() const {return clip_rectangle_;}
43
47
48 private:
49 xtd::forms::control* control_ = nullptr;
50 mutable xtd::drawing::graphics* graphics_ = nullptr;
51 xtd::drawing::rectangle clip_rectangle_;
52 };
53 }
54}
Defines an object used to draw lines and curves. This class cannot be inherited.
Definition: graphics.h:48
Stores a set of four integers that represent the location and size of a rectangle.
Definition: rectangle.h:25
Represents the base class for classes that contain event data, and provides a value to use for events...
Definition: event_args.h:18
Defines the base class for controls, which are components with visual representation.
Definition: control.h:67
Provides data for the paint event.
Definition: paint_event_args.h:26
const drawing::rectangle & clip_rectangle() const
Gets the rectangle in which to paint.
Definition: paint_event_args.h:42
paint_event_args(xtd::drawing::graphics &graphics, const drawing::rectangle &clip_rectangle)
Initializes a new instance of the paint_event_args class with the specified control,...
Definition: paint_event_args.h:35
paint_event_args(xtd::forms::control &control, const drawing::rectangle &clip_rectangle)
Initializes a new instance of the paint_event_args class with the specified control,...
Definition: paint_event_args.h:31
drawing::graphics & graphics()
Gets the graphics used to paint.
Contains xtd::event_args event args.
Contains xtd::drawing::graphics class.
#define forms_export_
Define shared library export.
Definition: forms_export.h:13
@ control
The left or right CTRL modifier key.
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition: about_box.h:13
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition: system_report.h:17
Contains xtd::drawing::rectangle class.