/** * @file main.cpp * @author apio (cloudapio.eu) * @brief Graphical text editor. * * @copyright Copyright (c) 2024, the Luna authors. * */ #include "EditorWidget.h" #include Result luna_main(int, char**) { ui::App app; TRY(app.init()); auto* window = TRY(ui::Window::create(ui::Rect { 200, 300, 600, 600 })); window->set_background(ui::Color::from_rgb(40, 40, 40)); window->set_title("Text Editor"); app.set_main_window(window); auto* editor = TRY(make(ui::Font::default_font())); // TRY(editor->load_file("/etc/skel/welcome")); window->set_main_widget(*editor); window->draw(); return app.run(); }