5#include "message_notifier_button.h"
7#include <xtd/drawing/icon>
12#include <xtd/event_args>
13#include <xtd/not_implemented_exception>
14#include <xtd/optional>
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;
75 message_notifier_button_collection&
buttons() noexcept {
return buttons_; }
77 std::optional<xtd::forms::message_notifier_button> notifier_button_clicked() const noexcept {
return notifier_button_clicked_; }
79 xtd::string title() const noexcept {
return title_; }
80 message_notifier& title(
const xtd::string& title)
noexcept { title_ = title;
return *
this; }
82 xtd::string message() const noexcept {
return message_; }
83 message_notifier& message(
const xtd::string& message)
noexcept { message_ = message;
return *
this; }
86 message_notifier& icon(
const xtd::drawing::image& icon)
noexcept { icon_ = icon;
return *
this; }
87 message_notifier& icon(
const xtd::drawing::icon& icon)
noexcept { icon_ = icon.to_bitmap();
return *
this; }
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; }
102 void show(
const iwin32_window& owner);
104 event<message_notifier, xtd::forms::notifier_closed_event_handler> notifier_closed;
105 event<message_notifier, xtd::forms::notifier_button_click_event_handler> button_click;
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;
Contains xtd::forms::layout::arranged_element_collection collection.
Represents text as a sequence of character units.
Definition basic_string.h:79
Represents a Windows icon, which is a small bitmap image that is used to represent an object....
Definition icon.h:28
An abstract base class that provides functionality for the bitmap and metafile descended classes.
Definition image.h:49
static image empty
Represent an empty xtd::drawing::image.
Definition image.h:65
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::component class.
#define forms_export_
Define shared library export.
Definition forms_export.h:13
@ show
Display the hot-key prefix.
Contains xtd::forms::iwin32_window interface.
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10
Contains xtd::forms::notifier_appearance enum class.