xtd - Reference Guide
0.1.1
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
|
#include <message_dialog.h>
Displays a message window, also known as a dialog box, which presents a message to the user. It is a modal window, blocking other actions in the application until the user closes it. A message_dialog can contain text, buttons, and symbols that inform and instruct the user.
Inherits xtd::forms::component.
Public Attributes | |
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. More... | |
event< message_dialog, help_event_handler > | help_request |
Occurs when the user clicks the Help button on a common dialog box. More... | |
Public Member Functions | |
message_dialog ()=default | |
Initializes a new instance of the message_dialog class. More... | |
xtd::forms::message_dialog_buttons | buttons () const |
Gets buttons to display in the message dialog. More... | |
message_dialog & | buttons (xtd::forms::message_dialog_buttons buttons) |
Sets buttons to display in the message dialog. More... | |
xtd::forms::message_dialog_default_button | default_button () const |
Gets default button for the message dialog. More... | |
message_dialog & | default_button (xtd::forms::message_dialog_default_button default_button) |
Sets default button for the message dialog. More... | |
xtd::forms::dialog_result | dialog_result () const |
Get async dialog_result result after dialog box is closing. More... | |
xtd::forms::dialog_style | dialog_style () const |
Gets the dialog style. More... | |
message_dialog & | dialog_style (xtd::forms::dialog_style dialog_style) |
Sets the dialog style. More... | |
bool | display_help_button () const |
Gets a value indicate if help button is shown. More... | |
message_dialog & | display_help_button (bool display_help_button) |
Sets a value indicate if help button is shown. More... | |
xtd::forms::message_dialog_icon | icon () const |
Gets icon to display in the message dialog. More... | |
message_dialog & | icon (xtd::forms::message_dialog_icon icon) |
Sets icon to display in the message dialog. More... | |
xtd::ustring | message () const |
Gets the text message. More... | |
message_dialog & | message (const xtd::ustring &message) |
Sets the text message. More... | |
xtd::forms::message_dialog_options | options () const |
Gets options will be used for the message box. More... | |
message_dialog & | options (xtd::forms::message_dialog_options options) |
Sets options will be used for the message box. More... | |
void | reset () |
Resets all properties to empty string. More... | |
xtd::forms::dialog_result | show_dialog () |
Runs message dialog box. More... | |
xtd::forms::dialog_result | show_dialog (const iwin32_window &owner) |
Runs message dialog box. More... | |
void | show_sheet (const iwin32_window &owner) |
Runs message dialog box. More... | |
xtd::forms::dialog_result | show_sheet_dialog (const iwin32_window &owner) |
Runs message dialog box. More... | |
xtd::ustring | text () const |
Gets the dialog caption text. More... | |
message_dialog & | text (const xtd::ustring &text) |
Sets the dialog caption text. More... | |
Public Member Functions inherited from xtd::object | |
object ()=default | |
Create a new instance of the ultimate base class object. More... | |
virtual bool | equals (const object &obj) const noexcept |
Determines whether the specified object is equal to the current object. More... | |
virtual size_t | get_hash_code () const noexcept |
Serves as a hash function for a particular type. More... | |
template<typename object_t > | |
std::unique_ptr< object_t > | memberwise_clone () const |
Gets the type of the current instance. More... | |
virtual xtd::ustring | to_string () const noexcept |
Returns a std::string that represents the current object. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from xtd::object | |
static bool | equals (const object &object_a, const object &object_b) noexcept |
Determines whether the specified object instances are considered equal. More... | |
static bool | reference_equals (const object &object_a, const object &object_b) noexcept |
Determines whether the specified object instances are the same instance. More... | |
Protected Member Functions inherited from xtd::forms::component | |
component ()=default | |
Initialises a new instance of the component class. More... | |
virtual bool | can_raise_events () const |
Gets a value indicating whether the component can raise an event. More... | |
bool | design_mode () const |
Gets a value that indicates whether the component is currently in design mode. More... | |
|
default |
Initializes a new instance of the message_dialog class.
|
inline |
Gets buttons to display in the message dialog.
|
inline |
Sets buttons to display in the message dialog.
buttons | One of the xtd::forms::message_dialog_buttons values that specifies which buttons to display in the message dialog. |
|
inline |
Gets default button for the message dialog.
|
inline |
Sets default button for the message dialog.
default_button | One of the xtd::forms::message_dialog_default_button values that specifies the default button for the message dialog. |
|
inline |
Get async dialog_result result after dialog box is closing.
|
inline |
Gets the dialog style.
|
inline |
Sets the dialog style.
dialog_style | One of the xtd::forms::dialog_style values. The default value is xtd::forms::dialog_style::standard. |
|
inline |
Gets a value indicate if help button is shown.
|
inline |
Sets a value indicate if help button is shown.
display_help_button | true to show the Help button; otherwise, false. The default is false. |
|
inline |
Gets icon to display in the message dialog.
|
inline |
Sets icon to display in the message dialog.
icon | One of the xtd::forms::message_dialog_icon values that specifies which icon to display in the message dialog. |
|
inline |
Gets the text message.
|
inline |
|
inline |
Gets options will be used for the message box.
|
inline |
Sets options will be used for the message box.
options | One of the xtd::forms::message_dialog_options values that specifies which display and association options will be used for the message box. You may pass in 0 if you wish to use the defaults. |
void xtd::forms::message_dialog::reset | ( | ) |
Resets all properties to empty string.
xtd::forms::dialog_result xtd::forms::message_dialog::show_dialog | ( | ) |
Runs message dialog box.
xtd::forms::dialog_result xtd::forms::message_dialog::show_dialog | ( | const iwin32_window & | owner | ) |
Runs message dialog box.
void xtd::forms::message_dialog::show_sheet | ( | const iwin32_window & | owner | ) |
Runs message dialog box.
xtd::forms::dialog_result xtd::forms::message_dialog::show_sheet_dialog | ( | const iwin32_window & | owner | ) |
Runs message dialog box.
|
inline |
Gets the dialog caption text.
|
inline |
Sets the dialog caption text.
text | The new dialog caption text. |