mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
We currently duplicate a lot of code to handle application/context menus and actions. The goal here is to hold the data for the menus and actions in LibWebView. Each UI will then be able to generate menus from the data on-the-fly. The structures added here are meant to support generic and checkable actions, action groups, submenus, etc.
23 lines
460 B
C++
23 lines
460 B
C++
/*
|
|
* Copyright (c) 2025, Tim Flynn <trflynn89@ladybird.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <LibWebView/Menu.h>
|
|
|
|
class QAction;
|
|
class QMenu;
|
|
class QWidget;
|
|
|
|
namespace Ladybird {
|
|
|
|
class WebContentView;
|
|
|
|
QMenu* create_application_menu(QWidget& parent, WebView::Menu&);
|
|
QMenu* create_context_menu(QWidget& parent, WebContentView&, WebView::Menu&);
|
|
QAction* create_application_action(QWidget& parent, WebView::Action&);
|
|
|
|
}
|