xtd 0.2.0
exception_dialog.h
Go to the documentation of this file.
1 #pragma once
5 #include "component.h"
6 #include "dialog_result.h"
7 #include "dialog_appearance.h"
9 #include "iwin32_window.h"
11 #include <xtd/version>
12 #include <xtd/drawing/icon>
13 #include <xtd/system_exception>
14 #include <functional>
15 
17 namespace xtd {
19  namespace forms {
36  class forms_export_ exception_dialog final : public component {
37  struct data;
38 
39  public:
41 
46 
48 
53 
61 
64  std::reference_wrapper<const std::exception> exception() const noexcept;
69  exception_dialog& exception(const std::exception& exception);
70 
73  xtd::ustring text() const noexcept;
79 
81 
84  void reset() noexcept;
85 
87  xtd::forms::dialog_result show_dialog();
89  xtd::forms::dialog_result show_dialog(const iwin32_window& owner);
92  void show_sheet(const iwin32_window& owner);
94  xtd::forms::dialog_result show_sheet_dialog(const iwin32_window& owner);
96 
98 
104 
105  protected:
107 
112  void on_dialog_closed(const dialog_closed_event_args& e);
114 
115  private:
116  std::shared_ptr<data> data_;
117  };
118  }
119 }
control_appearance dialog_appearance
Specifies the appearance of a dialog.
Definition: dialog_appearance.h:19
dialog_result
Specifies identifiers to indicate the return value of a dialog box.
Definition: dialog_result.h:41
Contains xtd::forms::dialog_appearance enum class.
Contains xtd::forms::dialog_closed_event_handler dialog.
Contains xtd::forms::layout::arranged_element_collection collection.
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
event< exception_dialog, dialog_closed_event_handler > dialog_closed
Occurs when the user close an exception dialog box with dialog close button or other dialog buttons...
Definition: exception_dialog.h:102
control_appearance
Specifies the appearance of a control.
Definition: control_appearance.h:19
Represents text as a sequence of UTF-8 code units.
Definition: ustring.h:46
Contains xtd::forms::iwin32_window interface.
Provides an interface to expose Win32 HWND handles.
Definition: iwin32_window.h:21
Represents an event.
Definition: event.h:21
Contains xtd::forms::dialog_result enum class.
Represents a common dialog box that displays exception dialog.
Definition: exception_dialog.h:36
Provides data for a dialog closed event.
Definition: dialog_closed_event_args.h:20
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition: about_box.h:13
Contains xtd::forms::component class.
The xtd::forms::status_bar_panel displays text in the standard font.
Provides the base implementation and enables object sharing between applications. ...
Definition: component.h:23