xtd 1.0.0
Loading...
Searching...
No Matches
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<xtd::forms::message_notifier_button> {
10 public:
12
14 message_notifier_button() = default;
15 explicit message_notifier_button(const xtd::string& text) : text_(text) {}
17
19
21 [[nodiscard]] auto text() const noexcept -> const xtd::string& {
22 return text_;
23 }
24
25 auto text(const xtd::string& value) -> message_notifier_button& {
26 text_ = value;
27 return *this;
28 }
30
32
37 [[nodiscard]] auto equals(const xtd::object& obj) const noexcept -> bool override {
38 return is<message_notifier_button>(obj) && equals(static_cast<const message_notifier_button&>(obj));
39 }
40
43 [[nodiscard]] auto equals(const message_notifier_button& other) const noexcept -> bool override {
44 return text_ == other.text_;
45 }
46
49 [[nodiscard]] auto get_hash_code() const noexcept -> xtd::usize override {
50 return hash_code::combine(text_);
51 }
52
53
54 private:
55 xtd::string text_;
56 };
57
58 using message_notifier_button_ref = xtd::ref<xtd::forms::message_notifier_button>;
59 }
60}
61
Provides the base implementation and enables object sharing between applications.
Definition component.hpp:26
auto equals(const message_notifier_button &other) const noexcept -> bool override
Determines whether the specified object is equal to the current object.
Definition message_notifier_button.hpp:43
auto get_hash_code() const noexcept -> xtd::usize override
Serves as a hash function for a particular type.
Definition message_notifier_button.hpp:49
auto equals(const xtd::object &obj) const noexcept -> bool override
Determines whether the specified object is equal to the current object.
Definition message_notifier_button.hpp:37
static auto combine(args_t... values) noexcept -> xtd::usize
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: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.
xtd::basic_string< char > string
Represents text as a sequence of UTF-8 code units.
Definition __string_definitions.hpp:43
xtd::reference_wrapper_object< type_t > ref
The xtd::ref object is a reference wrapper.
Definition ref.hpp:25
std::size_t usize
Represents an unsigned size of any object in bytes.
Definition usize.hpp:22
auto is(xtd::any value) -> bool
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:60
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