xtd 0.2.0
Loading...
Searching...
No Matches
key_press_event_args.h
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
37 explicit key_press_event_args(char32 key_char) : key_char_(key_char) {}
39
44
46
51 bool handled() const noexcept {return handled_;}
55 void handled(bool handled) {handled_ = handled;}
56
76 char32 key_char() const noexcept {return key_char_;}
96 void key_char(char32 key_char) {key_char_ = key_char;}
98
99 private:
100 char32 key_char_;
101 bool handled_ = false;
102 };
103 }
104}
Represents the base class for classes that contain event data, and provides a value to use for events...
Definition event_args.h:18
Provides data for the xtd::forms::control::key_press event.
Definition key_press_event_args.h:26
void key_char(char32 key_char)
Sets the character corresponding to the key pressed.
Definition key_press_event_args.h:96
void handled(bool handled)
Sets a value indicating whether the xtd::forms::control::key_press event was handled.
Definition key_press_event_args.h:55
char32 key_char() const noexcept
Gets the character corresponding to the key pressed.
Definition key_press_event_args.h:76
key_press_event_args(char32 key_char)
Initializes a new instance of the KeyPressEventArgs class.
Definition key_press_event_args.h:37
key_press_event_args()=default
Initializes a new instance of the KeyPressEventArgs class.
bool handled() const noexcept
Gets a value indicating whether the xtd::forms::control::key_press event was handled.
Definition key_press_event_args.h:51
char32_t char32
Represents a 32-bit unicode character.
Definition char32.h:26
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition xtd_about_box.h:12
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10