Andreas Kling
9475427d5d
LibVT: Add TerminalWidget::scroll_to_bottom() API
...
(And use this internally when scrolling to bottom on non-modifier
keydown events.)
2020-11-10 11:55:12 +01:00
Andreas Kling
982e066100
LibGfx: Move FontDatabase from LibGUI to LibGfx
...
Not sure why I put this into LibGUI in the first place.
2020-10-31 13:56:21 +01:00
Andreas Kling
aef56159a8
LibGUI: Add Widget focus policies
...
Every widget now has a GUI::FocusPolicy that determines how it can
receive focus:
- NoFocus: The widget is not focusable (default)
- TabFocus: The widget can be focused using the tab key.
- ClickFocus: The widget can be focused by clicking on it.
- StrongFocus: Both of the above.
For widgets that have a focus proxy, getting/setting the focus policy
will affect the proxy instead.
2020-10-30 17:03:28 +01:00
Andreas Kling
27a7ebe548
LibVT: Use dbgln() in TerminalWidget
2020-10-30 17:03:28 +01:00
Andreas Kling
9d347352a1
LibGfx+LibGUI+Clients: Make fonts findable by their qualified name
...
The qualified name of a font is "<Family> <Size> <Weight>". You can
get the QN of a Font via the Font::qualified_name() API, and you can
get any system font by QN from the GUI::FontDatabase. :^)
2020-10-25 21:18:18 +01:00
Andreas Kling
f475fa3f54
LibVT: Show an I-beam cursor over TerminalWidget
...
..and implement this using the new widget override cursor mechanism.
2020-09-11 14:26:37 +02:00
Andreas Kling
b4f307f982
LibGUI+WindowServer: Rename window "override cursor" to just "cursor"
...
Let's just say each window has a cursor, there's not really overriding
going on.
2020-09-11 14:26:37 +02:00
Andreas Kling
0f9be82826
LibGfx: Move StandardCursor enum to LibGfx
...
This enum existed both in LibGUI and WindowServer which was silly and
error-prone.
2020-09-10 19:25:13 +02:00
Nico Weber
90d9c83067
LibVT: Let Terminal only expose history_size, not storage
2020-09-10 12:01:26 +02:00
Andreas Kling
51146e3075
LibGUI: Make the Clipboard API deal in raw byte buffers a bit more
...
To open up for putting not just text/plain content on the clipboard,
let's make the GUI::Clipboard API a bit more raw-data-friendly. :^)
2020-09-05 16:16:01 +02:00
Ben Wiederhake
e59c415ae3
LibVT+Terminal: Mark default action in context menu
2020-08-30 09:47:49 +02:00
thankyouverycool
ebba297b42
Base: Move 16x16 common icons to /res/icons/16x16/
...
Drops the '16' suffix from filenames. Resizes inconsistent
audio-volume icons to intended size.
2020-08-27 15:38:02 +02:00
Sergey Bugaev
1671e1ac92
WindowServer+LibVT: Convert some dbgprintf() to dbg()
...
These kept annoying me, because these were the only two lines in the default
boot log that went unattributed.
2020-08-18 17:19:52 +02:00
Andreas Kling
75b8f4e4e6
LibGUI: Make focus events more aware of why focus is changing
...
This patch adds GUI::FocusEvent which has a GUI::FocusSource.
The focus source is one of three things:
- Programmatic
- Mouse
- Keyboard
This allows receivers of focus events to implement different behaviors
depending on how they receive/lose focus.
2020-08-15 00:05:45 +02:00
Nico Weber
ce95628b7f
Unicode: Try s/codepoint/code_point/g again
...
This time, without trailing 's'. Ran:
git grep -l 'codepoint' | xargs sed -ie 's/codepoint/code_point/g
2020-08-05 22:33:42 +02:00
Nico Weber
19ac1f6368
Revert "Unicode: s/codepoint/code_point/g"
...
This reverts commit ea9ac3155d
.
It replaced "codepoint" with "code_points", not "code_point".
2020-08-05 22:33:42 +02:00
Andreas Kling
ea9ac3155d
Unicode: s/codepoint/code_point/g
...
Unicode calls them "code points" so let's follow their style.
2020-08-03 19:06:41 +02:00
Andreas Kling
226c0cfb20
LibVT: Don't scroll to bottom when pressing the right shift key
2020-07-12 14:32:39 +02:00
Tom
df54229954
LibVT: Set scrollbar page size
2020-07-09 21:56:45 +02:00
Andreas Kling
0c4b0c0312
Terminal+LibVT: Add "clear including history" action (Ctrl+Shift+K) :^)
...
Sometimes you just want to get rid of all your scrollback history in
the terminal, and now there's a way to do that.
2020-07-05 23:34:02 +02:00
Andreas Kling
d851863704
Userspace: Remove a bunch of unnecessary Kernel/API/KeyCode.h includes
2020-07-04 17:25:31 +02:00
Andreas Kling
11c4a28660
Kernel: Move headers intended for userspace use into Kernel/API/
2020-07-04 17:22:23 +02:00
Andreas Kling
ca93c22ae2
LibGUI: Turn GUI::Application::the() into a pointer
...
During app teardown, the Application object may be destroyed before
something else, and so having Application::the() return a reference was
obscuring the truth about its lifetime.
This patch makes the API more honest by returning a pointer. While
this makes call sites look a bit more sketchy, do note that the global
Application pointer only becomes null during app teardown.
2020-07-04 16:54:55 +02:00
Andreas Kling
14477eb565
Terminal: Bump the default ScrollLength to 4
...
This feels so much better than scrolling one line at a time. :^)
2020-06-30 18:33:09 +02:00
Benoît Lormeau
310fbe48e5
LibVT/Terminal: add a scroll length to the TerminalWidget
...
The scroll length is the number of lines by which the terminal will go
up/down when scrolling the mouse wheel once.
2020-06-30 18:24:00 +02:00
AnotherTest
d1d01897a3
Terminal: Ignore cell background when visual beep is active
...
Fixes #2621
2020-06-25 10:57:58 +02:00
Hüseyin ASLITÜRK
7abca30f41
LibVT: Replace u8 type to u32 for code point
...
Replace KeyEvent text attribute usage with code_point.
2020-06-16 13:15:17 +02:00
Andreas Kling
116cf92156
LibGfx: Rename Rect,Point,Size => IntRect,IntPoint,IntSize
...
This fits nicer with FloatRect,FloatPoint,FloatSize and gives a much
better visual clue about what type of metric is being used.
2020-06-10 10:59:04 +02:00
Andreas Kling
165f69023b
LibVT: Allow updating the window progress via an escape sequence
...
You can now request an update of the terminal's window progress by
sending this escape sequence:
<esc>]9;<value>;<max_value>;<escape><backslash>
I'm sure we can find many interesting uses for this! :^)
2020-05-30 23:00:35 +02:00
Sergey Bugaev
620697d924
LibVT: Move most of key press handling logic into VT::Terminal
...
This will let us share it between the userspace (TerminalWidget) and the Kernel.
2020-05-27 11:19:38 +02:00
Sergey Bugaev
602c3fdb3a
AK: Rename FileSystemPath -> LexicalPath
...
And move canonicalized_path() to a static method on LexicalPath.
This is to make it clear that FileSystemPath/canonicalized_path() only
perform *lexical* canonicalization.
2020-05-26 14:35:10 +02:00
Nicholas Hollett
181eacd3ba
LibVT: Pass the handler name to Launcher::open_url to control what gets launched
...
Now we can pick which application gets opened in the context menu for
URLs in the Terminal \o/
2020-05-18 11:27:27 +02:00
Andreas Kling
30a3b8333a
LibVT: TerminalWidget now opts into emoji input by default :^)
2020-05-17 22:35:25 +02:00
Andreas Kling
1b78d9fa1f
LibVT: Handle keydown events with multi-byte text correctly
...
TerminalWidget can now handle keydown events that contain multi-byte
UTF-8 sequences. :^)
2020-05-17 22:35:25 +02:00
Andreas Kling
0d78ee95f9
LibVT: Make TerminalWidget::selected_text() produce UTF-8 strings :^)
2020-05-17 22:35:25 +02:00
Andreas Kling
7b5b4bee70
LibVT: Store all-ASCII terminal lines as 8-bit characters
...
To conserve memory, we now use byte storage for terminal lines until we
encounter a non-ASCII codepoint. At that point, we transparently switch
to UTF-32 storage for that one line.
2020-05-17 12:32:09 +02:00
Andreas Kling
fa712d8aa5
LibVT: Don't try to set the window title to invalid UTF-8 text
2020-05-16 19:55:43 +02:00
Andreas Kling
06f3eb0ecd
LibVT: Tweak input parsing related names
2020-05-16 19:30:46 +02:00
Andreas Kling
c4edc4c550
LibVT: Switch VT::Line to being backed by 32-bit codepoints
...
This will allow us to have much better Unicode support. It does incur
a memory usage regression which we'll have to optimize to cover.
2020-05-16 19:30:43 +02:00
Andreas Kling
16965db86b
LibVT: Move out the Line class from Terminal to its own class
2020-05-15 18:57:50 +02:00
Andreas Kling
f8e3c8326d
Terminal: When offering to open a URL, show name + icon for handler app
...
Instead of just saying "Open URL" when you right click on a hyperlink
in the terminal, we now say something like "Open in Browser". :^)
2020-05-12 18:49:24 +02:00
AnotherTest
5b9fe0cf46
LibVT: Update the terminal buffer based on visible lines
...
Lines in the history should not be considered for update at all.
Fixes #2185
2020-05-11 09:33:18 +02:00
Andreas Kling
666863c2d8
LibVT: Clear the hovered hyperlink after completing a drag
2020-05-10 17:42:24 +02:00
Andreas Kling
f41bbdd46e
LibVT: Allow dragging hyperlinks :^)
...
You can now drag a hyperlink as a text/uri-list. This allows you to
drag a file from "ls" output and drop it on a FileManager to copy
the file there. Truly futuristic stuff!
2020-05-10 17:39:11 +02:00
Andreas Kling
901d2e3236
LibVT: Make selection follow terminal history scrollback :^)
...
The buffer positions referred to by a VT::Position now include history
scrollback, meaning that a VT::Position with row=0 is at the start of
the history.
The active terminal buffer keeps moving in VT::Position coordinates
whenever we scroll. This allows selection to follow history. It also
allows us to click hyperlinks in history.
Fixes #957 .
2020-05-10 16:59:02 +02:00
Andreas Kling
8af3af137e
LibVT: Use the "ActiveLink" theme color for links being clicked
...
Okay, links are finally starting to feel visually intuitive. :^)
2020-05-10 16:14:49 +02:00
Andreas Kling
ab7de41c7b
LibVT: Don't commit to opening a hyperlink until mouseup
...
It felt too rushed to open links when simply mousedown'ing on them.
Improve this by implementing basic "click" semantics instead.
This patch also introduces the ability to prevent link opening if you
want to force selection instead. Hold shift and we will not open links.
2020-05-10 16:01:08 +02:00
Andreas Kling
c10c6240f2
LibVT: Open hyperlinks on plain left-click instead of Ctrl+Click
2020-05-10 13:45:04 +02:00
Andreas Kling
3226276fe9
LibVT: Always draw hyperlinks with a dotted underline
...
The dotted line is custom painted to put some more distance between the
dots than what Painter::draw_line() does.
2020-05-10 13:43:56 +02:00
AnotherTest
8487806ec0
LibVT: Support RGB colors (\x1b[38;2;<r>;<g>;<b>m)
2020-05-10 10:23:05 +02:00