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
18 message_notifier_button& text(const xtd::string& value) {
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 }
29
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
Provides the base implementation and enables object sharing between applications.
Definition component.hpp:26
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:44
Contains xtd::forms::component class.
xtd::basic_string< char > string
Represents text as a sequence of UTF-8 code units.
Definition __string_definitions.hpp:43
size_t size
Represents a size of any object in bytes.
Definition size.hpp:23
bool is(xtd::any value)
Checks if the result of an expression is compatible with a given type.
Definition is.hpp:485
@ other
The operating system is other.
Definition platform_id.hpp:58
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition texts.hpp:219
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8