mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-25 17:25:08 +02:00
Unfortunately, the NSMenu-based bookmarks implementation cannot support context menus within arbitrary folders. The NSMenu consumes the right- click events during its own menu tracking, and we are not able to see those events from our interface. This patch replaces the NSMenu for folders with a custom NSPopup. This implementation makes it much easier to handle context menus.
30 lines
654 B
Objective-C
30 lines
654 B
Objective-C
/*
|
|
* Copyright (c) 2025-2026, Tim Flynn <trflynn89@ladybird.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <Interface/Menu.h>
|
|
#include <LibWebView/Menu.h>
|
|
|
|
#import <Cocoa/Cocoa.h>
|
|
|
|
@class LadybirdWebView;
|
|
|
|
namespace Ladybird {
|
|
|
|
NSMenu* create_application_menu(WebView::Menu&);
|
|
void repopulate_application_menu(NSMenu*, WebView::Menu&);
|
|
|
|
NSMenu* create_context_menu(LadybirdWebView*, WebView::Menu&);
|
|
|
|
NSMenuItem* create_application_menu_item(WebView::Action&);
|
|
NSButton* create_application_button(WebView::Action&);
|
|
NSImageView* create_application_icon(WebView::Action&);
|
|
|
|
void set_control_image(id control, NSString*);
|
|
|
|
}
|