1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 12:27:35 +00:00

MacPDF: Add an NSOutlineViewDataSource for the PDF outline

Not used yet.
This commit is contained in:
Nico Weber 2023-10-08 22:28:01 -04:00 committed by Tim Flynn
parent 18dfc61280
commit 79bba20efc
3 changed files with 118 additions and 0 deletions

View file

@ -0,0 +1,28 @@
/*
* 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
- (Optional<u32>)page;
@end
@interface MacPDFOutlineViewDataSource : NSObject <NSOutlineViewDataSource>
- (instancetype)initWithOutline:(RefPtr<PDF::OutlineDict>)outline;
@end
NS_ASSUME_NONNULL_END