|
Unravel Engine C++ Reference
|
Component that holds a reference to a UI document for RmlUi rendering. More...
#include <ui_document_component.h>
Public Member Functions | |
| auto | is_loaded () const -> bool |
| Check if document is currently loaded. | |
| auto | is_enabled () const -> bool |
| Check if document is currently enabled. | |
| void | set_enabled (bool enabled) |
| Set the enabled state of the document. | |
Public Member Functions inherited from unravel::owned_component | |
| auto | operator= (const owned_component &other) -> owned_component &=default |
| void | set_owner (entt::handle owner) |
| Sets the owner of the component. | |
| auto | get_owner () const noexcept -> entt::const_handle |
| Gets the owner of the component. | |
| auto | get_owner () noexcept -> entt::handle |
| Gets the owner of the component. | |
Public Member Functions inherited from unravel::basic_component | |
| void | touch () |
| Marks the component as 'touched'. | |
Public Attributes | |
| asset_handle< ui_tree > | asset |
| Path to the UI document file (HTML/RML) | |
| Rml::ElementDocument * | document = nullptr |
| Shared pointer to the loaded RmlUi document. | |
| uint64_t | version = 0 |
Public Attributes inherited from unravel::basic_component | |
| bool | eto {} |
| Disable empty type optimizations. | |
Additional Inherited Members | |
Public Types inherited from unravel::component_crtp< ui_document_component, owned_component > | |
| using | base |
Static Public Member Functions inherited from unravel::owned_component | |
| template<typename T > | |
| static void | on_create_component (entt::registry &r, entt::entity e) |
| template<typename T > | |
| static void | on_destroy_component (entt::registry &r, entt::entity e) |
Static Public Attributes inherited from unravel::component_crtp< ui_document_component, owned_component > | |
| static constexpr bool | in_place_delete |
| Indicates if the component can be deleted in place. | |
Component that holds a reference to a UI document for RmlUi rendering.
This component manages an RmlUi document within the shared UI context. Each component instance holds its own document while sharing the global UI context.
Definition at line 25 of file ui_document_component.h.
|
nodiscard |
Check if document is currently enabled.
Definition at line 16 of file ui_document_component.cpp.
|
nodiscard |
Check if document is currently loaded.
Definition at line 11 of file ui_document_component.cpp.
| void unravel::ui_document_component::set_enabled | ( | bool | enabled | ) |
Set the enabled state of the document.
| enabled | True if document should be enabled |
Definition at line 21 of file ui_document_component.cpp.
| asset_handle<ui_tree> unravel::ui_document_component::asset |
Path to the UI document file (HTML/RML)
Definition at line 28 of file ui_document_component.h.
| Rml::ElementDocument* unravel::ui_document_component::document = nullptr |
Shared pointer to the loaded RmlUi document.
Definition at line 32 of file ui_document_component.h.
| uint64_t unravel::ui_document_component::version = 0 |
Definition at line 34 of file ui_document_component.h.