feat: move Files to its own process; add window server messaging (multi-format clipboard, drag and drop), undo/redo, sidebar, breadcrumbs, thumbnails, file type icons, New menu and proper text fields

This commit is contained in:
daniel committed 2026-10-24 12:44:20 +02:00
1 parent 07191b1286
commit d3e49a925d
66 files changed
+6855 -905

No files matched your search

+15
View File
@@ -11,6 +11,7 @@
#include <gui/standalone.hpp>
#include <gui/truetype.hpp>
#include <gui/svg.hpp>
#include <gui/transfer.hpp>
#include "svg_doc.hpp"
@@ -589,6 +590,20 @@ extern "C" void _start() {
if (ev.type == 3) break; // close
// Show an image dropped onto the window.
char dropped[512];
if (gui::handle_file_drop(win.id, ev, dropped, sizeof(dropped))) {
montauk::strncpy(g_filepath, dropped, sizeof(g_filepath));
g_load_ok = load_image(g_filepath);
if (g_load_ok) {
if (g_img_w > g_win_w || g_img_h > viewport_h()) zoom_fit();
else center_image();
}
render(canvas);
win.present();
continue;
}
// Resize
if (ev.type == 2) {
g_win_w = win.width;