xtd 1.0.0
Loading...
Searching...
No Matches
assert_dialog.hpp
Go to the documentation of this file.
1
4#pragma once
5#include "component.hpp"
6#include "dialog_result.hpp"
9#include "iwin32_window.hpp"
10#include <xtd/diagnostics/stack_frame>
11#include <xtd/event>
12
14namespace xtd {
16 namespace forms {
36 struct data;
37
38 public:
40
45
47
51 [[nodiscard]] auto dialog_result() const noexcept -> xtd::forms::dialog_result;
52
55 [[nodiscard]] auto dialog_appearance() const noexcept -> xtd::forms::dialog_appearance;
60
63 [[nodiscard]] auto message() const noexcept -> xtd::string;
67 auto message(const xtd::string& value) -> assert_dialog&;
69
71
74 auto reset() noexcept -> void;
75
80
83 auto show_sheet(const iwin32_window& owner, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) -> void;
84
88
90
96
98
103 [[deprecated("Will be removed in version 1.2.0.")]]
104 [[nodiscard]] auto stack_frame() const noexcept -> xtd::diagnostics::stack_frame;
109 [[deprecated("Use xtd::forms::assert_dialog::show_dialog ([owner,] stack_frame) or xtd::forms::assert_dialog::show_sheet (owner, stack_frame) - Will be removed in version 1.2.0.")]]
110 [[nodiscard]] auto stack_frame(const xtd::diagnostics::stack_frame& value) -> assert_dialog&;
112
113 protected:
115
122
123 private:
124 auto set_message() noexcept -> void;
125 xtd::sptr<data> data_;
126 };
127 }
128}
Represents an event.
Definition event.hpp:23
auto dialog_result() const noexcept -> xtd::forms::dialog_result
Gets async dialog_result result after dialog box is closing.
auto reset() noexcept -> void
Resets all properties to empty string.
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.hpp:94
assert_dialog()
Initializes a new instance of the assert_dialog class.
auto show_sheet(const iwin32_window &owner, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> void
Runs assert dialog box.
auto stack_frame() const noexcept -> xtd::diagnostics::stack_frame
Gets stack frame.
auto on_dialog_closed(const dialog_closed_event_args &e) -> void
Raises the close event.
auto dialog_appearance() const noexcept -> xtd::forms::dialog_appearance
Gets the dialog appearance.
auto show_dialog(const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> xtd::forms::dialog_result
Runs assert dialog box.
auto show_sheet_dialog(const iwin32_window &owner, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) -> xtd::forms::dialog_result
Runs assert dialog box.
auto message() const noexcept -> xtd::string
Gets the dialog message text.
Provides the base implementation and enables object sharing between applications.
Definition component.hpp:26
Provides data for a dialog closed event.
Definition dialog_closed_event_args.hpp:22
Provides an interface to expose Win32 HWND handles.
Definition iwin32_window.hpp:23
Contains xtd::forms::component class.
Contains xtd::forms::dialog_appearance enum class.
Contains xtd::forms::dialog_closed_event_handler handler.
Contains xtd::forms::dialog_result enum class.
xtd::delegate< void(xtd::object &sender, const xtd::forms::dialog_closed_event_args &e)> dialog_closed_event_handler
Provides handler for a dialog closed event.
Definition dialog_closed_event_handler.hpp:27
#define forms_export_
Define shared library export.
Definition forms_export.hpp:13
xtd::shared_ptr_object< type_t > sptr
The xtd::sptr object is a shared pointer.
Definition sptr.hpp:25
Contains xtd::forms::iwin32_window interface.
The xtd::diagnostics namespace provides classes that allow you to interact with system processes,...
Definition assert_dialog_result.hpp:10
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition texts.hpp:219
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
constexpr auto data() const noexcept -> const_pointer
Gets direct access to the underlying contiguous storage.
Definition read_only_span.hpp:197