xtd - Reference Guide  0.1.2
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
Loading...
Searching...
No Matches
key_press_event_args.h
Go to the documentation of this file.
1
4#pragma once
5
6#include <xtd/event_args.h>
7
9namespace xtd {
11 namespace forms {
24 public:
31 key_press_event_args(char32_t key_char) : key_char_(key_char) {}
36
40 bool handled() const {return handled_;}
44 void handled(bool handled) {handled_ = handled;}
45
65 char32_t key_char() const {return key_char_;}
85 void key_char(char32_t key_char) {key_char_ = key_char;}
86
87 private:
88 char32_t key_char_;
89 bool handled_ = false;
90 };
91 }
92}
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 key_press event.
Definition key_press_event_args.h:23
void handled(bool handled)
Sets a value indicating whether the key_press event was handled.
Definition key_press_event_args.h:44
char32_t key_char() const
Gets the character corresponding to the key pressed.
Definition key_press_event_args.h:65
key_press_event_args()=default
Initializes a new instance of the KeyPressEventArgs class.
void key_char(char32_t key_char)
Sets the character corresponding to the key pressed.
Definition key_press_event_args.h:85
key_press_event_args(char32_t key_char)
Initializes a new instance of the KeyPressEventArgs class.
Definition key_press_event_args.h:31
bool handled() const
Gets a value indicating whether the key_press event was handled.
Definition key_press_event_args.h:40
Contains xtd::event_args event args.
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