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:
parent
18dfc61280
commit
79bba20efc
3 changed files with 118 additions and 0 deletions
28
Meta/Lagom/Contrib/MacPDF/MacPDFOutlineViewDataSource.h
Normal file
28
Meta/Lagom/Contrib/MacPDF/MacPDFOutlineViewDataSource.h
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue