123456789101112131415161718192021222324252627282930313233343536373839404142 |
- //
- // KMCompareCoveringWindowController.swift
- // PDF Reader Pro
- //
- // Created by lizhe on 2023/11/20.
- //
- import Cocoa
- class KMCompareCoveringWindowController: NSWindowController {
- @IBOutlet weak var coveringView: KMCompareCoveringView!
- var pdfDocument: CPDFDocument? {
- didSet {
- self.coveringView.pdfDocument = pdfDocument
- }
- }
-
- var hideCloseInfo: Bool = false
-
- var saveHandle: ((KMCompareCoveringWindowController) -> Void)?
- var closeHandle: ((KMCompareCoveringWindowController) -> Void)?
-
- convenience init(document: CPDFDocument) {
- self.init(windowNibName: "KMCompareCoveringWindowController")
- self.pdfDocument = document
- }
-
- override func windowDidLoad() {
- super.windowDidLoad()
- self.coveringView.pdfDocument = pdfDocument
- self.coveringView.closeHandle = { [unowned self] view in
- self.closeHandle?(self)
- }
-
- self.coveringView.saveHandle = { [unowned self] view in
- self.saveHandle?(self)
- }
- }
-
- }
|