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/ustring>
10
12namespace xtd {
14 namespace forms {
16 namespace style_sheets {
30 class forms_export_ theme : public xtd::iequatable<theme>, public xtd::object {
31 public:
33
36 theme() = default;
41 explicit theme(const xtd::ustring& name);
46 theme(const xtd::ustring& name, const xtd::ustring& description);
51 theme(const xtd::ustring& name, const xtd::ustring& description, const xtd::ustring& authors);
57 theme(const xtd::ustring& name, const xtd::ustring& description, const xtd::ustring& authors, const xtd::uri& website);
59
61 theme(const theme&) = default;
62 theme(theme&&) = default;
63 theme& operator =(const theme&) = default;
65
67
71 const xtd::ustring& authors() const noexcept;
74 void authors(const xtd::ustring& value) noexcept;
75
78 const xtd::ustring& description() const noexcept;
81 void description(const xtd::ustring& value) noexcept;
82
85 const xtd::ustring& name() const noexcept;
88 void name(const xtd::ustring& value) noexcept;
89
92 const xtd::uri& website() const noexcept;
95 void website(const xtd::uri& value) noexcept;
97
99
101 bool equals(const theme& other) const noexcept override {return name_ == other.name_ && description_ == other.description_ && authors_ == other.authors_ && website_ == other.website_;}
102
103 xtd::ustring to_string() const noexcept override;
104
107 xtd::ustring to_css() const noexcept;
109
111
117 static bool from_css(const xtd::ustring& css_text, theme& result);
118
123 static theme parse(const xtd::ustring& text);
124
129 static bool try_parse(const xtd::ustring& text, theme& result) noexcept;
131
132 private:
133 xtd::ustring name_;
134 xtd::ustring description_;
135 xtd::ustring authors_;
136 xtd::uri website_;
137 };
138 }
139 }
140}
The theme data allows you to specify the theme informations.
Definition theme.h:30
theme(const xtd::ustring &name)
Initializes a new instance of the xtd::forms::style_sheets::theme class with specified name.
theme(const xtd::ustring &name, const xtd::ustring &description, const xtd::ustring &authors, const xtd::uri &website)
Initializes a new instance of the xtd::forms::style_sheets::theme class with specified name,...
xtd::ustring to_string() const noexcept override
Returns a sxd::ustring that represents the current object.
theme(const xtd::ustring &name, const xtd::ustring &description, const xtd::ustring &authors)
Initializes a new instance of the xtd::forms::style_sheets::theme class with specified name,...
const xtd::ustring & authors() const noexcept
Gets the theme authors.
theme()=default
Initializes a new instance of the xtd::forms::style_sheets::theme class.
theme(const xtd::ustring &name, const xtd::ustring &description)
Initializes a new instance of the xtd::forms::style_sheets::theme class with specified name and descr...
Defines a generalized method that a value type or class implements to create a type-specific method f...
Definition iequatable.h:18
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.h:32
Provides an object representation of a uniform resource identifier (URI) and easy access to the parts...
Definition uri.h:103
Represents text as a sequence of UTF-8 code units.
Definition ustring.h:47
#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