Files
ladybird/UI/AppKit/Interface/BookmarkFolder.h
Timothy Flynn 81c2426b03 UI/AppKit: Create custom popup views for bookmarks bar folders
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.
2026-04-01 04:57:28 +02:00

29 lines
610 B
Objective-C

/*
* Copyright (c) 2026, Tim Flynn <trflynn89@ladybird.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibWebView/Forward.h>
#import <Cocoa/Cocoa.h>
@class BookmarksBar;
@interface BookmarkFolderPopover : NSPopover
- (instancetype)init:(WebView::Menu&)menu
bookmarksBar:(BookmarksBar*)bookmarks_bar
parentFolder:(BookmarkFolderPopover*)parent_folder;
- (void)showRelativeToView:(NSView*)view preferredEdge:(NSRectEdge)preferred_edge;
- (void)openChildFolder:(WebView::Menu&)menu relativeToView:(NSView*)view;
- (void)closeChildFolder;
- (void)close;
@end