34 lines
634 B
C++
34 lines
634 B
C++
#pragma once
|
|
#include "Pointer.h"
|
|
#include <filesystem>
|
|
#include "TextEditorModel.h"
|
|
|
|
class TextEditorController
|
|
{
|
|
public:
|
|
|
|
TextEditorController();
|
|
|
|
static Ptr<TextEditorController> Create();
|
|
|
|
void OnSave();
|
|
|
|
void OnClear();
|
|
|
|
void OnLoad();
|
|
|
|
String GetContent() const;
|
|
|
|
void SetContent(const String& content);
|
|
|
|
void SetSavePath(const std::filesystem::path& path);
|
|
|
|
void SetLoadPath(const std::filesystem::path& path);
|
|
|
|
private:
|
|
TextEditorModelUPtr mModel;
|
|
std::filesystem::path mSavePath;
|
|
std::filesystem::path mLoadPath;
|
|
};
|
|
|
|
using TextEditorControllerUPtr = Ptr<TextEditorController>;
|