1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 22:37:35 +00:00

LibGUI: Add a universally available "command palette" to GUI programs

You can now press Ctrl+Shift+A in any LibGUI application and we'll give
you a command palette dialog where you can search for context-relevant
actions by name (via the keyboard.)

The set of actions is currently the same one you'd access via keyboard
shortcuts. In the future, we'll probably want to add APIs to allow
richer integrations with this feature.
This commit is contained in:
Andreas Kling 2022-01-27 19:49:51 +01:00
parent e0b60d56a5
commit 3e7e52c5f0
6 changed files with 235 additions and 1 deletions

View file

@ -84,6 +84,8 @@ public:
Function<void(Action&)> on_action_enter;
Function<void(Action&)> on_action_leave;
auto const& global_shortcut_actions(Badge<GUI::CommandPalette>) const { return m_global_shortcut_actions; }
private:
Application(int argc, char** argv, Core::EventLoop::MakeInspectable = Core::EventLoop::MakeInspectable::No);
Application(Main::Arguments const& arguments, Core::EventLoop::MakeInspectable inspectable = Core::EventLoop::MakeInspectable::No)