mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 15:16:14 +00:00
When the outline has focus, arrow keys navigate the outline instead of changing the current page. Add opt-up and opt-down as a way to move by one page even when the outline has focus. (This matches Preview.app.) xib change: Added two menu Previous Page with key equivalent opt-up and Next Page with key equivalent opt-down to Go menu and bound them to goToPreviousPage: and goToNextPage: on First Responder. When the outline has focus, the responder chain is outline -> window, so also add the actions on the window controller, and let that forward to the PDF view.
31 lines
608 B
Objective-C
31 lines
608 B
Objective-C
/*
|
|
* Copyright (c) 2023, Nico Weber <thakis@chromium.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "CocoaWrapper.h"
|
|
|
|
#import "MacPDFView.h"
|
|
#include <LibPDF/Document.h>
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
@class MacPDFDocument;
|
|
|
|
@interface MacPDFWindowController : NSWindowController <MacPDFViewDelegate, NSOutlineViewDelegate, NSToolbarDelegate>
|
|
|
|
- (instancetype)initWithDocument:(MacPDFDocument*)document;
|
|
|
|
- (IBAction)goToNextPage:(id)sender;
|
|
- (IBAction)goToPreviousPage:(id)sender;
|
|
- (IBAction)showGoToPageDialog:(id)sender;
|
|
|
|
- (void)pdfDidInitialize;
|
|
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|