mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 10:47:35 +00:00
Browser: Provide ability to create new browser windows
This change allows a user to spawn new browser processes by either going to "File -> New Window" or by the shortcut "Ctrl + N".
This commit is contained in:
parent
48389f4179
commit
90719d34af
4 changed files with 21 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
|
||||
* Copyright (c) 2022, the SerenityOS developers.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -17,6 +18,7 @@ public:
|
|||
WindowActions(GUI::Window&);
|
||||
|
||||
Function<void()> on_create_new_tab;
|
||||
Function<void()> on_create_new_window;
|
||||
Function<void()> on_next_tab;
|
||||
Function<void()> on_previous_tab;
|
||||
Vector<Function<void()>> on_tabs;
|
||||
|
@ -25,6 +27,7 @@ public:
|
|||
Function<void(GUI::Action&)> on_vertical_tabs;
|
||||
|
||||
GUI::Action& create_new_tab_action() { return *m_create_new_tab_action; }
|
||||
GUI::Action& create_new_window_action() { return *m_create_new_window_action; }
|
||||
GUI::Action& next_tab_action() { return *m_next_tab_action; }
|
||||
GUI::Action& previous_tab_action() { return *m_previous_tab_action; }
|
||||
GUI::Action& about_action() { return *m_about_action; }
|
||||
|
@ -33,6 +36,7 @@ public:
|
|||
|
||||
private:
|
||||
RefPtr<GUI::Action> m_create_new_tab_action;
|
||||
RefPtr<GUI::Action> m_create_new_window_action;
|
||||
RefPtr<GUI::Action> m_next_tab_action;
|
||||
RefPtr<GUI::Action> m_previous_tab_action;
|
||||
NonnullRefPtrVector<GUI::Action> m_tab_actions;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue