Automatic widget registration helpers for ImGui Test Engine integration. More...
#include <string>
#include "imgui/imgui.h"
#include "app/gui/automation/widget_id_registry.h"
#include "absl/strings/str_cat.h"
Go to the source code of this file.
Classes | |
class | yaze::gui::AutoWidgetScope |
RAII scope that enables automatic widget registration. More... | |
Namespaces | |
namespace | yaze |
Main namespace for the application. | |
namespace | yaze::gui |
Graphical User Interface (GUI) components for the application. | |
Functions | |
void | yaze::gui::AutoRegisterLastItem (const std::string &widget_type, const std::string &explicit_label="", const std::string &description="") |
Automatically register the last ImGui item. | |
bool | yaze::gui::AutoButton (const char *label, const ImVec2 &size=ImVec2(0, 0)) |
bool | yaze::gui::AutoSmallButton (const char *label) |
bool | yaze::gui::AutoCheckbox (const char *label, bool *v) |
bool | yaze::gui::AutoRadioButton (const char *label, bool active) |
bool | yaze::gui::AutoRadioButton (const char *label, int *v, int v_button) |
bool | yaze::gui::AutoInputText (const char *label, char *buf, size_t buf_size, ImGuiInputTextFlags flags=0, ImGuiInputTextCallback callback=nullptr, void *user_data=nullptr) |
bool | yaze::gui::AutoInputTextMultiline (const char *label, char *buf, size_t buf_size, const ImVec2 &size=ImVec2(0, 0), ImGuiInputTextFlags flags=0, ImGuiInputTextCallback callback=nullptr, void *user_data=nullptr) |
bool | yaze::gui::AutoInputInt (const char *label, int *v, int step=1, int step_fast=100, ImGuiInputTextFlags flags=0) |
bool | yaze::gui::AutoInputFloat (const char *label, float *v, float step=0.0f, float step_fast=0.0f, const char *format="%.3f", ImGuiInputTextFlags flags=0) |
bool | yaze::gui::AutoSliderInt (const char *label, int *v, int v_min, int v_max, const char *format="%d", ImGuiSliderFlags flags=0) |
bool | yaze::gui::AutoSliderFloat (const char *label, float *v, float v_min, float v_max, const char *format="%.3f", ImGuiSliderFlags flags=0) |
bool | yaze::gui::AutoCombo (const char *label, int *current_item, const char *const items[], int items_count, int popup_max_height_in_items=-1) |
bool | yaze::gui::AutoSelectable (const char *label, bool selected=false, ImGuiSelectableFlags flags=0, const ImVec2 &size=ImVec2(0, 0)) |
bool | yaze::gui::AutoSelectable (const char *label, bool *p_selected, ImGuiSelectableFlags flags=0, const ImVec2 &size=ImVec2(0, 0)) |
bool | yaze::gui::AutoMenuItem (const char *label, const char *shortcut=nullptr, bool selected=false, bool enabled=true) |
bool | yaze::gui::AutoMenuItem (const char *label, const char *shortcut, bool *p_selected, bool enabled=true) |
bool | yaze::gui::AutoBeginMenu (const char *label, bool enabled=true) |
bool | yaze::gui::AutoBeginTabItem (const char *label, bool *p_open=nullptr, ImGuiTabItemFlags flags=0) |
bool | yaze::gui::AutoTreeNode (const char *label) |
bool | yaze::gui::AutoTreeNodeEx (const char *label, ImGuiTreeNodeFlags flags=0) |
bool | yaze::gui::AutoCollapsingHeader (const char *label, ImGuiTreeNodeFlags flags=0) |
void | yaze::gui::RegisterCanvas (const char *canvas_name, const std::string &description="") |
Register a canvas widget after BeginChild or similar. | |
void | yaze::gui::RegisterTable (const char *table_name, const std::string &description="") |
Register a table after BeginTable. | |
Automatic widget registration helpers for ImGui Test Engine integration.
This file provides inline wrappers and RAII helpers that automatically register ImGui widgets with the WidgetIdRegistry for test automation.
Usage: { gui::AutoWidgetScope scope("Dungeon/Canvas"); if (gui::AutoButton("Save##DungeonSave")) { // Button clicked } gui::AutoInputText("RoomName", buffer, sizeof(buffer)); }
All widgets created within this scope will be automatically registered with their full hierarchical paths for test harness discovery.
Definition in file widget_auto_register.h.