ASAPCabinetFE
 
Loading...
Searching...
No Matches
imgui_manager.h
1
11#ifndef GUI_MANAGER_H
12#define GUI_MANAGER_H
13
14#include <SDL2/SDL.h>
15#include <memory>
16
21struct ImGuiContext;
22
27class IWindowManager;
28
33class IConfigService;
34
46public:
56 ImGuiManager(IWindowManager* windowManager, IConfigService* configService);
57
68 ImGuiManager(SDL_Window* window, SDL_Renderer* renderer, IConfigService* configService);
69
76
83 void initialize();
84
92 void reinitialize();
93
99 void newFrame();
100
108 void render(SDL_Renderer* renderer);
109
118 void processEvent(const SDL_Event& event);
119
120private:
121 IWindowManager* windowManager_;
122 IConfigService* configService_;
123 SDL_Window* configWindow_;
124 SDL_Renderer* configRenderer_;
125 ImGuiContext* context_;
126};
127
128#endif // GUI_MANAGER_H
Interface for configuration services (forward declaration).
Definition iconfig_service.h:30
Interface for managing SDL windows and renderers.
Definition iwindow_manager.h:27
ImGui context structure (forward declaration).
Manages ImGui contexts for UI rendering.
Definition imgui_manager.h:45
~ImGuiManager()
Destroys the ImGuiManager instance.
Definition imgui_manager.cpp:15
void reinitialize()
Reinitialize ImGui platform/renderer backends when windows or renderers change.
Definition imgui_manager.cpp:24
void initialize()
Initializes the ImGui context.
Definition imgui_manager.cpp:50
void newFrame()
Starts a new ImGui frame.
Definition imgui_manager.cpp:97
void processEvent(const SDL_Event &event)
Processes an SDL event for ImGui.
Definition imgui_manager.cpp:147
void render(SDL_Renderer *renderer)
Renders ImGui draw data.
Definition imgui_manager.cpp:134