xtd 0.2.0
cancel_event_args.h
Go to the documentation of this file.
1 #pragma once
5 #include <xtd/event_args>
6 
8 namespace xtd {
10  namespace forms {
20  class cancel_event_args : public event_args {
21  public:
23 
26  cancel_event_args() = default;
27 
30  explicit cancel_event_args(bool cancel) : cancel_(cancel) {};
32 
35  cancel_event_args& operator =(const cancel_event_args& cancel_event_args) = default;
37 
39 
43  virtual bool cancel() const noexcept {return cancel_;}
46  virtual void cancel(bool cancel) {cancel_ = cancel;}
48 
49  protected:
50  bool cancel_ = false;
51  };
52  }
53 }
virtual void cancel(bool cancel)
Sets a value indicating whether the event should be canceled.
Definition: cancel_event_args.h:46
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
cancel_event_args()=default
Initializes a new instance of the cancel_event_args class with the cancel property set to false...
cancel_event_args(bool cancel)
Initializes a new instance of the cancel_event_args class with the cancel property set to the given v...
Definition: cancel_event_args.h:30
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition: about_box.h:13
Provides data for a cancelable event.
Definition: cancel_event_args.h:20
virtual bool cancel() const noexcept
Gets a value indicating whether the event should be canceled.
Definition: cancel_event_args.h:43