22#include <TextEditor.h>
79 void setDocument(
const std::string& path,
const std::string& text);
82 void document(std::string& path, std::string& text)
const;
Main application class for the plain-text editor backend.
Definition undoAppText.hpp:35
std::unique_ptr< TextEditor > m_editor
Definition undoAppText.hpp:100
void closeFile()
Clear the editor and forget the current file.
bool m_isDirty
Editor text differs from the file on disk.
Definition undoAppText.hpp:102
bool hasUnsavedChanges() const
Whether the text on screen differs from the file on disk.
Definition undoAppText.hpp:92
bool m_initialized
Definition undoAppText.hpp:98
void saveFile()
Write the editor's current text back to m_currentFilePath.
void renameFileTo(const std::string &path)
Record that the file this editor holds has moved on disk.
void setupEditor()
(Re)create the TextEditor widget with the standard dark palette
std::string m_currentFilePath
Definition undoAppText.hpp:99
void setDocument(const std::string &path, const std::string &text)
Put what is on screen back into an editor, under a new file name.
void document(std::string &path, std::string &text) const
The editor's text and the file it belongs to.
bool initialize()
Initialize the plain-text editor (idempotent)
void renderEditorPanel()
Render the editor inside the unified "Editor" ImGui window.
void shutdown()
Shutdown the plain-text editor.
static TextApp & getInstance()
Get the singleton instance of TextApp.
void openFile(const std::string &path)
Open a file and load it into the editor.
std::vector< std::string > m_outputLines
Definition undoAppText.hpp:101
Definition undoAppCpp.hpp:26