mirror of
https://github.com/obsqrbtz/clrsync.git
synced 2026-04-09 04:29:04 +03:00
init
This commit is contained in:
40
src/gui/template_editor.hpp
Normal file
40
src/gui/template_editor.hpp
Normal 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
|
||||
Reference in New Issue
Block a user