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.
console_cancel_event_args.h
Go to the documentation of this file.
1 #pragma once
5 #include "event_args.h"
6 #include "console_special_key.h"
7 
9 namespace xtd {
19  public:
21  console_cancel_event_args() = default;
22 
26  console_cancel_event_args(bool cancel, console_special_key special_key) : cancel_(cancel), special_key_(special_key) {}
27 
30  console_cancel_event_args& operator=(const console_cancel_event_args&) = default;
32 
35  bool cancel() const {return cancel_;}
36 
39  void cancel(bool cancel) {cancel_ = cancel;}
40 
43  console_special_key special_key() const {return special_key_;}
44 
45  private:
46  bool cancel_ = false;
47  console_special_key special_key_ = static_cast<console_special_key>(0);
48  };
49 }
bool cancel() const
Gets a value that indicates whether simultaneously pressing the Control modifier key and the C consol...
Definition: console_cancel_event_args.h:35
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
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
void cancel(bool cancel)
Sets a value that indicates whether simultaneously pressing the Control modifier key and the C consol...
Definition: console_cancel_event_args.h:39
console_special_key
Specifies combinations of modifier and console keys that can interrupt the current process...
Definition: console_special_key.h:18
Contains xtd::console_special_key enum class.
Provides data for the console::cancel_key_press event. This class cannot be inherited.
Definition: console_cancel_event_args.h:18
console_special_key special_key() const
Gets the combination of modifier and console keys that interrupted the current process.
Definition: console_cancel_event_args.h:43
console_cancel_event_args(bool cancel, console_special_key special_key)
Initializes a new instance of the console_cancel_event_args class.
Definition: console_cancel_event_args.h:26
console_cancel_event_args()=default
Initializes a new instance of the console_cancel_event_args class.