/* * Copyright (c) 2020, Andreas Kling * Copyright (c) 2022, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include namespace Browser { class WindowActions { public: static WindowActions& the(); WindowActions(GUI::Window&); Function on_create_new_tab; Function on_create_new_window; Function on_next_tab; Function on_previous_tab; Vector> on_tabs; Function on_show_bookmarks_bar; Function 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; } GUI::Action& show_bookmarks_bar_action() { return *m_show_bookmarks_bar_action; } GUI::Action& vertical_tabs_action() { return *m_vertical_tabs_action; } private: RefPtr m_create_new_tab_action; RefPtr m_create_new_window_action; RefPtr m_next_tab_action; RefPtr m_previous_tab_action; Vector> m_tab_actions; RefPtr m_about_action; RefPtr m_show_bookmarks_bar_action; RefPtr m_vertical_tabs_action; }; }