#pragma once #include #include #include #include #include class GAction; class Point; class GMenu { public: explicit GMenu(const StringView& name); ~GMenu(); static GMenu* from_menu_id(int); GAction* action_at(int); void add_action(NonnullRefPtr); void add_separator(); void popup(const Point& screen_position); void dismiss(); Function on_item_activation; private: friend class GMenuBar; int menu_id() const { return m_menu_id; } int realize_menu(); void unrealize_menu(); int m_menu_id { -1 }; String m_name; Vector> m_items; };