5#include "message_notifier_button.hpp"
7#include <xtd/drawing/icon>
12#include <xtd/event_args>
13#include <xtd/not_implemented_exception>
14#include <xtd/optional>
41 explicit notifier_closed_event_args(
const std::optional<xtd::forms::message_notifier_button>& button) : button_(button) {}
43 [[nodiscard]]
auto button()
const noexcept -> std::optional<xtd::forms::message_notifier_button> {
47 [[nodiscard]]
auto close_on_timeout()
const noexcept ->
bool {
48 return close_on_timeout_;
51 [[nodiscard]]
auto close_on_click_message()
const noexcept ->
bool {
52 return close_on_click_message_;
56 bool close_on_timeout_ =
false;
57 bool close_on_click_message_ =
false;
58 std::optional<xtd::forms::message_notifier_button> button_ = std::nullopt;
76 message_notifier() =
default;
82 [[nodiscard]]
auto buttons()
const noexcept ->
const message_notifier_button_collection& {
return buttons_;}
83 [[nodiscard]]
auto buttons()
noexcept -> message_notifier_button_collection& {
return buttons_;}
85 [[nodiscard]]
auto close_timeout_enabled()
const noexcept ->
bool {
return close_timeout_enabled_;}
86 auto close_timeout_enabled(
bool value)
noexcept -> message_notifier& {close_timeout_enabled_ = value;
return *
this;}
88 [[nodiscard]]
auto close_timeout_interval()
const noexcept -> std::chrono::milliseconds {
return close_timeout_interval_;}
89 auto close_timeout_interval(std::chrono::milliseconds value)
noexcept -> message_notifier& {close_timeout_interval_ = value;
return *
this;}
90 auto close_timeout_interval_milliseconds(
xtd::int32 value)
noexcept -> message_notifier& {close_timeout_interval_ = std::chrono::milliseconds(value);
return *
this;}
93 auto icon(
const xtd::drawing::image& icon)
noexcept -> message_notifier& {icon_ = icon;
return *
this;}
94 auto icon(
const xtd::drawing::icon& value)
noexcept -> message_notifier& {icon_ = value.to_bitmap();
return *
this;}
99 [[nodiscard]]
auto message()
const noexcept ->
const xtd::string& {
return message_;}
100 auto message(
const xtd::string& value)
noexcept -> message_notifier& {message_ = value;
return *
this;}
102 [[nodiscard]]
auto notifier_button_clicked()
const noexcept -> std::optional<xtd::forms::message_notifier_button> {
return notifier_button_clicked_;}
104 [[nodiscard]]
auto title()
const noexcept ->
const xtd::string& {
return title_;}
105 auto title(
const xtd::string& value)
noexcept -> message_notifier& {title_ = value;
return *
this;}
111 auto reset() -> void;
136 bool close_timeout_enabled_ =
false;
137 std::chrono::milliseconds close_timeout_interval_ = std::chrono::milliseconds(10'000);
138 message_notifier_button_collection buttons_;
139 std::optional<xtd::forms::message_notifier_button> notifier_button_clicked_ = std::nullopt;
Contains xtd::forms::layout::arranged_element_collection collection.
Represents a Windows icon, which is a small bitmap image that is used to represent an object....
Definition icon.hpp:28
An abstract base class that provides functionality for the bitmap and metafile descended classes.
Definition image.hpp:49
static image empty
Represent an empty xtd::drawing::image.
Definition image.hpp:65
Represents the base class for classes that contain event data, and provides a value to use for events...
Definition event_args.hpp:18
Represents an event.
Definition event.hpp:23
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.hpp:45
Contains xtd::forms::component class.
#define forms_export_
Define shared library export.
Definition forms_export.hpp:13
xtd::basic_string< char > string
Represents text as a sequence of UTF-8 code units.
Definition __string_definitions.hpp:43
std::int32_t int32
Represents a 32-bit signed integer.
Definition int32.hpp:25
@ e
The E key.
Definition console_key.hpp:96
Contains xtd::forms::iwin32_window interface.
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
Contains xtd::forms::notifier_appearance enum class.