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 {
28 struct data;
29
30 public:
32
37
39
44
47 xtd::ustring message() const noexcept;
52 #if defined(TRACE)
53 dialog_.message(message);
54 #endif
55 return *this;
56 }
58
60
63 void reset();
64
67 #if defined(TRACE)
68 xtd::diagnostics::trace::write_line(dialog_.message());
69 return dialog_.show_dialog();
70 #else
72 #endif
73 }
76 #if defined(TRACE)
77 xtd::diagnostics::trace::write_line(dialog_.message());
78 return dialog_.show_dialog(owner);
79 #else
81 #endif
82 }
84 void show_sheet(const iwin32_window& owner) {
85 #if defined(TRACE)
86 xtd::diagnostics::trace::write_line(dialog_.message());
87 dialog_.show_sheet(owner);
88 #endif
89 }
92 #if defined(TRACE)
93 xtd::diagnostics::trace::write_line(dialog_.message());
94 return dialog_.show_sheet_dialog(owner);
95 #else
97 #endif
98 }
100
102
108
109 private:
113 virtual void on_dialog_closed(const dialog_closed_event_args& e);
114
115 message_dialog dialog_;
116 };
117 }
118}
static void write_line()
Writes a line terminator to the trace listeners in the listeners collection.
Definition trace.h:356
Represents an event.
Definition event.h:21
Provides the base implementation and enables object sharing between applications.
Definition component.h:23
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
Displays a message window and write debug, which presents a debug message to the user.
Definition trace_message_dialog.h:27
void show_sheet(const iwin32_window &owner)
Runs message dialog box.
Definition trace_message_dialog.h:84
xtd::forms::dialog_result show_dialog(const iwin32_window &owner)
Runs message dialog box.
Definition trace_message_dialog.h:75
void reset()
Resets all properties to empty string.
xtd::forms::dialog_result show_dialog()
Runs message dialog box.
Definition trace_message_dialog.h:66
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:91
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:106
xtd::forms::dialog_result dialog_result() const noexcept
Gets async dialog_result result after dialog box is closing.
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