xtd 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 {
26  public:
28 
32  key_press_event_args() = default;
36  explicit key_press_event_args(char32 key_char) : key_char_(key_char) {}
38 
41  key_press_event_args& operator =(const key_press_event_args& key_press_event_args) = default;
43 
45 
50  bool handled() const noexcept {return handled_;}
54  void handled(bool handled) {handled_ = handled;}
55 
75  char32 key_char() const noexcept {return key_char_;}
95  void key_char(char32 key_char) {key_char_ = key_char;}
97 
98  private:
99  char32 key_char_;
100  bool handled_ = false;
101  };
102  }
103 }
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
char32 key_char() const noexcept
Gets the character corresponding to the key pressed.
Definition: key_press_event_args.h:75
key_press_event_args()=default
Initializes a new instance of the KeyPressEventArgs class.
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
key_press_event_args(char32 key_char)
Initializes a new instance of the KeyPressEventArgs class.
Definition: key_press_event_args.h:36
void key_char(char32 key_char)
Sets the character corresponding to the key pressed.
Definition: key_press_event_args.h:95
bool handled() const noexcept
Gets a value indicating whether the xtd::forms::control::key_press event was handled.
Definition: key_press_event_args.h:50
void handled(bool handled)
Sets a value indicating whether the xtd::forms::control::key_press event was handled.
Definition: key_press_event_args.h:54
Provides data for the xtd::forms::control::key_press event.
Definition: key_press_event_args.h:25
char32_t char32
Represents a 32-bit unicode character.
Definition: types.h:85
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition: about_box.h:13