ladybird/Applications/TextEditor/main.cpp
Andreas Kling 72a3f69df7 LibGUI: Get rid of GWindow::should_exit_event_loop_on_close().
This behavior and API was extremely counter-intuitive since our default
behavior was for applications to never exit after you close all of their
windows.

Now that we exit the event loop by default when the very last GWindow is
deleted, we don't have to worry about this.
2019-07-23 18:20:00 +02:00

21 lines
470 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);
auto* text_widget = new TextEditorWidget();
window->set_main_widget(text_widget);
if (argc >= 2)
text_widget->open_sesame(argv[1]);
window->show();
window->set_icon_path("/res/icons/TextEditor16.png");
return app.exec();
}