xtd 0.2.0
Loading...
Searching...
No Matches
trace_message_dialog.h
Go to the documentation of this file.
1
4#pragma once
5#include "message_dialog.h"
6
8namespace xtd {
10 namespace forms {
30 struct data;
31
32 public:
34
39
41
46
49 xtd::string message() const noexcept;
54 #if defined(TRACE)
55 dialog_.message(message);
56 #endif
57 return *this;
58 }
60
62
65 void reset();
66
69 #if defined(TRACE)
70 xtd::diagnostics::trace::write_line(dialog_.message());
71 return dialog_.show_dialog();
72 #else
74 #endif
75 }
78 #if defined(TRACE)
79 xtd::diagnostics::trace::write_line(dialog_.message());
80 return dialog_.show_dialog(owner);
81 #else
83 #endif
84 }
86 void show_sheet(const iwin32_window& owner) {
87 #if defined(TRACE)
88 xtd::diagnostics::trace::write_line(dialog_.message());
89 dialog_.show_sheet(owner);
90 #endif
91 }
94 #if defined(TRACE)
95 xtd::diagnostics::trace::write_line(dialog_.message());
96 return dialog_.show_sheet_dialog(owner);
97 #else
99 #endif
100 }
102
104
110
111 private:
115 virtual void on_dialog_closed(const dialog_closed_event_args& e);
116
117 message_dialog dialog_;
118 };
119 }
120}
static void write_line()
Writes a line terminator to the trace listeners in the listeners collection.
Definition trace.h:343
Represents an event.
Definition event.h:21
Provides the base implementation and enables object sharing between applications.
Definition component.h:25
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
Displays a message window and write debug, which presents a debug message to the user.
Definition trace_message_dialog.h:29
void show_sheet(const iwin32_window &owner)
Runs message dialog box.
Definition trace_message_dialog.h:86
xtd::forms::dialog_result show_dialog(const iwin32_window &owner)
Runs message dialog box.
Definition trace_message_dialog.h:77
void reset()
Resets all properties to empty string.
xtd::forms::dialog_result show_dialog()
Runs message dialog box.
Definition trace_message_dialog.h:68
trace_message_dialog()
Initializes a new instance of the trace_message_dialog class.
xtd::forms::dialog_result show_sheet_dialog(const iwin32_window &owner)
Runs message dialog box.
Definition trace_message_dialog.h:93
event< trace_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 trace_message_dialog.h:108
xtd::forms::dialog_result dialog_result() const noexcept
Gets async dialog_result result after dialog box is closing.
#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