This commit is contained in:
2025-12-07 01:35:33 +03:00
commit 6cc0a613dc
342 changed files with 166529 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
#ifndef CLRSYNC_GUI_TEMPLATE_EDITOR_HPP
#define CLRSYNC_GUI_TEMPLATE_EDITOR_HPP
#include "template_controller.hpp"
#include <core/palette/palette.hpp>
#include "color_text_edit/TextEditor.h"
#include <string>
class template_editor
{
public:
template_editor();
void render();
void apply_current_palette(const clrsync::core::palette& pal);
private:
void render_controls();
void render_editor();
void render_template_list();
void save_template();
void load_template(const std::string &name);
void new_template();
void refresh_templates();
bool is_valid_path(const std::string &path);
template_controller m_template_controller;
TextEditor m_editor;
std::string m_template_name;
std::string m_output_path;
std::string m_reload_command;
std::string m_validation_error;
bool m_enabled{true};
bool m_is_editing_existing{false};
};
#endif // CLRSYNC_GUI_TEMPLATE_EDITOR_HPP