stuff-from-scratch/apps/notes_tk/text_editor/PlainTextDocument.h

25 lines
338 B
C
Raw Normal View History

2020-06-27 09:47:30 +00:00
#pragma once
2023-12-21 09:18:44 +00:00
#include "String.h"
2023-12-27 12:20:02 +00:00
#include "Pointer.h"
2020-06-27 09:47:30 +00:00
class PlainTextDocument
{
2023-12-21 09:18:44 +00:00
String mContent;
2020-06-27 09:47:30 +00:00
public:
PlainTextDocument();
2023-12-21 09:18:44 +00:00
static Ptr<PlainTextDocument> Create();
2020-06-27 09:47:30 +00:00
2023-12-21 09:18:44 +00:00
String GetContent() const;
2020-06-27 09:47:30 +00:00
2023-12-21 09:18:44 +00:00
void SetContent(const String& content);
2020-06-27 09:47:30 +00:00
void Clear();
};
2023-12-21 09:18:44 +00:00
using PlainTextDocumentUPtr = Ptr<PlainTextDocument>;