mud provides a range of generic ui components residing in the uio module. these components are of a critical utility either for live debugging the state of the app or for production-grade editor tools:
- browse a module namespaces, functions, types
- call a method
- edit a value
- inspect an object fields
- inspect an object structure as a graph
- create an object
- inspect a collection of objects, add and remove object to it
- toggle a console to do virtually any operation on the application state
the system_inspector
and module_inspector
ui components allow to inspect all the system modules, or one module specifically :
uio::system_inspector();
uio::module_inspector();
this method_call_edit
component allows to set the arguments to a method and call it :
Method& meth = method(MyObject::foo);
uio::method_call_edit(ui, meth);
the value_edit
component allows to edit a single value :
Var value = var(35);
uio::value_edit(ui, value);
the inspector
component allows to edit any object, all of its fields, and all of its components :
AppObject object(12, 'cocorico');
uio::inspector(ui, &object);
the creator
component allows to edit all fields of an object and create it :
Var object = var<MyObject>();
uio::creator(ui, object);
the multi_inspector
component allows to edit each of a collection of objects, and add and remove objects to it :
std::vector<Var> objects = { var(MyObject(5, "cocorico")) };
uio::multi_inspector(ui, objects);