Files
ladybird/UI/AppKit/Interface/BookmarksBar.h
Timothy Flynn b544e42809 LibWebView+UI: Add an about:bookmarks page to manage bookmarks
This page renders the bookmarks as a tree and hook context menu events
up to the UI's bookmarks bar context menus to allow editing bookmarks.
Users can also drag-and-drop bookmark items around.
2026-04-09 10:08:06 -04:00

36 lines
902 B
Objective-C

/*
* Copyright (c) 2026, Tim Flynn <trflynn89@ladybird.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/Optional.h>
#include <LibGfx/Point.h>
#include <LibWebView/Forward.h>
#import <Cocoa/Cocoa.h>
@class BookmarkFolderPopover;
@interface BookmarksBar : NSView
- (instancetype)init;
- (void)rebuild;
- (void)closeBookmarkFolders;
- (void)bookmarkFolderDidClose:(BookmarkFolderPopover*)folder;
- (void)showContextMenu:(id)control event:(NSEvent*)event;
- (void)showContextMenu:(Gfx::IntPoint)content_position
view:(NSView*)view
bookmarkItem:(Optional<WebView::BookmarkItem const&>)item
targetFolderID:(Optional<String const&>)target_folder_id;
@property (nonatomic, strong, readonly) NSString* selected_bookmark_menu_item_id;
@property (nonatomic, strong, readonly) NSString* selected_bookmark_menu_target_folder_id;
@end