2019-07-11 15:52:33 -03:00
|
|
|
#include "TextEditorWidget.h"
|
2019-07-28 05:18:49 -03:00
|
|
|
#include <LibDraw/PNGLoader.h>
|
2019-05-15 21:47:28 -03:00
|
|
|
|
2019-03-06 20:31:06 -03:00
|
|
|
int main(int argc, char** argv)
|
|
|
|
|
{
|
|
|
|
|
GApplication app(argc, argv);
|
|
|
|
|
|
2019-05-15 21:47:28 -03:00
|
|
|
auto* window = new GWindow;
|
2019-05-27 18:33:17 -03:00
|
|
|
window->set_title("Text Editor");
|
2019-03-06 20:31:06 -03:00
|
|
|
window->set_rect(20, 200, 640, 400);
|
2019-04-13 11:59:55 -03:00
|
|
|
|
2019-07-11 15:52:33 -03:00
|
|
|
auto* text_widget = new TextEditorWidget();
|
|
|
|
|
window->set_main_widget(text_widget);
|
|
|
|
|
|
|
|
|
|
if (argc >= 2)
|
|
|
|
|
text_widget->open_sesame(argv[1]);
|
|
|
|
|
|
2019-07-15 17:58:37 -03:00
|
|
|
window->show();
|
2019-07-28 05:18:49 -03:00
|
|
|
window->set_icon(load_png("/res/icons/TextEditor16.png"));
|
2019-07-15 17:58:37 -03:00
|
|
|
|
2019-03-06 20:31:06 -03:00
|
|
|
return app.exec();
|
2019-07-23 13:20:00 -03:00
|
|
|
}
|