xtd 0.2.0
assert_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"
10 #include <xtd/diagnostics/stack_frame>
11 #include <xtd/event>
12 
14 namespace xtd {
16  namespace forms {
33  class forms_export_ assert_dialog final : public component {
34  struct data;
35 
36  public:
38 
41  assert_dialog();
43 
45 
50 
58 
61  xtd::ustring message() const noexcept;
65  assert_dialog& message(const xtd::ustring& value);
66 
69  xtd::diagnostics::stack_frame stack_frame() const noexcept;
73  assert_dialog& stack_frame(const xtd::diagnostics::stack_frame& value);
75 
77 
80  void reset() noexcept;
81 
83  xtd::forms::dialog_result show_dialog();
85  xtd::forms::dialog_result show_dialog(const iwin32_window& owner);
86 
89  void show_sheet(const iwin32_window& owner);
90 
92  xtd::forms::dialog_result show_sheet_dialog(const iwin32_window& owner);
94 
96 
102 
103  protected:
105 
110  void on_dialog_closed(const dialog_closed_event_args& e);
112 
113  private:
114  void set_message() noexcept;
115  std::shared_ptr<data> data_;
116  };
117  }
118 }
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.
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
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.
event< assert_dialog, dialog_closed_event_handler > dialog_closed
Occurs when the user close an assert dialog box with dialog close button or other dialog buttons...
Definition: assert_dialog.h:100
Provides an interface to expose Win32 HWND handles.
Definition: iwin32_window.h:21
Represents an event.
Definition: event.h:21
Provides information about a xtd::diagnostics::stack_frame, which represents a function call on the c...
Definition: stack_frame.h:37
Contains xtd::forms::dialog_result enum class.
Implements a Windows message.
Definition: message.h:26
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.
Represents a common dialog box that displays assert dialog.
Definition: assert_dialog.h:33
Provides the base implementation and enables object sharing between applications. ...
Definition: component.h:23