Unravel Engine C++ Reference
|
Manages ImGui layout for property inspection in the editor. More...
#include <inspector.h>
Public Member Functions | |
property_layout (const property_layout &)=delete | |
Disable copy operations due to RAII nature and global stack management. | |
auto | operator= (const property_layout &) -> property_layout &=delete |
property_layout (property_layout &&)=delete | |
Disable move operations to prevent stack corruption. | |
auto | operator= (property_layout &&) -> property_layout &=delete |
property_layout () | |
Default constructor that registers this layout in the global stack. | |
property_layout (const entt::meta_data &prop, bool columns=true) | |
Constructs layout from meta property data. | |
property_layout (const std::string &name, bool columns=true) | |
Constructs layout with property name only. | |
property_layout (const std::string &name, const std::string &tooltip, bool columns=true) | |
Constructs layout with name and tooltip. | |
property_layout (const std::string &name, const std::function< void()> &callback, bool columns=true) | |
Constructs layout with custom rendering callback. | |
~property_layout () | |
Destructor that cleans up ImGui state and removes from stack. | |
void | set_data (const entt::meta_data &prop, bool columns=true) |
Updates layout data from meta property. | |
void | set_data (const std::string &name, const std::string &tooltip, bool columns=true) |
Updates layout data with name and tooltip. | |
void | push_layout (bool auto_proceed_to_next_column=true) |
Initializes ImGui layout with tables and property label. | |
auto | push_tree_layout (ImGuiTreeNodeFlags flags=0) -> bool |
Creates a collapsible tree node layout for nested properties. | |
void | pop_layout () |
Cleans up ImGui state (IDs, tables, tree nodes) | |
void | prepare_for_item () |
Prepares ImGui for rendering the property value widget. | |
Static Public Member Functions | |
static auto | get_current () -> property_layout * |
Gets the currently active property layout from the global stack. | |
Manages ImGui layout for property inspection in the editor.
Handles the visual layout of properties in the inspector panel, including column-based layouts, tree nodes, tooltips, and context menus. Uses RAII to automatically manage ImGui state.
Definition at line 18 of file inspector.h.
|
delete |
Disable copy operations due to RAII nature and global stack management.
|
delete |
Disable move operations to prevent stack corruption.
unravel::property_layout::property_layout | ( | ) |
Default constructor that registers this layout in the global stack.
Definition at line 25 of file inspector.cpp.
unravel::property_layout::property_layout | ( | const entt::meta_data & | prop, |
bool | columns = true ) |
Constructs layout from meta property data.
prop | Meta property containing name and tooltip information |
columns | Whether to use column-based layout (default: true) |
Definition at line 30 of file inspector.cpp.
unravel::property_layout::property_layout | ( | const std::string & | name, |
bool | columns = true ) |
Constructs layout with property name only.
name | Display name for the property |
columns | Whether to use column-based layout (default: true) |
Definition at line 39 of file inspector.cpp.
unravel::property_layout::property_layout | ( | const std::string & | name, |
const std::string & | tooltip, | ||
bool | columns = true ) |
Constructs layout with name and tooltip.
name | Display name for the property |
tooltip | Help text shown on hover |
columns | Whether to use column-based layout (default: true) |
Definition at line 48 of file inspector.cpp.
unravel::property_layout::property_layout | ( | const std::string & | name, |
const std::function< void()> & | callback, | ||
bool | columns = true ) |
Constructs layout with custom rendering callback.
name | Display name for the property |
callback | Custom function to render the property label |
columns | Whether to use column-based layout (default: true) |
Definition at line 57 of file inspector.cpp.
unravel::property_layout::~property_layout | ( | ) |
Destructor that cleans up ImGui state and removes from stack.
Definition at line 68 of file inspector.cpp.
|
static |
Gets the currently active property layout from the global stack.
Definition at line 20 of file inspector.cpp.
|
delete |
|
delete |
void unravel::property_layout::pop_layout | ( | ) |
Cleans up ImGui state (IDs, tables, tree nodes)
Definition at line 211 of file inspector.cpp.
void unravel::property_layout::prepare_for_item | ( | ) |
Prepares ImGui for rendering the property value widget.
Definition at line 151 of file inspector.cpp.
void unravel::property_layout::push_layout | ( | bool | auto_proceed_to_next_column = true | ) |
Initializes ImGui layout with tables and property label.
auto_proceed_to_next_column | Whether to automatically move to next column |
Definition at line 92 of file inspector.cpp.
auto unravel::property_layout::push_tree_layout | ( | ImGuiTreeNodeFlags | flags = 0 | ) | -> bool |
Creates a collapsible tree node layout for nested properties.
flags | ImGui tree node flags for customization |
Definition at line 162 of file inspector.cpp.
void unravel::property_layout::set_data | ( | const entt::meta_data & | prop, |
bool | columns = true ) |
Updates layout data from meta property.
prop | Meta property containing name and tooltip |
columns | Whether to use column-based layout |
Definition at line 75 of file inspector.cpp.
void unravel::property_layout::set_data | ( | const std::string & | name, |
const std::string & | tooltip, | ||
bool | columns = true ) |
Updates layout data with name and tooltip.
name | Display name for the property |
tooltip | Help text shown on hover |
columns | Whether to use column-based layout |
Definition at line 85 of file inspector.cpp.