yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
widget_id_registry.h File Reference
#include <cstdint>
#include <optional>
#include <string>
#include <unordered_map>
#include <vector>
#include "absl/strings/string_view.h"
#include "absl/time/time.h"
#include "imgui/imgui.h"

Go to the source code of this file.

Classes

class  yaze::gui::WidgetIdScope
 RAII helper for managing hierarchical ImGui ID scopes. More...
 
class  yaze::gui::WidgetIdRegistry
 Centralized registry for discoverable GUI widgets. More...
 
struct  yaze::gui::WidgetIdRegistry::WidgetBounds
 
struct  yaze::gui::WidgetIdRegistry::WidgetMetadata
 
struct  yaze::gui::WidgetIdRegistry::WidgetInfo
 

Namespaces

namespace  yaze
 Main namespace for the application.
 
namespace  yaze::gui
 Graphical User Interface (GUI) components for the application.
 

Macros

#define YAZE_WIDGET_SCOPE(name)   yaze::gui::WidgetIdScope _yaze_scope_##__LINE__(name)
 
#define YAZE_REGISTER_WIDGET(widget_type, widget_name)
 
#define YAZE_REGISTER_CURRENT_WIDGET(widget_type)
 

Macro Definition Documentation

◆ YAZE_WIDGET_SCOPE

#define YAZE_WIDGET_SCOPE (   name)    yaze::gui::WidgetIdScope _yaze_scope_##__LINE__(name)

Definition at line 149 of file widget_id_registry.h.

◆ YAZE_REGISTER_WIDGET

#define YAZE_REGISTER_WIDGET (   widget_type,
  widget_name 
)
Value:
do { \
if (ImGui::GetItemID() != 0) { \
yaze::gui::WidgetIdRegistry::Instance().RegisterWidget( \
_yaze_scope_##__LINE__.GetWidgetPath(#widget_type, widget_name), \
#widget_type, ImGui::GetItemID()); \
} \
} while (0)

Definition at line 152 of file widget_id_registry.h.

◆ YAZE_REGISTER_CURRENT_WIDGET

#define YAZE_REGISTER_CURRENT_WIDGET (   widget_type)
Value:
do { \
if (ImGui::GetItemID() != 0) { \
yaze::gui::WidgetIdRegistry::Instance().RegisterWidget( \
_yaze_scope_##__LINE__.GetWidgetPath(widget_type, \
ImGui::GetLastItemLabel()), \
widget_type, ImGui::GetItemID()); \
} \
} while (0)

Definition at line 163 of file widget_id_registry.h.