2019-02-11 14:43:43 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
2019-02-11 15:37:12 +01:00
|
|
|
#include <AK/Badge.h>
|
2019-07-24 09:12:23 +02:00
|
|
|
#include <AK/NonnullOwnPtrVector.h>
|
2019-05-28 11:53:16 +02:00
|
|
|
#include <LibGUI/GMenu.h>
|
2019-02-11 14:43:43 +01:00
|
|
|
|
2019-02-11 15:37:12 +01:00
|
|
|
class GApplication;
|
|
|
|
|
|
2019-02-11 14:43:43 +01:00
|
|
|
class GMenuBar {
|
|
|
|
|
public:
|
|
|
|
|
GMenuBar();
|
|
|
|
|
~GMenuBar();
|
|
|
|
|
|
2019-07-24 09:12:23 +02:00
|
|
|
void add_menu(NonnullOwnPtr<GMenu>&&);
|
2019-02-11 15:37:12 +01:00
|
|
|
|
|
|
|
|
void notify_added_to_application(Badge<GApplication>);
|
|
|
|
|
void notify_removed_from_application(Badge<GApplication>);
|
|
|
|
|
|
2019-02-11 14:43:43 +01:00
|
|
|
private:
|
2019-02-13 17:54:30 +01:00
|
|
|
int realize_menubar();
|
|
|
|
|
void unrealize_menubar();
|
|
|
|
|
|
2019-05-26 01:07:30 +02:00
|
|
|
int m_menubar_id { -1 };
|
2019-07-24 09:12:23 +02:00
|
|
|
NonnullOwnPtrVector<GMenu> m_menus;
|
2019-02-11 14:43:43 +01:00
|
|
|
};
|