mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 14:37:45 +00:00
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.
This commit is contained in:
parent
4e8b6e48fd
commit
476a4475e5
5 changed files with 62 additions and 1 deletions
21
Applications/Browser/WindowActions.h
Normal file
21
Applications/Browser/WindowActions.h
Normal file
|
@ -0,0 +1,21 @@
|
|||
#pragma once
|
||||
|
||||
#include <LibGUI/Action.h>
|
||||
|
||||
namespace Browser {
|
||||
|
||||
class WindowActions {
|
||||
public:
|
||||
static WindowActions& the();
|
||||
|
||||
WindowActions(GUI::Window&);
|
||||
|
||||
Function<void()> on_create_new_tab;
|
||||
|
||||
GUI::Action& create_new_tab_action() { return *m_create_new_tab_action; }
|
||||
|
||||
private:
|
||||
RefPtr<GUI::Action> m_create_new_tab_action;
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue