xtd 1.0.0
Loading...
Searching...
No Matches
key_press_event_args.hpp
Go to the documentation of this file.
1
4#pragma once
5#include <xtd/event_args>
6
8namespace xtd {
10 namespace forms {
27 public:
29
39
41
46 [[nodiscard]] auto handled() const noexcept -> bool {return handled_;}
50 auto handled(bool value) -> key_press_event_args& {
51 handled_ = value;
52 return *this;
53 }
54
74 [[nodiscard]] auto key_char() const noexcept -> xtd::char32 {return key_char_;}
95 key_char_ = value;
96 return *this;
97 }
98
99
100 private:
101 xtd::char32 key_char_;
102 bool handled_ = false;
103 };
104 }
105}
Represents the base class for classes that contain event data, and provides a value to use for events...
Definition event_args.hpp:18
key_press_event_args(xtd::char32 key_char)
Initializes a new instance of the KeyPressEventArgs class.
Definition key_press_event_args.hpp:37
auto handled() const noexcept -> bool
Gets a value indicating whether the xtd::forms::control::key_press event was handled.
Definition key_press_event_args.hpp:46
key_press_event_args()=default
Initializes a new instance of the KeyPressEventArgs class.
auto key_char() const noexcept -> xtd::char32
Gets the character corresponding to the key pressed.
Definition key_press_event_args.hpp:74
auto handled(bool value) -> key_press_event_args &
Sets a value indicating whether the xtd::forms::control::key_press event was handled.
Definition key_press_event_args.hpp:50
auto key_char(xtd::char32 value) -> key_press_event_args &
Sets the character corresponding to the key pressed.
Definition key_press_event_args.hpp:94
char32_t char32
Represents a 32-bit unicode character.
Definition char32.hpp:23
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