Unravel Engine C++ Reference
Loading...
Searching...
No Matches
unravel::ui_tree Struct Reference

Represents a UI visual tree asset (HTML/RML document). More...

#include <ui_tree.h>

Public Types

using sptr = std::shared_ptr<ui_tree>
 Shared pointer to a visual tree.
 
using wptr = std::weak_ptr<ui_tree>
 Weak pointer to a visual tree.
 
using uptr = std::unique_ptr<ui_tree>
 Unique pointer to a visual tree.
 

Public Member Functions

auto is_valid () const -> bool
 Check if the visual tree content is valid/non-empty.
 
auto get_content_size () const -> size_t
 Get the size of the content in bytes.
 

Public Attributes

std::string content
 The HTML/RML content of the visual tree.
 

Detailed Description

Represents a UI visual tree asset (HTML/RML document).

This asset contains the structure and content of a UI document, similar to Unity's UXML files. It defines the hierarchy and properties of UI elements.

Definition at line 24 of file ui_tree.h.

Member Typedef Documentation

◆ sptr

using unravel::ui_tree::sptr = std::shared_ptr<ui_tree>

Shared pointer to a visual tree.

Definition at line 26 of file ui_tree.h.

◆ uptr

using unravel::ui_tree::uptr = std::unique_ptr<ui_tree>

Unique pointer to a visual tree.

Definition at line 28 of file ui_tree.h.

◆ wptr

using unravel::ui_tree::wptr = std::weak_ptr<ui_tree>

Weak pointer to a visual tree.

Definition at line 27 of file ui_tree.h.

Member Function Documentation

◆ get_content_size()

auto unravel::ui_tree::get_content_size ( ) const -> size_t
nodiscard

Get the size of the content in bytes.

Returns
Size of content string

Definition at line 11 of file ui_tree.cpp.

◆ is_valid()

auto unravel::ui_tree::is_valid ( ) const -> bool
nodiscard

Check if the visual tree content is valid/non-empty.

Returns
True if content is not empty

Definition at line 6 of file ui_tree.cpp.

Member Data Documentation

◆ content

std::string unravel::ui_tree::content

The HTML/RML content of the visual tree.

Definition at line 31 of file ui_tree.h.


The documentation for this struct was generated from the following files: