2020-04-23 21:27:34 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <LibGUI/Action.h>
|
|
|
|
|
|
|
|
namespace Browser {
|
|
|
|
|
|
|
|
class WindowActions {
|
|
|
|
public:
|
|
|
|
static WindowActions& the();
|
|
|
|
|
|
|
|
WindowActions(GUI::Window&);
|
|
|
|
|
|
|
|
Function<void()> on_create_new_tab;
|
2020-04-23 21:43:24 +02:00
|
|
|
Function<void()> on_next_tab;
|
|
|
|
Function<void()> on_previous_tab;
|
2020-04-24 20:50:06 +02:00
|
|
|
Function<void()> on_about;
|
2020-04-25 17:20:23 +02:00
|
|
|
Function<void(GUI::Action&)> on_show_bookmarks_bar;
|
2020-04-23 21:27:34 +02:00
|
|
|
|
|
|
|
GUI::Action& create_new_tab_action() { return *m_create_new_tab_action; }
|
2020-04-23 21:43:24 +02:00
|
|
|
GUI::Action& next_tab_action() { return *m_next_tab_action; }
|
|
|
|
GUI::Action& previous_tab_action() { return *m_previous_tab_action; }
|
2020-04-24 20:50:06 +02:00
|
|
|
GUI::Action& about_action() { return *m_about_action; }
|
2020-04-25 17:20:23 +02:00
|
|
|
GUI::Action& show_bookmarks_bar_action() { return *m_show_bookmarks_bar_action; }
|
2020-04-23 21:27:34 +02:00
|
|
|
|
|
|
|
private:
|
|
|
|
RefPtr<GUI::Action> m_create_new_tab_action;
|
2020-04-23 21:43:24 +02:00
|
|
|
RefPtr<GUI::Action> m_next_tab_action;
|
|
|
|
RefPtr<GUI::Action> m_previous_tab_action;
|
2020-04-24 20:50:06 +02:00
|
|
|
RefPtr<GUI::Action> m_about_action;
|
2020-04-25 17:20:23 +02:00
|
|
|
RefPtr<GUI::Action> m_show_bookmarks_bar_action;
|
2020-04-23 21:27:34 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|