|
FuncDoodle
|
Helper for registering ImGui test engine tests with popup access. More...
Go to the source code of this file.
Classes | |
| struct | ImTestCtx |
| Bundles the ImGui test context with a popup registry reference. More... | |
Functions | |
| FuncDoodle::Application * | GetApp () |
| Returns the active FuncDoodle application instance. | |
| FuncDoodle::PopupRegistry & | GetPopups () |
| Returns the application's popup registry. | |
| template<typename F> | |
| ImGuiTest * | ImTest (const char *name, F testFunc) |
| Registers a test under the "funcdoodle" group with automatic popup injection. | |
Helper for registering ImGui test engine tests with popup access.
Provides the ImTest() function which eliminates boilerplate around IM_REGISTER_TEST and automatically injects a PopupRegistry reference into each test via ImTestCtx.
|
inline |
Returns the active FuncDoodle application instance.
Tries the ImGui UserData pointer first, then falls back to the singleton.
|
inline |
Returns the application's popup registry.
Convenience shorthand for GetApp()->GetUiManager().GetPopups().
|
inline |
Registers a test under the "funcdoodle" group with automatic popup injection.
Stores the user-provided callable via heap allocation and wires it into the ImGui test engine via UserData. The trampoline in TestFunc constructs an ImTestCtx with the current ImGuiTestContext and PopupRegistry, then forwards it to the user's function.
Example usage:
| F | Callable type taking ImTestCtx&. |
| name | Short test name (e.g. "menu_open_close"). |
| testFunc | Lambda or function object. |