Add a basic GUI text editor #45

Merged
apio merged 9 commits from text-editor into main 2024-04-15 17:06:05 +00:00

9 Commits

Author SHA1 Message Date
f3d9d4bcc0
editor: Fix creation of new files
All checks were successful
Build and test / build (push) Successful in 1m38s
The editor is supposed to create files if they don't exist, however before this commit stat() would fail and exit load_file() before we even got to File::open_or_create().
2024-04-01 18:42:55 +02:00
d6f7069589
editor: Display only the basename of the current file in the window title 2024-04-01 18:42:55 +02:00
ec44213f4e
terminal: Use widget->window() instead of the App's main window 2024-04-01 18:42:55 +02:00
a06ecef08d
editor: Use TextInput as a base class 2024-04-01 18:42:55 +02:00
43c0c801ae
libui: Add a TextInput base class to handle most input fields and add an InputField class for single-line inputs 2024-04-01 18:42:55 +02:00
0c8fe315db
editor: Refuse to load non-regular file types 2024-04-01 18:42:55 +02:00
2cf6549608
editor: Remove insert mode and use the arrow keys to navigate, plus Ctrl+S to save 2024-04-01 18:42:55 +02:00
88a6beff5a
editor: Add basic loading and saving 2024-04-01 18:42:55 +02:00
615cae687d
editor: Add a basic text editor 2024-04-01 18:42:54 +02:00