1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-10-17 07:22:23 +00:00

Import a simple text editor I started working on.

This commit is contained in:
Andreas Kling 2018-12-04 00:27:16 +01:00
parent 405383fd2f
commit ca6847b5bb
59 changed files with 895 additions and 39 deletions

19
Editor/main.cpp Normal file
View file

@ -0,0 +1,19 @@
#include "Document.h"
#include "Editor.h"
#include <stdio.h>
int main(int c, char** v)
{
std::string file_to_open = "cuki.h";
if (c > 1) {
file_to_open = v[1];
}
auto document = Document::create_from_file(file_to_open);
if (!document) {
fprintf(stderr, "Failed to open file.\n");
return 1;
}
Editor editor;
editor.set_document(std::move(document));
return editor.exec();
}