9#include <simplesquirrel/simplesquirrel.hpp>
64 bool selectClass(
const std::string&
name);
71 bool inspectObject(
const ssq::Object&
object);
81 void setPickScene(std::function<ssq::Object()> pickScene);
83 bool selectInstance(
int index);
85 void openNested(
const std::string& className,
const ssq::Object&
object);
94 return (selectedInstance_ >= 0 &&
96 size_t(selectedInstance_) < instances_.size())
97 ? instances_[size_t(selectedInstance_)].object
108 struct InstanceEntry {
113 std::string className;
125 Runtime* runtime()
const;
134 const ssq::Object* currentInstance()
const;
135 int currentClassIndex()
const;
136 void rebuildPropertyModel();
138 PropertyViewOptions propertyViewOptions();
139 WidgetDesc propertyWidget(
const std::string& ownerClass,
140 const ReflectedMember&
member,
141 const ReflectedValue&
value,
142 const ssq::Object& instance);
144 std::vector<std::string> classNames_;
145 std::string selectedClass_;
146 std::vector<InstanceEntry> instances_;
147 std::vector<NestedEntry> navStack_;
148 std::function<ssq::Object()> pickScene_;
149 int selectedInstance_ = -1;
150 UIHostHandle host_{};
151 std::unique_ptr<property_access::ReflectedPropertyModel> propertyModel_;
#define EVENGINE_API_WORLD
float(ui::Theme::* member)[4]
Reflection-driven property inspector (DevTools phase C, MVVM).
Inspector()=default
Inspector.
Inspector & operator=(const Inspector &)=delete
UIHostHandle host() const noexcept
Returns the mounted inspector host handle, or an empty handle until open().
int selectedIndex() const
Index of the selected instance; -1 when none.
ssq::Object selectedInstance() const
Live script object of the selected instance (empty when none).
Inspector(const Inspector &)=delete
const std::string & selectedClass() const
Name of the currently selected class ("" when none).
int instanceCount() const
Number of live instances of the selected class.
ecs::EntityHandle UIHostHandle