Unravel Engine C++ Reference
Loading...
Searching...
No Matches
ui_tree.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 ElementDocument;
11}
12
13namespace unravel
14{
15
24struct ui_tree
25{
26 using sptr = std::shared_ptr<ui_tree>;
27 using wptr = std::weak_ptr<ui_tree>;
28 using uptr = std::unique_ptr<ui_tree>;
29
31 std::string content;
32
37 [[nodiscard]] auto is_valid() const -> bool;
38
43 [[nodiscard]] auto get_content_size() const -> size_t;
44};
45
46} // namespace unravel
Represents a UI visual tree asset (HTML/RML document).
Definition ui_tree.h:25
std::shared_ptr< ui_tree > sptr
Shared pointer to a visual tree.
Definition ui_tree.h:26
std::weak_ptr< ui_tree > wptr
Weak pointer to a visual tree.
Definition ui_tree.h:27
std::string content
The HTML/RML content of the visual tree.
Definition ui_tree.h:31
auto is_valid() const -> bool
Check if the visual tree content is valid/non-empty.
Definition ui_tree.cpp:6
auto get_content_size() const -> size_t
Get the size of the content in bytes.
Definition ui_tree.cpp:11
std::unique_ptr< ui_tree > uptr
Unique pointer to a visual tree.
Definition ui_tree.h:28