LibGUI: Give GTextEditor a context menu.

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. :^)
This commit is contained in:
Andreas Kling 2019-04-18 12:25:00 +02:00
parent 67d7fc94fc
commit ae3ec3fc37
Notes: sideshowbarker 2024-07-19 14:40:04 +09:00
6 changed files with 83 additions and 45 deletions

View file

@ -29,7 +29,7 @@ GMenu::~GMenu()
unrealize_menu();
}
void GMenu::add_action(Retained<GAction>&& action)
void GMenu::add_action(Retained<GAction> action)
{
m_items.append(make<GMenuItem>(m_menu_id, move(action)));
}