xtd 0.2.0
Loading...
Searching...
No Matches
debug_message_box.h
Go to the documentation of this file.
1
4#pragma once
5#include "application.h"
6#include "message_dialog.h"
7#include "message_box_icon.h"
11#include <xtd/diagnostics/debug>
12
14namespace xtd {
16 namespace forms {
36 public:
38
43
49
50 private:
52 #if !defined(NDEBUG) || defined(DEBUG) || defined(TRACE)
54 message_dialog dialog;
55 dialog.buttons(buttons);
56 dialog.default_button(default_button);
57 dialog.display_help_button(display_help_button);
58 dialog.icon(icon);
59 dialog.message(text);
60 dialog.options(options);
61 dialog.text(caption);
62 return owner ? dialog.show_sheet_dialog(*owner) : dialog.show_dialog();
63 #else
65 #endif
66 }
67 };
68 }
69}
Represents text as a sequence of character units.
Definition basic_string.h:79
static const basic_string empty_string
Represents the empty basic_string.
Definition basic_string.h:124
static void write_line()
Writes a line terminator to the trace listeners in the listeners collection.
Definition debug.h:361
static xtd::string product_name() noexcept
Gets the product name associated with this application.
Provides a collection of button objects for use by a Windows Forms application.
Definition buttons.h:24
Displays a dialog box and write debug.
Definition debug_message_box.h:35
static xtd::forms::dialog_result show(const xtd::forms::iwin32_window &owner, const xtd::string &text)
Displays a message box in front of the specified window and write debug with specified text.
Definition debug_message_box.h:47
static xtd::forms::dialog_result show(const xtd::string &text)
Displays a message box and write debug with specified text.
Definition debug_message_box.h:42
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
xtd::string text() const noexcept
Gets the dialog caption text.
xtd::forms::dialog_result show_dialog()
Runs message dialog box.
xtd::forms::message_dialog_buttons buttons() const noexcept
Gets buttons to display in the message dialog.
xtd::forms::message_dialog_options options() const noexcept
Gets options will be used for the message box.
xtd::string message() const noexcept
Gets the text message.
xtd::forms::message_dialog_default_button default_button() const noexcept
Gets default button for the message dialog.
xtd::forms::message_dialog_icon icon() const noexcept
Gets icon to display in the message dialog.
bool display_help_button() const noexcept
Gets a value indicate if help button is shown.
xtd::forms::dialog_result show_sheet_dialog(const iwin32_window &owner)
Runs message dialog box.
#define static_
This keyword is use to represent a static object. A static object can't be instantiated (constructors...
Definition static.h:37
message_dialog_icon
Specifies constants defining which information to display.
Definition message_dialog_icon.h:22
dialog_result
Specifies identifiers to indicate the return value of a dialog box.
Definition dialog_result.h:43
message_dialog_default_button
Specifies constants defining the default button on a message_box.
Definition message_dialog_default_button.h:22
message_dialog_options
Specifies options on a message_box.
Definition message_dialog_options.h:24
message_dialog_buttons
Specifies constants defining which buttons to display on a message_box.
Definition message_dialog_buttons.h:22
@ none
The message box contain no symbols.
@ error
The message box contains a symbol consisting of white X in a circle with a red background.
@ none
Nothing is returned from the dialog box. This means that the modal dialog continues running.
@ button1
The first button on the message box is the default button.
@ text
The xtd::forms::status_bar_panel displays text in the standard font.
@ ok
The message box contains an OK button.
Contains xtd::forms::message_box_buttons enum class.
Contains xtd::forms::message_box_default_button enum class.
Contains xtd::forms::message_box_icon enum class.
Contains xtd::forms::message_box_options enum class.
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
Contains xtd::forms::application class.