xtd 0.2.0
Loading...
Searching...
No Matches
debug_message_dialog.h
Go to the documentation of this file.
1
4#pragma once
5#include "message_dialog.h"
6#include <xtd/diagnostics/debug>
7
9namespace xtd {
11 namespace forms {
31 struct data;
32
33 public:
35
40
42
47
50 xtd::string message() const noexcept;
55 #if !defined(NDEBUG) || defined(DEBUG) || defined(TRACE)
56 dialog_.message(message);
57 #endif
58 return *this;
59 }
61
63
66 void reset();
67
70 #if !defined(NDEBUG) || defined(DEBUG) || defined(TRACE)
71 xtd::diagnostics::debug::write_line(dialog_.message());
72 return dialog_.show_dialog();
73 #else
75 #endif
76 }
79 #if !defined(NDEBUG) || defined(DEBUG) || defined(TRACE)
80 xtd::diagnostics::debug::write_line(dialog_.message());
81 return dialog_.show_dialog(owner);
82 #else
84 #endif
85 }
87 void show_sheet(const iwin32_window& owner) {
88 #if !defined(NDEBUG) || defined(DEBUG) || defined(TRACE)
89 xtd::diagnostics::debug::write_line(dialog_.message());
90 dialog_.show_sheet(owner);
91 #endif
92 }
95 #if !defined(NDEBUG) || defined(DEBUG) || defined(TRACE)
96 xtd::diagnostics::debug::write_line(dialog_.message());
97 return dialog_.show_sheet_dialog(owner);
98 #else
100 #endif
101 }
103
105
111
112 private:
116 virtual void on_dialog_closed(const dialog_closed_event_args& e);
117
118 message_dialog dialog_;
119 };
120 }
121}
static void write_line()
Writes a line terminator to the trace listeners in the listeners collection.
Definition debug.h:361
Represents an event.
Definition event.h:21
Provides the base implementation and enables object sharing between applications.
Definition component.h:25
Displays a message window and write debug, which presents a debug message to the user.
Definition debug_message_dialog.h:30
xtd::forms::dialog_result show_sheet_dialog(const iwin32_window &owner)
Runs message dialog box.
Definition debug_message_dialog.h:94
void reset()
Resets all properties to empty string.
debug_message_dialog()
Initializes a new instance of the debug_message_dialog class.
xtd::forms::dialog_result dialog_result() const noexcept
Gets async dialog_result result after dialog box is closing.
event< debug_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 debug_message_dialog.h:109
xtd::forms::dialog_result show_dialog()
Runs message dialog box.
Definition debug_message_dialog.h:69
xtd::forms::dialog_result show_dialog(const iwin32_window &owner)
Runs message dialog box.
Definition debug_message_dialog.h:78
void show_sheet(const iwin32_window &owner)
Runs message dialog box.
Definition debug_message_dialog.h:87
Provides data for a dialog closed event.
Definition dialog_closed_event_args.h:22
Provides an interface to expose Win32 HWND handles.
Definition iwin32_window.h:23
Displays a message window, also known as a dialog box, which presents a message to the user....
Definition message_dialog.h:42
Implements a Windows message.
Definition message.h:28
#define forms_export_
Define shared library export.
Definition forms_export.h:13
dialog_result
Specifies identifiers to indicate the return value of a dialog box.
Definition dialog_result.h:43
@ none
Nothing is returned from the dialog box. This means that the modal dialog continues running.
Contains xtd::forms::message_dialog dialog.
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition xtd_about_box.h:12
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10