xtd - Reference Guide  0.1.0
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
Loading...
Searching...
No Matches
close_reason.h
Go to the documentation of this file.
1
4#pragma once
5#include <xtd/ustring.h>
6
8namespace xtd {
10 namespace forms {
18 enum class close_reason {
20 none = 0,
26 user_closing = 3,
33 };
34
36 inline std::ostream& operator<<(std::ostream& os, close_reason value) {return os << to_string(value, {{close_reason::none, "none"}, {close_reason::windows_shut_down, "windows_shut_down"}, {close_reason::mdi_form_closing, "mdi_form_closing"}, {close_reason::user_closing, "user_closing"}, {close_reason::task_manager_closing, "task_manager_closing"}, {close_reason::form_owner_closing, "form_owner_closing"}, {close_reason::application_exit_call, "application_exit_call"}});}
37 inline std::wostream& operator<<(std::wostream& os, close_reason value) {return os << to_string(value, {{close_reason::none, L"none"}, {close_reason::windows_shut_down, L"windows_shut_down"}, {close_reason::mdi_form_closing, L"mdi_form_closing"}, {close_reason::user_closing, L"user_closing"}, {close_reason::task_manager_closing, L"task_manager_closing"}, {close_reason::form_owner_closing, L"form_owner_closing"}, {close_reason::application_exit_call, L"application_exit_call"}});}
39 }
40}
std::string to_string(const value_t &value, const std::string &fmt, const std::locale &loc)
Convert a specified value into a string with specified format and locale.
Definition: to_string.h:37
close_reason
Specifies the reason that a form was closed.
Definition: close_reason.h:18
@ none
The cause of the closure was not defined or could not be determined.
@ application_exit_call
The Exit method of the Application class was invoked.
@ none
The cause of the closure was not defined or could not be determined.
@ windows_shut_down
The operating system is closing all applications before shutting down.
@ form_owner_closing
The owner form is closing.
@ mdi_form_closing
The parent form of this multiple document interface (MDI) form is closing.
@ task_manager_closing
The Microsoft Windows Task Manager is closing the application.
@ user_closing
The user is closing the form through the user interface (UI), for example by clicking the Close butto...
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition: about_box.h:13
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition: system_report.h:17
Contains xtd::ustring class.