ladybird/Applications/TextEditor/main.cpp
Rhin d7b836858e TextEditor: Move the application UI into a dedicated TextEditorWidget. (#292)
Added a main widget for the text editor as a stepping stone to add new features.
2019-07-11 20:52:33 +02:00

22 lines
No EOL
524 B
C++

#include "TextEditorWidget.h"
int main(int argc, char** argv)
{
GApplication app(argc, argv);
auto* window = new GWindow;
window->set_title("Text Editor");
window->set_rect(20, 200, 640, 400);
window->set_should_exit_event_loop_on_close(true);
window->show();
window->set_icon_path("/res/icons/TextEditor16.png");
auto* text_widget = new TextEditorWidget();
window->set_main_widget(text_widget);
if (argc >= 2)
text_widget->open_sesame(argv[1]);
return app.exec();
}