wip: moving backend-related stuff out of the app logic

This commit is contained in:
2025-12-18 16:45:49 +03:00
parent 292a748ac4
commit c68ca3dabe
8 changed files with 370 additions and 27 deletions

38
src/gui/ui_manager.hpp Normal file
View File

@@ -0,0 +1,38 @@
#ifndef CLRSYNC_UI_MANAGER_HPP
#define CLRSYNC_UI_MANAGER_HPP
#include <string>
namespace clrsync::gui::backend
{
class backend_interface;
}
namespace clrsync::gui
{
struct ui_config
{
std::string ini_path = "";
bool enable_docking = true;
bool enable_keyboard_nav = true;
};
class ui_manager
{
public:
explicit ui_manager(backend::backend_interface *backend);
~ui_manager();
bool initialize(const ui_config& config = ui_config());
void shutdown();
void begin_frame();
void end_frame();
private:
backend::backend_interface *m_backend;
void *m_imgui_context = nullptr;
};
}
#endif