xtd - Reference Guide  0.2.0
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
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:
27  key_press_event_args() = default;
31  key_press_event_args(char32_t key_char) : key_char_(key_char) {}
34  key_press_event_args& operator=(const key_press_event_args& key_press_event_args) = default;
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 }
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:40
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:85
key_press_event_args(char32_t key_char)
Initializes a new instance of the KeyPressEventArgs class.
Definition: key_press_event_args.h:31
char32_t key_char() const
Gets the character corresponding to the key pressed.
Definition: key_press_event_args.h:65
void handled(bool handled)
Sets a value indicating whether the key_press event was handled.
Definition: key_press_event_args.h:44
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