ladybird/Meta/Lagom/Contrib/MacPDF/MacPDFOutlineViewDataSource.h
Nico Weber a75f876ec0 MacPF: Add a small group header in front of the outline
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)".
2023-10-10 09:50:08 -04:00

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