2019-02-11 14:43:43 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <LibGUI/GMenu.h>
|
2019-02-11 15:37:12 +01:00
|
|
|
#include <AK/Badge.h>
|
|
|
|
#include <AK/OwnPtr.h>
|
2019-02-11 14:43:43 +01:00
|
|
|
#include <AK/Vector.h>
|
|
|
|
|
2019-02-11 15:37:12 +01:00
|
|
|
class GApplication;
|
|
|
|
|
2019-02-11 14:43:43 +01:00
|
|
|
class GMenuBar {
|
|
|
|
public:
|
|
|
|
GMenuBar();
|
|
|
|
~GMenuBar();
|
|
|
|
|
2019-02-11 15:37:12 +01:00
|
|
|
void add_menu(OwnPtr<GMenu>&&);
|
|
|
|
|
|
|
|
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-02-12 00:52:19 +01:00
|
|
|
int m_menubar_id { 0 };
|
2019-02-11 15:37:12 +01:00
|
|
|
Vector<OwnPtr<GMenu>> m_menus;
|
2019-02-11 14:43:43 +01:00
|
|
|
};
|