mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-07 19:57:45 +03:00
ae3ec3fc37
Now GTextEditor manages its own editing actions (cut/copy/paste/etc) and will show a context menu containing them when requested. Apps that want to put a GTextEditor's actions in its menu can get to the actions via public getters. :^)
26 lines
459 B
C++
26 lines
459 B
C++
#pragma once
|
|
|
|
#include <LibGUI/GMenu.h>
|
|
#include <AK/Badge.h>
|
|
#include <AK/Vector.h>
|
|
|
|
class GApplication;
|
|
|
|
class GMenuBar {
|
|
public:
|
|
GMenuBar();
|
|
~GMenuBar();
|
|
|
|
void add_menu(OwnPtr<GMenu>&&);
|
|
|
|
void notify_added_to_application(Badge<GApplication>);
|
|
void notify_removed_from_application(Badge<GApplication>);
|
|
|
|
private:
|
|
int realize_menubar();
|
|
void unrealize_menubar();
|
|
|
|
int m_menubar_id { 0 };
|
|
Vector<OwnPtr<GMenu>> m_menus;
|
|
};
|