Unravel Engine C++ Reference
|
Base class for type-specific property inspectors in the editor. More...
#include <inspector.h>
Public Types | |
using | attribute_getter = std::function<entt::meta_any(const char*)> |
Function type for retrieving meta attributes by name. | |
Public Member Functions | |
virtual | ~inspector ()=default |
Virtual destructor for proper cleanup. | |
virtual void | before_inspect (const entt::meta_data &prop) |
Called before inspecting a property to set up layout. | |
virtual void | after_inspect (const entt::meta_data &prop) |
Called after inspecting a property to clean up layout. | |
virtual auto | inspect (rtti::context &ctx, entt::meta_any &var, const meta_any_proxy &var_proxy, const var_info &info, const entt::meta_custom &custom) -> inspect_result=0 |
Pure virtual method to render and handle interaction for a variable. | |
![]() | |
virtual auto | get_meta_type () const -> entt::meta_type |
auto | is () const -> bool |
auto | is (const entt::meta_type &type) const -> bool |
virtual auto | as_derived () -> entt::meta_any |
Static Public Member Functions | |
template<typename T > | |
static void | create_and_register (const entt::meta_type &inspected_type, std::unordered_map< entt::id_type, std::shared_ptr< inspector > > &type_map) |
Factory method to create and register inspector instances. | |
![]() | |
static auto | get_static_meta_type () -> entt::meta_type |
Protected Attributes | |
std::unique_ptr< property_layout > | layout_ |
Layout manager for this inspector's UI. | |
bool | open_ {} |
Whether this inspector's UI section is expanded. | |
Base class for type-specific property inspectors in the editor.
Inspectors provide custom UI for editing different data types in the inspector panel. Each inspector handles rendering and interaction for a specific type (e.g., floats, vectors, textures).
Definition at line 240 of file inspector.h.
using unravel::inspector::attribute_getter = std::function<entt::meta_any(const char*)> |
Function type for retrieving meta attributes by name.
Definition at line 256 of file inspector.h.
|
virtualdefault |
Virtual destructor for proper cleanup.
|
virtual |
Called after inspecting a property to clean up layout.
prop | Meta property that was inspected |
Definition at line 244 of file inspector.cpp.
|
virtual |
Called before inspecting a property to set up layout.
prop | Meta property being inspected |
Definition at line 239 of file inspector.cpp.
|
inlinestatic |
Factory method to create and register inspector instances.
T | Inspector type to create |
inspected_type | Type that this inspector handles |
type_map | Registry map to store the inspector instance |
Definition at line 249 of file inspector.h.
|
pure virtual |
Pure virtual method to render and handle interaction for a variable.
ctx | Runtime type information context |
var | Variable being inspected |
var_proxy | Proxy for accessing the variable |
info | Metadata about the variable |
custom | Custom attributes for the variable |
|
protected |
Layout manager for this inspector's UI.
Definition at line 292 of file inspector.h.
|
protected |
Whether this inspector's UI section is expanded.
Definition at line 294 of file inspector.h.