5 #include "message_notifier_button.h" 6 #include "notifier_style.h" 7 #include <xtd/drawing/icon> 9 #include <xtd/delegate> 10 #include <xtd/ustring> 12 #include <xtd/event_args> 13 #include <xtd/not_implemented_exception> 14 #include <xtd/optional> 35 using notifier_button_click_event_handler = delegate<void(object& sender, const notifier_button_click_event_args& e)>;
43 std::optional<xtd::forms::message_notifier_button> button()
const noexcept {
47 bool close_on_timeout()
const noexcept {
48 return close_on_timeout_;
51 bool close_on_click_message()
const noexcept {
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;
62 using notifier_closed_event_handler = delegate<void(object& sender, const notifier_closed_event_args& e)>;
77 std::optional<xtd::forms::message_notifier_button> notifier_button_clicked()
const noexcept {
return notifier_button_clicked_; }
89 bool close_timeout_enabled()
const noexcept {
return close_timeout_enabled_; }
90 message_notifier& close_timeout_enabled(
bool value) noexcept { close_timeout_enabled_ = value;
return *
this; }
92 std::chrono::milliseconds close_timeout_interval()
const noexcept {
return close_timeout_interval_; }
93 message_notifier& close_timeout_interval(std::chrono::milliseconds value) noexcept { close_timeout_interval_ = value;
return *
this;}
94 message_notifier& close_timeout_interval_milliseconds(
int32 value) noexcept { close_timeout_interval_ = std::chrono::milliseconds(value);
return *
this; }
96 xtd::forms::notifier_style notifier_style()
const noexcept {
return notifier_style_; }
97 message_notifier& notifier_style(xtd::forms::notifier_style notifier_style) noexcept { notifier_style_ = notifier_style;
return *
this; }
109 notifier_closed(*
this, e);
112 button_click(*
this, e);
119 bool close_timeout_enabled_ =
false;
120 std::chrono::milliseconds close_timeout_interval_ = std::chrono::milliseconds(10
'000); 121 message_notifier_button_collection buttons_; 122 std::optional<xtd::forms::message_notifier_button> notifier_button_clicked_ = std::nullopt; 123 xtd::forms::notifier_style notifier_style_ = xtd::forms::notifier_style::standard;
xtd::drawing::bitmap to_bitmap() const
Converts this xtd::drawing::icon to a GDI+ xtd::drawing::bitmap.
Represents the base class for classes that contain event data, and provides a value to use for events...
Definition: event_args.h:18
Contains xtd::forms::layout::arranged_element_collection collection.
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
Represents text as a sequence of UTF-8 code units.
Definition: ustring.h:46
Contains xtd::forms::iwin32_window interface.
Represents an event.
Definition: event.h:21
An abstract base class that provides functionality for the bitmap and metafile descended classes...
Definition: image.h:48
int_least32_t int32
Represents a 32-bit signed integer.
Definition: types.h:129
Contains xtd::forms::component class.
static image empty
Represent an empty xtd::drawing::image.
Definition: image.h:63
Represents a Windows icon, which is a small bitmap image that is used to represent an object...
Definition: icon.h:28