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
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
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
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