Andreas Kling
05f5d0dda3
LibGfx: Add Gfx::TextAttributes (and use it in GUI::TextDocumentSpan)
2021-01-02 20:57:43 +01:00
Andreas Kling
a35693915e
LibGUI: Make syntax highlighter communicate boldness instead of font
...
Now that fonts know their own weight, we no longer need highlighters to
tell us which font to use. Instead, they can just say "this should be
bold" and we'll find the right font ourselves.
2020-12-28 15:53:10 +01:00
Itamar
bf53d7ff64
LibCpp: Add library for working with c++ code
...
Moved the C++ Lexer we have from LibGUI to here, so that other
components could use it without linking with LibGUI.
2020-09-30 21:46:59 +02:00
Nico Weber
9ee1edae2a
CppLexer: Support raw string literals
...
Handles prefixes and delimiters (`R"(text)", `u8R"f(text)f"`, ...).
2020-07-27 12:11:19 +02:00
Oriko
2b162ef794
LibGUI: Use themes for syntax highlighting
2020-03-16 13:39:34 +01:00
Oriko
b4381be0ba
LibGUI: Add missing copyright headers
2020-03-13 23:09:58 +01:00
Oriko
c02037e944
LibGUI: Abstract token pair matching
2020-03-13 22:53:13 +01:00
Oriko
137d68a2ae
HackStudio: Abstract over syntax highlighter
2020-03-12 19:04:59 +01:00
Oriko
6d89f48dd8
LibGUI: Add underlines to highlighting
2020-03-12 19:04:59 +01:00
Oriko
d8a73dd979
LibGUI: Parse #include statements separately
2020-03-12 12:37:13 +01:00
Oriko
8d54e4e012
LibGUI: Highlight various number literals
2020-03-11 21:26:47 +01:00
Oriko
7b13fb557b
LibGUI: Fix overflow crash in highlighter
2020-03-11 13:24:52 +01:00
Oriko
d58cf1a05d
LibGUI: Syntax highlight string escape sequences
2020-03-11 10:16:55 +01:00
Andreas Kling
b1058b33fb
AK: Add global FlatPtr typedef. It's u32 or u64, based on sizeof(void*)
...
Use this instead of uintptr_t throughout the codebase. This makes it
possible to pass a FlatPtr to something that has u32 and u64 overloads.
2020-03-08 13:06:51 +01:00
Andreas Kling
ceec1a7d38
AK: Make Vector use size_t for its size and capacity
2020-02-25 14:52:35 +01:00
Andreas Kling
e1ff4fa034
LibGUI: Remove more header dependencies from Widget.h
2020-02-15 00:24:14 +01:00
Andreas Kling
92e2afe584
LibGUI: Tweak C++ syntax highlighting colors a bit :^)
2020-02-11 13:07:21 +01:00
Andreas Kling
bb8e65be41
LibGUI+HackStudio: Move syntax highlighting from HackStudio to LibGUI
...
This patch introduces the GUI::SyntaxHighlighter class, which can be
attached to a GUI::TextEditor to provide syntax highlighting.
The C++ syntax highlighting from HackStudio becomes a new class called
GUI::CppSyntaxHighlighter. This will make it possible to get C++ syntax
highlighting in any app that uses a GUI::TextEditor. :^)
Sidenote: It does feel a bit weird having a C++ lexer in a GUI toolkit
library, and we'll probably end up moving this out to a separate place
as this functionality grows larger.
2020-02-07 20:07:15 +01:00