xtd 0.2.0
Loading...
Searching...
No Matches
theme.h
Go to the documentation of this file.
1
4#pragma once
5#include "../../forms_export.h"
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);
48 theme(const xtd::string& name, const xtd::string& description);
53 theme(const xtd::string& name, const xtd::string& description, const xtd::string& authors);
59 theme(const xtd::string& name, const xtd::string& description, const xtd::string& authors, const xtd::uri& website);
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
103 using object::equals;
104 bool equals(const theme& other) const noexcept override {return name_ == other.name_ && description_ == other.description_ && authors_ == other.authors_ && website_ == other.website_;}
105
106 xtd::string to_string() const noexcept override;
107
110 xtd::string to_css() const noexcept;
112
114
120 static bool from_css(const xtd::string& css_text, theme& result);
121
126 static theme parse(const xtd::string& text);
127
132 static bool try_parse(const xtd::string& text, theme& result) noexcept;
134
135 private:
136 xtd::string name_;
137 xtd::string description_;
138 xtd::string authors_;
139 xtd::uri website_;
140 };
141 }
142 }
143}
Represents text as a sequence of character units.
Definition basic_string.h:79
The theme data allows you to specify the theme informations.
Definition theme.h:32
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,...
xtd::string to_string() const noexcept override
Returns a xtd::string that represents the current object.
theme(const xtd::string &name)
Initializes a new instance of the xtd::forms::style_sheets::theme class with specified name.
theme()=default
Initializes a new instance of the xtd::forms::style_sheets::theme class.
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.h:22
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.h:42
Provides an object representation of a uniform resource identifier (URI) and easy access to the parts...
Definition uri.h:103
#define forms_export_
Define shared library export.
Definition forms_export.h:13
@ other
The operating system is other.
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition xtd_about_box.h:12
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10