xtd.forms - Reference Guide  0.1.0
Modern c++17 library containing classes for creating Windows-based applications that take full advantage of the rich user interface features available in the Microsoft Windows, Apple macOS and Linux like Ubuntu operating system.
do_work_event_args.h
1 #pragma once
2 #include <any>
3 #include <cstdint>
4 #include <xtd/event_args.h>
5 
7 namespace xtd {
9  namespace forms {
11  class do_work_event_args : public event_args {
12  public:
15  do_work_event_args& operator=(const do_work_event_args& do_work_event_args) = default;
17 
20  do_work_event_args(const std::any& argument) : argument_(argument) {}
21 
24  std::any argument() const {return this->argument_;}
25 
26  bool cancel() const {return cancel_;}
27  void cancel(bool value) {cancel_ = value;}
28 
29  std::any result() const {return this->result_;}
30  void result(std::any value) {this->result_ = value;}
31 
32  private:
33  std::any argument_;
34  bool cancel_ = false;
35  std::any result_;
36  };
37  }
38 }
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
std::any argument() const
Gets a value that represents the argument of an asynchronous operation.
Definition: do_work_event_args.h:24
Provides data for the do_work event handler.
Definition: do_work_event_args.h:11
do_work_event_args(const std::any &argument)
Initializes a new instance of the DoWorkEventArgs class.
Definition: do_work_event_args.h:20