xtd 0.2.0
message_notifier_button.hpp
1#pragma once
2#include "component.hpp"
3#include <xtd/iequatable>
4#include <xtd/string>
5
6// TODO: documentation
7namespace xtd {
8 namespace forms {
9 class message_notifier_button : public xtd::forms::component, public xtd::iequatable<message_notifier_button> {
10 public:
11 message_notifier_button() = default;
12 explicit message_notifier_button(const xtd::string& text) : text_(text) {}
13
14 const xtd::string& text() const noexcept {
15 return text_;
16 }
17
19 text_ = value;
20 return *this;
21 }
22
26 bool equals(const xtd::object& obj) const noexcept override {
27 return is<message_notifier_button>(obj) && equals(static_cast<const message_notifier_button&>(obj));
28 }
32 bool equals(const message_notifier_button& other) const noexcept override {
33 return text_ == other.text_;
34 }
35
38 xtd::size get_hash_code() const noexcept override {
39 return hash_code::combine(text_);
40 }
41
42 private:
43 xtd::string text_;
44 };
45
46 using message_notifier_button_ref = std::reference_wrapper<message_notifier_button>;
47 }
48}
49
Represents text as a sequence of character units.
Definition basic_string.hpp:71
Provides the base implementation and enables object sharing between applications.
Definition component.hpp:26
Definition message_notifier_button.hpp:9
bool equals(const xtd::object &obj) const noexcept override
Determines whether the specified object is equal to the current object.
Definition message_notifier_button.hpp:26
bool equals(const message_notifier_button &other) const noexcept override
Determines whether the specified object is equal to the current object.
Definition message_notifier_button.hpp:32
xtd::size get_hash_code() const noexcept override
Serves as a hash function for a particular type.
Definition message_notifier_button.hpp:38
static xtd::size combine(args_t... values) noexcept
Combines values into a hash code.
Definition hash_code.hpp:70
Defines a generalized method that a value type or class implements to create a type-specific method f...
Definition iequatable.hpp:22
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.hpp:43
Contains xtd::forms::component class.
size_t size
Represents a size of any object in bytes.
Definition size.hpp:23
@ other
The operating system is other.
@ text
The xtd::forms::status_bar_panel displays text in the standard font.
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition xtd_about_box.hpp:12
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10