xtd 0.2.0
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 theme(const theme&) = default;
64 theme(theme&&) = default;
65 theme& operator =(const theme&) = default;
67
69
73 const xtd::string& authors() const noexcept;
76 void authors(const xtd::string& value) noexcept;
77
80 const xtd::string& description() const noexcept;
83 void description(const xtd::string& value) noexcept;
84
87 const xtd::string& name() const noexcept;
90 void name(const xtd::string& value) noexcept;
91
94 const xtd::uri& website() const noexcept;
97 void website(const xtd::uri& value) noexcept;
99
101
106 bool equals(const xtd::object& obj) const noexcept override;
110 bool equals(const theme& other) const noexcept override;
111
114 xtd::size get_hash_code() const noexcept override;
115
116 xtd::string to_string() const noexcept override;
117
120 xtd::string to_css() const noexcept;
122
124
130 static bool from_css(const xtd::string& css_text, theme& result);
131
136 static theme parse(const xtd::string& text);
137
142 static bool try_parse(const xtd::string& text, theme& result) noexcept;
144
145 private:
146 xtd::string name_;
147 xtd::string description_;
148 xtd::string authors_;
149 xtd::uri website_;
150 };
151 }
152 }
153}
static bool from_css(const xtd::string &css_text, theme &result)
Creates a xtd::forms::style_sheets::theme object from the specified css text.
const xtd::uri & website() const noexcept
Gets the theme website.
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,...
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,...
const xtd::string & name() const noexcept
Gets the theme name.
const xtd::string & description() const noexcept
Gets the theme name.
static bool try_parse(const xtd::string &text, theme &result) noexcept
Creates a xtd::forms::style_sheets::theme object from the specified text.
xtd::string to_css() const noexcept
Return a xtd::string that represents the css format of the current xtd::forms::style_sheets::theme ob...
xtd::string to_string() const noexcept override
Returns a xtd::string that represents the current object.
static theme parse(const xtd::string &text)
Creates a xtd::forms::style_sheets::theme object from the specified text.
theme(const xtd::string &name)
Initializes a new instance of the xtd::forms::style_sheets::theme class with specified name.
xtd::size get_hash_code() const noexcept override
Serves as a hash function for a particular type.
theme()=default
Initializes a new instance of the xtd::forms::style_sheets::theme class.
bool equals(const xtd::object &obj) const noexcept override
Determines whether the specified object is equal to the current object.
const xtd::string & authors() const noexcept
Gets the theme authors.
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
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
@ other
The operating system is other.
Definition platform_id.hpp:58
@ size
Specifies that both the width and height property values of the control are defined.
Definition bounds_specified.hpp:36
@ text
The xtd::forms::status_bar_panel displays text in the standard font.
Definition status_bar_panel_style.hpp:25
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
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8