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

Represents a UI style sheet asset (CSS/RCSS document). More...

#include <style_sheet.h>

Public Types

using sptr = std::shared_ptr<style_sheet>
 Shared pointer to a style sheet.
 
using wptr = std::weak_ptr<style_sheet>
 Weak pointer to a style sheet.
 
using uptr = std::unique_ptr<style_sheet>
 Unique pointer to a style sheet.
 

Public Member Functions

auto is_valid () const -> bool
 Check if the style sheet 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 CSS/RCSS content of the style sheet.
 

Detailed Description

Represents a UI style sheet asset (CSS/RCSS document).

This asset contains styling information for UI elements, similar to Unity's USS files. It defines the visual appearance and layout properties of UI elements.

Definition at line 25 of file style_sheet.h.

Member Typedef Documentation

◆ sptr

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

Shared pointer to a style sheet.

Definition at line 27 of file style_sheet.h.

◆ uptr

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

Unique pointer to a style sheet.

Definition at line 29 of file style_sheet.h.

◆ wptr

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

Weak pointer to a style sheet.

Definition at line 28 of file style_sheet.h.

Member Function Documentation

◆ get_content_size()

auto unravel::style_sheet::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 style_sheet.cpp.

◆ is_valid()

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

Check if the style sheet content is valid/non-empty.

Returns
True if content is not empty

Definition at line 6 of file style_sheet.cpp.

Member Data Documentation

◆ content

std::string unravel::style_sheet::content

The CSS/RCSS content of the style sheet.

Definition at line 32 of file style_sheet.h.


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