Commit Graph

1357 Commits

Author SHA1 Message Date
Andreas Kling
f13c62f225 GTextEditor: Fix double effect of backspace/delete in some cases. 2019-03-07 17:18:22 +01:00
Andreas Kling
a738b5cb69 TextEditor: Open an empty document by default. 2019-03-07 17:15:59 +01:00
Andreas Kling
f8b72ab3ab GTextEditor: Add basic PageUp/PageDown navigation support. 2019-03-07 17:11:17 +01:00
Andreas Kling
187d7cb400 GTextEditor: Add write_to_file(String path) :^) 2019-03-07 17:06:11 +01:00
Andreas Kling
a5bc20c733 GTextEditor: Support starting with an empty document. 2019-03-07 16:51:47 +01:00
Andreas Kling
43d56b6f3a GTextEditor: Support splitting lines at the cursor with the Return key. 2019-03-07 16:49:21 +01:00
Andreas Kling
a64b71fb3d GTextEditor: Support forward delete/merge with the Delete key. 2019-03-07 16:33:20 +01:00
Andreas Kling
ac78cdae46 Kernel: Detect the Delete key. 2019-03-07 16:20:00 +01:00
Andreas Kling
38662f884d GTextEditor: Merge with previous line if backspacing at column 0. 2019-03-07 16:15:25 +01:00
Andreas Kling
6094f592a9 GTextEditor: More work on basic line editing. Insert/remove characters. 2019-03-07 16:04:21 +01:00
Andreas Kling
8425ea971a GTextEditor: Start working on editing, starting with inserting newlines. 2019-03-07 15:52:11 +01:00
Andreas Kling
b4df33e453 GTextEditor: Only paint lines inside the dirty rect.
This dramatically improves performance in large documents. :^)
2019-03-07 15:03:38 +01:00
Andreas Kling
3ee0e82206 FileManager: Open non-executable files in TextEditor by default. 2019-03-07 14:43:12 +01:00
Andreas Kling
ce35cddb1b GTextEditor: Let's use a Vector for the line backing store.
I'm eventually gonna want to replace this with something more clever,
like a automagically splicing vector or something, but for now, at least
we move away from immutable Strings.
2019-03-07 14:35:32 +01:00
Andreas Kling
a21ecd440a GTextEditor: Allow moving the cursor by clicking. 2019-03-07 14:02:10 +01:00
Andreas Kling
9997992907 GTextEditor: Make the cursor invalidation work with the padding(). 2019-03-07 13:54:02 +01:00
Andreas Kling
60c1ab5fbe GTextEditor: Scroll the cursor into view before updating it. 2019-03-07 13:34:00 +01:00
Andreas Kling
9591acc212 GTextEditor: Remove some debug spam. 2019-03-07 13:26:02 +01:00
Andreas Kling
77198ef735 GTextEditor: Simplify update_cursor(). 2019-03-07 13:23:17 +01:00
Andreas Kling
6a6bcc5daf GTextEditor: Add Home/End and Ctrl+Home/Ctrl+End navigation shortcuts.
For start/end of line and start/end of document respectively.
2019-03-07 13:21:51 +01:00
Andreas Kling
8dcec749ed Kernel: Detect the Home and End keyboard keys. 2019-03-07 13:19:05 +01:00
Andreas Kling
1ac71d1fb1 GTextEditor: Improvements to cursor rendering.
The view now scrolls along with you as you move the cursor around.
2019-03-07 13:13:25 +01:00
Andreas Kling
dff57909a7 GTextEditor: Only draw the cursor line background shade when focused. 2019-03-07 02:26:44 +01:00
Andreas Kling
6db132069f GTextEditor: Draw the cursor line in a slightly darker shade. 2019-03-07 02:24:46 +01:00
Andreas Kling
be0ac86b63 TextEditor: Add New/Open/Save actions.
They aren't hooked up to anything, I just felt like making some icons. ;^)
2019-03-07 01:46:37 +01:00
Andreas Kling
c3bb84239e TextEditor: Show the open filename in the window title. 2019-03-07 01:08:07 +01:00
Andreas Kling
1f92636c6d GTextEditor: Make the cursor blink while the editor is focused. 2019-03-07 01:05:35 +01:00
Andreas Kling
ca65ca2f2d TextEditor: Show the current cursor position in the statusbar. 2019-03-07 00:46:29 +01:00
Andreas Kling
9158de6c41 Begin working on a graphical TextEditor.
It's gonna be a wrapper around a new GTextEditor widget so I can easily
reuse the functionality anywhere I need it. :^)
2019-03-07 00:31:06 +01:00
Andreas Kling
67ee579113 WindowServer: Add window icons. Every window has the same icon for now.
The icons show up both in the title bars and in the window switcher.
Eventually I'd like to be able to minimize to icon, and maybe even have
myself a taskbar.
2019-03-06 23:03:36 +01:00
Andreas Kling
3729f7cc6a About: Use Katica Bold for displaying the system name. :^) 2019-03-06 22:39:49 +01:00
Andreas Kling
495c4f940d WindowServer: Only the left mouse button should initiate window drag. 2019-03-06 22:38:19 +01:00
Andreas Kling
eedfb2649e WindowServer: Tweak appearance of window close buttons. 2019-03-06 22:36:37 +01:00
Andreas Kling
5773b91a04 WindowServer: Use the right font for computing titlebar text rects. 2019-03-06 22:34:45 +01:00
Andreas Kling
e56fe71dbc Kernel: And some more KResult/KResultOr<T> porting work. 2019-03-06 22:30:13 +01:00
Andreas Kling
028afabf6b Kernel: Port more code to KResult and KResultOr<T>. 2019-03-06 22:14:31 +01:00
Andreas Kling
3079ef01ce Userland: /bin/cp needs to handle open(dst) failing with EISDIR. 2019-03-06 20:28:00 +01:00
Andreas Kling
e6f389a544 Kernel: Add two error checks for open() to return EISDIR or ENODEV. 2019-03-06 20:27:19 +01:00
Andreas Kling
7d46375690 Userland: Support "cp foo somedirectory"
Don't overwrite the literal directory inode contents when copying a file
to a directory, duh. :^)
2019-03-06 20:22:23 +01:00
Andreas Kling
d75897708b Base: Tweak Katica system menu glyph. 2019-03-06 20:04:52 +01:00
Andreas Kling
2950d33c76 ProcessManager: Tweak priority icons. 2019-03-06 20:03:10 +01:00
Andreas Kling
7df1121e1c LibGUI: GTableModel::data() should take a GModelIndex instead of int,int. 2019-03-06 19:56:47 +01:00
Andreas Kling
dc4e6dd7bc LibGUI: Fix LibGUI::to_string() for GVariant::Type::Float. 2019-03-06 19:49:59 +01:00
Andreas Kling
09ecef6299 GTableView: Ignore right clicks for now. 2019-03-06 19:44:18 +01:00
Andreas Kling
f3341d2ae7 Base: Tweak Katica and Katica Bold glyphs. 2019-03-06 19:41:36 +01:00
Andreas Kling
b46c7da0a4 FontEditor: Don't crash when clicking on the unused part of a glyph. 2019-03-06 19:04:30 +01:00
Andreas Kling
31d6b640eb Add a bold variant of Katica and make that the system's default bold font.
..and do some minor tweaks to the font rendering code.
2019-03-06 14:50:27 +01:00
Andreas Kling
66a5ddd94a More work on the variable-width font support.
Katica is now the default system font, and it looks quite nice. :^)
I'm gonna need to refine the GTextBox movement stuff eventually,
but it works well-enough for basic editing now.
2019-03-06 14:06:40 +01:00
Andreas Kling
e53cef02d5 Kernel: Dump kernel stack trace on assertion failure. 2019-03-06 14:05:41 +01:00
Andreas Kling
7f6c81d90f Implement basic support for variable-width fonts.
Also add a nice new font called Katica. It's not used anywhere yet but
I'm definitely itching to start using it. :^)
2019-03-06 12:52:41 +01:00