chore: refactor

This commit is contained in:
2025-12-19 17:22:23 +03:00
parent 82998d688c
commit 4ada2c44ed
38 changed files with 1628 additions and 500 deletions

View File

@@ -1,6 +1,10 @@
#ifndef CLRSYNC_UI_MANAGER_HPP
#define CLRSYNC_UI_MANAGER_HPP
#include <string>
#include <vector>
class font_loader;
struct ImFont;
namespace clrsync::gui::backend
{
@@ -29,9 +33,25 @@ public:
void begin_frame();
void end_frame();
void push_default_font();
void pop_font();
std::vector<std::string> get_system_fonts() const;
bool reload_font(const char* font_name, float size);
std::string open_file_dialog(const std::string& title = "Open File",
const std::string& initial_path = "",
const std::vector<std::string>& filters = {});
std::string save_file_dialog(const std::string& title = "Save File",
const std::string& initial_path = "",
const std::vector<std::string>& filters = {});
std::string select_folder_dialog(const std::string& title = "Select Folder",
const std::string& initial_path = "");
private:
backend::backend_interface *m_backend;
void *m_imgui_context = nullptr;
font_loader *m_font_loader = nullptr;
};
}