#pragma once #include #include #include "TextEditorModel.h" class TextEditorController { TextEditorModelUPtr mModel; std::filesystem::path mSavePath; std::filesystem::path mLoadPath; public: TextEditorController(); static std::unique_ptr Create(); void OnSave(); void OnClear(); void OnLoad(); std::string GetContent() const; void SetContent(const std::string& content); void SetSavePath(const std::filesystem::path& path); void SetLoadPath(const std::filesystem::path& path); }; using TextEditorControllerUPtr = std::unique_ptr;