xtd 1.0.0
Loading...
Searching...
No Matches
draw_item_event_args.hpp
Go to the documentation of this file.
1
4#pragma once
5#include "../forms_export.hpp"
6#include "control.hpp"
7#include "draw_item_state.hpp"
8#include <xtd/drawing/color>
9#include <xtd/drawing/font>
10#include <xtd/drawing/graphics>
11#include <xtd/drawing/rectangle>
12#include <xtd/drawing/system_fonts>
13#include <xtd/event_args>
14#include <cstdint>
15
17namespace xtd {
19 namespace forms {
32 struct data;
33
34 public:
36 draw_item_event_args() = default;
38 auto operator =(const draw_item_event_args& other) -> draw_item_event_args&;
40
42
59
61
66 [[nodiscard]] auto back_color() const noexcept -> const xtd::drawing::color&;
67
70 [[nodiscard]] auto bounds() const noexcept -> const xtd::drawing::rectangle&;
71
75 [[nodiscard]] auto font() const noexcept -> const xtd::drawing::font&;
76
80 [[nodiscard]] auto fore_color() const noexcept -> const xtd::drawing::color&;
81
84 [[nodiscard]] auto graphics() noexcept -> xtd::drawing::graphics&;
85
89 [[nodiscard]] auto index() const noexcept -> xtd::usize;
90
94 [[nodiscard]] auto state() const noexcept -> xtd::forms::draw_item_state;
96
97 private:
98 xtd::sptr<data> data_;
99 };
100 }
101}
Represents an ARGB (alpha, red, green, blue) color.
Definition color.hpp:52
Defines a particular format for text, including font face, size, and style attributes....
Definition font.hpp:45
Defines an object used to draw lines and curves. This class cannot be inherited.
Definition graphics.hpp:67
Represents the base class for classes that contain event data, and provides a value to use for events...
Definition event_args.hpp:18
auto index() const noexcept -> xtd::usize
Gets the index value of the item that is being drawn.
auto font() const noexcept -> const xtd::drawing::font &
Gets the font that is assigned to the item being drawn.
draw_item_event_args(xtd::drawing::graphics &graphics, const xtd::drawing::font &font, const xtd::drawing::rectangle &rect, xtd::usize index, xtd::forms::draw_item_state state)
Initializes a new instance of the xtd::forms::draw_item_event_args class for the specified control wi...
auto fore_color() const noexcept -> const xtd::drawing::color &
Gets the foreground color of the of the item being drawn.
auto graphics() noexcept -> xtd::drawing::graphics &
Gets the graphics surface to draw the item on.
auto state() const noexcept -> xtd::forms::draw_item_state
Gets the state of the item being drawn.
auto bounds() const noexcept -> const xtd::drawing::rectangle &
Gets the rectangle that represents the bounds of the item that is being drawn.
draw_item_event_args(xtd::drawing::graphics &graphics, const xtd::drawing::font &font, const xtd::drawing::rectangle &rect, xtd::usize index, xtd::forms::draw_item_state state, const xtd::drawing::color &back_color, const xtd::drawing::color &fore_core)
Initializes a new instance of the xtd::forms::draw_item_event_args class for the specified control wi...
auto back_color() const noexcept -> const xtd::drawing::color &
Gets the background color of the item that is being drawn.
Contains xtd::forms::control control.
Contains xtd::forms::draw_item_state enum class.
Contains forms_export_ keyword.
#define forms_export_
Define shared library export.
Definition forms_export.hpp:13
xtd::shared_ptr_object< type_t > sptr
The xtd::sptr object is a shared pointer.
Definition sptr.hpp:25
std::size_t usize
Represents an unsigned size of any object in bytes.
Definition usize.hpp:22
@ other
The operating system is other.
Definition platform_id.hpp:60
draw_item_state
Specifies the state of an item that is being drawn. This enumeration supports a bitwise combination o...
Definition draw_item_state.hpp:18
The xtd::drawing namespace provides access to GDI+ basic graphics functionality. More advanced functi...
Definition actions_system_images.hpp:10
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition texts.hpp:219
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
constexpr auto data() const noexcept -> const_pointer
Gets direct access to the underlying contiguous storage.
Definition read_only_span.hpp:197
Stores a set of four integers that represent the location and size of a rectangle.
Definition rectangle.hpp:44