1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-16 16:34:59 +00:00
serenity/Libraries/LibGUI
Andreas Kling 1bef057ec3 LibGUI: Make the TextEditor widget store UTF-32 codepoints
A TextDocumentLine is now backed by a non-null-terminated sequence of
Unicode codepoints encoded as UTF-32 (one u32 per codepoint.)

This makes it possible to view and edit arbitrary Unicode text without
strange cursor and selection behavior. You can freely copy and paste
emojis between TextEditor and Terminal now. :^)

Storing UTF-32 is quite space-inefficient, but we should be able to
use the same optimization techniques as LibVT does to reduce it in
the typical case where most text is ASCII.

There are a lot of things that can be cleaned up around this code,
but this works well enough that I'm pretty happy with it.
2020-05-17 22:35:25 +02:00
..
AboutDialog.cpp LibGUI: Include keyboard modifier state with button on_click calls 2020-05-12 20:31:16 +02:00
AboutDialog.h LibGUI: Don't use Core::Object::add() to instantiate dialogs 2020-03-04 21:04:06 +01:00
AbstractButton.cpp LibGUI: Include keyboard modifier state with button on_click calls 2020-05-12 20:31:16 +02:00
AbstractButton.h LibGUI: Include keyboard modifier state with button on_click calls 2020-05-12 20:31:16 +02:00
AbstractTableView.cpp LibGUI: Add AbstractTableView::move_selection(int steps) 2020-05-13 21:24:27 +02:00
AbstractTableView.h LibGUI: Add AbstractTableView::move_selection(int steps) 2020-05-13 21:24:27 +02:00
AbstractView.cpp FileManager+LibGUI: Allow drop on entire DirectoryView 2020-04-20 12:15:26 +02:00
AbstractView.h LibGUI: Remove unneeded access rights 2020-05-02 14:12:36 +02:00
Action.cpp Base: New "cut" action icon 2020-04-24 20:42:34 +02:00
Action.h LibGUI: Make it easier to create checkable GUI::Actions 2020-04-21 17:21:28 +02:00
ActionGroup.cpp LibGUI: Remove leading G from filenames 2020-02-06 20:33:02 +01:00
ActionGroup.h LibGUI: Add forwarding header 2020-02-16 09:41:56 +01:00
Application.cpp Clipboard: Move the system clipboard to a dedicated service process :^) 2020-05-14 22:53:58 +02:00
Application.h LibGUI: Add a way to highlight the focused widget for debugging 2020-05-12 15:48:31 +02:00
BoxLayout.cpp LibGUI: Make Layout a Core::Object and add basic serialization 2020-03-05 09:22:43 +01:00
BoxLayout.h LibGUI: Make Layout a Core::Object and add basic serialization 2020-03-05 09:22:43 +01:00
Button.cpp LibGUI: Include keyboard modifier state with button on_click calls 2020-05-12 20:31:16 +02:00
Button.h LibGUI: Include keyboard modifier state with button on_click calls 2020-05-12 20:31:16 +02:00
CheckBox.cpp LibGUI: Include keyboard modifier state with button on_click calls 2020-05-12 20:31:16 +02:00
CheckBox.h LibGUI: Include keyboard modifier state with button on_click calls 2020-05-12 20:31:16 +02:00
Clipboard.cpp Clipboard: Move the system clipboard to a dedicated service process :^) 2020-05-14 22:53:58 +02:00
Clipboard.h FileManager+LibGUI+Userland: Switch clipboard to MIME types 2020-05-16 09:11:46 +02:00
CMakeLists.txt LibGUI: Fix build (LibGUI depends on Clipboard IPC classes) 2020-05-15 09:46:55 +02:00
ColorInput.cpp LibGUI: Require a full click on ColorInput's color rect to open picker 2020-04-29 19:17:40 +02:00
ColorInput.h LibGUI: Require a full click on ColorInput's color rect to open picker 2020-04-29 19:17:40 +02:00
ColorPicker.cpp LibGUI: Include keyboard modifier state with button on_click calls 2020-05-12 20:31:16 +02:00
ColorPicker.h LibGUI: Transfer "color has alpha channel" state 2020-04-29 16:22:09 +02:00
ColumnsView.cpp LibGUI: Add a way for models to update without invalidating indexes 2020-04-12 12:03:33 +02:00
ColumnsView.h LibGUI: Add a way for models to update without invalidating indexes 2020-04-12 12:03:33 +02:00
ComboBox.cpp LibGUI: Include keyboard modifier state with button on_click calls 2020-05-12 20:31:16 +02:00
ComboBox.h LibGUI: Allow scrolling through a ComboBox with the mouse wheel 2020-05-12 15:11:06 +02:00
Command.cpp LibGUI: Remove leading G from filenames 2020-02-06 20:33:02 +01:00
Command.h LibGUI: Remove leading G from filenames 2020-02-06 20:33:02 +01:00
CppLexer.cpp LibGUI: Fix CppLexer assertion on incomplete #include statements 2020-04-04 11:00:14 +02:00
CppLexer.h LibGUI: Parse #include statements separately 2020-03-12 12:37:13 +01:00
CppSyntaxHighlighter.cpp LibGUI: Use themes for syntax highlighting 2020-03-16 13:39:34 +01:00
CppSyntaxHighlighter.h LibGUI: Use themes for syntax highlighting 2020-03-16 13:39:34 +01:00
Desktop.cpp LibGUI: Desktop, add methods for set background color and wallpaper mode 2020-03-29 19:36:37 +02:00
Desktop.h LibGUI: Desktop, add methods for set background color and wallpaper mode 2020-03-29 19:36:37 +02:00
Dialog.cpp LibGUI: Don't use Core::Object::add() to instantiate dialogs 2020-03-04 21:04:06 +01:00
Dialog.h LibGUI: Don't use Core::Object::add() to instantiate dialogs 2020-03-04 21:04:06 +01:00
DisplayLink.cpp WindowServer+LibGUI: Add a way to get notified at display refresh rate 2020-03-22 21:13:23 +01:00
DisplayLink.h WindowServer+LibGUI: Add a way to get notified at display refresh rate 2020-03-22 21:13:23 +01:00
DragOperation.cpp LibGfx+LibIPC: Add Gfx::ShareableBitmap, a bitmap for easy IPC usage 2020-03-29 19:37:23 +02:00
DragOperation.h LibGUI: Add forwarding header 2020-02-16 09:41:56 +01:00
Event.cpp LibGUI: Add KeyEvent::to_string() 2020-05-12 17:03:17 +02:00
Event.h LibGUI: Add missing Vector.h include to Event.h 2020-05-12 23:28:08 +02:00
FilePicker.cpp LibGUI: Include keyboard modifier state with button on_click calls 2020-05-12 20:31:16 +02:00
FilePicker.h LibCore: Add StandardPaths thing to retrieve various standard locations 2020-04-19 19:57:05 +02:00
FileSystemModel.cpp LibGUI: Create thumnail for gif files 2020-04-26 18:44:20 +02:00
FileSystemModel.h LibGUI: Icon for INI file type 2020-05-01 16:58:18 +02:00
FontDatabase.cpp LibGUI: Skip non-font files in the FontDatabase constructor 2020-03-11 21:27:03 +01:00
FontDatabase.h LibGUI: Move Icon and FontDatabase into the GUI namespace 2020-03-07 01:33:53 +01:00
Forward.h LibGUI: The UI calls it 'Icon view', fix the name in the code 2020-05-02 14:12:36 +02:00
Frame.cpp LibGUI: Introduce widget content margins + improve splitters 2020-04-24 19:05:02 +02:00
Frame.h LibGUI: Introduce widget content margins + improve splitters 2020-04-24 19:05:02 +02:00
GroupBox.cpp LibGUI: Remove parent parameter to GUI::Widget constructor 2020-02-23 12:27:53 +01:00
GroupBox.h LibGUI: Remove parent parameter to GUI::Widget constructor 2020-02-23 12:27:53 +01:00
Icon.cpp Misc: Replace "String(string_view)" with "string_view.to_string()" 2020-05-06 19:28:59 +02:00
Icon.h LibGUI: Move Icon and FontDatabase into the GUI namespace 2020-03-07 01:33:53 +01:00
IconView.cpp LibGUI: The UI calls it 'Icon view', fix the name in the code 2020-05-02 14:12:36 +02:00
IconView.h LibGUI: The UI calls it 'Icon view', fix the name in the code 2020-05-02 14:12:36 +02:00
INILexer.cpp LibGUI: INI file syntax highlighter 2020-05-01 16:58:18 +02:00
INILexer.h LibGUI: INI file syntax highlighter 2020-05-01 16:58:18 +02:00
INISyntaxHighlighter.cpp LibGUI: INI file syntax highlighter 2020-05-01 16:58:18 +02:00
INISyntaxHighlighter.h LibGUI: INI file syntax highlighter 2020-05-01 16:58:18 +02:00
InputBox.cpp LibGUI: Include keyboard modifier state with button on_click calls 2020-05-12 20:31:16 +02:00
InputBox.h LibGUI: Don't use Core::Object::add() to instantiate dialogs 2020-03-04 21:04:06 +01:00
JsonArrayModel.cpp LibGUI: Add store(), add() and remove() methods to JsonArrayModel 2020-03-27 14:12:18 +01:00
JsonArrayModel.h LibGUI: Add store(), add() and remove() methods to JsonArrayModel 2020-03-27 14:12:18 +01:00
JSSyntaxHighlighter.cpp LibJS: Implement exponentiation assignment operator (**=) 2020-05-05 11:12:27 +02:00
JSSyntaxHighlighter.h LibGUI: Rename SyntaxLanguage::{Javascript -> JavaScript} 2020-05-07 22:04:56 +02:00
Label.cpp LibGUI: Make Label::set_icon() take a const Gfx::Bitmap* 2020-03-29 19:37:23 +02:00
Label.h LibGUI: Make Label::set_icon() take a const Gfx::Bitmap* 2020-03-29 19:37:23 +02:00
Layout.cpp AK: Add global FlatPtr typedef. It's u32 or u64, based on sizeof(void*) 2020-03-08 13:06:51 +01:00
Layout.h LibGUI: Make Layout a Core::Object and add basic serialization 2020-03-05 09:22:43 +01:00
LazyWidget.cpp LibGUI: Remove parent parameter to GUI::Widget constructor 2020-02-23 12:27:53 +01:00
LazyWidget.h LibGUI: Remove parent parameter to GUI::Widget constructor 2020-02-23 12:27:53 +01:00
ListView.cpp LibGUI: Allow scrolling through a ComboBox with the mouse wheel 2020-05-12 15:11:06 +02:00
ListView.h LibGUI: Allow scrolling through a ComboBox with the mouse wheel 2020-05-12 15:11:06 +02:00
Margins.h LibGUI: Remove leading G from filenames 2020-02-06 20:33:02 +01:00
Menu.cpp LibGUI: Simplify submenu construction 2020-04-29 11:48:11 +02:00
Menu.h LibGUI: Simplify submenu construction 2020-04-29 11:48:11 +02:00
MenuBar.cpp LibGUI: Make MenuBar a Core::Object 2020-04-21 16:19:18 +02:00
MenuBar.h LibGUI: Make MenuBar a Core::Object 2020-04-21 16:19:18 +02:00
MenuItem.cpp LibGUI: Simplify submenu construction 2020-04-29 11:48:11 +02:00
MenuItem.h LibGUI: Simplify submenu construction 2020-04-29 11:48:11 +02:00
MessageBox.cpp LibGUI: Add GUI::MessageBox::show_error() convenience function 2020-05-13 21:11:49 +02:00
MessageBox.h LibGUI: Add GUI::MessageBox::show_error() convenience function 2020-05-13 21:11:49 +02:00
Model.cpp LibGUI: Add a way for models to update without invalidating indexes 2020-04-12 12:03:33 +02:00
Model.h LibGUI: Add a way for models to update without invalidating indexes 2020-04-12 12:03:33 +02:00
ModelEditingDelegate.h LibGUI: Make the ModelEditingDelegate constructor protected 2020-03-05 15:50:22 +01:00
ModelIndex.cpp LibGUI: Add forwarding header 2020-02-16 09:41:56 +01:00
ModelIndex.h LibGUI: Add forwarding header 2020-02-16 09:41:56 +01:00
ModelSelection.cpp LibGUI: Keep still-valid indexes in selection after a model update 2020-04-09 09:53:28 +02:00
ModelSelection.h LibGUI: Keep still-valid indexes in selection after a model update 2020-04-09 09:53:28 +02:00
MultiView.cpp LibGUI: FilePicker: Make icon view button initially checked 2020-05-02 14:12:36 +02:00
MultiView.h LibGUI: FilePicker: Make icon view button initially checked 2020-05-02 14:12:36 +02:00
Notification.cpp Meta: Add missing copyright headers 2020-04-06 11:09:01 +02:00
Notification.h Meta: Add missing copyright headers 2020-04-06 11:09:01 +02:00
Painter.cpp LibGfx: Add forward declaration header 2020-02-14 23:31:18 +01:00
Painter.h LibGUI: Add forwarding header 2020-02-16 09:41:56 +01:00
ProgressBar.cpp LibGUI: Remove parent parameter to GUI::Widget constructor 2020-02-23 12:27:53 +01:00
ProgressBar.h LibGUI: Remove parent parameter to GUI::Widget constructor 2020-02-23 12:27:53 +01:00
RadioButton.cpp LibGUI: Include keyboard modifier state with button on_click calls 2020-05-12 20:31:16 +02:00
RadioButton.h LibGUI: Include keyboard modifier state with button on_click calls 2020-05-12 20:31:16 +02:00
ResizeCorner.cpp LibGUI: Make sure the ResizeCorner aligns nicely inside StatusBar 2020-04-23 15:58:39 +02:00
ResizeCorner.h LibGUI: Remove parent parameter to GUI::Widget constructor 2020-02-23 12:27:53 +01:00
ScrollableWidget.cpp LibGUI: Fix off-by-one in ScrollableWidget 2020-05-02 14:12:36 +02:00
ScrollableWidget.h LibGUI: Add ScrollableWidget::viewport_rect_in_content_coordinates() 2020-05-04 22:33:20 +02:00
ScrollBar.cpp LibGUI+LibGfx: Paint scollbar tracks with a dithered pattern 2020-05-10 01:02:06 +02:00
ScrollBar.h LibGUI: Remove parent parameter to GUI::Widget constructor 2020-02-23 12:27:53 +01:00
Shortcut.cpp LibGUI: Use KeyCode stringification helper in Shortcut::to_string() 2020-05-12 17:02:33 +02:00
Shortcut.h LibGUI: Add forwarding header 2020-02-16 09:41:56 +01:00
Slider.cpp LibGUI: Remove unnecessary is_enabled() checks in mouse event handlers 2020-04-29 19:17:40 +02:00
Slider.h LibGUI: Remove parent parameter to GUI::Widget constructor 2020-02-23 12:27:53 +01:00
SortingProxyModel.cpp LibGUI: Add a way for models to update without invalidating indexes 2020-04-12 12:03:33 +02:00
SortingProxyModel.h LibGUI: Remove leading G from filenames 2020-02-06 20:33:02 +01:00
SpinBox.cpp LibGUI: Include keyboard modifier state with button on_click calls 2020-05-12 20:31:16 +02:00
SpinBox.h LibGUI: Make the "enabled" widget state propagate to child widgets 2020-05-08 13:49:58 +02:00
Splitter.cpp LibGUI: Shrink GUI::Splitter by 1 pixel to make it look just right 2020-04-24 19:05:04 +02:00
Splitter.h LibGUI: Remove parent parameter to GUI::Widget constructor 2020-02-23 12:27:53 +01:00
StackWidget.cpp LibGUI: Grant focus when activating a new stack/tab child widget 2020-04-24 14:34:24 +02:00
StackWidget.h LibGUI: Remove parent parameter to GUI::Widget constructor 2020-02-23 12:27:53 +01:00
StatusBar.cpp LibGUI: Make StatusBar 2px shorter vertically for a snugger fit 2020-04-23 18:52:34 +02:00
StatusBar.h LibGUI: Remove parent parameter to GUI::Widget constructor 2020-02-23 12:27:53 +01:00
SyntaxHighlighter.cpp LibGUI: Add missing copyright headers 2020-03-13 23:09:58 +01:00
SyntaxHighlighter.h LibGUI: Rename SyntaxLanguage::{Javascript -> JavaScript} 2020-05-07 22:04:56 +02:00
TableView.cpp LibGUI: Make view widgets fill background by default 2020-04-18 21:55:37 +02:00
TableView.h LibGUI: Remove parent parameter to GUI::Widget constructor 2020-02-23 12:27:53 +01:00
TabWidget.cpp LibGUI: Add hook when a tab is middle clicked 2020-05-09 23:54:20 +02:00
TabWidget.h LibGUI: Add hook when a tab is middle clicked 2020-05-09 23:54:20 +02:00
TextBox.cpp LibGUI: Remove parent parameter to GUI::Widget constructor 2020-02-23 12:27:53 +01:00
TextBox.h LibGUI: Remove parent parameter to GUI::Widget constructor 2020-02-23 12:27:53 +01:00
TextDocument.cpp LibGUI: Make the TextEditor widget store UTF-32 codepoints 2020-05-17 22:35:25 +02:00
TextDocument.h LibGUI: Make the TextEditor widget store UTF-32 codepoints 2020-05-17 22:35:25 +02:00
TextEditor.cpp LibGUI: Make the TextEditor widget store UTF-32 codepoints 2020-05-17 22:35:25 +02:00
TextEditor.h HackStudio: GUI support for setting breakpoints on source code lines 2020-04-25 13:16:46 +02:00
TextPosition.h LibGUI: Remove remaining G prefixes 2020-03-19 22:52:44 +01:00
TextRange.h LibGUI: Remove remaining G prefixes 2020-03-19 22:52:44 +01:00
ToolBar.cpp LibGUI: Add a ToolBarContainer widget and put most ToolBars in one 2020-04-23 17:44:49 +02:00
ToolBar.h LibGUI: Remove parent parameter to GUI::Widget constructor 2020-02-23 12:27:53 +01:00
ToolBarContainer.cpp LibGUI: Make ToolBarContainer better at reacting to child events 2020-04-25 17:16:05 +02:00
ToolBarContainer.h LibCore+LibHTTP: Move out the HTTP handler and add HTTPS 2020-05-02 12:24:10 +02:00
TreeView.cpp LibGUI: Properly draw the background of the selected TreeView line 2020-05-07 22:13:25 +02:00
TreeView.h LibGUI: Add a way for models to update without invalidating indexes 2020-04-12 12:03:33 +02:00
UndoStack.cpp AK: Make Vector use size_t for its size and capacity 2020-02-25 14:52:35 +01:00
UndoStack.h AK: Make Vector use size_t for its size and capacity 2020-02-25 14:52:35 +01:00
Variant.cpp AK: Allow %m.nf specifier for double/float in printf to set fraction with 2020-04-07 09:02:02 +02:00
Variant.h LibGUI: Allow constructing Variant from FlyString 2020-03-22 19:06:31 +01:00
Widget.cpp LibGUI: Add a way to highlight the focused widget for debugging 2020-05-12 15:48:31 +02:00
Widget.h LibGUI: Introduce widget content margins + improve splitters 2020-04-24 19:05:02 +02:00
Window.cpp LibGUI+WindowServer: Allow applications to set custom cursor bitmaps 2020-05-16 09:44:55 +02:00
Window.h LibGUI+WindowServer: Allow applications to set custom cursor bitmaps 2020-05-16 09:44:55 +02:00
WindowServerConnection.cpp Clipboard: Move the system clipboard to a dedicated service process :^) 2020-05-14 22:53:58 +02:00
WindowServerConnection.h Clipboard: Move the system clipboard to a dedicated service process :^) 2020-05-14 22:53:58 +02:00
WindowType.h WindowServer: Add WindowType::Desktop 2020-04-18 21:10:16 +02:00