xtd 0.2.0
message_dialog.hpp
Go to the documentation of this file.
1
4#pragma once
5#include "component.hpp"
8#include "dialog_result.hpp"
10#include "iwin32_window.hpp"
15
17struct __xtd_forms_message_dialog_closed_caller__;
19
21namespace xtd {
23 namespace forms {
42 class forms_export_ message_dialog final : public component {
43 struct data;
44
45 public:
47
52
54
63
71
74 bool display_help_button() const noexcept;
79
83
91
94 xtd::forms::message_dialog_icon icon() const noexcept;
99
107
110 xtd::string message() const noexcept;
115
118 xtd::string text() const noexcept;
122 message_dialog& text(const xtd::string& text);
124
126
129 void reset();
130
136 void show_sheet(const iwin32_window& owner);
140
142
147
152
153 private:
155 friend struct ::__xtd_forms_message_dialog_closed_caller__;
157
161 virtual void on_dialog_closed(const dialog_closed_event_args& e);
162
163 xtd::sptr<data> data_;
164 };
165 }
166}
Represents an event.
Definition event.hpp:21
component()
Initialises a new instance of the component class.
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
xtd::string text() const noexcept
Gets the dialog caption text.
message_dialog()
Initializes a new instance of the message_dialog class.
xtd::forms::dialog_result show_dialog()
Runs message dialog box.
xtd::forms::message_dialog_buttons buttons() const noexcept
Gets buttons to display in the message dialog.
void reset()
Resets all properties to empty string.
xtd::forms::message_dialog_options options() const noexcept
Gets options will be used for the message box.
xtd::string message() const noexcept
Gets the text message.
xtd::forms::message_dialog_default_button default_button() const noexcept
Gets default button for the message dialog.
event< message_dialog, dialog_closed_event_handler > dialog_closed
Occurs when the user close a message dialog box with dialog close button or other dialog buttons.
Definition message_dialog.hpp:150
xtd::forms::dialog_result dialog_result() const noexcept
Gets async dialog_result result after dialog box is closing.
xtd::forms::dialog_appearance dialog_appearance() const noexcept
Gets the dialog appearance.
void show_sheet(const iwin32_window &owner)
Runs message dialog box.
xtd::forms::message_dialog_icon icon() const noexcept
Gets icon to display in the message dialog.
event< message_dialog, help_event_handler > help_request
Occurs when the user clicks the Help button on a common dialog box.
Definition message_dialog.hpp:146
bool display_help_button() const noexcept
Gets a value indicate if help button is shown.
xtd::forms::dialog_result show_sheet_dialog(const iwin32_window &owner)
Runs message dialog box.
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(object &sender, help_event_args &e)> help_event_handler
Represents the method that will handle the xtd::forms::control::help_requested event of a control.
Definition help_event_handler.hpp:28
xtd::delegate< void(object &sender, const 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
message_dialog_icon
Specifies constants defining which information to display.
Definition message_dialog_icon.hpp:22
message_dialog_default_button
Specifies constants defining the default button on a message_box.
Definition message_dialog_default_button.hpp:22
message_dialog_options
Specifies options on a message_box.
Definition message_dialog_options.hpp:24
message_dialog_buttons
Specifies constants defining which buttons to display on a message_box.
Definition message_dialog_buttons.hpp:22
@ e
The E key.
Definition keys.hpp:207
Contains xtd::forms::help_event_handler event handler.
Contains xtd::forms::iwin32_window interface.
Contains xtd::forms::message_dialog_buttons enum class.
Contains xtd::forms::message_dialog_default_button enum class.
Contains xtd::forms::message_dialog_icon enum class.
Contains xtd::forms::message_dialog_options enum class.
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 const_pointer data() const noexcept
Gets direct access to the underlying contiguous storage.
Definition read_only_span.hpp:201