xtd 0.2.0
Loading...
Searching...
No Matches
xtd::forms::debug_message_dialog Class Referencefinal
Inheritance diagram for xtd::forms::debug_message_dialog:
xtd::forms::component xtd::object

Definition

Displays a message window and write debug, which presents a debug message to the user.

Header
#include <xtd/forms/debug_message_dialog>
Namespace
xtd::forms
Library
xtd.forms
Appearance
Windows macOS Gnome
Light  
 
 
 
 
 
Dark  
 
 
 
 
 
Examples
The following code example demonstrates the use of debug_message_dialog dialog.
#define DEBUG
#include <xtd/forms/application>
#include <xtd/forms/button>
#include <xtd/forms/debug_form>
#include <xtd/forms/debug_message_dialog>
#include <xtd/forms/form>
using namespace xtd::forms;
class form1 : public form {
public:
form1() {
button_show_debug_message.location({10, 10});
button_show_debug_message.parent(*this);
button_show_debug_message.text("Error...");
button_show_debug_message.auto_size(true);
button_show_debug_message.click += [&] {
auto dialog = debug_message_dialog {};
dialog.message("An unknown process error occured.");
dialog.show_sheet_dialog(*this);
};
}
private:
button button_show_debug_message;
};
auto main()->int {
auto df = debug_form {};
application::run(form1 {});
}
static void run()
Begins running a standard application message loop on the current thread, without a form.
Represents a Windows button control.
Definition button.h:47
virtual drawing::point location() const noexcept
Gets the coordinates of the upper-left corner of the control relative to the upper-left corner of its...
Represents a form that displays debug form. This class cannot be inherited.
Definition debug_form.h:34
Displays a message window and write debug, which presents a debug message to the user.
Definition debug_message_dialog.h:28
xtd::ustring message() const noexcept
Gets the text message.
Represents a window or dialog box that makes up an application's user interface.
Definition form.h:52
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition xtd_about_box.h:12
Examples
debug_message_dialog.cpp.

Public Events

event< debug_message_dialog, dialog_closed_event_handlerdialog_closed
 Occurs when the user close a message dialog box with dialog close button or other dialog buttons.
 

Public Constructors

 debug_message_dialog ()
 Initializes a new instance of the debug_message_dialog class.
 

Public Properties

xtd::forms::dialog_result dialog_result () const noexcept
 Gets async dialog_result result after dialog box is closing.
 
xtd::ustring message () const noexcept
 Gets the text message.
 
debug_message_dialogmessage (const xtd::ustring &message)
 Sets the text message.
 

Public Methods

void reset ()
 Resets all properties to empty string.
 
xtd::forms::dialog_result show_dialog ()
 Runs message dialog box.
 
xtd::forms::dialog_result show_dialog (const iwin32_window &owner)
 Runs message dialog box.
 
void show_sheet (const iwin32_window &owner)
 Runs message dialog box.
 
xtd::forms::dialog_result show_sheet_dialog (const iwin32_window &owner)
 Runs message dialog box.
 

Additional Inherited Members

- Public Member Functions inherited from xtd::object
 object ()=default
 Create a new instance of the ultimate base class object.
 
bool equals (const object &obj) const noexcept
 Determines whether the specified object is equal to the current object.
 
virtual size_t get_hash_code () const noexcept
 Serves as a hash function for a particular type.
 
virtual type_object get_type () const noexcept
 Gets the type of the current instance.
 
template<typename object_t >
std::unique_ptr< object_t > memberwise_clone () const noexcept
 Creates a shallow copy of the current object.
 
virtual xtd::ustring to_string () const noexcept
 Returns a sxd::ustring that represents the current object.
 
- 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.
 
static bool reference_equals (const object &object_a, const object &object_b) noexcept
 Determines whether the specified object instances are the same instance.
 
- Protected Member Functions inherited from xtd::forms::component
 component ()
 Initialises a new instance of the component class.
 
virtual bool can_raise_events () const noexcept
 Gets a value indicating whether the component can raise an event.
 
bool design_mode () const noexcept
 Gets a value that indicates whether the component is currently in design mode.
 

Constructor & Destructor Documentation

◆ debug_message_dialog()

xtd::forms::debug_message_dialog::debug_message_dialog ( )

Initializes a new instance of the debug_message_dialog class.

Member Function Documentation

◆ dialog_result()

xtd::forms::dialog_result xtd::forms::debug_message_dialog::dialog_result ( ) const
noexcept

Gets async dialog_result result after dialog box is closing.

Returns
ok if the user clicks OK in the dialog box; otherwise, cancel.

◆ message() [1/2]

xtd::ustring xtd::forms::debug_message_dialog::message ( ) const
noexcept

Gets the text message.

Returns
The text message.
Examples
debug_message_dialog.cpp.

◆ message() [2/2]

debug_message_dialog & xtd::forms::debug_message_dialog::message ( const xtd::ustring message)
inline

Sets the text message.

Parameters
messageThe text message.
Returns
Current debug_message_dialog instance.

◆ reset()

void xtd::forms::debug_message_dialog::reset ( )

Resets all properties to empty string.

◆ show_dialog() [1/2]

xtd::forms::dialog_result xtd::forms::debug_message_dialog::show_dialog ( )
inline

Runs message dialog box.

◆ show_dialog() [2/2]

xtd::forms::dialog_result xtd::forms::debug_message_dialog::show_dialog ( const iwin32_window owner)
inline

Runs message dialog box.

◆ show_sheet()

void xtd::forms::debug_message_dialog::show_sheet ( const iwin32_window owner)
inline

Runs message dialog box.

◆ show_sheet_dialog()

xtd::forms::dialog_result xtd::forms::debug_message_dialog::show_sheet_dialog ( const iwin32_window owner)
inline

Runs message dialog box.

Member Data Documentation

◆ dialog_closed

event<debug_message_dialog, dialog_closed_event_handler> xtd::forms::debug_message_dialog::dialog_closed

Occurs when the user close a message dialog box with dialog close button or other dialog buttons.

Remarks
For more information about handling events, see Handling and Raising Events.

The documentation for this class was generated from the following file: