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 {
29 struct data;
30
31 public:
33
38
40
45
48 xtd::ustring message() const noexcept;
53 #if !defined(NDEBUG) || defined(DEBUG) || defined(TRACE)
54 dialog_.message(message);
55 #endif
56 return *this;
57 }
59
61
64 void reset();
65
68 #if !defined(NDEBUG) || defined(DEBUG) || defined(TRACE)
69 xtd::diagnostics::debug::write_line(dialog_.message());
70 return dialog_.show_dialog();
71 #else
73 #endif
74 }
77 #if !defined(NDEBUG) || defined(DEBUG) || defined(TRACE)
78 xtd::diagnostics::debug::write_line(dialog_.message());
79 return dialog_.show_dialog(owner);
80 #else
82 #endif
83 }
85 void show_sheet(const iwin32_window& owner) {
86 #if !defined(NDEBUG) || defined(DEBUG) || defined(TRACE)
87 xtd::diagnostics::debug::write_line(dialog_.message());
88 dialog_.show_sheet(owner);
89 #endif
90 }
93 #if !defined(NDEBUG) || defined(DEBUG) || defined(TRACE)
94 xtd::diagnostics::debug::write_line(dialog_.message());
95 return dialog_.show_sheet_dialog(owner);
96 #else
98 #endif
99 }
101
103
109
110 private:
114 virtual void on_dialog_closed(const dialog_closed_event_args& e);
115
116 message_dialog dialog_;
117 };
118 }
119}
static void write_line()
Writes a line terminator to the trace listeners in the listeners collection.
Definition debug.h:374
Represents an event.
Definition event.h:21
Provides the base implementation and enables object sharing between applications.
Definition component.h:23
Displays a message window and write debug, which presents a debug message to the user.
Definition debug_message_dialog.h:28
xtd::forms::dialog_result show_sheet_dialog(const iwin32_window &owner)
Runs message dialog box.
Definition debug_message_dialog.h:92
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:107
xtd::forms::dialog_result show_dialog()
Runs message dialog box.
Definition debug_message_dialog.h:67
xtd::forms::dialog_result show_dialog(const iwin32_window &owner)
Runs message dialog box.
Definition debug_message_dialog.h:76
void show_sheet(const iwin32_window &owner)
Runs message dialog box.
Definition debug_message_dialog.h:85
Provides data for a dialog closed event.
Definition dialog_closed_event_args.h:20
Provides an interface to expose Win32 HWND handles.
Definition iwin32_window.h:21
Displays a message window, also known as a dialog box, which presents a message to the user....
Definition message_dialog.h:40
Implements a Windows message.
Definition message.h:26
Represents text as a sequence of UTF-8 code units.
Definition ustring.h:47
#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:41
@ 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