xtd 1.0.0
Loading...
Searching...
No Matches
theme.hpp
Go to the documentation of this file.
1
4#pragma once
6#include <xtd/iequatable>
7#include <xtd/object>
8#include <xtd/uri>
9#include <xtd/string>
10
12namespace xtd {
14 namespace forms {
16 namespace style_sheets {
32 class forms_export_ theme : public xtd::iequatable<theme>, public xtd::object {
33 public:
35
38 theme() = default;
43 explicit theme(const xtd::string& name);
61
63
67 [[nodiscard]] auto authors() const noexcept -> const xtd::string&;
70 auto authors(const xtd::string& value) noexcept -> void;
71
74 [[nodiscard]] auto description() const noexcept -> const xtd::string&;
77 auto description(const xtd::string& value) noexcept -> void;
78
81 [[nodiscard]] auto name() const noexcept -> const xtd::string&;
84 auto name(const xtd::string& value) noexcept -> void;
85
88 [[nodiscard]] auto website() const noexcept -> const xtd::uri&;
91 auto website(const xtd::uri& value) noexcept -> void;
93
95
100 [[nodiscard]] auto equals(const xtd::object& obj) const noexcept -> bool override;
104 [[nodiscard]] auto equals(const theme& other) const noexcept -> bool override;
105
108 [[nodiscard]] auto get_hash_code() const noexcept -> xtd::usize override;
109
110 [[nodiscard]] auto to_string() const noexcept -> xtd::string override;
111
114 [[nodiscard]] auto to_css() const noexcept -> xtd::string;
116
118
124 static auto from_css(const xtd::string& css_text, theme& result) -> bool;
125
130 [[nodiscard]] static auto parse(const xtd::string& text) -> theme;
131
136 [[nodiscard]] static auto try_parse(const xtd::string& text, theme& result) noexcept -> bool;
138
139 private:
140 xtd::string name_;
141 xtd::string description_;
142 xtd::string authors_;
143 xtd::uri website_;
144 };
145 }
146 }
147}
theme(const xtd::string &name, const xtd::string &description, const xtd::string &authors)
Initializes a new instance of the xtd::forms::style_sheets::theme class with specified name,...
auto website() const noexcept -> const xtd::uri &
Gets the theme website.
theme(const xtd::string &name, const xtd::string &description)
Initializes a new instance of the xtd::forms::style_sheets::theme class with specified name and descr...
theme(const xtd::string &name, const xtd::string &description, const xtd::string &authors, const xtd::uri &website)
Initializes a new instance of the xtd::forms::style_sheets::theme class with specified name,...
auto to_css() const noexcept -> xtd::string
Return a xtd::string that represents the css format of the current xtd::forms::style_sheets::theme ob...
static auto try_parse(const xtd::string &text, theme &result) noexcept -> bool
Creates a xtd::forms::style_sheets::theme object from the specified text.
auto authors() const noexcept -> const xtd::string &
Gets the theme authors.
static auto from_css(const xtd::string &css_text, theme &result) -> bool
Creates a xtd::forms::style_sheets::theme object from the specified css text.
auto name() const noexcept -> const xtd::string &
Gets the theme name.
static auto parse(const xtd::string &text) -> theme
Creates a xtd::forms::style_sheets::theme object from the specified text.
auto get_hash_code() const noexcept -> xtd::usize override
Serves as a hash function for a particular type.
theme(const xtd::string &name)
Initializes a new instance of the xtd::forms::style_sheets::theme class with specified name.
auto equals(const xtd::object &obj) const noexcept -> bool override
Determines whether the specified object is equal to the current object.
auto to_string() const noexcept -> xtd::string override
Returns a xtd::string that represents the current object.
theme()=default
Initializes a new instance of the xtd::forms::style_sheets::theme class.
auto description() const noexcept -> const xtd::string &
Gets the theme name.
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
Provides an object representation of a uniform resource identifier (URI) and easy access to the parts...
Definition uri.hpp:103
Contains forms_export_ keyword.
#define forms_export_
Define shared library export.
Definition forms_export.hpp:13
xtd::basic_string< char > string
Represents text as a sequence of UTF-8 code units.
Definition __string_definitions.hpp:43
std::size_t usize
Represents an unsigned size of any object in bytes.
Definition usize.hpp:22
The xtd::forms::style_sheets namespace contains various properties, states, and subcontrols that make...
Definition background_image.hpp:21
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition texts.hpp:219
Contains classes that represent ASCII and Unicode character encodings; abstract base classes for conv...
Definition basic_string_builder.hpp:13
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8