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 {
25 public:
27
35 explicit key_press_event_args(char32 key_char) : key_char_(key_char) {}
37
42
44
49 bool handled() const noexcept {return handled_;}
53 void handled(bool handled) {handled_ = handled;}
54
74 char32 key_char() const noexcept {return key_char_;}
94 void key_char(char32 key_char) {key_char_ = key_char;}
96
97 private:
98 char32 key_char_;
99 bool handled_ = false;
100 };
101 }
102}
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:24
void key_char(char32 key_char)
Sets the character corresponding to the key pressed.
Definition key_press_event_args.h:94
void handled(bool handled)
Sets a value indicating whether the xtd::forms::control::key_press event was handled.
Definition key_press_event_args.h:53
char32 key_char() const noexcept
Gets the character corresponding to the key pressed.
Definition key_press_event_args.h:74
key_press_event_args(char32 key_char)
Initializes a new instance of the KeyPressEventArgs class.
Definition key_press_event_args.h:35
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:49
char32_t char32
Represents a 32-bit unicode character.
Definition types.h:87
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