Unravel Engine C++ Reference
Loading...
Searching...
No Matches
style_sheet.h
Go to the documentation of this file.
1#pragma once
2#include <engine/engine_export.h>
3
4#include <memory>
5#include <string>
6
7// Forward declarations
8namespace Rml
9{
10 class StyleSheet;
11 class StyleSheetContainer;
12}
13
14namespace unravel
15{
16
26{
27 using sptr = std::shared_ptr<style_sheet>;
28 using wptr = std::weak_ptr<style_sheet>;
29 using uptr = std::unique_ptr<style_sheet>;
30
32 std::string content;
33
38 [[nodiscard]] auto is_valid() const -> bool;
39
44 [[nodiscard]] auto get_content_size() const -> size_t;
45};
46
47} // namespace unravel
Represents a UI style sheet asset (CSS/RCSS document).
Definition style_sheet.h:26
std::unique_ptr< style_sheet > uptr
Unique pointer to a style sheet.
Definition style_sheet.h:29
std::string content
The CSS/RCSS content of the style sheet.
Definition style_sheet.h:32
auto get_content_size() const -> size_t
Get the size of the content in bytes.
auto is_valid() const -> bool
Check if the style sheet content is valid/non-empty.
std::shared_ptr< style_sheet > sptr
Shared pointer to a style sheet.
Definition style_sheet.h:27
std::weak_ptr< style_sheet > wptr
Weak pointer to a style sheet.
Definition style_sheet.h:28