Commit graph

8936 commits

Author SHA1 Message Date
Itamar
74f41d5f98 HackStudio: Add cpp debugger
The HackStudio debugger integrates with LibDebug to provide
source-level debugging.

The user can set breakpoints at various positions in the source code,
and then run the program in debug mode.

When the program is stopped, the current execution position is
displayed, and the user can insert/remove breakpoints, continue
execution, or single step the program.
2020-04-25 13:16:46 +02:00
Itamar
393560d8a2 HackStudio: GUI support for setting breakpoints on source code lines 2020-04-25 13:16:46 +02:00
Itamar
009b4ea3f4 LibDebug: Add remove_breakpoint
Also, change the interface of all breakpoint management functions to
only take the address of the breakpoint as an argument.
2020-04-25 13:16:46 +02:00
Hüseyin ASLITÜRK
e00b85b8c0 Userland/ls: Remove unnecessary output 2020-04-25 12:09:46 +02:00
Brendan Coles
6dde2c7f47 Browser: Add Browser.ini configuration file
The Browser can now load a home page URL from the user's Browser.ini
configuration file rather than using a hard-coded URL.
2020-04-25 10:55:55 +02:00
Andreas Kling
0f4fa43541 LibGUI: Tweak TabWidget tab icon placement 2020-04-24 22:49:57 +02:00
Andreas Kling
260e4049ff Browser: Use the active tab's favicon as the window icon :^) 2020-04-24 22:47:53 +02:00
Andreas Kling
4d8206f7c2 LibGUI: Use bold font for the currently active TabWidget tab 2020-04-24 22:44:36 +02:00
Andreas Kling
d6bbf12b7c LibGUI: Add "uniform tabs" mode to TabWidget (all tabs have same width)
...and enable this in the main Browser UI. :^)
2020-04-24 22:36:25 +02:00
Andreas Kling
682f0ac93b Browser: React to favicon notifications and put favicons in the tabs! 2020-04-24 22:28:05 +02:00
Andreas Kling
53cb5325ee LibGUI: Allow TabWidget tabs to have icons and custom text alignment 2020-04-24 22:27:46 +02:00
Andreas Kling
2be184f49c LibWeb: Try fetching a favicon when loading a non-file URL in HtmlView
If valid and decodable, the favicon will be provided to clients via the
on_favicon_change hook. :^)
2020-04-24 22:26:53 +02:00
Andreas Kling
3fcfab4404 Browser: Move the "About" action to WindowActions 2020-04-24 20:50:06 +02:00
Andreas Kling
45a932a600 Base: New "cut" action icon 2020-04-24 20:42:34 +02:00
Andreas Kling
dfe8dea2ac Browser: Remove padding from the main TabWidget
This makes the active tab "take over" the whole window UI, even though
it's actually inside a TabWidget.
2020-04-24 20:42:34 +02:00
Andreas Kling
1587b53001 LibGUI: Allow overriding the padding inside a TabWidget 2020-04-24 20:42:34 +02:00
Andreas Kling
9d8620f956 Browser: Add icons for the "new tab" and "close tab" actions 2020-04-24 20:42:34 +02:00
Andreas Kling
2b64cf3efe Base: New "open" and "save" action icons 2020-04-24 20:42:34 +02:00
Andreas Kling
7db0194d4b Base: Tweak Calendar app icon 2020-04-24 20:42:34 +02:00
DexesTTP
424f47cbe5 LibGUI: Fix display issue when selecting multi-lines in TextEditor
When selecting the start of a multi-line line, a selection rect was
displayed for the whole line but the text wasn't rendered properly.
This change prevents the selection rect from being drawn in virtual
lines with no selected characters.
2020-04-24 20:29:47 +02:00
Linus Groh
a832ab0f4e js: Interrupt running script or REPL evaluation when receiving SIGINT 2020-04-24 19:43:34 +02:00
Andreas Kling
c350bb9178 LibGUI: Fix laggy mouse selection in TextEditor widget
We were letting the automatic scrolling timer drive all selection
updates to fix an unwanted acceleration that was happening. However,
if a mousemove occurs *within* the editor widget, we should just
handle it right then and there.
2020-04-24 19:14:22 +02:00
Andreas Kling
344e66caaa LibGUI: Shrink GUI::Splitter by 1 pixel to make it look just right
Splitters were slightly oversized to work around the fact that we
were ignoring 2px on both sides of them. Now that the whole splitter
can be interacted with, we can lose 1px of fat and look great! :^)
2020-04-24 19:05:04 +02:00
Andreas Kling
9617b7ede4 FileManager: Set content margin of DirectoryView to same as children 2020-04-24 19:05:04 +02:00
Andreas Kling
42f0b2522b LibGUI: Introduce widget content margins + improve splitters
A GUI::Widget can now set an optional content margin (4x0 by default.)
Pixels in the content margin will be ignored for hit testing purposes.

Use this to allow frame-like widgets (like GUI::Frame!) to ignore any
mouse events in the frame area, and instead let those go to parent.

This allows GUI::Splitter to react "sooner" to mouse events that were
previously swallowed by the child widgets instead of ending up in the
splitter. The net effect is that 2 more pixels on each side of a
splitter handle are now interactive and usable for splitting! :^)
2020-04-24 19:05:02 +02:00
Andreas Kling
9badcff1ba WindowServer: Don't allow activating disabled menu items with keyboard 2020-04-24 17:29:42 +02:00
Andreas Kling
e786444ffa WindowServer: Fix name typo in descend_into_submenu_at_hovered_item() 2020-04-24 17:26:16 +02:00
Andreas Kling
cbb3c7aade WindowServer: Skip over disabled menu items during keyboard navigation 2020-04-24 17:24:09 +02:00
Andreas Kling
4218b00cb4 Base: Tweak ladybug icon 2020-04-24 17:10:59 +02:00
Andreas Kling
5d88022252 LibGUI: When removing a TabWidget tab, activate the next tab 2020-04-24 17:10:59 +02:00
Kesse Jones
b0ca174d49 LibJS: Add Array.prototype.find 2020-04-24 17:10:19 +02:00
Linus Groh
fd5f05079d QuickShow: Properly hide toolbar on toggle action
Similar to fullscreen mode we need to hide the toolbar's container.
2020-04-24 17:00:00 +02:00
Linus Groh
d86d73f6e8 QuickShow: Hide toolbar container in fullscreen mode
If we just hide the toolbar itself, its container is still visible and
taking up space at the top of the screen.
2020-04-24 17:00:00 +02:00
Andreas Kling
5c2bdbf27f Browser+LibWeb: Open link in new tab on Ctrl+Click :^) 2020-04-24 14:43:56 +02:00
Andreas Kling
d5d8e87d56 Browser: Scope tab-specific actions to the tab itself
This makes LibGUI choose the correct action depending on which tab
is currently active (technically which tab is *focused*.)

Fixes #1935.
2020-04-24 14:34:24 +02:00
Andreas Kling
a2bdcfabc9 LibGUI: Grant focus when activating a new stack/tab child widget
This makes opening a tab actually focus the opened tab.
2020-04-24 14:34:24 +02:00
Andreas Kling
d0578bfa32 LibGUI: Search the entire focus chain for shortcut actions
Instead of only looking in the focused widget, we now also look in the
ancestor chain of that widget for any ancestor with a registered action
for the given shortcut.

This makes it possible for parent widgets to capture action activations
while one of their children is focused.
2020-04-24 14:34:24 +02:00
Linus Groh
896decd4d5 Browser: Open links with target="_blank" in new tab 2020-04-24 14:34:11 +02:00
Linus Groh
061205b3b3 LibWeb: Pass link target to HtmlView's on_link_click callback 2020-04-24 14:34:11 +02:00
Linus Groh
95b51e857d LibJS: Add TokenType::TemplateLiteral
This is required for template literals - we're not quite there yet, but at
least the parser can now tell us when this token is encountered -
currently this yields "Unexpected token Invalid". Not really helpful.

The character is a "backtick", but as we already have
TokenType::{StringLiteral,RegexLiteral} this seemed like a fitting name.

This also enables syntax highlighting for template literals in the js
REPL and LibGUI's JSSyntaxHighlighter.
2020-04-24 11:18:57 +02:00
Linus Groh
57caca3171 LibJS: Fix ObjectExpression::execute()
Change from code review changed key() and value() getters - forgot to
update this...
2020-04-24 00:02:07 +02:00
Linus Groh
746dd5b190 LibJS: Implement computed properties in object expressions 2020-04-23 23:56:04 +02:00
Linus Groh
bebd5c097c LibJS: Require colon in object expression for non-identifier keys
{foo} is valid - {"foo"} or {1} is not.
2020-04-23 23:56:04 +02:00
Linus Groh
402ba20c36 LibJS: Fix left shift operator
Typo causing it to compute lhs << lhs, not lhs << rhs as expected.
2020-04-23 23:48:27 +02:00
Andreas Kling
1b8b492258 Browser: Add "next tab" and "previous tab" actions
Now you can switch between the open tabs with Ctrl+PgUp and Ctrl+PgDn
2020-04-23 21:43:24 +02:00
Andreas Kling
4087e3cfb9 LibGUI: Add TabWidget functions to activate next/previous tab 2020-04-23 21:43:08 +02:00
Andreas Kling
312501f309 Browser: Add "Close tab" action (Ctrl+W) :^)
Note that this is a little bit unreliable with the keyboard shortcut
since LibGUI can get confused about which Action it's supposed to use
as each Browser::Tab has its own "close tab" action. This will need
to be fixed in LibGUI.
2020-04-23 21:36:17 +02:00
Andreas Kling
476a4475e5 Browser: Add "New tab" action (Ctrl+T) :^)
This also introduces a WindowActions collection of actions that are not
specific to the currently open tab, but nevertheless part of its menus.
2020-04-23 21:28:25 +02:00
Andreas Kling
4e8b6e48fd Browser: Start implementing tabbed browsing! :^)
This patch moves most of the Browser UI into a Tab class. The main UI
now mainly consists of a GUI::TabWidget that Tab objects are added to.

I'm going with the "tabs on top" style here, since I like how it makes
it feel like each tab has its own UI controls (which it actually does!)
2020-04-23 21:16:11 +02:00
Andreas Kling
ee7e7e6d55 LibGUI: Add TabWidget::set_tab_title(Widget&, StringView)
This lets you change the title of a tab after creating it.
2020-04-23 21:13:47 +02:00