xtd - Reference Guide 0.2.0
key_press_event_args.h
Go to the documentation of this file.
1 #pragma once
5 
6 #include <xtd/event_args.h>
7 
9 namespace xtd {
11  namespace forms {
24  public:
26 
30  key_press_event_args() = default;
34  explicit key_press_event_args(char32_t key_char) : key_char_(key_char) {}
36 
39  key_press_event_args& operator=(const key_press_event_args& key_press_event_args) = default;
41 
43 
48  bool handled() const {return handled_;}
52  void handled(bool handled) {handled_ = handled;}
53 
73  char32_t key_char() const {return key_char_;}
93  void key_char(char32_t key_char) {key_char_ = key_char;}
95 
96  private:
97  char32_t key_char_;
98  bool handled_ = false;
99  };
100  }
101 }
Contains xtd::event_args event args.
Represents the base class for classes that contain event data, and provides a value to use for events...
Definition: event_args.h:18
key_press_event_args()=default
Initializes a new instance of the KeyPressEventArgs class.
bool handled() const
Gets a value indicating whether the key_press event was handled.
Definition: key_press_event_args.h:48
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
void key_char(char32_t key_char)
Sets the character corresponding to the key pressed.
Definition: key_press_event_args.h:93
key_press_event_args(char32_t key_char)
Initializes a new instance of the KeyPressEventArgs class.
Definition: key_press_event_args.h:34
char32_t key_char() const
Gets the character corresponding to the key pressed.
Definition: key_press_event_args.h:73
void handled(bool handled)
Sets a value indicating whether the key_press event was handled.
Definition: key_press_event_args.h:52
Provides data for the key_press event.
Definition: key_press_event_args.h:23
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition: about_box.h:13