chore: structured src/gui, run clang-format

This commit is contained in:
2025-12-18 13:23:50 +03:00
parent 613c2c80f5
commit 7641846600
55 changed files with 1647 additions and 1399 deletions

View File

@@ -0,0 +1,38 @@
#ifndef CLRSYNC_GUI_PALETTE_CONTROLLER_HPP
#define CLRSYNC_GUI_PALETTE_CONTROLLER_HPP
#include "core/io/toml_file.hpp"
#include "core/palette/palette_manager.hpp"
#include <string>
#include <unordered_map>
class palette_controller
{
public:
palette_controller();
const clrsync::core::palette &current_palette() const
{
return m_current_palette;
}
const std::unordered_map<std::string, clrsync::core::palette> &palettes() const
{
return m_palettes;
}
void select_palette(const std::string &name);
void create_palette(const std::string &name);
void save_current_palette();
void delete_current_palette();
void apply_current_theme() const;
void set_color(const std::string &key, const clrsync::core::color &color);
private:
void reload_palettes();
clrsync::core::palette_manager<clrsync::core::io::toml_file> m_palette_manager;
std::unordered_map<std::string, clrsync::core::palette> m_palettes;
clrsync::core::palette m_current_palette;
};
#endif // CLRSYNC_GUI_PALETTE_CONTROLLER_HPP