mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-29 14:14:45 +03:00
a75f876ec0
This has to be part of the data source, which makes things a bit annoying. For PDFs that have no outline, it says "(No outline)".
30 lines
574 B
Objective-C
30 lines
574 B
Objective-C
/*
|
|
* Copyright (c) 2023, Nico Weber <thakis@chromium.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "CocoaWrapper.h"
|
|
|
|
#include <LibPDF/Document.h>
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
// Objective-C wrapper of PDF::OutlineItem, to launder it through the NSOutlineViewDataSource protocol.
|
|
@interface OutlineItemWrapper : NSObject
|
|
|
|
- (BOOL)isGroupItem;
|
|
- (Optional<u32>)page;
|
|
|
|
@end
|
|
|
|
@interface MacPDFOutlineViewDataSource : NSObject <NSOutlineViewDataSource>
|
|
|
|
- (instancetype)initWithOutline:(RefPtr<PDF::OutlineDict>)outline;
|
|
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|