Kaynağa Gözat

【书签】OC代码导入

lizhe 1 yıl önce
ebeveyn
işleme
feca7151f1
35 değiştirilmiş dosya ile 4100 ekleme ve 40 silme
  1. 43 1
      PDF Office/PDF Master/Class/Document/KMMainDocument.swift
  2. 1 1
      PDF Office/PDF Master/Class/PDFTools/KMBookmark/Controller/KMBookmarkController.swift
  3. 10 10
      PDF Office/PDF Master/Class/PDFTools/KMBookmark/Controller/KMBookmarkController.xib
  4. 77 13
      PDF Office/PDF Master/Class/PDFTools/KMBookmark/Model/KMBookmark.swift
  5. 43 0
      PDF Office/PDF Master/Class/PDFTools/KMBookmark/Old/Cell/SKSeparatorCell.h
  6. 55 0
      PDF Office/PDF Master/Class/PDFTools/KMBookmark/Old/Cell/SKSeparatorCell.m
  7. 53 0
      PDF Office/PDF Master/Class/PDFTools/KMBookmark/Old/Cell/SKTextWithIconCell.h
  8. 182 0
      PDF Office/PDF Master/Class/PDFTools/KMBookmark/Old/Cell/SKTextWithIconCell.m
  9. 129 0
      PDF Office/PDF Master/Class/PDFTools/KMBookmark/Old/Controller/BookmarkSheet.xib
  10. 122 0
      PDF Office/PDF Master/Class/PDFTools/KMBookmark/Old/Controller/BookmarksWindow.xib
  11. 75 0
      PDF Office/PDF Master/Class/PDFTools/KMBookmark/Old/Controller/SKBookmarkController.h
  12. 1054 0
      PDF Office/PDF Master/Class/PDFTools/KMBookmark/Old/Controller/SKBookmarkController.m
  13. 48 0
      PDF Office/PDF Master/Class/PDFTools/KMBookmark/Old/Controller/SKBookmarkSheetController.h
  14. 96 0
      PDF Office/PDF Master/Class/PDFTools/KMBookmark/Old/Controller/SKBookmarkSheetController.m
  15. 18 0
      PDF Office/PDF Master/Class/PDFTools/KMBookmark/Old/Controller/SKDocumentController.h
  16. 46 0
      PDF Office/PDF Master/Class/PDFTools/KMBookmark/Old/Controller/SKDocumentController.m
  17. 74 0
      PDF Office/PDF Master/Class/PDFTools/KMBookmark/Old/Extension/NSMenu_SKExtensions.h
  18. 147 0
      PDF Office/PDF Master/Class/PDFTools/KMBookmark/Old/Extension/NSMenu_SKExtensions.m
  19. 97 0
      PDF Office/PDF Master/Class/PDFTools/KMBookmark/Old/Model/SKBookmark.h
  20. 711 0
      PDF Office/PDF Master/Class/PDFTools/KMBookmark/Old/Model/SKBookmark.m
  21. 56 0
      PDF Office/PDF Master/Class/PDFTools/KMBookmark/Old/SKAlias/SKAlias.h
  22. 134 0
      PDF Office/PDF Master/Class/PDFTools/KMBookmark/Old/SKAlias/SKAlias.m
  23. 48 0
      PDF Office/PDF Master/Class/PDFTools/KMBookmark/Old/SKAlias/SKDictionaryFormatter.h
  24. 70 0
      PDF Office/PDF Master/Class/PDFTools/KMBookmark/Old/SKAlias/SKDictionaryFormatter.m
  25. 48 0
      PDF Office/PDF Master/Class/PDFTools/KMBookmark/Old/Tool/SKToolbarItem.h
  26. 72 0
      PDF Office/PDF Master/Class/PDFTools/KMBookmark/Old/Tool/SKToolbarItem.m
  27. 94 0
      PDF Office/PDF Master/Class/PDFTools/KMBookmark/Old/View/SKOutlineView.h
  28. 270 0
      PDF Office/PDF Master/Class/PDFTools/KMBookmark/Old/View/SKOutlineView.m
  29. 0 2
      PDF Office/PDF Master/Class/PDFTools/KMBookmark/View/KMTextWithIconCell.swift
  30. 12 12
      PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/Outline/OutlineView/View/KMCustomOutlineView.swift
  31. 8 0
      PDF Office/PDF Master/PDF_Reader_Pro DMG-Bridging-Header.h
  32. 8 0
      PDF Office/PDF Master/PDF_Reader_Pro Edition-Bridging-Header.h
  33. 8 0
      PDF Office/PDF Master/PDF_Reader_Pro-Bridging-Header.h
  34. 190 0
      PDF Office/PDF Reader Pro.xcodeproj/project.pbxproj
  35. 1 1
      PDF Office/PDF Reader Pro.xcodeproj/xcshareddata/xcschemes/PDF Reader Pro Edition.xcscheme

+ 43 - 1
PDF Office/PDF Master/Class/Document/KMMainDocument.swift

@@ -652,6 +652,36 @@ typealias KMMainDocumentCloudUploadHanddler = (@escaping(Bool, String)->()) -> (
             return
         }
         
+//        let bookmarkSheetController = SKBookmarkSheetController(windowNibName: "BookmarkSheet")
+//        NSWindow.currentWindow().beginSheet(bookmarkSheetController.window!) { resoponse in
+//            
+//        }
+//        bookmarkSheetController.textField.stringValue = self.displayName
+//        bookmarkSheetController.beginSheetModal(for: self.windowForSheet) { [unowned self] result in
+//            if (result == NSApplication.ModalResponse.OK.rawValue) {
+//                let label = bookmarkSheetController.textField.stringValue;
+//                let folder: SKBookmark = bookmarkSheetController.selectedFolder ?? SKBookmarkController.shared().bookmarkRoot
+//                var bookmark = SKBookmark()
+//                switch (item.tag) {
+//                    case 0:
+//                        let mainViewController = self.mainViewController
+//                        let page = mainViewController?.listView.currentPage()
+//                        bookmark = SKBookmark.bookmark(with: self.fileURL, pageIndex: (page?.pageIndex())!, label: label) as! SKBookmark
+//                    case 1:
+//                        let setup = self.currentDocumntSetup()
+//                        bookmark = SKBookmark.bookmark(withSetup: setup, label: label) as! SKBookmark
+//                    
+//                    case 2:
+//                        let setups = NSApp.orderedDocuments.map { $0.value(forKey: "currentDocumentSetup") }
+//                        bookmark = SKBookmark.bookmarkSession(withSetups: setups as [Any], label: label) as! SKBookmark
+//                    
+//                    default:
+//                        break;
+//                }
+//                folder.mutableArrayValue(forKey: "children").add(bookmark)
+//            }
+//        }
+        
         if item.tag == 3 {
             KMPrint("Edit Bookmark")
             bookmarkController = KMBookmarkController.showBookmarkController()
@@ -667,7 +697,7 @@ typealias KMMainDocumentCloudUploadHanddler = (@escaping(Bool, String)->()) -> (
         bookmarkSheetController?.cancelAction = { [unowned self] controller, type in
             
         }
-        
+//        
         bookmarkSheetController?.doneAction = { [unowned self] controller, type, label in
             let folder = controller.selectedFolder
             var bookmark: KMBookmark?
@@ -697,6 +727,18 @@ typealias KMMainDocumentCloudUploadHanddler = (@escaping(Bool, String)->()) -> (
         }
     }
     
+    func currentDocumntSetup() -> [String: Any] {
+        var setup: [String: Any] = [:]
+        
+        let data = SKAlias.init(url: fileURL).data
+        if (data != nil) {
+            setup.updateValue(data as Any, forKey: "_BDAlias")
+        } else {
+            setup.updateValue(fileURL?.path as Any, forKey: "fileName")
+        }
+        return setup;
+    }
+    
     
     
     @IBAction func showWindow(_ sender: Any?) {

+ 1 - 1
PDF Office/PDF Master/Class/PDFTools/KMBookmark/Controller/KMBookmarkController.swift

@@ -294,7 +294,7 @@ class KMBookmarkController: NSWindowController {
 //
 //    
 //    // MARK: - NSMenu delegate methods
-//
+
 //    func addItemForBookmark(_ bookmark: KMBookmark, toMenu menu: NSMenu, isFolder: Bool, isAlternate: Bool) {
 //        var item: NSMenuItem?
 //        if isFolder {

+ 10 - 10
PDF Office/PDF Master/Class/PDFTools/KMBookmark/Controller/KMBookmarkController.xib

@@ -17,35 +17,35 @@
         <window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" animationBehavior="default" id="F0z-JX-Cv5">
             <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
             <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
-            <rect key="contentRect" x="196" y="240" width="512" height="233"/>
+            <rect key="contentRect" x="196" y="240" width="663" height="307"/>
             <rect key="screenRect" x="0.0" y="0.0" width="2560" height="1415"/>
             <view key="contentView" id="se5-gp-TjO">
-                <rect key="frame" x="0.0" y="0.0" width="512" height="233"/>
+                <rect key="frame" x="0.0" y="0.0" width="663" height="307"/>
                 <autoresizingMask key="autoresizingMask"/>
                 <subviews>
                     <view translatesAutoresizingMaskIntoConstraints="NO" id="8va-Ju-ebM">
-                        <rect key="frame" x="0.0" y="0.0" width="512" height="233"/>
+                        <rect key="frame" x="0.0" y="0.0" width="663" height="307"/>
                         <subviews>
                             <scrollView fixedFrame="YES" borderType="none" autohidesScrollers="YES" horizontalLineScroll="18" horizontalPageScroll="10" verticalLineScroll="18" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3xo-BF-qal">
-                                <rect key="frame" x="0.0" y="22" width="512" height="212"/>
+                                <rect key="frame" x="0.0" y="22" width="663" height="286"/>
                                 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                 <clipView key="contentView" id="one-Qw-MTE">
-                                    <rect key="frame" x="0.0" y="0.0" width="512" height="212"/>
+                                    <rect key="frame" x="0.0" y="0.0" width="663" height="286"/>
                                     <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                     <subviews>
                                         <outlineView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="firstColumnOnly" alternatingRowBackgroundColors="YES" columnReordering="NO" typeSelect="NO" autosaveName="SKBookmarksTable" rowHeight="16" headerView="DUP-Q2-ASL" indentationPerLevel="13" outlineTableColumn="qcP-Ly-Zi3" id="O1w-IL-33b">
-                                            <rect key="frame" x="0.0" y="0.0" width="512" height="184"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="663" height="258"/>
                                             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                             <size key="intercellSpacing" width="3" height="2"/>
                                             <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                                             <color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/>
                                             <tableColumns>
-                                                <tableColumn identifier="label" width="248" minWidth="40" maxWidth="1000" id="qcP-Ly-Zi3">
+                                                <tableColumn identifier="label" width="250" minWidth="100" maxWidth="1000" id="qcP-Ly-Zi3">
                                                     <tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="left" title="Label">
                                                         <color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
                                                         <color key="backgroundColor" white="0.33333298560000002" alpha="1" colorSpace="calibratedWhite"/>
                                                     </tableHeaderCell>
-                                                    <textFieldCell key="dataCell" lineBreakMode="truncatingTail" selectable="YES" editable="YES" alignment="left" id="FJd-fo-cum" customClass="KMTextWithIconCell" customModule="PDF_Reader_Pro" customModuleProvider="target">
+                                                    <textFieldCell key="dataCell" lineBreakMode="truncatingTail" selectable="YES" editable="YES" alignment="left" id="FJd-fo-cum" customClass="SKTextWithIconCell" customModule="PDF_Reader_Pro" customModuleProvider="target">
                                                         <font key="font" metaFont="cellTitle"/>
                                                         <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
                                                         <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
@@ -92,7 +92,7 @@
                                     <autoresizingMask key="autoresizingMask"/>
                                 </scroller>
                                 <tableHeaderView key="headerView" wantsLayer="YES" id="DUP-Q2-ASL">
-                                    <rect key="frame" x="0.0" y="0.0" width="512" height="28"/>
+                                    <rect key="frame" x="0.0" y="0.0" width="663" height="28"/>
                                     <autoresizingMask key="autoresizingMask"/>
                                 </tableHeaderView>
                             </scrollView>
@@ -109,7 +109,7 @@
             <connections>
                 <outlet property="delegate" destination="-2" id="0bl-1N-AYu"/>
             </connections>
-            <point key="canvasLocation" x="126" y="116.5"/>
+            <point key="canvasLocation" x="201.5" y="153.5"/>
         </window>
     </objects>
 </document>

+ 77 - 13
PDF Office/PDF Master/Class/PDFTools/KMBookmark/Model/KMBookmark.swift

@@ -101,37 +101,69 @@ class KMBookmark: NSObject {
             }
             guard let label = properties[kLabel] as? String else { return nil }
             bookmark = KMFolderBookmark.bookmark(children: newChildren, label: label)
+        } else if properties["windowFrame"] != nil {
+            guard let label = properties[kLabel] as? String else { return nil }
+            bookmark = KMFileBookmark.bookmark(setup: properties, label: label)
+            bookmark.label = label
         } else {
             let pageIndex = properties[kPageIndex] as? UInt ?? UInt(NSNotFound)
             let label = properties[kLabel] as? String
             let aliasData = properties[kBDAlias] as? Data
-            bookmark = KMBookmark.bookmark(url: URL(fileURLWithPath: ""), pageIndex: pageIndex, label: label!)
-//            guard let aliasData = properties[ALIASDATA_KEY] as? Data, let label = properties[LABEL_KEY] as? String else { return nil }
+
+            bookmark = KMFileBookmark.bookmark(aliasData: aliasData! as NSData, pageIndex: Int(pageIndex), label: label!)
         }
-//        else if properties["windowFrame"] != nil {
-//            guard let label = properties[LABEL_KEY] as? String else { return nil }
-//            self = SKFileBookmark(setup: properties, label: label) as? Self
-//        } 
-//        else {
-//            let pageIndex = properties[PAGEINDEX_KEY] as? UInt ?? NSNotFound
-//            guard let aliasData = properties[ALIASDATA_KEY] as? Data, let label = properties[LABEL_KEY] as? String else { return nil }
-//            self = KMFileBookmark(aliasData: aliasData, pageIndex: pageIndex, label: label) as? Self
-//        }
         return bookmark
     }
     
     static func bookmark(children: [KMBookmark], label: String) -> KMBookmark {
-        var bookmark = KMFolderBookmark()
+        let bookmark = KMFolderBookmark()
         
         return bookmark
     }
     
     static func bookmark(url: [KMBookmark], label: String) -> KMBookmark {
-        var bookmark = KMFolderBookmark()
+        let bookmark = KMFolderBookmark()
         
         return bookmark
     }
     
+    static func bookmark(aliasData: NSData, pageIndex: Int, label: String) -> KMBookmark {
+        let bookmark = KMFileBookmark()
+        
+        let alias = SKAlias.init(data: aliasData as Data)
+        let url = alias?.fileURL
+        bookmark.fileURL = url
+        return bookmark
+    }
+    
+    static func bookmark(setup: [String: Any], label: String) -> KMBookmark {
+        let pageIndex = setup[kPageIndex] as? UInt ?? UInt(NSNotFound)
+        let aliasData = setup[kBDAlias] as? Data
+        
+        let bookmark = KMFileBookmark.bookmark(aliasData: aliasData! as NSData, pageIndex: Int(pageIndex), label: label)
+        return bookmark
+    }
+    
+//    func resolveAliasData(aliasData: Data) -> URL? {
+//        var resolvedURL: URL?
+//        do {
+//            // 尝试创建NSURL实例
+//            let aliasURL = URL(dataRepresentation: aliasData, relativeTo: nil)
+//            
+//            // 解析别名并获取原始路径
+//            try aliasURL?.resolveAliasFileURL()
+//            
+//            // 将NSURL转换为URL
+//            if let resolvedFileURL = aliasURL as URL? {
+//                resolvedURL = resolvedFileURL
+//            }
+//        } catch {
+//            print("Error resolving alias data:", error)
+//        }
+//        return resolvedURL
+//    }
+    
+    
 //        - (id)initWithProperties:(NSDictionary *)dictionary {
 //            NSString *type = [dictionary objectForKey:TYPE_KEY];
 //            if ([type isEqualToString:SEPARATOR_STRING]) {
@@ -346,6 +378,10 @@ class KMSessionBookmark: KMBookmark {
     override func initWithProperties(properties: NSDictionary) -> KMBookmark {
         return KMSessionBookmark()
     }
+    
+    func icon() -> NSImage {
+        return NSImage(named: NSImage.multipleDocumentsName)!
+    }
 }
 
 //MARK: Separator
@@ -374,5 +410,33 @@ class KMFileBookmark: KMBookmark {
             
         }
     }
+    
+    static func missingFileImage() -> NSImage {
+        let image: NSImage = {
+            let size = NSSize(width: 16.0, height: 16.0)
+            return NSImage(size: size, flipped: false, drawingHandler: { rect in
+                let genericDocImage = NSWorkspace.shared.icon(forFileType: NSFileTypeForHFSTypeCode(OSType(kGenericDocumentIcon)))
+                let questionMark = NSWorkspace.shared.icon(forFileType: NSFileTypeForHFSTypeCode(OSType(kQuestionMarkIcon)))
+                genericDocImage.draw(in: rect, from: .zero, operation: .copy, fraction: 0.7)
+                questionMark.draw(in: NSRect(x: 3.0, y: 2.0, width: 10.0, height: 10.0), from: .zero, operation: .sourceOver, fraction: 0.7)
+                return true
+            })
+        }()
+        return image
+    }
+    
+    func icon() -> NSImage {
+        if let fileURL = self.fileURL {
+            return NSWorkspace.shared.icon(forFile: fileURL.path)
+        } else {
+            return KMFileBookmark.missingFileImage()
+        }
+    }
+
 }
 
+
+
+class AliasData: Codable {
+    
+}

+ 43 - 0
PDF Office/PDF Master/Class/PDFTools/KMBookmark/Old/Cell/SKSeparatorCell.h

@@ -0,0 +1,43 @@
+//
+//  SKSeparatorCell.h
+//  Skim
+//
+//  Created by Christiaan Hofman on 9/25/09.
+/*
+ This software is Copyright (c) 2009-2018
+ Christiaan Hofman. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ - Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in
+    the documentation and/or other materials provided with the
+    distribution.
+
+ - Neither the name of Christiaan Hofman nor the names of any
+    contributors may be used to endorse or promote products derived
+    from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <Cocoa/Cocoa.h>
+
+
+@interface SKSeparatorCell : NSCell
+@end

+ 55 - 0
PDF Office/PDF Master/Class/PDFTools/KMBookmark/Old/Cell/SKSeparatorCell.m

@@ -0,0 +1,55 @@
+//
+//  SKSeparatorCell.m
+//  Skim
+//
+//  Created by Christiaan Hofman on 9/25/09.
+/*
+ This software is Copyright (c) 2009-2018
+ Christiaan Hofman. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ - Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in
+    the documentation and/or other materials provided with the
+    distribution.
+
+ - Neither the name of Christiaan Hofman nor the names of any
+    contributors may be used to endorse or promote products derived
+    from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "SKSeparatorCell.h"
+
+#define SEPARATOR_LEFT_INDENT 4.0
+#define SEPARATOR_RIGHT_INDENT 2.0
+
+
+@implementation SKSeparatorCell
+
+- (void)drawWithFrame:(NSRect)cellFrame inView:(NSView *)controlView {
+    [NSGraphicsContext saveGraphicsState];
+    [[NSColor gridColor] setStroke];
+    [NSBezierPath setDefaultLineWidth:1.0];
+    [NSBezierPath strokeLineFromPoint:NSMakePoint(NSMinX(cellFrame) + SEPARATOR_LEFT_INDENT, floor(NSMidY(cellFrame)) + 0.5) toPoint:NSMakePoint(NSMaxX(cellFrame) - SEPARATOR_RIGHT_INDENT, floor(NSMidY(cellFrame)) + 0.5)];
+    [NSGraphicsContext restoreGraphicsState];
+}
+
+@end

+ 53 - 0
PDF Office/PDF Master/Class/PDFTools/KMBookmark/Old/Cell/SKTextWithIconCell.h

@@ -0,0 +1,53 @@
+//
+//  SKTextWithIconCell.h
+//  Skim
+//
+//  Created by Christiaan Hofman on 9/13/07.
+/*
+ This software is Copyright (c) 2007-2018
+ Christiaan Hofman. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ - Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in
+    the documentation and/or other materials provided with the
+    distribution.
+
+ - Neither the name of Christiaan Hofman nor the names of any
+    contributors may be used to endorse or promote products derived
+    from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <Cocoa/Cocoa.h>
+
+extern NSString *SKTextWithIconStringKey;
+extern NSString *SKTextWithIconImageKey;
+
+@interface SKTextWithIconCell : NSTextFieldCell {
+    NSImageCell *imageCell;
+}
+
+- (NSImage *)icon;
+
+- (NSRect)textRectForBounds:(NSRect)aRect;
+- (NSRect)iconRectForBounds:(NSRect)aRect;
+
+@end

+ 182 - 0
PDF Office/PDF Master/Class/PDFTools/KMBookmark/Old/Cell/SKTextWithIconCell.m

@@ -0,0 +1,182 @@
+//
+//  SKTextWithIconCell.m
+//  Skim
+//
+//  Created by Christiaan Hofman on 9/13/07.
+/*
+ This software is Copyright (c) 2007-2018
+ Christiaan Hofman. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ - Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in
+    the documentation and/or other materials provided with the
+    distribution.
+
+ - Neither the name of Christiaan Hofman nor the names of any
+    contributors may be used to endorse or promote products derived
+    from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "SKTextWithIconCell.h"
+#import "SKDictionaryFormatter.h"
+#import "NSImage_SKExtensions.h"
+//#import "NSGeometry_SKExtensions.h"
+//#import "NSEvent_SKExtensions.h"
+
+NSString *SKTextWithIconStringKey = @"string";
+NSString *SKTextWithIconImageKey = @"image";
+
+#define BORDER_BETWEEN_EDGE_AND_IMAGE (2.0)
+#define BORDER_BETWEEN_IMAGE_AND_TEXT (2.0)
+#define IMAGE_OFFSET (1.0)
+
+@implementation SKTextWithIconCell
+
+NSRect SKCenterRectVertically(NSRect rect, CGFloat height, CGFloat offset, BOOL flipped) {
+    rect.origin.y += 0.5 * (NSHeight(rect) - height);
+    rect.origin.y = flipped ? ceil(rect.origin.y) - offset  : floor(rect.origin.y) + offset;
+    rect.size.height = height;
+    return rect;
+}
+
+static inline NSRect SKSliceRect(NSRect rect, CGFloat amount, NSRectEdge edge) {
+    NSRect ignored;
+    NSDivideRect(rect, &rect, &ignored, amount, edge);
+    return rect;
+}
+
+static inline NSRect SKShrinkRect(NSRect rect, CGFloat amount, NSRectEdge edge) {
+    NSRect ignored;
+    NSDivideRect(rect, &ignored, &rect, amount, edge);
+    return rect;
+}
+
+
+
+static SKDictionaryFormatter *textWithIconCellFormatter = nil;
+
++ (void)initialize {
+//    SKINITIALIZE;
+    textWithIconCellFormatter = [[SKDictionaryFormatter alloc] initWithKey:SKTextWithIconStringKey];
+}
+
+- (void)commonInit {
+    imageCell = [[NSImageCell alloc] init];
+    [imageCell setImageScaling:NSImageScaleProportionallyUpOrDown];
+    if ([self formatter] == nil)
+        [self setFormatter:textWithIconCellFormatter];
+}
+
+- (id)initTextCell:(NSString *)aString {
+    self = [super initTextCell:aString];
+    if (self) {
+        [self commonInit];
+    }
+    return self;
+}
+
+- (id)initWithCoder:(NSCoder *)decoder {
+    self = [super initWithCoder:decoder];
+    if (self) {
+        [self commonInit];
+    }
+    return self;
+}
+
+- (id)copyWithZone:(NSZone *)zone {
+    SKTextWithIconCell *copy = [super copyWithZone:zone];
+    copy->imageCell = [imageCell copyWithZone:zone];
+    return copy;
+}
+
+- (void)dealloc {
+//    SKDESTROY(imageCell);
+//    [super dealloc];
+}
+
+- (NSSize)cellSizeForBounds:(NSRect)aRect {
+    NSSize cellSize = [super cellSizeForBounds:aRect];
+    cellSize.width += cellSize.height - 1 + BORDER_BETWEEN_EDGE_AND_IMAGE + BORDER_BETWEEN_IMAGE_AND_TEXT;
+    cellSize.width = fmin(cellSize.width, NSWidth(aRect));
+    return cellSize;
+}
+
+- (NSRect)textRectForBounds:(NSRect)aRect {
+    return SKShrinkRect(aRect, NSHeight(aRect) - 1 + BORDER_BETWEEN_EDGE_AND_IMAGE + BORDER_BETWEEN_IMAGE_AND_TEXT, NSMinXEdge);
+}
+
+- (NSRect)iconRectForBounds:(NSRect)aRect {
+    return SKSliceRect(SKShrinkRect(aRect, BORDER_BETWEEN_EDGE_AND_IMAGE, NSMinXEdge), NSHeight(aRect) - 1, NSMinXEdge);
+}
+
+- (void)drawInteriorWithFrame:(NSRect)aRect inView:(NSView *)controlView {
+    // let super draw the text
+    NSRect textRect = [self textRectForBounds:aRect];
+    [super drawInteriorWithFrame:textRect inView:controlView];
+    
+    // Draw the image
+    NSRect imageRect = [self iconRectForBounds:aRect];
+    imageRect = SKCenterRectVertically(imageRect, NSWidth(imageRect), IMAGE_OFFSET, [controlView isFlipped]);
+    [imageCell drawInteriorWithFrame:imageRect inView:controlView];
+}
+
+- (void)editWithFrame:(NSRect)aRect inView:(NSView *)controlView editor:(NSText *)textObj delegate:(id)anObject event:(NSEvent *)theEvent {
+    [super editWithFrame:[self textRectForBounds:aRect] inView:controlView editor:textObj delegate:anObject event:theEvent];
+}
+
+- (void)selectWithFrame:(NSRect)aRect inView:(NSView *)controlView editor:(NSText *)textObj delegate:(id)anObject start:(NSInteger)selStart length:(NSInteger)selLength {
+    [super selectWithFrame:[self textRectForBounds:aRect] inView:controlView editor:textObj delegate:anObject start:selStart length:selLength];
+}
+
+//#if SDK_BEFORE(10_10)
+//#define NSCellHitResult NSUInteger
+//#endif
+
+- (NSCellHitResult)hitTestForEvent:(NSEvent *)event inRect:(NSRect)cellFrame ofView:(NSView *)controlView {
+    NSRect textRect = [self textRectForBounds:cellFrame];
+    NSPoint mouseLoc = [controlView convertPoint:[event locationInWindow] fromView:nil];
+    NSCellHitResult hit = NSCellHitNone;
+    if (NSMouseInRect(mouseLoc, textRect, [controlView isFlipped]))
+        hit = [super hitTestForEvent:event inRect:textRect ofView:controlView];
+    else if (NSMouseInRect(mouseLoc, [self iconRectForBounds:cellFrame], [controlView isFlipped]))
+        hit = NSCellHitContentArea;
+    return hit;
+}
+
+//#if SDK_BEFORE(10_10)
+//#undef NSCellHitResult
+//#endif
+
+- (void)setObjectValue:(id <NSCopying>)obj {
+    [super setObjectValue:obj];
+    if ([(id)obj respondsToSelector:@selector(objectForKey:)]) {
+        [imageCell setImage:[(id)obj objectForKey:SKTextWithIconImageKey]];
+        self.stringValue = [(id)obj objectForKey:SKTextWithIconStringKey];
+    }
+    
+}
+
+- (NSImage *)icon {
+    return [imageCell image];
+}
+
+@end

+ 129 - 0
PDF Office/PDF Master/Class/PDFTools/KMBookmark/Old/Controller/BookmarkSheet.xib

@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22505" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
+    <dependencies>
+        <deployment version="1060" identifier="macosx"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22505"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <customObject id="-2" userLabel="File's Owner" customClass="SKBookmarkSheetController">
+            <connections>
+                <outlet property="buttons" destination="46" id="49"/>
+                <outlet property="controls" destination="39" id="40"/>
+                <outlet property="folderPopUp" destination="17" id="23"/>
+                <outlet property="labelFields" destination="38" id="41"/>
+                <outlet property="textField" destination="10" id="J87-Ue-DoE"/>
+                <outlet property="window" destination="7" id="13"/>
+            </connections>
+        </customObject>
+        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
+        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
+        <window allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" id="7" userLabel="Window" customClass="NSPanel">
+            <windowStyleMask key="styleMask" titled="YES" closable="YES"/>
+            <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
+            <rect key="contentRect" x="456" y="316" width="400" height="128"/>
+            <rect key="screenRect" x="0.0" y="0.0" width="2560" height="1415"/>
+            <value key="minSize" type="size" width="213" height="107"/>
+            <view key="contentView" id="8">
+                <rect key="frame" x="0.0" y="0.0" width="400" height="128"/>
+                <autoresizingMask key="autoresizingMask"/>
+                <subviews>
+                    <textField focusRingType="none" verticalHuggingPriority="750" id="9">
+                        <rect key="frame" x="17" y="90" width="72" height="17"/>
+                        <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+                        <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Bookmark:" id="27">
+                            <font key="font" metaFont="system"/>
+                            <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
+                            <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
+                        </textFieldCell>
+                    </textField>
+                    <button tag="1" imageHugsTitle="YES" verticalHuggingPriority="750" id="12">
+                        <rect key="frame" x="304" y="12" width="82" height="32"/>
+                        <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
+                        <buttonCell key="cell" type="push" title="OK" bezelStyle="rounded" alignment="center" borderStyle="border" tag="1" inset="2" id="30">
+                            <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                            <font key="font" metaFont="system"/>
+                            <string key="keyEquivalent" base64-UTF8="YES">
+DQ
+</string>
+                        </buttonCell>
+                        <connections>
+                            <accessibilityConnection property="link" destination="11" id="37"/>
+                            <action selector="okButtonAction:" target="-2" id="pBJ-t5-FA4"/>
+                        </connections>
+                    </button>
+                    <button imageHugsTitle="YES" verticalHuggingPriority="750" id="11">
+                        <rect key="frame" x="222" y="12" width="82" height="32"/>
+                        <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
+                        <buttonCell key="cell" type="push" title="Cancel" bezelStyle="rounded" alignment="center" borderStyle="border" inset="2" id="29">
+                            <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                            <font key="font" metaFont="system"/>
+                            <string key="keyEquivalent" base64-UTF8="YES">
+Gw
+</string>
+                        </buttonCell>
+                        <connections>
+                            <action selector="cancelButtonAction:" target="-2" id="eDV-2O-TyT"/>
+                        </connections>
+                    </button>
+                    <textField focusRingType="none" verticalHuggingPriority="750" id="10">
+                        <rect key="frame" x="94" y="88" width="286" height="22"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
+                        <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="28">
+                            <font key="font" metaFont="system"/>
+                            <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
+                            <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+                        </textFieldCell>
+                        <connections>
+                            <accessibilityConnection property="title" destination="9" id="24"/>
+                        </connections>
+                    </textField>
+                    <popUpButton imageHugsTitle="YES" verticalHuggingPriority="750" id="17">
+                        <rect key="frame" x="91" y="56" width="292" height="26"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
+                        <popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" inset="2" arrowPosition="arrowAtCenter" preferredEdge="maxY" selectedItem="19" id="31">
+                            <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
+                            <font key="font" metaFont="menu"/>
+                            <menu key="menu" id="18">
+                                <items>
+                                    <menuItem state="on" id="19"/>
+                                </items>
+                            </menu>
+                        </popUpButtonCell>
+                        <connections>
+                            <accessibilityConnection property="title" destination="22" id="25"/>
+                        </connections>
+                    </popUpButton>
+                    <textField focusRingType="none" verticalHuggingPriority="750" id="22">
+                        <rect key="frame" x="17" y="62" width="72" height="17"/>
+                        <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+                        <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Add to:" id="32">
+                            <font key="font" metaFont="system"/>
+                            <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
+                            <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
+                        </textFieldCell>
+                    </textField>
+                </subviews>
+            </view>
+            <point key="canvasLocation" x="132" y="-82"/>
+        </window>
+        <customObject id="38" userLabel="Labels" customClass="SKIBArray">
+            <connections>
+                <outlet property="object1" destination="9" id="42"/>
+                <outlet property="object2" destination="22" id="43"/>
+            </connections>
+        </customObject>
+        <customObject id="39" userLabel="Controls" customClass="SKIBArray">
+            <connections>
+                <outlet property="object1" destination="10" id="44"/>
+                <outlet property="object2" destination="17" id="45"/>
+            </connections>
+        </customObject>
+        <customObject id="46" userLabel="Buttons" customClass="SKIBArray">
+            <connections>
+                <outlet property="object1" destination="12" id="50"/>
+                <outlet property="object2" destination="11" id="51"/>
+            </connections>
+        </customObject>
+    </objects>
+</document>

+ 122 - 0
PDF Office/PDF Master/Class/PDFTools/KMBookmark/Old/Controller/BookmarksWindow.xib

@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22505" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
+    <dependencies>
+        <deployment version="1060" identifier="macosx"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22505"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <customObject id="-2" userLabel="File's Owner" customClass="SKBookmarkController">
+            <connections>
+                <outlet property="outlineView" destination="57" id="83"/>
+                <outlet property="statusBar" destination="37" id="55"/>
+                <outlet property="window" destination="5" id="19"/>
+            </connections>
+        </customObject>
+        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
+        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
+        <window title="Bookmarks" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" id="5" userLabel="Window">
+            <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
+            <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
+            <rect key="contentRect" x="242" y="493" width="400" height="250"/>
+            <rect key="screenRect" x="0.0" y="0.0" width="2560" height="1415"/>
+            <value key="minSize" type="size" width="300" height="100"/>
+            <view key="contentView" id="6">
+                <rect key="frame" x="0.0" y="0.0" width="400" height="250"/>
+                <autoresizingMask key="autoresizingMask"/>
+                <subviews>
+                    <customView id="37" customClass="SKStatusBar">
+                        <rect key="frame" x="0.0" y="0.0" width="400" height="22"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
+                    </customView>
+                    <scrollView borderType="none" autohidesScrollers="YES" horizontalLineScroll="18" horizontalPageScroll="10" verticalLineScroll="18" verticalPageScroll="10" usesPredominantAxisScrolling="NO" id="56">
+                        <rect key="frame" x="0.0" y="22" width="400" height="229"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <clipView key="contentView" id="Jxl-Bb-QQn">
+                            <rect key="frame" x="0.0" y="0.0" width="400" height="229"/>
+                            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                            <subviews>
+                                <outlineView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="firstColumnOnly" alternatingRowBackgroundColors="YES" columnReordering="NO" typeSelect="NO" autosaveName="SKBookmarksTable" rowHeight="16" headerView="100" indentationPerLevel="13" outlineTableColumn="58" id="57" customClass="SKOutlineView">
+                                    <rect key="frame" x="0.0" y="0.0" width="400" height="201"/>
+                                    <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                                    <size key="intercellSpacing" width="3" height="2"/>
+                                    <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                    <color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/>
+                                    <tableColumns>
+                                        <tableColumn identifier="label" width="136" minWidth="40" maxWidth="1000" id="58">
+                                            <tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="left" title="Label">
+                                                <color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
+                                                <color key="backgroundColor" white="0.33333298560000002" alpha="1" colorSpace="calibratedWhite"/>
+                                            </tableHeaderCell>
+                                            <textFieldCell key="dataCell" lineBreakMode="truncatingTail" selectable="YES" editable="YES" alignment="left" id="91" customClass="SKTextWithIconCell">
+                                                <font key="font" metaFont="cellTitle"/>
+                                                <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
+                                                <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+                                            </textFieldCell>
+                                            <tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
+                                        </tableColumn>
+                                        <tableColumn identifier="file" editable="NO" width="172" minWidth="40" maxWidth="1000" id="59">
+                                            <tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="left" title="File">
+                                                <color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
+                                                <color key="backgroundColor" white="0.33333298560000002" alpha="1" colorSpace="calibratedWhite"/>
+                                            </tableHeaderCell>
+                                            <textFieldCell key="dataCell" lineBreakMode="truncatingHead" selectable="YES" editable="YES" alignment="left" id="86">
+                                                <font key="font" metaFont="cellTitle"/>
+                                                <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
+                                                <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+                                            </textFieldCell>
+                                            <tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
+                                        </tableColumn>
+                                        <tableColumn identifier="page" width="54" minWidth="33" maxWidth="1000" id="60">
+                                            <tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="left" title="Page">
+                                                <color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
+                                                <color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/>
+                                            </tableHeaderCell>
+                                            <textFieldCell key="dataCell" lineBreakMode="truncatingTail" selectable="YES" editable="YES" alignment="left" id="97">
+                                                <numberFormatter key="formatter" formatterBehavior="default10_4" usesGroupingSeparator="NO" formatWidth="-1" groupingSize="0" minimumIntegerDigits="1" maximumIntegerDigits="42" id="101">
+                                                    <real key="minimum" value="1"/>
+                                                </numberFormatter>
+                                                <font key="font" metaFont="cellTitle"/>
+                                                <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
+                                                <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
+                                            </textFieldCell>
+                                            <tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
+                                        </tableColumn>
+                                    </tableColumns>
+                                    <connections>
+                                        <outlet property="dataSource" destination="-2" id="81"/>
+                                        <outlet property="delegate" destination="-2" id="82"/>
+                                        <outlet property="menu" destination="104" id="108"/>
+                                    </connections>
+                                </outlineView>
+                            </subviews>
+                        </clipView>
+                        <scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="YES" id="99">
+                            <rect key="frame" x="1" y="-30" width="385" height="15"/>
+                            <autoresizingMask key="autoresizingMask"/>
+                        </scroller>
+                        <scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="NO" id="98">
+                            <rect key="frame" x="-30" y="17" width="15" height="213"/>
+                            <autoresizingMask key="autoresizingMask"/>
+                        </scroller>
+                        <tableHeaderView key="headerView" wantsLayer="YES" id="100">
+                            <rect key="frame" x="0.0" y="0.0" width="400" height="28"/>
+                            <autoresizingMask key="autoresizingMask"/>
+                        </tableHeaderView>
+                    </scrollView>
+                </subviews>
+            </view>
+            <connections>
+                <outlet property="delegate" destination="-2" id="20"/>
+                <outlet property="initialFirstResponder" destination="57" id="90"/>
+            </connections>
+            <point key="canvasLocation" x="132" y="-230"/>
+        </window>
+        <menu id="104">
+            <connections>
+                <outlet property="delegate" destination="-2" id="109"/>
+            </connections>
+            <point key="canvasLocation" x="132" y="-74"/>
+        </menu>
+    </objects>
+</document>

+ 75 - 0
PDF Office/PDF Master/Class/PDFTools/KMBookmark/Old/Controller/SKBookmarkController.h

@@ -0,0 +1,75 @@
+//
+//  SKBookmarkController.h
+//  Skim
+//
+//  Created by Christiaan Hofman on 3/16/07.
+/*
+ This software is Copyright (c) 2007-2018
+ Christiaan Hofman. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ - Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in
+    the documentation and/or other materials provided with the
+    distribution.
+
+ - Neither the name of Christiaan Hofman nor the names of any
+    contributors may be used to endorse or promote products derived
+    from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <Cocoa/Cocoa.h>
+#import <Quartz/Quartz.h>
+#import "SKOutlineView.h"
+
+@class SKBookmark, SKStatusBar;
+
+@interface SKBookmarkController : NSWindowController <NSWindowDelegate, NSToolbarDelegate, NSMenuDelegate, SKOutlineViewDelegate, SKOutlineViewDataSource, QLPreviewPanelDataSource, QLPreviewPanelDelegate> {
+    SKStatusBar *statusBar;
+    SKBookmark *previousSession;
+    NSMutableArray *recentDocuments;
+    NSUndoManager *undoManager;
+    NSArray *draggedBookmarks;
+    NSDictionary *toolbarItems;
+}
+
++ (SKBookmarkController *)sharedBookmarkController;
+
+@property (weak) IBOutlet SKOutlineView *outlineView;
+//@property (nonatomic, retain) IBOutlet SKOutlineView *outlineView;
+@property (nonatomic, retain) IBOutlet SKStatusBar *statusBar;
+@property (nonatomic) SKBookmark *bookmarkRoot;
+
+- (IBAction)openBookmark:(id)sender;
+
+- (IBAction)doubleClickBookmark:(id)sender;
+- (IBAction)insertBookmarkFolder:(id)sender;
+- (IBAction)insertBookmarkSeparator:(id)sender;
+- (IBAction)addBookmark:(id)sender;
+- (IBAction)deleteBookmark:(id)sender;
+- (IBAction)toggleStatusBar:(id)sender;
+
+- (void)addRecentDocumentForURL:(NSURL *)fileURL pageIndex:(NSUInteger)pageIndex scaleFactor:(CGFloat)factor snapshots:(NSArray *)setups;
+- (NSUInteger)pageIndexForRecentDocumentAtURL:(NSURL *)fileURL;
+- (CGFloat)scaleFactorForRecentDocumentAtURL:(NSURL *)fileURL;
+- (NSArray *)snapshotsForRecentDocumentAtURL:(NSURL *)fileURL;
+
+@end

Dosya farkı çok büyük olduğundan ihmal edildi
+ 1054 - 0
PDF Office/PDF Master/Class/PDFTools/KMBookmark/Old/Controller/SKBookmarkController.m


+ 48 - 0
PDF Office/PDF Master/Class/PDFTools/KMBookmark/Old/Controller/SKBookmarkSheetController.h

@@ -0,0 +1,48 @@
+//
+//  SKBookmarkSheetController.h
+//  Skim
+//
+//  Created by Christiaan Hofman on 1/23/12.
+/*
+ This software is Copyright (c) 2012-2018
+ Christiaan Hofman. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ - Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in
+    the documentation and/or other materials provided with the
+    distribution.
+
+ - Neither the name of Christiaan Hofman nor the names of any
+    contributors may be used to endorse or promote products derived
+    from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <Cocoa/Cocoa.h>
+@class SKBookmark;
+
+@interface SKBookmarkSheetController : NSWindowController
+
+@property (nonatomic, retain) IBOutlet NSPopUpButton *folderPopUp;
+@property (weak) IBOutlet NSTextField *textField;
+@property (nonatomic, readonly) SKBookmark *selectedFolder;
+
+@end

+ 96 - 0
PDF Office/PDF Master/Class/PDFTools/KMBookmark/Old/Controller/SKBookmarkSheetController.m

@@ -0,0 +1,96 @@
+//
+//  SKBookmarkSheetController.m
+//  Skim
+//
+//  Created by Christiaan Hofman on 1/23/12.
+/*
+ This software is Copyright (c) 2012-2018
+ Christiaan Hofman. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ - Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in
+    the documentation and/or other materials provided with the
+    distribution.
+
+ - Neither the name of Christiaan Hofman nor the names of any
+    contributors may be used to endorse or promote products derived
+    from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "SKBookmarkSheetController.h"
+#import "SKBookmarkController.h"
+#import "SKBookmark.h"
+#import "NSMenu_SKExtensions.h"
+//#import "NSWindowController_SKExtensions.h"
+
+
+@implementation SKBookmarkSheetController
+
+- (NSString *)windowNibName { return @"BookmarkSheet"; }
+
+- (void)addMenuItemsForBookmarks:(NSArray *)bookmarks level:(NSInteger)level toMenu:(NSMenu *)menu {
+    for (SKBookmark *bm in bookmarks) {
+        if ([bm bookmarkType] == SKBookmarkTypeFolder) {
+            NSString *label = [bm label];
+            NSMenuItem *item = [menu addItemWithTitle:label ?: @"" action:NULL keyEquivalent:@""];
+            [item setImageAndSize:[bm icon]];
+            [item setIndentationLevel:level];
+            [item setRepresentedObject:bm];
+            [self addMenuItemsForBookmarks:[bm children] level:level+1 toMenu:menu];
+        }
+    }
+}
+
+
+- (void)beginSheetModalForWindow:(NSWindow *)window completionHandler:(void (^)(NSInteger result))handler {
+    SKBookmarkController *bookmarkController = [SKBookmarkController sharedBookmarkController];
+    SKBookmark *root = [bookmarkController bookmarkRoot];
+
+    [_folderPopUp removeAllItems];
+    [self addMenuItemsForBookmarks:[NSArray arrayWithObjects:root, nil] level:0 toMenu:[_folderPopUp menu]];
+    [_folderPopUp selectItemAtIndex:0];
+    
+    
+    [NSApp beginSheet:[self window]
+       modalForWindow:window
+        modalDelegate:self
+       didEndSelector:@selector(didEndSheet:returnCode:contextInfo:)
+          contextInfo:(__bridge void * _Null_unspecified)(handler)];
+}
+
+- (SKBookmark *)selectedFolder {
+    return [[_folderPopUp selectedItem] representedObject];
+}
+
+- (IBAction)cancelButtonAction:(id)sender {
+    [NSApp endSheet:[self window]];
+    [[self window] orderOut:self];
+}
+
+- (IBAction)okButtonAction:(id)sender {
+    
+    
+    [NSApp endSheet:[self window]];
+    [[self window] orderOut:self];
+}
+
+@end

+ 18 - 0
PDF Office/PDF Master/Class/PDFTools/KMBookmark/Old/Controller/SKDocumentController.h

@@ -0,0 +1,18 @@
+//
+//  SKDocumentController.h
+//  PDF Reader Pro
+//
+//  Created by lizhe on 2024/2/23.
+//
+
+#import <Cocoa/Cocoa.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface SKDocumentController : NSDocumentController
+- (Class)documentClassForContentsOfURL:(NSURL *)inAbsoluteURL;
+
+- (id)openDocumentWithSetup:(NSDictionary *)setup error:(NSError **)outError;
+@end
+
+NS_ASSUME_NONNULL_END

+ 46 - 0
PDF Office/PDF Master/Class/PDFTools/KMBookmark/Old/Controller/SKDocumentController.m

@@ -0,0 +1,46 @@
+//
+//  SKDocumentController.m
+//  PDF Reader Pro
+//
+//  Created by lizhe on 2024/2/23.
+//
+
+#import "SKDocumentController.h"
+#import "SKAlias.h"
+
+NSString *SKDocumentSetupAliasKey = @"_BDAlias";
+NSString *SKDocumentSetupFileNameKey = @"fileName";
+
+@implementation SKDocumentController
+- (id)openDocumentWithSetup:(NSDictionary *)setup error:(NSError **)outError {
+    id document = nil;
+    NSURL *fileURL = [[SKAlias aliasWithData:[setup objectForKey:SKDocumentSetupAliasKey]] fileURL];
+    if (fileURL == nil && [setup objectForKey:SKDocumentSetupFileNameKey])
+        fileURL = [NSURL fileURLWithPath:[setup objectForKey:SKDocumentSetupFileNameKey]];
+    if (fileURL && [fileURL checkResourceIsReachableAndReturnError:NULL] && NO == [self isTrashedFileURL:fileURL]) {
+        if ((document = [self openDocumentWithContentsOfURL:fileURL display:NO error:outError])) {
+//            [document applySetup:setup];
+            [document showWindows];
+        }
+    } else if (outError) {
+        *outError = [NSError errorWithDomain:@"SKDocumentErrorDomain" code:2 userInfo:[NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Unable to load file", @"Error description"), NSLocalizedDescriptionKey, nil]];
+    }
+    return document;
+}
+
+- (BOOL)isTrashedFileURL:(NSURL *)url {
+    NSCParameterAssert([url isFileURL]);
+    FSRef fileRef;
+    Boolean result = false;
+    if (CFURLGetFSRef((CFURLRef)url, &fileRef)) {
+        FSDetermineIfRefIsEnclosedByFolder(0, kTrashFolderType, &fileRef, &result);
+        if (result == false)
+            FSDetermineIfRefIsEnclosedByFolder(0, kSystemTrashFolderType, &fileRef, &result);
+    }
+    return result;
+}
+
+- (Class)documentClassForContentsOfURL:(NSURL *)inAbsoluteURL {
+    return [self documentClassForType:[self typeForContentsOfURL:inAbsoluteURL error:NULL]];
+}
+@end

+ 74 - 0
PDF Office/PDF Master/Class/PDFTools/KMBookmark/Old/Extension/NSMenu_SKExtensions.h

@@ -0,0 +1,74 @@
+//
+//  NSMenu_SKExtensions.h
+//  Skim
+//
+//  Created by Christiaan Hofman on 6/11/08.
+/*
+ This software is Copyright (c) 2008-2018
+ Christiaan Hofman. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ - Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in
+    the documentation and/or other materials provided with the
+    distribution.
+
+ - Neither the name of Christiaan Hofman nor the names of any
+    contributors may be used to endorse or promote products derived
+    from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <Cocoa/Cocoa.h>
+
+
+@interface NSMenu (SKExtensions)
+
++ (NSMenu *)menu;
+
+- (NSMenuItem *)insertItemWithTitle:(NSString *)aString action:(SEL)aSelector target:(id)aTarget atIndex:(NSInteger)anIndex;
+- (NSMenuItem *)addItemWithTitle:(NSString *)aString action:(SEL)aSelector target:(id)aTarget;
+
+- (NSMenuItem *)insertItemWithTitle:(NSString *)aString action:(SEL)aSelector target:(id)aTarget tag:(NSInteger)aTag atIndex:(NSInteger)anIndex;
+- (NSMenuItem *)addItemWithTitle:(NSString *)aString action:(SEL)aSelector target:(id)aTarget tag:(NSInteger)aTag;
+
+- (NSMenuItem *)insertItemWithTitle:(NSString *)aString imageNamed:(NSString *)anImageName action:(SEL)aSelector target:(id)aTarget tag:(NSInteger)aTag atIndex:(NSInteger)anIndex;
+- (NSMenuItem *)addItemWithTitle:(NSString *)aString imageNamed:(NSString *)anImageName action:(SEL)aSelector target:(id)aTarget tag:(NSInteger)aTag;
+
+- (NSMenuItem *)insertItemWithSubmenuAndTitle:(NSString *)aString atIndex:(NSInteger)anIndex;
+- (NSMenuItem *)addItemWithSubmenuAndTitle:(NSString *)aString;
+
+@end
+
+
+@interface NSMenuItem (SKExtensions)
+
++ (NSMenuItem *)menuItemWithTitle:(NSString *)aString action:(SEL)aSelector target:(id)aTarget;
++ (NSMenuItem *)menuItemWithTitle:(NSString *)aString action:(SEL)aSelector target:(id)aTarget tag:(NSInteger)aTag;
++ (NSMenuItem *)menuItemWithSubmenuAndTitle:(NSString *)aString;
+
+- (id)initWithTitle:(NSString *)aString action:(SEL)aSelector target:(id)aTarget;
+- (id)initWithTitle:(NSString *)aString action:(SEL)aSelector target:(id)aTarget tag:(NSInteger)aTag;
+- (id)initWithTitle:(NSString *)aString imageNamed:(NSString *)anImageName action:(SEL)aSelector target:(id)aTarget tag:(NSInteger)aTag;
+- (id)initWithSubmenuAndTitle:(NSString *)aString;
+
+- (void)setImageAndSize:(NSImage *)image;
+
+@end

+ 147 - 0
PDF Office/PDF Master/Class/PDFTools/KMBookmark/Old/Extension/NSMenu_SKExtensions.m

@@ -0,0 +1,147 @@
+//
+//  NSMenu_SKExtensions.m
+//  Skim
+//
+//  Created by Christiaan Hofman on 6/11/08.
+/*
+ This software is Copyright (c) 2008-2018
+ Christiaan Hofman. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ - Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in
+    the documentation and/or other materials provided with the
+    distribution.
+
+ - Neither the name of Christiaan Hofman nor the names of any
+    contributors may be used to endorse or promote products derived
+    from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "NSMenu_SKExtensions.h"
+#import "NSImage_SKExtensions.h"
+
+
+@implementation NSMenu (SKExtensions)
+
++ (NSMenu *)menu {
+    return [[NSMenu alloc] initWithTitle:@""];
+}
+
+- (NSMenuItem *)insertItemWithTitle:(NSString *)aString action:(SEL)aSelector target:(id)aTarget atIndex:(NSInteger)anIndex {
+    NSMenuItem *item = [[NSMenuItem alloc] initWithTitle:aString action:aSelector target:aTarget];
+    [self insertItem:item atIndex:anIndex];
+    return item;
+}
+
+- (NSMenuItem *)addItemWithTitle:(NSString *)aString action:(SEL)aSelector target:(id)aTarget {
+    return [self insertItemWithTitle:aString action:aSelector target:aTarget atIndex:[self numberOfItems]];
+}
+
+- (NSMenuItem *)insertItemWithTitle:(NSString *)aString action:(SEL)aSelector target:(id)aTarget tag:(NSInteger)aTag atIndex:(NSInteger)anIndex {
+    NSMenuItem *item = [[NSMenuItem alloc] initWithTitle:aString action:aSelector target:aTarget tag:aTag];
+    [self insertItem:item atIndex:anIndex];
+    return item;
+}
+
+- (NSMenuItem *)addItemWithTitle:(NSString *)aString action:(SEL)aSelector target:(id)aTarget tag:(NSInteger)aTag {
+    return [self insertItemWithTitle:aString action:aSelector target:aTarget tag:aTag atIndex:[self numberOfItems]];
+}
+
+- (NSMenuItem *)insertItemWithTitle:(NSString *)aString imageNamed:(NSString *)anImageName action:(SEL)aSelector target:(id)aTarget tag:(NSInteger)aTag atIndex:(NSInteger)anIndex {
+    NSMenuItem *item = [[NSMenuItem alloc] initWithTitle:aString imageNamed:anImageName action:aSelector target:aTarget tag:aTag];
+    [self insertItem:item atIndex:anIndex];
+    return item;
+}
+
+- (NSMenuItem *)addItemWithTitle:(NSString *)aString imageNamed:(NSString *)anImageName action:(SEL)aSelector target:(id)aTarget tag:(NSInteger)aTag {
+    return [self insertItemWithTitle:aString imageNamed:anImageName action:aSelector target:aTarget tag:aTag atIndex:[self numberOfItems]];
+}
+
+- (NSMenuItem *)insertItemWithSubmenuAndTitle:(NSString *)aString atIndex:(NSInteger)anIndex {
+    NSMenuItem *item = [[NSMenuItem alloc] initWithSubmenuAndTitle:aString];
+    [self insertItem:item atIndex:anIndex];
+    return item;
+}
+
+- (NSMenuItem *)addItemWithSubmenuAndTitle:(NSString *)aString {
+    return [self insertItemWithSubmenuAndTitle:aString atIndex:[self numberOfItems]];
+}
+
+@end
+
+
+@implementation NSMenuItem (SKExtensions)
+
++ (NSMenuItem *)menuItemWithTitle:(NSString *)aString action:(SEL)aSelector target:(id)aTarget {
+    return [[NSMenuItem alloc] initWithTitle:aString action:aSelector target:aTarget];
+}
+
++ (NSMenuItem *)menuItemWithTitle:(NSString *)aString action:(SEL)aSelector target:(id)aTarget tag:(NSInteger)aTag {
+    return [[NSMenuItem alloc] initWithTitle:aString action:aSelector target:aTarget tag:aTag];
+}
+
++ (NSMenuItem *)menuItemWithSubmenuAndTitle:(NSString *)aString {
+    return [[NSMenuItem alloc] initWithSubmenuAndTitle:aString];
+}
+
+- (id)initWithTitle:(NSString *)aString action:(SEL)aSelector target:(id)aTarget {
+    return [self initWithTitle:aString imageNamed:nil action:aSelector target:aTarget tag:0];
+}
+
+- (id)initWithTitle:(NSString *)aString action:(SEL)aSelector target:(id)aTarget tag:(NSInteger)aTag {
+    return [self initWithTitle:aString imageNamed:nil action:aSelector target:aTarget tag:aTag];
+}
+
+- (id)initWithTitle:(NSString *)aString imageNamed:(NSString *)anImageName action:(SEL)aSelector target:(id)aTarget tag:(NSInteger)aTag {
+    self = [self initWithTitle:aString action:aSelector keyEquivalent:@""];
+    if (self) {
+        if (anImageName)
+            [self setImage:[NSImage imageNamed:anImageName]];
+        [self setTarget:aTarget];
+        [self setTag:aTag];
+    }
+    return self;
+}
+
+- (id)initWithSubmenuAndTitle:(NSString *)aString {
+    self = [self initWithTitle:aString action:NULL keyEquivalent:@""];
+    if (self) {
+        NSMenu *menu = [[NSMenu alloc] initWithTitle:aString];
+        [self setSubmenu:menu];
+    }
+    return self;
+}
+
+- (void)setImageAndSize:(NSImage *)image {
+    NSSize dstSize = NSMakeSize(16.0, 16.0);
+    NSSize srcSize = [image size];
+    if (NSEqualSizes(srcSize, dstSize)) {
+        [self setImage:image];
+    } else {
+        NSImage *newImage = [NSImage bitmapImageWithSize:dstSize drawingHandler:^(NSRect rect) {
+            [image drawInRect:rect fromRect:NSZeroRect operation:NSCompositeCopy fraction:1.0];
+        }];
+        [self setImage:newImage];
+    }
+}
+        
+@end

+ 97 - 0
PDF Office/PDF Master/Class/PDFTools/KMBookmark/Old/Model/SKBookmark.h

@@ -0,0 +1,97 @@
+//
+//  SKBookmark.h
+//  Skim
+//
+//  Created by Christiaan Hofman on 9/15/07.
+/*
+ This software is Copyright (c) 2007-2018
+ Christiaan Hofman. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ - Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in
+    the documentation and/or other materials provided with the
+    distribution.
+
+ - Neither the name of Christiaan Hofman nor the names of any
+    contributors may be used to endorse or promote products derived
+    from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <Cocoa/Cocoa.h>
+#import <Quartz/Quartz.h>
+
+typedef NS_ENUM(NSInteger, SKBookmarkType) {
+    SKBookmarkTypeBookmark,
+    SKBookmarkTypeFolder,
+    SKBookmarkTypeSession,
+    SKBookmarkTypeSeparator
+};
+
+@interface SKBookmark : NSObject <NSCopying, QLPreviewItem> {
+    SKBookmark *parent;
+}
+
++ (id)bookmarkWithURL:(NSURL *)aURL pageIndex:(NSUInteger)aPageIndex label:(NSString *)aLabel;
++ (id)bookmarkWithSetup:(NSDictionary *)aSetupDict label:(NSString *)aLabel;
++ (id)bookmarkFolderWithLabel:(NSString *)aLabel;
++ (id)bookmarkSessionWithSetups:(NSArray *)aSetupDicts label:(NSString *)aLabel;
++ (id)bookmarkSeparator;
+
++ (NSArray *)bookmarksForURLs:(NSArray *)urls;
+
+- (id)initWithURL:(NSURL *)aURL pageIndex:(NSUInteger)aPageIndex label:(NSString *)aLabel;
+- (id)initWithSetup:(NSDictionary *)aSetupDict label:(NSString *)aLabel;
+- (id)initFolderWithChildren:(NSArray *)aChildren label:(NSString *)aLabel;
+- (id)initFolderWithLabel:(NSString *)aLabel;
+- (id)initRootWithChildrenProperties:(NSArray *)childrenProperties;
+- (id)initSessionWithSetups:(NSArray *)aSetupDicts label:(NSString *)aLabel;
+- (id)initSeparator;
+- (id)initWithProperties:(NSDictionary *)dictionary;
+
+@property (nonatomic, readonly) NSDictionary *properties;
+@property (nonatomic, readonly) SKBookmarkType bookmarkType;
+@property (nonatomic, retain) NSString *label;
+@property (nonatomic, readonly) NSImage *icon, *alternateIcon;
+@property (nonatomic, readonly) NSURL *fileURL;
+@property (nonatomic) NSUInteger pageIndex;
+@property (nonatomic, retain) NSNumber *pageNumber;
+@property (nonatomic, assign) SKBookmark *parent;
+
+- (NSArray *)children;
+- (NSUInteger)countOfChildren;
+- (SKBookmark *)objectInChildrenAtIndex:(NSUInteger)anIndex;
+- (void)insertObject:(SKBookmark *)child inChildrenAtIndex:(NSUInteger)anIndex;
+- (void)removeObjectFromChildrenAtIndex:(NSUInteger)anIndex;
+
+@property (nonatomic, readonly) SKBookmark *scriptingParent;
+@property (nonatomic, readonly) NSArray *entireContents;
+
+- (NSArray *)bookmarks;
+- (void)insertObject:(SKBookmark *)bookmark inBookmarksAtIndex:(NSUInteger)anIndex;
+- (void)removeObjectFromBookmarksAtIndex:(NSUInteger)anIndex;
+
+- (BOOL)isDescendantOf:(SKBookmark *)bookmark;
+- (BOOL)isDescendantOfArray:(NSArray *)bookmarks;
+
+- (void)open;
+
+@end

+ 711 - 0
PDF Office/PDF Master/Class/PDFTools/KMBookmark/Old/Model/SKBookmark.m

@@ -0,0 +1,711 @@
+//
+//  SKBookmark.m
+//  Skim
+//
+//  Created by Christiaan Hofman on 9/15/07.
+/*
+ This software is Copyright (c) 2007-2018
+ Christiaan Hofman. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ - Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in
+    the documentation and/or other materials provided with the
+    distribution.
+
+ - Neither the name of Christiaan Hofman nor the names of any
+    contributors may be used to endorse or promote products derived
+    from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "SKBookmark.h"
+#import "SKAlias.h"
+#import "NSImage_SKExtensions.h"
+//#import "NSDocument_SKExtensions.h"
+#import "SKDocumentController.h"
+//#import "NSURL_SKExtensions.h"
+//#import "SKMainDocument.h"
+//#import "SKMainWindowController.h"
+//#import "NSError_SKExtensions.h"
+//#import "NSShadow_SKExtensions.h"
+
+#define BOOKMARK_STRING     @"bookmark"
+#define SESSION_STRING      @"session"
+#define FOLDER_STRING       @"folder"
+#define SEPARATOR_STRING    @"separator"
+
+#define PROPERTIES_KEY  @"properties"
+#define CHILDREN_KEY    @"children"
+#define LABEL_KEY       @"label"
+#define PAGEINDEX_KEY   @"pageIndex"
+#define ALIASDATA_KEY   @"_BDAlias"
+#define TYPE_KEY        @"type"
+
+NSString *SKFolderDocumentType = @"public.folder";
+@interface SKFileBookmark : SKBookmark {
+    SKAlias *alias;
+    NSData *aliasData;
+    NSString *label;
+    NSUInteger pageIndex;
+    NSDictionary *setup;
+}
+- (id)initWithAliasData:(NSData *)aData pageIndex:(NSUInteger)aPageIndex label:(NSString *)aLabel;
+- (SKAlias *)alias;
+- (NSData *)aliasData;
+@end
+
+@interface SKFolderBookmark : SKBookmark {
+    NSString *label;
+    NSMutableArray *children;
+}
+@end
+
+@interface SKRootBookmark : SKFolderBookmark
+@end
+
+@interface SKSessionBookmark : SKFolderBookmark
+@end
+
+@interface SKSeparatorBookmark : SKBookmark
+@end
+
+#pragma mark -
+
+@implementation SKBookmark
++ (id)bookmarkWithURL:(NSURL *)aURL pageIndex:(NSUInteger)aPageIndex label:(NSString *)aLabel {
+    return [[self alloc] initWithURL:aURL pageIndex:aPageIndex label:aLabel];
+}
+
++ (id)bookmarkWithSetup:(NSDictionary *)aSetupDict label:(NSString *)aLabel {
+    return [[self alloc] initWithSetup:aSetupDict label:aLabel];
+}
+
++ (id)bookmarkFolderWithLabel:(NSString *)aLabel {
+    return [[self alloc] initFolderWithLabel:aLabel];
+}
+
++ (id)bookmarkSessionWithSetups:(NSArray *)aSetupDicts label:(NSString *)aLabel {
+    return [[self alloc] initSessionWithSetups:aSetupDicts label:aLabel];
+}
+
++ (id)bookmarkSeparator {
+    return [[self alloc] initSeparator];
+}
+
++ (NSArray *)bookmarksForURLs:(NSArray *)urls {
+    NSFileManager *fm = [NSFileManager defaultManager];
+    NSDocumentController *dc = [NSDocumentController sharedDocumentController];
+    NSMutableArray *array = [NSMutableArray array];
+    
+    for (NSURL *url in urls) {
+        NSString *fileType = [dc typeForContentsOfURL:url error:NULL];
+        Class docClass;
+        SKBookmark *bookmark;
+        NSString *label = nil;
+        [url getResourceValue:&label forKey:NSURLLocalizedNameKey error:NULL];
+        if ([[NSWorkspace sharedWorkspace] type:fileType conformsToType:SKFolderDocumentType]) {
+            NSArray *children = [self bookmarksForURLs:[fm contentsOfDirectoryAtURL:url includingPropertiesForKeys:nil options:NSDirectoryEnumerationSkipsHiddenFiles error:NULL]];
+            if ([children count] && (bookmark = [[self alloc] initFolderWithChildren:children label:label])) {
+                [array addObject:bookmark];
+            }
+        } else if ((docClass = [dc documentClassForType:fileType])) {
+            if ((bookmark = [[self alloc] initWithURL:url pageIndex:0 label:label])) {
+                [array addObject:bookmark];
+            }
+        }
+    }
+    
+    return array;
+}
+
+- (id)initWithURL:(NSURL *)aURL pageIndex:(NSUInteger)aPageIndex label:(NSString *)aLabel {
+    return [[SKFileBookmark alloc] initWithURL:aURL pageIndex:aPageIndex label:aLabel];
+}
+
+- (id)initWithSetup:(NSDictionary *)aSetupDict label:(NSString *)aLabel {
+    return [[SKFileBookmark alloc] initWithSetup:aSetupDict label:aLabel];
+}
+
+- (id)initFolderWithChildren:(NSArray *)aChildren label:(NSString *)aLabel {
+    return [[SKFolderBookmark alloc] initFolderWithChildren:aChildren label:aLabel];
+}
+
+- (id)initFolderWithLabel:(NSString *)aLabel {
+    return [self initFolderWithChildren:nil label:aLabel];
+}
+
+- (id)initRootWithChildrenProperties:(NSArray *)childrenProperties {
+    NSMutableArray *aChildren = [NSMutableArray array];
+    SKBookmark *child;
+    for (NSDictionary *dict in childrenProperties) {
+        if ((child = [[SKBookmark alloc] initWithProperties:dict])) {
+            [aChildren addObject:child];
+        }
+    }
+    return [[SKRootBookmark alloc] initFolderWithChildren:aChildren label:NSLocalizedString(@"Bookmarks Menu", @"Menu item title")];
+}
+
+- (id)initSessionWithSetups:(NSArray *)aSetupDicts label:(NSString *)aLabel {
+    NSMutableArray *aChildren = [NSMutableArray array];
+    SKBookmark *child;
+    for (NSDictionary *setup in aSetupDicts) {
+        if ((child = [[SKBookmark alloc] initWithSetup:setup label:@""])) {
+            [aChildren addObject:child];
+        }
+    }
+    return [[SKSessionBookmark alloc] initFolderWithChildren:aChildren label:aLabel];
+}
+
+- (id)initSeparator {
+    return [[SKSeparatorBookmark alloc] init];
+}
+
+- (id)initWithProperties:(NSDictionary *)dictionary {
+    NSString *type = [dictionary objectForKey:TYPE_KEY];
+    if ([type isEqualToString:SEPARATOR_STRING]) {
+        return (id)[[SKSeparatorBookmark alloc] init];
+    } else if ([type isEqualToString:FOLDER_STRING] || [type isEqualToString:SESSION_STRING]) {
+        Class bookmarkClass = [type isEqualToString:FOLDER_STRING] ? [SKFolderBookmark class] : [SKSessionBookmark class];
+        NSMutableArray *newChildren = [NSMutableArray array];
+        SKBookmark *child;
+        for (NSDictionary *dict in [dictionary objectForKey:CHILDREN_KEY]) {
+            if ((child = [[SKBookmark alloc] initWithProperties:dict])) {
+                [newChildren addObject:child];
+            } else
+                NSLog(@"Failed to read child bookmark: %@", dict);
+        }
+        return (id)[[bookmarkClass alloc] initFolderWithChildren:newChildren label:[dictionary objectForKey:LABEL_KEY]];
+    } else if ([dictionary objectForKey:@"windowFrame"]) {
+        return (id)[[SKFileBookmark alloc] initWithSetup:dictionary label:[dictionary objectForKey:LABEL_KEY]];
+    } else {
+        NSNumber *pageIndex = [dictionary objectForKey:PAGEINDEX_KEY];
+        return (id)[[SKFileBookmark alloc] initWithAliasData:[dictionary objectForKey:ALIASDATA_KEY] pageIndex:(pageIndex ? [pageIndex unsignedIntegerValue] : NSNotFound) label:[dictionary objectForKey:LABEL_KEY]];
+    }
+}
+
+- (id)copyWithZone:(NSZone *)aZone { 	 
+    return [[SKBookmark alloc] initWithProperties:[self properties]];
+}
+
+- (void)dealloc {
+    parent = nil;
+}
+
+- (NSDictionary *)properties { return nil; }
+
+- (SKBookmarkType)bookmarkType { return SKBookmarkTypeSeparator; }
+
+- (NSImage *)icon { return nil; }
+- (NSImage *)alternateIcon { return [self icon]; }
+
+- (NSString *)label { return nil; }
+- (void)setLabel:(NSString *)newLabel {}
+
+- (NSURL *)fileURL { return nil; }
+- (NSUInteger)pageIndex { return NSNotFound; }
+- (void)setPageIndex:(NSUInteger)newPageIndex {}
+- (NSNumber *)pageNumber { return nil; }
+- (void)setPageNumber:(NSNumber *)newPageNumber {}
+
+- (NSURL *)previewItemURL { return [self fileURL]; }
+- (NSString *)previewItemTitle { return [self label]; }
+
+- (NSArray *)children { return nil; }
+- (NSUInteger)countOfChildren { return 0; }
+- (SKBookmark *)objectInChildrenAtIndex:(NSUInteger)anIndex { return nil; }
+- (void)insertObject:(SKBookmark *)child inChildrenAtIndex:(NSUInteger)anIndex {}
+- (void)removeObjectFromChildrenAtIndex:(NSUInteger)anIndex {}
+
+- (id)objectSpecifier {
+    NSUInteger idx = [[parent children] indexOfObjectIdenticalTo:self];
+    if (idx != NSNotFound) {
+        NSScriptObjectSpecifier *containerRef = nil;
+        NSScriptClassDescription *containerClassDescription = nil;
+        if ([parent parent]) {
+            containerRef = [parent objectSpecifier];
+            containerClassDescription = [containerRef keyClassDescription];
+        } else {
+            containerClassDescription = [NSScriptClassDescription classDescriptionForClass:[NSApp class]];
+        }
+        return [[NSIndexSpecifier allocWithZone:CFBridgingRetain(self)] initWithContainerClassDescription:containerClassDescription containerSpecifier:containerRef key:@"bookmarks" index:idx];
+    } else {
+        return nil;
+    }
+}
+
+- (SKBookmark *)scriptingParent {
+    return [parent parent] == nil ? nil : parent;
+}
+
+- (NSArray *)entireContents { return nil; }
+
+- (NSArray *)bookmarks {
+    return [self children];
+}
+
+- (void)insertObject:(SKBookmark *)bookmark inBookmarksAtIndex:(NSUInteger)anIndex {
+    [self insertObject:bookmark inChildrenAtIndex:anIndex];
+}
+
+- (void)removeObjectFromBookmarksAtIndex:(NSUInteger)anIndex {
+    [self removeObjectFromChildrenAtIndex:anIndex];
+}
+
+- (id)newScriptingObjectOfClass:(Class)objectClass forValueForKey:(NSString *)key withContentsValue:(id)contentsValue properties:(NSDictionary *)properties {
+    if ([key isEqualToString:@"bookmarks"]) {
+        [[NSScriptCommand currentCommand] setScriptErrorNumber:NSReceiversCantHandleCommandScriptError];
+        [[NSScriptCommand currentCommand] setScriptErrorString:@"Invalid container for new bookmark."];
+        return nil;
+    }
+    return [super newScriptingObjectOfClass:objectClass forValueForKey:key withContentsValue:contentsValue properties:properties];
+}
+
+- (BOOL)isDescendantOf:(SKBookmark *)bookmark {
+    if (self == bookmark)
+        return YES;
+    for (SKBookmark *child in [bookmark children]) {
+        if ([self isDescendantOf:child])
+            return YES;
+    }
+    return NO;
+}
+
+- (BOOL)isDescendantOfArray:(NSArray *)bookmarks {
+    for (SKBookmark *bm in bookmarks) {
+        if ([self isDescendantOf:bm]) return YES;
+    }
+    return NO;
+}
+
+- (void)open {}
+
+@end
+#pragma mark -
+
+@implementation SKFileBookmark
+
++ (NSImage *)missingFileImage {
+    static NSImage *image = nil;
+    if (image == nil) {
+        image = [NSImage imageWithSize:NSMakeSize(16.0, 16.0) drawingHandler:^(NSRect rect) {
+            NSImage *genericDocImage = [[NSWorkspace sharedWorkspace] iconForFileType:NSFileTypeForHFSTypeCode(kGenericDocumentIcon)];
+            NSImage *questionMark = [[NSWorkspace sharedWorkspace] iconForFileType:NSFileTypeForHFSTypeCode(kQuestionMarkIcon)];
+            [genericDocImage drawInRect:rect fromRect:NSZeroRect operation:NSCompositeCopy fraction:0.7];
+            [questionMark drawInRect:NSMakeRect(3.0, 2.0, 10.0, 10.0) fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:0.7];
+            return YES;
+        }];
+    }
+    return image;
+}
+
+- (id)initWithURL:(NSURL *)aURL pageIndex:(NSUInteger)aPageIndex label:(NSString *)aLabel {
+    self = [super init];
+    if (self) {
+        alias = [[SKAlias alloc] initWithURL:aURL];
+        if (alias) {
+            aliasData = [alias data];
+            pageIndex = aPageIndex;
+            label = [aLabel copy];
+            setup = nil;
+        } else {
+            self = nil;
+        }
+    }
+    return self;
+}
+
+- (id)initWithAliasData:(NSData *)aData pageIndex:(NSUInteger)aPageIndex label:(NSString *)aLabel {
+    self = [super init];
+    if (self) {
+        alias = [[SKAlias alloc] initWithData:aData];
+        if (aData && alias) {
+            aliasData = aData;
+            pageIndex = aPageIndex;
+            label = [aLabel copy];
+            setup = nil;
+        } else {
+            self = nil;
+        }
+    }
+    return self;
+}
+
+- (id)initWithSetup:(NSDictionary *)aSetupDict label:(NSString *)aLabel {
+    NSNumber *pageIndexNumber = [aSetupDict objectForKey:PAGEINDEX_KEY];
+    self = [self initWithAliasData:[aSetupDict objectForKey:ALIASDATA_KEY] pageIndex:(pageIndexNumber ? [pageIndexNumber unsignedIntegerValue] : NSNotFound) label:aLabel];
+    if (self) {
+        setup = [aSetupDict copy];
+    }
+    return self;
+}
+
+- (void)dealloc {
+//    SKDESTROY(alias);
+//    SKDESTROY(aliasData);
+//    SKDESTROY(label);
+//    SKDESTROY(setup);
+//    [super dealloc];
+}
+
+- (NSString *)description {
+    return [NSString stringWithFormat:@"<%@: label=%@, path=%@, page=%lu>", [self class], label, [[self fileURL] path], (unsigned long)pageIndex];
+}
+
+- (NSDictionary *)properties {
+    NSMutableDictionary *properties = [NSMutableDictionary dictionaryWithDictionary:setup];
+    [properties addEntriesFromDictionary:[NSDictionary dictionaryWithObjectsAndKeys:BOOKMARK_STRING, TYPE_KEY, [self aliasData], ALIASDATA_KEY, [NSNumber numberWithUnsignedInteger:pageIndex], PAGEINDEX_KEY, label, LABEL_KEY, nil]];
+    return properties;
+}
+
+- (SKBookmarkType)bookmarkType {
+    return SKBookmarkTypeBookmark;
+}
+
+- (NSURL *)fileURL {
+    return [alias fileURLNoUI];
+}
+
+- (SKAlias *)alias {
+    return alias;
+}
+
+- (NSData *)aliasData {
+    NSData *data = nil;
+    if ([self fileURL])
+        data = [alias data];
+    return data ?: aliasData;
+}
+
+- (NSImage *)icon {
+    NSURL *fileURL = [self fileURL];
+    return fileURL ? [[NSWorkspace sharedWorkspace] iconForFile:[fileURL path]] : [[self class] missingFileImage];
+}
+
+- (NSUInteger)pageIndex {
+    return pageIndex;
+}
+
+- (void)setPageIndex:(NSUInteger)newPageIndex { pageIndex = newPageIndex; }
+
+- (NSNumber *)pageNumber {
+    return pageIndex == NSNotFound ? nil : [NSNumber numberWithUnsignedInteger:pageIndex + 1];
+}
+
+- (void)setPageNumber:(NSNumber *)newPageNumber {
+    NSUInteger newNumber = [newPageNumber unsignedIntegerValue];
+    if (newNumber > 0)
+        [self setPageIndex:newNumber - 1];
+}
+
+- (NSString *)label {
+    NSString *theLabel = label;
+    if ([theLabel length] == 0)
+        [[self fileURL] getResourceValue:&theLabel forKey:NSURLLocalizedNameKey error:NULL];
+    return theLabel ?: @"";
+}
+
+- (void)setLabel:(NSString *)newLabel {
+    if (label != newLabel) {
+        label = newLabel;
+    }
+}
+
+- (void)open {
+    id document = nil;
+    NSError *error = nil;
+    if (setup) {
+        document = [[NSDocumentController sharedDocumentController] openDocumentWithSetup:[self properties] error:&error];
+    } else {
+//        // we allow UI when resolving alias for opening the bookmark, so don't use -fileURL, also consistent with openDocumentWithSetup:error:
+//        NSURL *fileURL = [alias fileURL];
+//        if (fileURL && NO == [fileURL isTrashedFileURL] && 
+//            (document = [[NSDocumentController sharedDocumentController] openDocumentWithContentsOfURL:fileURL display:YES error:&error]) &&
+//            [document isPDFDocument] && [self pageIndex] != NSNotFound)
+//            [[document mainWindowController] setPageNumber:[self pageIndex] + 1];
+    }
+//    if (document == nil && error && [error isUserCancelledError] == NO)
+//        [NSApp presentError:error];
+}
+
+@end
+
+#pragma mark -
+
+@implementation SKFolderBookmark
+
+- (id)initFolderWithChildren:(NSArray *)aChildren label:(NSString *)aLabel {
+    self = [super init];
+    if (self) {
+        label = [aLabel copy];
+        children = [[NSMutableArray alloc] initWithArray:aChildren];
+        [children makeObjectsPerformSelector:@selector(setParent:) withObject:self];
+    }
+    return self;
+}
+
+- (void)dealloc {
+//    SKDESTROY(label);
+//    SKDESTROY(children);
+//    [super dealloc];
+}
+
+- (NSString *)description {
+    return [NSString stringWithFormat:@"<%@: label=%@, children=%@>", [self class], label, children];
+}
+
+- (NSDictionary *)properties {
+    return [NSDictionary dictionaryWithObjectsAndKeys:FOLDER_STRING, TYPE_KEY, [children valueForKey:PROPERTIES_KEY], CHILDREN_KEY, label, LABEL_KEY, nil];
+}
+
+- (SKBookmarkType)bookmarkType {
+    return SKBookmarkTypeFolder;
+}
+
+- (NSImage *)icon {
+    return [NSImage imageNamed:NSImageNameFolder];
+}
+
+- (NSImage *)alternateIcon {
+    return [NSImage imageNamed:NSImageNameMultipleDocuments];
+}
+
+- (NSString *)label {
+    return label ?: @"";
+}
+
+- (void)setLabel:(NSString *)newLabel {
+    if (label != newLabel) {
+        label = newLabel;
+    }
+}
+
+- (NSArray *)children {
+    return [children copy];
+}
+
+- (NSUInteger)countOfChildren {
+    return [children count];
+}
+
+- (SKBookmark *)objectInChildrenAtIndex:(NSUInteger)anIndex {
+    return [children objectAtIndex:anIndex];
+}
+
+- (void)insertObject:(SKBookmark *)child inChildrenAtIndex:(NSUInteger)anIndex {
+    [children insertObject:child atIndex:anIndex];
+    [child setParent:self];
+}
+
+- (void)removeObjectFromChildrenAtIndex:(NSUInteger)anIndex {
+    [[children objectAtIndex:anIndex] setParent:nil];
+    [children removeObjectAtIndex:anIndex];
+}
+
+- (NSArray *)entireContents {
+    NSMutableArray *contents = [NSMutableArray array];
+    for (SKBookmark *bookmark in [self children]) {
+        [contents addObject:bookmark];
+        [contents addObjectsFromArray:[bookmark entireContents]];
+    }
+    return contents;
+}
+
+- (id)newScriptingObjectOfClass:(Class)objectClass forValueForKey:(NSString *)key withContentsValue:(id)contentsValue properties:(NSDictionary *)properties {
+    if ([key isEqualToString:@"bookmarks"]) {
+        SKBookmark *bookmark = nil;
+        NSURL *aURL = [properties objectForKey:@"scriptingFile"] ?: contentsValue;
+        NSString *aLabel = [properties objectForKey:@"label"];
+        NSNumber *aType = [properties objectForKey:@"bookmarkType"];
+        NSInteger type;
+        if ([aType respondsToSelector:@selector(integerValue)])
+            type = [aType integerValue];
+        else if (aURL == nil)
+            type = SKBookmarkTypeSession;
+        else if ([[NSWorkspace sharedWorkspace] type:[[NSWorkspace sharedWorkspace] typeOfFile:[aURL path] error:NULL] conformsToType:(NSString *)kUTTypeFolder])
+            type = SKBookmarkTypeFolder;
+        else
+            type = SKBookmarkTypeBookmark;
+        switch (type) {
+            case SKBookmarkTypeBookmark:
+            {
+                Class docClass;
+                if (aURL == nil) {
+                    [[NSScriptCommand currentCommand] setScriptErrorNumber:NSRequiredArgumentsMissingScriptError];
+                    [[NSScriptCommand currentCommand] setScriptErrorString:@"New file bookmark requires a file."];
+                } else if ([aURL checkResourceIsReachableAndReturnError:NULL] == NO) {
+                    [[NSScriptCommand currentCommand] setScriptErrorNumber:NSArgumentsWrongScriptError];
+                    [[NSScriptCommand currentCommand] setScriptErrorString:@"New file bookmark requires an existing file."];
+                } else if ((docClass = [[NSDocumentController sharedDocumentController] documentClassForContentsOfURL:aURL])) {
+                    NSUInteger aPageNumber = [[properties objectForKey:@"pageNumber"] unsignedIntegerValue];
+                    if (aPageNumber > 0)
+                        aPageNumber--;
+//                    else
+//                        aPageNumber = [docClass isPDFDocument] ? 0 : NSNotFound;
+                    if (aLabel == nil)
+                        [aURL getResourceValue:&aLabel forKey:NSURLLocalizedNameKey error:NULL];
+                    bookmark = [[SKBookmark alloc] initWithURL:aURL pageIndex:aPageNumber label:aLabel ?: @""];
+                } else {
+                    [[NSScriptCommand currentCommand] setScriptErrorNumber:NSArgumentsWrongScriptError];
+                    [[NSScriptCommand currentCommand] setScriptErrorString:@"Unsupported file type for new bookmark."];
+                }
+                break;
+            }
+            case SKBookmarkTypeFolder:
+            {
+                NSArray *aChildren = nil;
+                if (aURL) {
+                    aChildren = [SKBookmark bookmarksForURLs:[[NSFileManager defaultManager] contentsOfDirectoryAtURL:aURL includingPropertiesForKeys:nil options:NSDirectoryEnumerationSkipsHiddenFiles error:NULL]];
+                    if (aLabel == nil)
+                        [aURL getResourceValue:&aLabel forKey:NSURLLocalizedNameKey error:NULL];
+                }
+                bookmark = [[SKBookmark alloc] initFolderWithChildren:aChildren label:aLabel ?: @""];
+                break;
+            }
+            case SKBookmarkTypeSession:
+            {
+                NSArray *setups = [[NSApp orderedDocuments] valueForKey:@"currentDocumentSetup"];
+                bookmark = [[SKBookmark alloc] initSessionWithSetups:setups label:aLabel ?: @""];
+                break;
+            }
+            case SKBookmarkTypeSeparator:
+                bookmark = [[SKBookmark alloc] initSeparator];
+                break;
+            default:
+                [[NSScriptCommand currentCommand] setScriptErrorNumber:NSArgumentsWrongScriptError];
+                [[NSScriptCommand currentCommand] setScriptErrorString:@"New bookmark requires a supported bookmark type."];
+                break;
+        }
+        return bookmark;
+    }
+    return [super newScriptingObjectOfClass:objectClass forValueForKey:key withContentsValue:contentsValue properties:properties];
+}
+
+- (void)open {
+    NSInteger i = [children count];
+    while (i--)
+        [[children objectAtIndex:i] open];
+}
+
+@end
+
+#pragma mark -
+
+@implementation SKRootBookmark
+
+- (NSImage *)icon {
+    static NSImage *menuIcon = nil;
+    if (menuIcon == nil) {
+        menuIcon = [NSImage imageWithSize:NSMakeSize(16.0, 16.0) drawingHandler:^(NSRect rect){
+            [[NSColor colorWithCalibratedWhite:0.0 alpha:0.2] set];
+            [NSBezierPath fillRect:NSMakeRect(1.0, 1.0, 14.0, 13.0)];
+            [NSGraphicsContext saveGraphicsState];
+            NSBezierPath *path = [NSBezierPath bezierPath];
+            [path moveToPoint:NSMakePoint(2.0, 2.0)];
+            [path lineToPoint:NSMakePoint(2.0, 15.0)];
+            [path lineToPoint:NSMakePoint(7.0, 15.0)];
+            [path lineToPoint:NSMakePoint(7.0, 13.0)];
+            [path lineToPoint:NSMakePoint(14.0, 13.0)];
+            [path lineToPoint:NSMakePoint(14.0, 2.0)];
+            [path closePath];
+            [[NSColor whiteColor] set];
+            [NSShadow setShadowWithColor:[NSColor colorWithCalibratedWhite:0.0 alpha:0.33333] blurRadius:2.0 yOffset:-1.0];
+            [path fill];
+            [NSGraphicsContext restoreGraphicsState];
+            [[NSColor colorWithCalibratedRed:0.162 green:0.304 blue:0.755 alpha:1.0] set];
+            NSRectFill(NSMakeRect(2.0, 13.0, 5.0, 2.0));
+            [[NSColor colorWithCalibratedRed:0.894 green:0.396 blue:0.202 alpha:1.0] set];
+            NSRectFill(NSMakeRect(3.0, 4.0, 1.0, 1.0));
+            NSRectFill(NSMakeRect(3.0, 7.0, 1.0, 1.0));
+            NSRectFill(NSMakeRect(3.0, 10.0, 1.0, 1.0));
+            [[NSColor colorWithCalibratedWhite:0.6 alpha:1.0] set];
+            NSRectFill(NSMakeRect(5.0, 4.0, 1.0, 1.0));
+            NSRectFill(NSMakeRect(5.0, 7.0, 1.0, 1.0));
+            NSRectFill(NSMakeRect(5.0, 10.0, 1.0, 1.0));
+            NSUInteger i, j;
+            for (i = 0; i < 7; i++) {
+                for (j = 0; j < 3; j++) {
+                    [[NSColor colorWithCalibratedWhite:0.45 + 0.1 * rand() / RAND_MAX alpha:1.0] set];
+                    NSRectFill(NSMakeRect(6.0 + i, 4.0 + 3.0 * j, 1.0, 1.0));
+                }
+            }
+            NSGradient *gradient = [[NSGradient alloc] initWithStartingColor:[NSColor colorWithCalibratedWhite:0.0 alpha:0.1] endingColor:[NSColor colorWithCalibratedWhite:0.0 alpha:0.0]];
+            [gradient drawInRect:NSMakeRect(2.0, 2.0, 12.0,11.0) angle:90.0];
+            return YES;
+        }];
+    }
+    return menuIcon;
+}
+
+@end
+
+#pragma mark -
+
+@implementation SKSessionBookmark
+
+- (NSDictionary *)properties {
+    return [NSDictionary dictionaryWithObjectsAndKeys:SESSION_STRING, TYPE_KEY, [children valueForKey:PROPERTIES_KEY], CHILDREN_KEY, label, LABEL_KEY, nil];
+}
+
+- (SKBookmarkType)bookmarkType {
+    return SKBookmarkTypeSession;
+}
+
+- (NSImage *)icon {
+    return [NSImage imageNamed:NSImageNameMultipleDocuments];
+}
+
+- (NSImage *)alternateIcon {
+    return [NSImage imageNamed:NSImageNameFolder];
+}
+
+- (void)insertObject:(SKBookmark *)child inChildrenAtIndex:(NSUInteger)anIndex {}
+- (void)removeObjectFromChildrenAtIndex:(NSUInteger)anIndex {}
+
+- (NSArray *)entireContents { return nil; }
+
+- (id)newScriptingObjectOfClass:(Class)objectClass forValueForKey:(NSString *)key withContentsValue:(id)contentsValue properties:(NSDictionary *)properties {
+    if ([key isEqualToString:@"bookmarks"]) {
+        [[NSScriptCommand currentCommand] setScriptErrorNumber:NSReceiversCantHandleCommandScriptError];
+        [[NSScriptCommand currentCommand] setScriptErrorString:@"Invalid container for new bookmark."];
+        return nil;
+    }
+    return [super newScriptingObjectOfClass:objectClass forValueForKey:key withContentsValue:contentsValue properties:properties];
+}
+
+@end
+
+#pragma mark -
+
+@implementation SKSeparatorBookmark
+
+- (NSString *)description {
+    return [NSString stringWithFormat:@"<%@: separator>", [self class]];
+}
+
+- (NSDictionary *)properties {
+    return [NSDictionary dictionaryWithObjectsAndKeys:SEPARATOR_STRING, TYPE_KEY, nil];
+}
+
+- (SKBookmarkType)bookmarkType {
+    return SKBookmarkTypeSeparator;
+}
+
+@end

+ 56 - 0
PDF Office/PDF Master/Class/PDFTools/KMBookmark/Old/SKAlias/SKAlias.h

@@ -0,0 +1,56 @@
+//
+//  SKAlias.h
+//  Skim
+//
+//  Created by Christiaan Hofman on 1/21/13.
+/*
+ This software is Copyright (c)2013-2018
+ Christiaan Hofman. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ - Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in
+    the documentation and/or other materials provided with the
+    distribution.
+
+ - Neither the name of Christiaan Hofman nor the names of any
+    contributors may be used to endorse or promote products derived
+    from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <Cocoa/Cocoa.h>
+
+
+@interface SKAlias : NSObject {
+    AliasHandle aliasHandle;
+}
+
+@property (nonatomic, readonly) NSData *data;
+@property (nonatomic, readonly) NSURL *fileURL;
+@property (nonatomic, readonly) NSURL *fileURLNoUI;
+
++ (id)aliasWithData:(NSData *)data;
++ (id)aliasWithURL:(NSURL *)fileURL;
+
+- (id)initWithData:(NSData *)data;
+- (id)initWithURL:(NSURL *)fileURL;
+
+@end

+ 134 - 0
PDF Office/PDF Master/Class/PDFTools/KMBookmark/Old/SKAlias/SKAlias.m

@@ -0,0 +1,134 @@
+//
+//  SKAlias.m
+//  Skim
+//
+//  Created by Christiaan Hofman on 1/21/13.
+/*
+ This software is Copyright (c)2013-2018
+ Christiaan Hofman. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ - Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in
+    the documentation and/or other materials provided with the
+    distribution.
+
+ - Neither the name of Christiaan Hofman nor the names of any
+    contributors may be used to endorse or promote products derived
+    from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "SKAlias.h"
+
+
+@implementation SKAlias
+
+@dynamic data, fileURL, fileURLNoUI;
+
++ (id)aliasWithData:(NSData *)data {
+    return [[self alloc] initWithData:data];
+}
+
++ (id)aliasWithURL:(NSURL *)fileURL {
+    return [[self alloc] initWithURL:fileURL];
+}
+
+- (id)initWithData:(NSData *)data {
+    self = [super init];
+    if (self) {
+        
+        if (data == nil) {
+            self = nil;
+        } else {
+            CFIndex len = CFDataGetLength((CFDataRef)data);
+            Handle handle = NewHandle(len);
+        
+            if (handle != NULL && len > 0) {
+                HLock(handle);
+                memmove((void *)*handle, (const void *)CFDataGetBytePtr((CFDataRef)data), len);
+                HUnlock(handle);
+                
+                aliasHandle = (AliasHandle)handle;
+            } else {
+                self = nil;
+            }
+
+        }
+    }
+    return self;
+}
+
+- (id)initWithURL:(NSURL *)fileURL {
+    self = [super init];
+    if (self) {
+        FSRef fileRef;
+        
+        if (nil == fileURL ||
+            false == CFURLGetFSRef((CFURLRef)fileURL, &fileRef) || 
+            noErr != FSNewAlias(NULL, &fileRef, &aliasHandle)) {
+            
+            self = nil;
+        }
+    }
+    return self;
+}
+
+- (void)dealloc {
+    if (aliasHandle) DisposeHandle((Handle)aliasHandle);
+    aliasHandle = NULL;
+}
+
+- (NSData *)data {
+    CFDataRef data = NULL;
+    Handle handle = (Handle)aliasHandle;
+    
+    if (handle) {
+        CFIndex len = GetHandleSize(handle);
+        SInt8 handleState = HGetState(handle);
+        
+        HLock(handle);
+        data = CFDataCreate(kCFAllocatorDefault, (const UInt8 *)*handle, len);
+        HSetState(handle, handleState);
+    }
+    
+    return (__bridge NSData *)(data);
+}
+
+- (NSURL *)fileURLWithMountFlags:(unsigned int)flags {
+    CFURLRef fileURL = NULL;
+    FSRef fileRef;
+    Boolean wasChanged;
+    
+    if (aliasHandle && noErr == FSResolveAliasWithMountFlags(NULL, aliasHandle, &fileRef, &wasChanged, flags))
+        fileURL = CFURLCreateFromFSRef(kCFAllocatorDefault, &fileRef);
+    
+    return (__bridge NSURL *)(fileURL);
+}
+
+- (NSURL *)fileURL {
+    return [self fileURLWithMountFlags:0];
+}
+
+- (NSURL *)fileURLNoUI {
+    return [self fileURLWithMountFlags:kResolveAliasFileNoUI];
+}
+
+@end

+ 48 - 0
PDF Office/PDF Master/Class/PDFTools/KMBookmark/Old/SKAlias/SKDictionaryFormatter.h

@@ -0,0 +1,48 @@
+//
+//  SKDictionaryFormatter.h
+//  Skim
+//
+//  Created by Christiaan Hofman on 12/16/11.
+/*
+ This software is Copyright (c) 2008-2018
+ Christiaan Hofman. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ - Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in
+    the documentation and/or other materials provided with the
+    distribution.
+
+ - Neither the name of Christiaan Hofman nor the names of any
+    contributors may be used to endorse or promote products derived
+    from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <Cocoa/Cocoa.h>
+
+
+@interface SKDictionaryFormatter : NSFormatter {
+    NSString *key;
+}
+
+- (id)initWithKey:(NSString *)aKey;
+
+@end

+ 70 - 0
PDF Office/PDF Master/Class/PDFTools/KMBookmark/Old/SKAlias/SKDictionaryFormatter.m

@@ -0,0 +1,70 @@
+//
+//  SKDictionaryFormatter.m
+//  Skim
+//
+//  Created by Christiaan Hofman on 12/16/11.
+/*
+ This software is Copyright (c) 2008-2018
+ Christiaan Hofman. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ - Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in
+    the documentation and/or other materials provided with the
+    distribution.
+
+ - Neither the name of Christiaan Hofman nor the names of any
+    contributors may be used to endorse or promote products derived
+    from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "SKDictionaryFormatter.h"
+
+
+@implementation SKDictionaryFormatter
+
+- (id)init {
+    return [self initWithKey:nil];
+}
+
+- (id)initWithKey:(NSString *)aKey {
+    self = [super init];
+    if (self) {
+        key = aKey;
+    }
+    return self;
+}
+
+- (void)dealloc {
+//    SKDESTROY(key);
+//    [super dealloc];
+}
+
+- (NSString *)stringForObjectValue:(id)obj {
+    return [obj respondsToSelector:@selector(objectForKey:)] ? [obj objectForKey:key] : nil;
+}
+
+- (BOOL)getObjectValue:(id *)obj forString:(NSString *)string errorDescription:(NSString **)error {
+    *obj = [NSDictionary dictionaryWithObjectsAndKeys:[string copy], key, nil];
+    return YES;
+}
+
+@end

+ 48 - 0
PDF Office/PDF Master/Class/PDFTools/KMBookmark/Old/Tool/SKToolbarItem.h

@@ -0,0 +1,48 @@
+//
+//  SKToolbarItem.h
+//  Skim
+//
+//  Created by Christiaan Hofman on 4/24/07.
+/*
+ This software is Copyright (c) 2007-2018
+ Christiaan Hofman. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ - Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in
+    the documentation and/or other materials provided with the
+    distribution.
+
+ - Neither the name of Christiaan Hofman nor the names of any
+    contributors may be used to endorse or promote products derived
+    from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <Cocoa/Cocoa.h>
+
+
+@interface SKToolbarItem : NSToolbarItem
+
+- (void)setLabels:(NSString *)label;
+- (void)setViewWithSizes:(NSView *)view;
+- (void)setImageNamed:(NSString *)name;
+
+@end

+ 72 - 0
PDF Office/PDF Master/Class/PDFTools/KMBookmark/Old/Tool/SKToolbarItem.m

@@ -0,0 +1,72 @@
+//
+//  SKToolbarItem.m
+//  Skim
+//
+//  Created by Christiaan Hofman on 4/24/07.
+/*
+ This software is Copyright (c) 2007-2018
+ Christiaan Hofman. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ - Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in
+    the documentation and/or other materials provided with the
+    distribution.
+
+ - Neither the name of Christiaan Hofman nor the names of any
+    contributors may be used to endorse or promote products derived
+    from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "SKToolbarItem.h"
+
+
+@implementation SKToolbarItem 
+
+- (void)validate {
+    if ([self view] && [[[self toolbar] delegate] respondsToSelector:@selector(validateToolbarItem:)]) {
+        BOOL enabled = [(id)[[self toolbar] delegate] validateToolbarItem:self];
+        [self setEnabled:enabled];
+    }
+    [super validate];
+}
+
+- (void)setLabels:(NSString *)label {
+    [self setLabel:label];
+    [self setPaletteLabel:label];
+}
+
+- (void)setViewWithSizes:(NSView *)view {
+    if ([view isKindOfClass:[NSSegmentedControl class]]) {
+//        if (RUNNING_BEFORE(10_7))
+//            [(NSSegmentedControl *)view setSegmentStyle:NSSegmentStyleCapsule];
+        [(NSSegmentedControl *)view sizeToFit];
+    }
+    [self setView:view];
+    [self setMinSize:[view bounds].size];
+    [self setMaxSize:[view bounds].size];
+}
+
+- (void)setImageNamed:(NSString *)name {
+    [self setImage:[NSImage imageNamed:name]];
+}
+
+@end

+ 94 - 0
PDF Office/PDF Master/Class/PDFTools/KMBookmark/Old/View/SKOutlineView.h

@@ -0,0 +1,94 @@
+//
+//  SKOutlineView.h
+//  Skim
+//
+//  Created by Christiaan Hofman on 8/22/07.
+/*
+ This software is Copyright (c) 2007-2018
+ Christiaan Hofman. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ - Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in
+    the documentation and/or other materials provided with the
+    distribution.
+
+ - Neither the name of Christiaan Hofman nor the names of any
+    contributors may be used to endorse or promote products derived
+    from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <Cocoa/Cocoa.h>
+//#import "SKTypeSelectHelper.h"
+
+@protocol SKOutlineViewDelegate, SKOutlineViewDataSource;
+
+@interface SKOutlineView : NSOutlineView /*<SKTypeSelectDelegate>*/ {
+//    SKTypeSelectHelper *typeSelectHelper;
+    BOOL supportsQuickLook;
+}
+
+@property (nonatomic, readonly) NSArray *selectedItems;
+@property (nonatomic, readonly) BOOL canDelete, canCopy, canPaste;
+@property (nonatomic) BOOL supportsQuickLook;
+//@property (nonatomic, retain) SKTypeSelectHelper *typeSelectHelper;
+
+- (NSArray *)itemsAtRowIndexes:(NSIndexSet *)indexes;
+
+- (void)delete:(id)sender;
+- (void)copy:(id)sender;
+- (void)paste:(id)sender;
+
+- (void)scrollToBeginningOfDocument:(id)sender;
+- (void)scrollToEndOfDocument:(id)sender;
+
+- (id <SKOutlineViewDelegate>)delegate;
+- (void)setDelegate:(id <SKOutlineViewDelegate>)newDelegate;
+- (id <SKOutlineViewDataSource>)dataSource;
+- (void)setDataSource:(id <SKOutlineViewDataSource>)newDataSource;
+
+@end
+
+
+@protocol SKOutlineViewDelegate <NSOutlineViewDelegate>
+@optional
+
+- (void)outlineView:(NSOutlineView *)anOutlineView deleteItems:(NSArray *)items;
+- (BOOL)outlineView:(NSOutlineView *)anOutlineView canDeleteItems:(NSArray *)items;
+
+- (void)outlineView:(NSOutlineView *)anOutlineView copyItems:(NSArray *)items;
+- (BOOL)outlineView:(NSOutlineView *)anOutlineView canCopyItems:(NSArray *)items;
+
+- (void)outlineView:(NSOutlineView *)anOutlineView pasteFromPasteboard:(NSPasteboard *)pboard;
+- (BOOL)outlineView:(NSOutlineView *)anOutlineView canPasteFromPasteboard:(NSPasteboard *)pboard;
+
+//- (NSArray *)outlineView:(NSOutlineView *)anOutlineView typeSelectHelperSelectionStrings:(SKTypeSelectHelper *)aTypeSelectHelper;
+//- (void)outlineView:(NSOutlineView *)anOutlineView typeSelectHelper:(SKTypeSelectHelper *)aTypeSelectHelper didFailToFindMatchForSearchString:(NSString *)searchString;
+//- (void)outlineView:(NSOutlineView *)anOutlineView typeSelectHelper:(SKTypeSelectHelper *)aTypeSelectHelper updateSearchString:(NSString *)searchString;
+
+@end
+
+@protocol SKOutlineViewDataSource <NSOutlineViewDataSource>
+@optional
+
+- (void)outlineView:(NSOutlineView *)anOutlineView dragEndedWithOperation:(NSDragOperation)items;
+
+@end

+ 270 - 0
PDF Office/PDF Master/Class/PDFTools/KMBookmark/Old/View/SKOutlineView.m

@@ -0,0 +1,270 @@
+//
+//  SKOutlineView.m
+//  Skim
+//
+//  Created by Christiaan Hofman on 8/22/07.
+/*
+ This software is Copyright (c) 2007-2018
+ Christiaan Hofman. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ - Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in
+    the documentation and/or other materials provided with the
+    distribution.
+
+ - Neither the name of Christiaan Hofman nor the names of any
+    contributors may be used to endorse or promote products derived
+    from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "SKOutlineView.h"
+#import <Quartz/Quartz.h>
+//#import "SKTypeSelectHelper.h"
+//#import "NSEvent_SKExtensions.h"
+//#import "NSFont_SKExtensions.h"
+
+
+@implementation SKOutlineView
+- (void)dealloc {
+//    [typeSelectHelper setDelegate:nil];
+//    SKDESTROY(typeSelectHelper);
+//    [super dealloc];
+}
+
+- (NSArray *)itemsAtRowIndexes:(NSIndexSet *)indexes {
+    NSMutableArray *items = [NSMutableArray array];
+    [indexes enumerateIndexesUsingBlock:^(NSUInteger idx, BOOL *stop) {
+        [items addObject:[self itemAtRow:idx]];
+    }];
+    return items;
+}
+
+- (NSArray *)selectedItems {
+    return [self itemsAtRowIndexes:[self selectedRowIndexes]];
+}
+
+//- (void)setTypeSelectHelper:(SKTypeSelectHelper *)newTypeSelectHelper {
+//    if (typeSelectHelper != newTypeSelectHelper) {
+//        if ([typeSelectHelper delegate] == self)
+//            [typeSelectHelper setDelegate:nil];
+//        [typeSelectHelper release];
+//        typeSelectHelper = [newTypeSelectHelper retain];
+//        [typeSelectHelper setDelegate:self];
+//    }
+//}
+
+- (void)expandItem:(id)item expandChildren:(BOOL)collapseChildren {
+    [super expandItem:item expandChildren:collapseChildren];
+//    [typeSelectHelper rebuildTypeSelectSearchCache];
+}
+
+- (void)collapseItem:(id)item collapseChildren:(BOOL)collapseChildren {
+    [super collapseItem:item collapseChildren:collapseChildren];
+//    [typeSelectHelper rebuildTypeSelectSearchCache];
+}
+
+- (void)reloadData{
+    [super reloadData];
+//    [typeSelectHelper rebuildTypeSelectSearchCache];
+}
+
+- (void)keyDown:(NSEvent *)theEvent {
+    NSString *characters = [theEvent charactersIgnoringModifiers];
+    unichar eventChar = [characters length] > 0 ? [characters characterAtIndex:0] : 0;
+    
+    NSUInteger modifierFlags = [theEvent modifierFlags] & NSEventModifierFlagDeviceIndependentFlagsMask;
+    
+    if ((eventChar == NSNewlineCharacter || eventChar == NSEnterCharacter || eventChar == NSCarriageReturnCharacter) && modifierFlags == 0) {
+        if ([self doubleAction] == NULL || [self sendAction:[self doubleAction] to:[self target]] == NO)
+            NSBeep();
+    } else if ((eventChar == NSTabCharacter) && modifierFlags == 0) {
+        if (supportsQuickLook == NO)
+            [[self enclosingScrollView] pageDown:nil];
+        else if ([QLPreviewPanel sharedPreviewPanelExists] && [[QLPreviewPanel sharedPreviewPanel] isVisible])
+            [[QLPreviewPanel sharedPreviewPanel] orderOut:nil];
+        else
+            [[QLPreviewPanel sharedPreviewPanel] makeKeyAndOrderFront:nil];
+    } else if ((eventChar == NSTabCharacter) && modifierFlags == NSShiftKeyMask) {
+        if (supportsQuickLook == NO)
+            [[self enclosingScrollView] pageUp:nil];
+    } else if (eventChar == NSHomeFunctionKey && (modifierFlags & ~NSFunctionKeyMask) == 0) {
+        [self scrollToBeginningOfDocument:nil];
+    } else if (eventChar == NSEndFunctionKey && (modifierFlags & ~NSFunctionKeyMask) == 0) {
+        [self scrollToEndOfDocument:nil];
+	} else if ((eventChar == NSDeleteCharacter || eventChar == NSDeleteFunctionKey) && modifierFlags == 0 && [self canDelete]) {
+        [self delete:self];
+    } 
+//    else if ([typeSelectHelper handleEvent:theEvent] == NO) {
+//        [super keyDown:theEvent];
+//    }
+}
+
+- (void)scrollToBeginningOfDocument:(id)sender {
+    if ([self numberOfRows])
+        [self scrollRowToVisible:0];
+}
+
+- (void)scrollToEndOfDocument:(id)sender {
+    if ([self numberOfRows])
+        [self scrollRowToVisible:[self numberOfRows] - 1];
+}
+
+- (BOOL)canDelete {
+    NSArray *items = [self selectedItems];
+    if ([items count] && [[self delegate] respondsToSelector:@selector(outlineView:deleteItems:)]) {
+        if ([[self delegate] respondsToSelector:@selector(outlineView:canDeleteItems:)])
+            return [[self delegate] outlineView:self canDeleteItems:items];
+        else
+            return YES;
+    }
+    return NO;
+}
+
+- (void)delete:(id)sender {
+    if ([self canDelete])
+        [[self delegate] outlineView:self deleteItems:[self selectedItems]];
+    else
+        NSBeep();
+}
+
+- (BOOL)canCopy {
+    NSArray *items = [self selectedItems];
+    if ([items count] && [[self delegate] respondsToSelector:@selector(outlineView:copyItems:)]) {
+        if ([[self delegate] respondsToSelector:@selector(outlineView:canCopyItems:)])
+            return [[self delegate] outlineView:self canCopyItems:items];
+        else
+            return YES;
+    }
+    return NO;
+}
+
+- (void)copy:(id)sender {
+    if ([self canCopy])
+        [[self delegate] outlineView:self copyItems:[self selectedItems]];
+    else
+        NSBeep();
+}
+
+- (BOOL)canPaste {
+    if ([[self delegate] respondsToSelector:@selector(outlineView:pasteFromPasteboard:)]) {
+        if ([[self delegate] respondsToSelector:@selector(outlineView:canPasteFromPasteboard:)])
+            return [[self delegate] outlineView:self canPasteFromPasteboard:[NSPasteboard generalPasteboard]];
+        else
+            return YES;
+    }
+    return NO;
+}
+
+- (void)paste:(id)sender {
+    if ([self canPaste])
+        [[self delegate] outlineView:self pasteFromPasteboard:[NSPasteboard generalPasteboard]];
+    else
+        NSBeep();
+}
+
+- (BOOL)validateMenuItem:(NSMenuItem *)menuItem {
+    if ([menuItem action] == @selector(delete:))
+        return [self canDelete];
+    else if ([menuItem action] == @selector(copy:))
+        return [self canCopy];
+    else if ([menuItem action] == @selector(paste:))
+        return [self canPaste];
+    else if ([menuItem action] == @selector(selectAll:))
+        return [self allowsMultipleSelection];
+    else if ([menuItem action] == @selector(deselectAll:))
+        return [self allowsEmptySelection];
+    else if ([[SKOutlineView superclass] instancesRespondToSelector:@selector(validateMenuItem:)])
+        return [super validateMenuItem:menuItem];
+    return YES;
+}
+
+- (void)draggedImage:(NSImage *)anImage endedAt:(NSPoint)aPoint operation:(NSDragOperation)operation {
+    if ([[SKOutlineView superclass] instancesRespondToSelector:_cmd])
+        [super draggedImage:anImage endedAt:aPoint operation:operation];
+    if ([[self dataSource] respondsToSelector:@selector(outlineView:dragEndedWithOperation:)])
+        [[self dataSource] outlineView:self dragEndedWithOperation:operation];
+}
+
+- (NSFont *)font {
+    for (NSTableColumn *tc in [self tableColumns]) {
+        NSCell *cell = [tc dataCell];
+        if ([cell type] == NSTextCellType)
+            return [cell font];
+    }
+    return nil;
+}
+
+- (void)setFont:(NSFont *)font {
+    for (NSTableColumn *tc in [self tableColumns]) {
+        NSCell *cell = [tc dataCell];
+        if ([cell type] == NSTextCellType)
+            [cell setFont:font];
+    }
+    
+    CGFloat rowHeight = [self defaultViewLineHeight:font];
+    if ([self selectionHighlightStyle] == NSTableViewSelectionHighlightStyleSourceList)
+        rowHeight += 2.0;
+    [self setRowHeight:rowHeight];
+    [self noteHeightOfRowsWithIndexesChanged:[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, [self numberOfRows])]];
+}
+
+- (CGFloat)defaultViewLineHeight:(NSFont *)font {
+    static NSLayoutManager *layoutManager = nil;
+    if (layoutManager == nil) {
+        layoutManager = [[NSLayoutManager alloc] init];
+        [layoutManager setTypesetterBehavior:NSTypesetterBehavior_10_2_WithCompatibility];
+    }
+    return [layoutManager defaultLineHeightForFont:font];
+}
+#pragma mark SKTypeSelectHelper datasource protocol
+
+//- (NSArray *)typeSelectHelperSelectionStrings:(SKTypeSelectHelper *)aTypeSelectHelper {
+//    if ([[self delegate] respondsToSelector:@selector(outlineView:typeSelectHelperSelectionStrings:)])
+//        return [[self delegate] outlineView:self typeSelectHelperSelectionStrings:aTypeSelectHelper];
+//    return nil;
+//}
+
+//- (NSUInteger)typeSelectHelperCurrentlySelectedIndex:(SKTypeSelectHelper *)aTypeSelectHelper {
+//    return [[self selectedRowIndexes] lastIndex];
+//}
+
+//- (void)typeSelectHelper:(SKTypeSelectHelper *)aTypeSelectHelper selectItemAtIndex:(NSUInteger)itemIndex {
+//    [self selectRowIndexes:[NSIndexSet indexSetWithIndex:itemIndex] byExtendingSelection:NO];
+//    [self scrollRowToVisible:itemIndex];
+//}
+//
+//- (void)typeSelectHelper:(SKTypeSelectHelper *)aTypeSelectHelper didFailToFindMatchForSearchString:(NSString *)searchString {
+//    if ([[self delegate] respondsToSelector:@selector(outlineView:typeSelectHelper:didFailToFindMatchForSearchString:)])
+//        [[self delegate] outlineView:self typeSelectHelper:aTypeSelectHelper didFailToFindMatchForSearchString:searchString];
+//}
+//
+//- (void)typeSelectHelper:(SKTypeSelectHelper *)aTypeSelectHelper updateSearchString:(NSString *)searchString {
+//    if ([[self delegate] respondsToSelector:@selector(outlineView:typeSelectHelper:updateSearchString:)])
+//        [[self delegate] outlineView:self typeSelectHelper:aTypeSelectHelper updateSearchString:searchString];
+//}
+
+- (id <SKOutlineViewDelegate>)delegate { return (id <SKOutlineViewDelegate>)[super delegate]; }
+- (void)setDelegate:(id <SKOutlineViewDelegate>)newDelegate { [super setDelegate:newDelegate]; }
+- (id <SKOutlineViewDataSource>)dataSource { return (id <SKOutlineViewDataSource>)[super dataSource]; }
+- (void)setDataSource:(id <SKOutlineViewDataSource>)newDataSource { [super setDataSource:newDataSource]; }
+
+@end

+ 0 - 2
PDF Office/PDF Master/Class/PDFTools/KMBookmark/View/KMTextWithIconCell.swift

@@ -90,8 +90,6 @@ class KMTextWithIconCell: NSTextFieldCell {
             if let obj = objectValue as? NSDictionary {
                 imageCell.image = obj[SKTextWithIconImageKey] as? NSImage
                 self.stringValue = obj[SKTextWithIconStringKey] as! String
-//                print(obj[SKTextWithIconImageKey] as? NSImage)
-//                print(obj[SKTextWithIconStringKey] as? NSImage)
             }
         }
     }

+ 12 - 12
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/Outline/OutlineView/View/KMCustomOutlineView.swift

@@ -26,7 +26,7 @@ import Cocoa
     @objc optional func outlineView(_ anOutlineView: NSOutlineView, dragEndedWithOperation dragEndedO: NSDragOperation)
 }
 
-class KMCustomOutlineView: NSOutlineView {
+open class KMCustomOutlineView: NSOutlineView {
     var supportsQuickLook = false
     private var _typeSelectHelper: SKTypeSelectHelper?
     var typeSelectHelper: SKTypeSelectHelper? {
@@ -47,31 +47,31 @@ class KMCustomOutlineView: NSOutlineView {
     weak var botaDelegate: KMCustomOutlineViewDelegate?
     weak var botaDataSource: KMCustomOutlineViewDataSource?
     
-    override func draw(_ dirtyRect: NSRect) {
+    open override func draw(_ dirtyRect: NSRect) {
         super.draw(dirtyRect)
 
         // Drawing code here.
     }
     
-    override func expandItem(_ item: Any?, expandChildren: Bool) {
+    open override func expandItem(_ item: Any?, expandChildren: Bool) {
         super.expandItem(item, expandChildren: expandChildren)
         
         self.typeSelectHelper?.rebuildTypeSelectSearchCache()
     }
     
-    override func collapseItem(_ item: Any?, collapseChildren: Bool) {
+    open override func collapseItem(_ item: Any?, collapseChildren: Bool) {
         super.collapseItem(item, collapseChildren: collapseChildren)
         
         self.typeSelectHelper?.rebuildTypeSelectSearchCache()
     }
     
-    override func reloadData() {
+    open override func reloadData() {
         super.reloadData()
         
         self.typeSelectHelper?.rebuildTypeSelectSearchCache()
     }
     
-    override func keyDown(with event: NSEvent) {
+    open override func keyDown(with event: NSEvent) {
         let eventChar = event.firstCharacter()
         let modifierFlags = event.deviceIndependentModifierFlags()
 
@@ -114,7 +114,7 @@ class KMCustomOutlineView: NSOutlineView {
      
      */
     
-    override var font: NSFont? {
+    open override var font: NSFont? {
         get {
             for tc in self.tableColumns {
                 if let cell = tc.dataCell as? NSCell {
@@ -179,7 +179,7 @@ class KMCustomOutlineView: NSOutlineView {
         }
     }
     
-    func canDelete() -> Bool {
+    open func canDelete() -> Bool {
         let items = self.selectedItems()
         if items.count > 0 {
             return self.botaDelegate?.outlineView?(self, canDeleteItems: items) ?? true
@@ -188,9 +188,9 @@ class KMCustomOutlineView: NSOutlineView {
     }
     
     @objc func delete(_ sender: Any) {
-//        if self.canDelete() {
-//            self.botaDelegate?.outlineView?(self, deleteItems: self.selectedItems())
-//        }
+        if self.canDelete() {
+            self.botaDelegate?.outlineView?(self, deleteItems: self.selectedItems())
+        }
     }
     
     func selectedItems() -> [Any] {
@@ -209,7 +209,7 @@ class KMCustomOutlineView: NSOutlineView {
 }
 
 extension KMCustomOutlineView: NSMenuItemValidation {
-    func validateMenuItem(_ menuItem: NSMenuItem) -> Bool {
+    public func validateMenuItem(_ menuItem: NSMenuItem) -> Bool {
         if (menuItem.action == #selector(delete)) {
             return self.canDelete()
         } else if (menuItem.action == KMSelectorCopy) {

+ 8 - 0
PDF Office/PDF Master/PDF_Reader_Pro DMG-Bridging-Header.h

@@ -96,3 +96,11 @@
 #import "KMConvertCompareViewController.h"
 #import "KMConvertComparePayViewController.h"
 #import "AIInfoManager.h"
+
+//书签
+#import "SKAlias.h"
+#import "SKTextWithIconCell.h"
+#import "SKDictionaryFormatter.h"
+#import "SKBookmarkSheetController.h"
+#import "SKBookmarkController.h"
+#import "SKBookmark.h"

+ 8 - 0
PDF Office/PDF Master/PDF_Reader_Pro Edition-Bridging-Header.h

@@ -92,3 +92,11 @@
 #import "KMConvertCompareViewController.h"
 #import "KMConvertComparePayViewController.h"
 #import "AIInfoManager.h"
+
+//书签
+#import "SKAlias.h"
+#import "SKTextWithIconCell.h"
+#import "SKDictionaryFormatter.h"
+#import "SKBookmarkSheetController.h"
+#import "SKBookmarkController.h"
+#import "SKBookmark.h"

+ 8 - 0
PDF Office/PDF Master/PDF_Reader_Pro-Bridging-Header.h

@@ -92,3 +92,11 @@
 
 #import "KMConvertCompareViewController.h"
 #import "KMConvertComparePayViewController.h"
+
+//书签
+#import "SKAlias.h"
+#import "SKTextWithIconCell.h"
+#import "SKDictionaryFormatter.h"
+#import "SKBookmarkSheetController.h"
+#import "SKBookmarkController.h"
+#import "SKBookmark.h"

+ 190 - 0
PDF Office/PDF Reader Pro.xcodeproj/project.pbxproj

@@ -1248,6 +1248,45 @@
 		AD055E602B85E04C0035F824 /* KMTextWithIconCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD055E5F2B85E04C0035F824 /* KMTextWithIconCell.swift */; };
 		AD055E612B85E04C0035F824 /* KMTextWithIconCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD055E5F2B85E04C0035F824 /* KMTextWithIconCell.swift */; };
 		AD055E622B85E04C0035F824 /* KMTextWithIconCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD055E5F2B85E04C0035F824 /* KMTextWithIconCell.swift */; };
+		AD055E662B872FB50035F824 /* SKAlias.m in Sources */ = {isa = PBXBuildFile; fileRef = AD055E652B872FB50035F824 /* SKAlias.m */; };
+		AD055E672B872FB50035F824 /* SKAlias.m in Sources */ = {isa = PBXBuildFile; fileRef = AD055E652B872FB50035F824 /* SKAlias.m */; };
+		AD055E682B872FB50035F824 /* SKAlias.m in Sources */ = {isa = PBXBuildFile; fileRef = AD055E652B872FB50035F824 /* SKAlias.m */; };
+		AD055E6C2B8732680035F824 /* SKTextWithIconCell.m in Sources */ = {isa = PBXBuildFile; fileRef = AD055E6A2B8732680035F824 /* SKTextWithIconCell.m */; };
+		AD055E6D2B8732680035F824 /* SKTextWithIconCell.m in Sources */ = {isa = PBXBuildFile; fileRef = AD055E6A2B8732680035F824 /* SKTextWithIconCell.m */; };
+		AD055E6E2B8732680035F824 /* SKTextWithIconCell.m in Sources */ = {isa = PBXBuildFile; fileRef = AD055E6A2B8732680035F824 /* SKTextWithIconCell.m */; };
+		AD055E712B8732E00035F824 /* SKDictionaryFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = AD055E702B8732E00035F824 /* SKDictionaryFormatter.m */; };
+		AD055E722B8732E00035F824 /* SKDictionaryFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = AD055E702B8732E00035F824 /* SKDictionaryFormatter.m */; };
+		AD055E732B8732E00035F824 /* SKDictionaryFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = AD055E702B8732E00035F824 /* SKDictionaryFormatter.m */; };
+		AD055E7E2B88294F0035F824 /* SKBookmarkSheetController.m in Sources */ = {isa = PBXBuildFile; fileRef = AD055E7A2B88294D0035F824 /* SKBookmarkSheetController.m */; };
+		AD055E7F2B88294F0035F824 /* SKBookmarkSheetController.m in Sources */ = {isa = PBXBuildFile; fileRef = AD055E7A2B88294D0035F824 /* SKBookmarkSheetController.m */; };
+		AD055E802B88294F0035F824 /* SKBookmarkSheetController.m in Sources */ = {isa = PBXBuildFile; fileRef = AD055E7A2B88294D0035F824 /* SKBookmarkSheetController.m */; };
+		AD055E812B88294F0035F824 /* SKBookmarkController.m in Sources */ = {isa = PBXBuildFile; fileRef = AD055E7B2B88294E0035F824 /* SKBookmarkController.m */; };
+		AD055E822B88294F0035F824 /* SKBookmarkController.m in Sources */ = {isa = PBXBuildFile; fileRef = AD055E7B2B88294E0035F824 /* SKBookmarkController.m */; };
+		AD055E832B88294F0035F824 /* SKBookmarkController.m in Sources */ = {isa = PBXBuildFile; fileRef = AD055E7B2B88294E0035F824 /* SKBookmarkController.m */; };
+		AD055E882B882E7F0035F824 /* SKBookmark.m in Sources */ = {isa = PBXBuildFile; fileRef = AD055E872B882E7F0035F824 /* SKBookmark.m */; };
+		AD055E892B882E7F0035F824 /* SKBookmark.m in Sources */ = {isa = PBXBuildFile; fileRef = AD055E872B882E7F0035F824 /* SKBookmark.m */; };
+		AD055E8A2B882E7F0035F824 /* SKBookmark.m in Sources */ = {isa = PBXBuildFile; fileRef = AD055E872B882E7F0035F824 /* SKBookmark.m */; };
+		AD055E8D2B88304E0035F824 /* BookmarkSheet.xib in Resources */ = {isa = PBXBuildFile; fileRef = AD055E8B2B88304E0035F824 /* BookmarkSheet.xib */; };
+		AD055E8E2B88304E0035F824 /* BookmarkSheet.xib in Resources */ = {isa = PBXBuildFile; fileRef = AD055E8B2B88304E0035F824 /* BookmarkSheet.xib */; };
+		AD055E8F2B88304E0035F824 /* BookmarkSheet.xib in Resources */ = {isa = PBXBuildFile; fileRef = AD055E8B2B88304E0035F824 /* BookmarkSheet.xib */; };
+		AD055E902B88304E0035F824 /* BookmarksWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = AD055E8C2B88304E0035F824 /* BookmarksWindow.xib */; };
+		AD055E912B88304E0035F824 /* BookmarksWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = AD055E8C2B88304E0035F824 /* BookmarksWindow.xib */; };
+		AD055E922B88304E0035F824 /* BookmarksWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = AD055E8C2B88304E0035F824 /* BookmarksWindow.xib */; };
+		AD055E9F2B8836AE0035F824 /* SKDocumentController.m in Sources */ = {isa = PBXBuildFile; fileRef = AD055E9E2B8836AE0035F824 /* SKDocumentController.m */; };
+		AD055EA02B8836AE0035F824 /* SKDocumentController.m in Sources */ = {isa = PBXBuildFile; fileRef = AD055E9E2B8836AE0035F824 /* SKDocumentController.m */; };
+		AD055EA12B8836AE0035F824 /* SKDocumentController.m in Sources */ = {isa = PBXBuildFile; fileRef = AD055E9E2B8836AE0035F824 /* SKDocumentController.m */; };
+		AD055EB42B8841780035F824 /* SKSeparatorCell.m in Sources */ = {isa = PBXBuildFile; fileRef = AD055EB22B8841780035F824 /* SKSeparatorCell.m */; };
+		AD055EB52B8841780035F824 /* SKSeparatorCell.m in Sources */ = {isa = PBXBuildFile; fileRef = AD055EB22B8841780035F824 /* SKSeparatorCell.m */; };
+		AD055EB62B8841780035F824 /* SKSeparatorCell.m in Sources */ = {isa = PBXBuildFile; fileRef = AD055EB22B8841780035F824 /* SKSeparatorCell.m */; };
+		AD055EB92B8843FD0035F824 /* SKToolbarItem.m in Sources */ = {isa = PBXBuildFile; fileRef = AD055EB72B8843FD0035F824 /* SKToolbarItem.m */; };
+		AD055EBA2B8843FD0035F824 /* SKToolbarItem.m in Sources */ = {isa = PBXBuildFile; fileRef = AD055EB72B8843FD0035F824 /* SKToolbarItem.m */; };
+		AD055EBB2B8843FD0035F824 /* SKToolbarItem.m in Sources */ = {isa = PBXBuildFile; fileRef = AD055EB72B8843FD0035F824 /* SKToolbarItem.m */; };
+		AD055EC42B8846EB0035F824 /* SKOutlineView.m in Sources */ = {isa = PBXBuildFile; fileRef = AD055EC32B8846EB0035F824 /* SKOutlineView.m */; };
+		AD055EC52B8846EB0035F824 /* SKOutlineView.m in Sources */ = {isa = PBXBuildFile; fileRef = AD055EC32B8846EB0035F824 /* SKOutlineView.m */; };
+		AD055EC62B8846EB0035F824 /* SKOutlineView.m in Sources */ = {isa = PBXBuildFile; fileRef = AD055EC32B8846EB0035F824 /* SKOutlineView.m */; };
+		AD055EC92B8848400035F824 /* NSMenu_SKExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = AD055EC82B8848400035F824 /* NSMenu_SKExtensions.m */; };
+		AD055ECA2B8848400035F824 /* NSMenu_SKExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = AD055EC82B8848400035F824 /* NSMenu_SKExtensions.m */; };
+		AD055ECB2B8848400035F824 /* NSMenu_SKExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = AD055EC82B8848400035F824 /* NSMenu_SKExtensions.m */; };
 		AD0E8AB02A31B76300DBFD3C /* KMInAppPurchaseManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD0E8AAF2A31B76300DBFD3C /* KMInAppPurchaseManager.swift */; };
 		AD0E8AB12A31B76300DBFD3C /* KMInAppPurchaseManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD0E8AAF2A31B76300DBFD3C /* KMInAppPurchaseManager.swift */; };
 		AD0E8AB42A31B78900DBFD3C /* KMDMGPurchaseManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD0E8AB32A31B78900DBFD3C /* KMDMGPurchaseManager.swift */; };
@@ -5565,6 +5604,30 @@
 		AD055E522B73220A0035F824 /* KMBookmarkManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMBookmarkManager.swift; sourceTree = "<group>"; };
 		AD055E5B2B85C9A70035F824 /* KMSeparatorCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMSeparatorCell.swift; sourceTree = "<group>"; };
 		AD055E5F2B85E04C0035F824 /* KMTextWithIconCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMTextWithIconCell.swift; sourceTree = "<group>"; };
+		AD055E642B872FB40035F824 /* SKAlias.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SKAlias.h; sourceTree = "<group>"; };
+		AD055E652B872FB50035F824 /* SKAlias.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SKAlias.m; sourceTree = "<group>"; };
+		AD055E6A2B8732680035F824 /* SKTextWithIconCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SKTextWithIconCell.m; sourceTree = "<group>"; };
+		AD055E6B2B8732680035F824 /* SKTextWithIconCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SKTextWithIconCell.h; sourceTree = "<group>"; };
+		AD055E6F2B8732E00035F824 /* SKDictionaryFormatter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SKDictionaryFormatter.h; sourceTree = "<group>"; };
+		AD055E702B8732E00035F824 /* SKDictionaryFormatter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SKDictionaryFormatter.m; sourceTree = "<group>"; };
+		AD055E7A2B88294D0035F824 /* SKBookmarkSheetController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SKBookmarkSheetController.m; sourceTree = "<group>"; };
+		AD055E7B2B88294E0035F824 /* SKBookmarkController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SKBookmarkController.m; sourceTree = "<group>"; };
+		AD055E7C2B88294F0035F824 /* SKBookmarkSheetController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SKBookmarkSheetController.h; sourceTree = "<group>"; };
+		AD055E7D2B88294F0035F824 /* SKBookmarkController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SKBookmarkController.h; sourceTree = "<group>"; };
+		AD055E862B882E7F0035F824 /* SKBookmark.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SKBookmark.h; sourceTree = "<group>"; };
+		AD055E872B882E7F0035F824 /* SKBookmark.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SKBookmark.m; sourceTree = "<group>"; };
+		AD055E8B2B88304E0035F824 /* BookmarkSheet.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = BookmarkSheet.xib; sourceTree = "<group>"; };
+		AD055E8C2B88304E0035F824 /* BookmarksWindow.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = BookmarksWindow.xib; sourceTree = "<group>"; };
+		AD055E9D2B8836AE0035F824 /* SKDocumentController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SKDocumentController.h; sourceTree = "<group>"; };
+		AD055E9E2B8836AE0035F824 /* SKDocumentController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SKDocumentController.m; sourceTree = "<group>"; };
+		AD055EB22B8841780035F824 /* SKSeparatorCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SKSeparatorCell.m; sourceTree = "<group>"; };
+		AD055EB32B8841780035F824 /* SKSeparatorCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SKSeparatorCell.h; sourceTree = "<group>"; };
+		AD055EB72B8843FD0035F824 /* SKToolbarItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SKToolbarItem.m; sourceTree = "<group>"; };
+		AD055EB82B8843FD0035F824 /* SKToolbarItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SKToolbarItem.h; sourceTree = "<group>"; };
+		AD055EC22B8846EB0035F824 /* SKOutlineView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SKOutlineView.h; sourceTree = "<group>"; };
+		AD055EC32B8846EB0035F824 /* SKOutlineView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SKOutlineView.m; sourceTree = "<group>"; };
+		AD055EC72B8848400035F824 /* NSMenu_SKExtensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSMenu_SKExtensions.h; sourceTree = "<group>"; };
+		AD055EC82B8848400035F824 /* NSMenu_SKExtensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSMenu_SKExtensions.m; sourceTree = "<group>"; };
 		AD0E8AAF2A31B76300DBFD3C /* KMInAppPurchaseManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMInAppPurchaseManager.swift; sourceTree = "<group>"; };
 		AD0E8AB32A31B78900DBFD3C /* KMDMGPurchaseManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMDMGPurchaseManager.swift; sourceTree = "<group>"; };
 		AD0E8AB82A31BDDD00DBFD3C /* KMProduct.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMProduct.swift; sourceTree = "<group>"; };
@@ -8259,6 +8322,7 @@
 		AD055E1A2B70B2460035F824 /* KMBookmark */ = {
 			isa = PBXGroup;
 			children = (
+				AD055E792B88291C0035F824 /* Old */,
 				AD055E562B846C6B0035F824 /* Tool */,
 				AD055E512B7321EB0035F824 /* Manager */,
 				AD055E482B7234530035F824 /* View */,
@@ -8313,6 +8377,93 @@
 			path = Tool;
 			sourceTree = "<group>";
 		};
+		AD055E632B872FA90035F824 /* SKAlias */ = {
+			isa = PBXGroup;
+			children = (
+				AD055E6F2B8732E00035F824 /* SKDictionaryFormatter.h */,
+				AD055E702B8732E00035F824 /* SKDictionaryFormatter.m */,
+				AD055E642B872FB40035F824 /* SKAlias.h */,
+				AD055E652B872FB50035F824 /* SKAlias.m */,
+			);
+			path = SKAlias;
+			sourceTree = "<group>";
+		};
+		AD055E692B8732680035F824 /* Cell */ = {
+			isa = PBXGroup;
+			children = (
+				AD055EB32B8841780035F824 /* SKSeparatorCell.h */,
+				AD055EB22B8841780035F824 /* SKSeparatorCell.m */,
+				AD055E6A2B8732680035F824 /* SKTextWithIconCell.m */,
+				AD055E6B2B8732680035F824 /* SKTextWithIconCell.h */,
+			);
+			path = Cell;
+			sourceTree = "<group>";
+		};
+		AD055E792B88291C0035F824 /* Old */ = {
+			isa = PBXGroup;
+			children = (
+				AD055EBC2B8844D20035F824 /* Extension */,
+				AD055EA22B883B0C0035F824 /* Tool */,
+				AD055E932B8830820035F824 /* View */,
+				AD055E852B882E6F0035F824 /* Model */,
+				AD055E842B8829510035F824 /* Controller */,
+				AD055E632B872FA90035F824 /* SKAlias */,
+				AD055E692B8732680035F824 /* Cell */,
+			);
+			path = Old;
+			sourceTree = "<group>";
+		};
+		AD055E842B8829510035F824 /* Controller */ = {
+			isa = PBXGroup;
+			children = (
+				AD055E7D2B88294F0035F824 /* SKBookmarkController.h */,
+				AD055E7B2B88294E0035F824 /* SKBookmarkController.m */,
+				AD055E8C2B88304E0035F824 /* BookmarksWindow.xib */,
+				AD055E7C2B88294F0035F824 /* SKBookmarkSheetController.h */,
+				AD055E7A2B88294D0035F824 /* SKBookmarkSheetController.m */,
+				AD055E8B2B88304E0035F824 /* BookmarkSheet.xib */,
+				AD055E9D2B8836AE0035F824 /* SKDocumentController.h */,
+				AD055E9E2B8836AE0035F824 /* SKDocumentController.m */,
+			);
+			path = Controller;
+			sourceTree = "<group>";
+		};
+		AD055E852B882E6F0035F824 /* Model */ = {
+			isa = PBXGroup;
+			children = (
+				AD055E862B882E7F0035F824 /* SKBookmark.h */,
+				AD055E872B882E7F0035F824 /* SKBookmark.m */,
+			);
+			path = Model;
+			sourceTree = "<group>";
+		};
+		AD055E932B8830820035F824 /* View */ = {
+			isa = PBXGroup;
+			children = (
+				AD055EC22B8846EB0035F824 /* SKOutlineView.h */,
+				AD055EC32B8846EB0035F824 /* SKOutlineView.m */,
+			);
+			path = View;
+			sourceTree = "<group>";
+		};
+		AD055EA22B883B0C0035F824 /* Tool */ = {
+			isa = PBXGroup;
+			children = (
+				AD055EB82B8843FD0035F824 /* SKToolbarItem.h */,
+				AD055EB72B8843FD0035F824 /* SKToolbarItem.m */,
+			);
+			path = Tool;
+			sourceTree = "<group>";
+		};
+		AD055EBC2B8844D20035F824 /* Extension */ = {
+			isa = PBXGroup;
+			children = (
+				AD055EC72B8848400035F824 /* NSMenu_SKExtensions.h */,
+				AD055EC82B8848400035F824 /* NSMenu_SKExtensions.m */,
+			);
+			path = Extension;
+			sourceTree = "<group>";
+		};
 		AD0E8AAD2A31B6F300DBFD3C /* Appstore */ = {
 			isa = PBXGroup;
 			children = (
@@ -13346,6 +13497,7 @@
 				BB8810A32B4F7D1000AFA63E /* KMVerificationActivateViewController.xib in Resources */,
 				BB10FAE92AFE03CD00F18D65 /* KMPDFEditPageRangeWindowController.xib in Resources */,
 				BB4BD9CF2909026500A66A65 /* KMRightSideViewController.xib in Resources */,
+				AD055E902B88304E0035F824 /* BookmarksWindow.xib in Resources */,
 				BB99ACC5292DE22E0048AFD9 /* KMMergeViewController.xib in Resources */,
 				BB6347B82AF224E200F5438E /* KMConvertCollectionViewHeader.xib in Resources */,
 				8942F7F32926087200389627 /* KMSearchViewController.xib in Resources */,
@@ -13540,6 +13692,7 @@
 				9FDD0FA22952FF4D000C4DAD /* $themes.json in Resources */,
 				BB69C95C299116FD0001A9B1 /* five_line_score.pdf in Resources */,
 				BBFE6E702930D9C600142C01 /* KMMergeSettingWindowController.xib in Resources */,
+				AD055E8D2B88304E0035F824 /* BookmarkSheet.xib in Resources */,
 				BBA922152B4E783F0061057A /* KMPurchaseCompareDMGWindowController.xib in Resources */,
 				BB8F4552295A9FA50037EA22 /* KMCreateHeaderFooterController.xib in Resources */,
 				BBC348172955920B008D2CD1 /* KMBackgroundPropertyController.xib in Resources */,
@@ -13695,6 +13848,7 @@
 				BBEC00D5295C33D600A26C98 /* KMCreateBatesController.xib in Resources */,
 				BB328B6E2B565BEC00B382C6 /* iVersion.bundle in Resources */,
 				BB9599C82B3164B40062D346 /* KMRedactPropertiesWindowController.xib in Resources */,
+				AD055E912B88304E0035F824 /* BookmarksWindow.xib in Resources */,
 				AD1CA3FB2A05FCB60070541F /* KMAnnotationScreenViewController.xib in Resources */,
 				BB1969DC2B2842D700922736 /* SnapshotWindow.xib in Resources */,
 				AD3AAD8C2B10349600DE5FE7 /* KMHeaderFooterWindowController.xib in Resources */,
@@ -13950,6 +14104,7 @@
 				BB003032298D315E002DD1A0 /* KMPreferenceMarkupController.xib in Resources */,
 				BB89721C294AED6C0045787C /* KMWatermarkAdjectivePreViewBaseController.xib in Resources */,
 				ADB5E51F2A3711DF007110A8 /* KMSubscribeWaterMarkView.xib in Resources */,
+				AD055E8E2B88304E0035F824 /* BookmarkSheet.xib in Resources */,
 				9FDD0F9D2952FF4D000C4DAD /* comp-light.json in Resources */,
 				BBB376A22B10A7FD009539CC /* a_2b.png in Resources */,
 				ADED71DA29B57C01005EEC0A /* Localizable.strings in Resources */,
@@ -14362,6 +14517,7 @@
 				BB8F455C295AA1270037EA22 /* KMHeaderFooterPropertyInfoController.xib in Resources */,
 				BB6347BA2AF224E200F5438E /* KMConvertCollectionViewHeader.xib in Resources */,
 				9FD0FA5029D43D6800F2AB0D /* KMDeviceBrowserWindowController.xib in Resources */,
+				AD055E922B88304E0035F824 /* BookmarksWindow.xib in Resources */,
 				ADC63E3C2A49813E00854E02 /* KMSubscribeSuccessWindowController.xib in Resources */,
 				AD68783A29A60FC0005B5210 /* KMLoginView.xib in Resources */,
 				BBEFD0222AF9E5BC003FABD8 /* KMBatchOperateAddHeaderFooterViewController.xib in Resources */,
@@ -14556,6 +14712,7 @@
 				89316857296E45CA0073EA59 /* KMImageAccessoryController.xib in Resources */,
 				9FBA0EEB28FFC2FE001117AF /* Image.xcassets in Resources */,
 				BBA922172B4E783F0061057A /* KMPurchaseCompareDMGWindowController.xib in Resources */,
+				AD055E8F2B88304E0035F824 /* BookmarkSheet.xib in Resources */,
 				9F3D819829A33A290087B5AD /* KMDesignDropdown.xib in Resources */,
 				BBC8A7772B0640C200FA9377 /* KMBotaSearchViewController.xib in Resources */,
 				BB1B0B002B4FC6E900889528 /* KMOpenFileFunctionView.xib in Resources */,
@@ -14741,6 +14898,7 @@
 				ADDF833B2B391A5C00A81A4E /* CPDFSignatureWidgetAnnotation+PDFListView.m in Sources */,
 				BB7289E02B8838D8004B53B5 /* KMDataManager.swift in Sources */,
 				BB6347B42AF224D600F5438E /* KMConvertCollectionViewHeader.swift in Sources */,
+				AD055E7E2B88294F0035F824 /* SKBookmarkSheetController.m in Sources */,
 				BB897246294C19980045787C /* KMWatermarkAdjectiveListController.swift in Sources */,
 				BBC347FD295448DE008D2CD1 /* KMWatermarkTemplateModel.swift in Sources */,
 				ADDEEA5E2AD39DC500EF675D /* KMSignatureManager.swift in Sources */,
@@ -14834,6 +14992,7 @@
 				BB8F4586295B19AC0037EA22 /* KMHeaderFooterDateInfoView.swift in Sources */,
 				ADF9ED2F29A8507400C4A943 /* KMAccountInfoView.swift in Sources */,
 				9FDD0FAE29534FDC000C4DAD /* KMCompLight.swift in Sources */,
+				AD055EC42B8846EB0035F824 /* SKOutlineView.m in Sources */,
 				9F1F82F229373D6E0092C4B4 /* String+KMExtensions.swift in Sources */,
 				BB897236294B38DC0045787C /* KMWatermarkAdjectivePropertyBaseController.swift in Sources */,
 				AD85D19E2AEF927D000F4D28 /* KMQucikToolsModel.swift in Sources */,
@@ -14930,6 +15089,7 @@
 				9FF816EA2AFA5D760087EFC5 /* KMTableCellData.swift in Sources */,
 				ADDEEA822AD4DAB200EF675D /* KMSignatureWindowController.swift in Sources */,
 				BB8F457A295AFB330037EA22 /* KMHeaderFooterFontInfoView.swift in Sources */,
+				AD055E6C2B8732680035F824 /* SKTextWithIconCell.m in Sources */,
 				9F53D5572AD6908600CCF9D8 /* KMAnnotationLinkViewController.swift in Sources */,
 				BBB5C80729F4CEE40054F261 /* KMLinkAnnotationPropertyEmptyController.swift in Sources */,
 				8997010628F4082C009AF911 /* KMFromViewController.swift in Sources */,
@@ -15090,6 +15250,7 @@
 				F37322F3292DF9410013862C /* CSelfSignAnnotationFreeText.m in Sources */,
 				9F1FE4D829406E4700E952CA /* NSString+Utils.m in Sources */,
 				ADDF83AA2B391A5D00A81A4E /* DSignatureModel.swift in Sources */,
+				AD055EB42B8841780035F824 /* SKSeparatorCell.m in Sources */,
 				BB6DD81829348A00001F0544 /* KMSecureEncryptComboBoxCellView.swift in Sources */,
 				9F0CB4CD298654FA00007028 /* KMDesignToken+Height.swift in Sources */,
 				BB6013802AD38E0100A76FB2 /* CPDFTextAnnotation+PDFListView.swift in Sources */,
@@ -15129,6 +15290,7 @@
 				9FCFEC7C2AC579F600EAD2CB /* CPDFListSignatureAnnotation.swift in Sources */,
 				BBF8A3FD2AE8B03B00788BAC /* KMBatchOperateFile.swift in Sources */,
 				ADD1B6E42946C00800C3FFF7 /* KMPrintChoosePageSizePosterView.swift in Sources */,
+				AD055E662B872FB50035F824 /* SKAlias.m in Sources */,
 				9F1FE4BA29406E4700E952CA /* NSImage+CTAdditions.m in Sources */,
 				ADDF832F2B391A5C00A81A4E /* NSGeometry+PDFListView.m in Sources */,
 				BB67EE232B54FFEF00573BF0 /* ASIInputStream.m in Sources */,
@@ -15137,6 +15299,7 @@
 				AD0E8AB42A31B78900DBFD3C /* KMDMGPurchaseManager.swift in Sources */,
 				9FDD0FB229534FEA000C4DAD /* KMGlobal.swift in Sources */,
 				9F1FE49329406E4700E952CA /* common.m in Sources */,
+				AD055E712B8732E00035F824 /* SKDictionaryFormatter.m in Sources */,
 				ADE86A9D2B031FDB00414DFA /* KMCompareWindowController.swift in Sources */,
 				BB14700E299DC0D100784A6A /* OIDScopes.m in Sources */,
 				9F0CB52D298656D900007028 /* KMDesignToken+BorderWidthRight.swift in Sources */,
@@ -15273,6 +15436,7 @@
 				AD199DE72B230A9300D56FEE /* KMPrintMultipageView.swift in Sources */,
 				BB6719FD2AD2CE1B003D44D5 /* CPDFSquareAnnotation+PDFListView.swift in Sources */,
 				BB146FC3299DC0D100784A6A /* GTMReadMonitorInputStream.m in Sources */,
+				AD055E882B882E7F0035F824 /* SKBookmark.m in Sources */,
 				BB8115FB29924A5F0008F536 /* KMSecureEncryptCheckCellView.swift in Sources */,
 				AD867FAF29DFBB1200F00440 /* KMAnnotationOutlineCellView.swift in Sources */,
 				AD867F9429D955BF00F00440 /* KMBOTAOutlineCellView.swift in Sources */,
@@ -15411,6 +15575,7 @@
 				ADB2D6F9294882AE0029D2B3 /* KMTextFieldStepperView.swift in Sources */,
 				9F72D2082994BDAF00DCACF1 /* KMNotificationVC.swift in Sources */,
 				BB4DD04B299B296500E80DF6 /* KMCloudPathControl.swift in Sources */,
+				AD055EC92B8848400035F824 /* NSMenu_SKExtensions.m in Sources */,
 				ADAFDA192AE8DD6600F084BC /* KMAdvertisementTableView.swift in Sources */,
 				AD867F9029D9554F00F00440 /* KMBOTAOutlineItem.swift in Sources */,
 				BB0A823229C00400002C5C1B /* KMCommonEnum.swift in Sources */,
@@ -15702,6 +15867,8 @@
 				BB6DD8252934D056001F0544 /* KMSecureEncryptSuccessTipView.swift in Sources */,
 				BB6B43662A04919200E02B54 /* KMBaseViewController.swift in Sources */,
 				AD3AAD412B0B7B6C00DE5FE7 /* KMCompareManager.swift in Sources */,
+				AD055EB92B8843FD0035F824 /* SKToolbarItem.m in Sources */,
+				AD055E812B88294F0035F824 /* SKBookmarkController.m in Sources */,
 				ADE86AD12B04BAEA00414DFA /* KMCompareFilesView.swift in Sources */,
 				BB146FCF299DC0D100784A6A /* GTMMIMEDocument.m in Sources */,
 				9F1F82EA2935D02E0092C4B4 /* KMComboBox.swift in Sources */,
@@ -15773,6 +15940,7 @@
 				BBF170582AE296B90013CE02 /* KMView.swift in Sources */,
 				BB4EEF382976451E003A3537 /* KMRedactContentBaseView.swift in Sources */,
 				BB24D4A72977BE6700041659 /* KMRedactConfirmWindowController.swift in Sources */,
+				AD055E9F2B8836AE0035F824 /* SKDocumentController.m in Sources */,
 				9F0CB4F1298655BC00007028 /* KMDesignToken+ItemSpacing.swift in Sources */,
 				8997010E28F40842009AF911 /* KMOutlineViewController.swift in Sources */,
 				ADFA8F112B60E01C002595A4 /* KMSecureAlertView.swift in Sources */,
@@ -15970,6 +16138,7 @@
 				9F0CB5122986565700007028 /* KMDesignToken+BorderRadius.swift in Sources */,
 				9F69DBB32B512614003D4C45 /* KMAnnotationTextWidgetOptionsViewController.swift in Sources */,
 				BBF811E12B07178F0074874F /* KMExtractImageWindowController.swift in Sources */,
+				AD055E6D2B8732680035F824 /* SKTextWithIconCell.m in Sources */,
 				BB86C1EE28F544F4005AD968 /* CPDFListView+Event.m in Sources */,
 				BBF245592AE78D0300037D08 /* KMBatchOperateWindowController.swift in Sources */,
 				9F81ADC729B9B12C002251F4 /* NSButton+DesignToken.swift in Sources */,
@@ -16095,6 +16264,7 @@
 				BBF729B42B19630500576AC5 /* KMAddBatesOperationQueue.swift in Sources */,
 				9F0CB4CA2986533F00007028 /* KMDesignToken+Sizing.swift in Sources */,
 				9F8539DF29470A0700DF644E /* KMTabStripView.swift in Sources */,
+				AD055ECA2B8848400035F824 /* NSMenu_SKExtensions.m in Sources */,
 				AD9527EF295578BD0039D2BC /* KMBaseTextFieldPresenter.swift in Sources */,
 				BBFDFAA72AF3899400E08AA2 /* PasswordWindowController.swift in Sources */,
 				8942F80029260EC700389627 /* KMLeftMethodMode.swift in Sources */,
@@ -16143,6 +16313,7 @@
 				BB0FE0612B7351AA001E0F88 /* AIInfoManager.m in Sources */,
 				9F0CB50A2986563300007028 /* KMDesignToken+BorderBottom.swift in Sources */,
 				ADDF83662B391A5C00A81A4E /* DSignatureFromFileViewController.swift in Sources */,
+				AD055EB52B8841780035F824 /* SKSeparatorCell.m in Sources */,
 				BBA5429D29F13A140041BAD0 /* KMMemorandumPattern.swift in Sources */,
 				BB3A81AD2AC2A4E4006FC66C /* NSTextView+KMExtension.swift in Sources */,
 				BB49ED0F293F462E00C82CA2 /* KMConvertImageWindowController.swift in Sources */,
@@ -16353,6 +16524,7 @@
 				BB3A669F2B0752A800575343 /* KMTocOutlineView.swift in Sources */,
 				BB6719F62AD2C949003D44D5 /* CPDFRedactAnnotation+PDFListView.swift in Sources */,
 				ADCFFC0329C004AD007D3657 /* KMBookMarkTableRowView.swift in Sources */,
+				AD055E892B882E7F0035F824 /* SKBookmark.m in Sources */,
 				9FF816EF2AFA5D840087EFC5 /* KMTableDataManager.swift in Sources */,
 				ADDEEA872AD7805200EF675D /* KMGeneralButton.swift in Sources */,
 				BB5BE4EE2B060E2F00D51BF2 /* KMLanguageViewController.swift in Sources */,
@@ -16376,6 +16548,7 @@
 				BB3A429F2B4BF03A006D0642 /* KMSystemPDFMenu.swift in Sources */,
 				BBAFFB1C29CDD19C00C56112 /* KMMergeSelect.swift in Sources */,
 				9F78EFBC28F7C1CC001E66F4 /* KMHomeViewController.swift in Sources */,
+				AD055EA02B8836AE0035F824 /* SKDocumentController.m in Sources */,
 				9FBA0EEF28FFC716001117AF /* KMHomeFastToolViewController.swift in Sources */,
 				ADE8BC2629F7CCA600570F89 /* KMPageNumberDisplayView.swift in Sources */,
 				AD3AAD822B0E004B00DE5FE7 /* KMPostionIndicateView.swift in Sources */,
@@ -16394,6 +16567,7 @@
 				BBC348032955403D008D2CD1 /* KMWatermarkFilePropertyInfoController.swift in Sources */,
 				BB147027299DC0D100784A6A /* OIDTokenRequest.m in Sources */,
 				BBFE6E592930724B00142C01 /* KMMergePageModel.swift in Sources */,
+				AD055E822B88294F0035F824 /* SKBookmarkController.m in Sources */,
 				ADDF83452B391A5C00A81A4E /* DSignatureManager.swift in Sources */,
 				BB2F61592966B69D001CB369 /* KMWatermarkPropertyHomeController.swift in Sources */,
 				BB146FC4299DC0D100784A6A /* GTMReadMonitorInputStream.m in Sources */,
@@ -16602,6 +16776,7 @@
 				BBA19F4029ADE40A001A285A /* KMCellEmptyView.m in Sources */,
 				89316823296D73CC0073EA59 /* KMSignatureAnnotationViewController.m in Sources */,
 				ADDF83422B391A5C00A81A4E /* DSignatureConfigWindowController.swift in Sources */,
+				AD055E7F2B88294F0035F824 /* SKBookmarkSheetController.m in Sources */,
 				BB88E43C294023CB002B3655 /* KMDocumentModel.swift in Sources */,
 				BBB14A6429792D6900936EDB /* KMRedactPageRangeContentView.swift in Sources */,
 				9F8810862B564E9700F69815 /* KMAnnotationButtonWidgetOptionsViewController.swift in Sources */,
@@ -16626,6 +16801,7 @@
 				9FCFEC9D2AD152FA00EAD2CB /* CustomAlertView.swift in Sources */,
 				BB67EE1B2B54FFEF00573BF0 /* ASIHTTPRequest.m in Sources */,
 				BB147000299DC0D100784A6A /* OIDRedirectHTTPHandler.m in Sources */,
+				AD055E672B872FB50035F824 /* SKAlias.m in Sources */,
 				BB147003299DC0D100784A6A /* OIDScopeUtilities.m in Sources */,
 				BB1B0AF62B4FC6E900889528 /* KMConvertGuideView.swift in Sources */,
 				AD867FA729DFB77500F00440 /* KMAnnotationOutlineView.swift in Sources */,
@@ -16664,6 +16840,7 @@
 				BB4EEF4D2976544F003A3537 /* KMRedactAligementView.swift in Sources */,
 				BBF811F22B0763930074874F /* PDFConvertObject.swift in Sources */,
 				9F1FE4FA29406E4700E952CA /* CTTabStripView.m in Sources */,
+				AD055E722B8732E00035F824 /* SKDictionaryFormatter.m in Sources */,
 				BB78EAAB2B561F9700121691 /* KMFullScreenWindow.swift in Sources */,
 				BB31DA632AFA3088006D63CB /* KMPreferenceController.swift in Sources */,
 				AD199DF02B23121000D56FEE /* KMPrintPamphletView.swift in Sources */,
@@ -16710,9 +16887,11 @@
 				BB10FAF72AFE2C2900F18D65 /* KMNumberArrayFormatter.swift in Sources */,
 				BBD7FE082A13241C00F96075 /* KMOutlineEditViewController.swift in Sources */,
 				BB1B0AF32B4FC6E900889528 /* KMFunctionGuideNameItemView.swift in Sources */,
+				AD055EC52B8846EB0035F824 /* SKOutlineView.m in Sources */,
 				BB0FE0592B734DD1001E0F88 /* KMAIRequestServerManager.swift in Sources */,
 				BB8F4558295AA1270037EA22 /* KMHeaderFooterPropertyInfoController.swift in Sources */,
 				AD88108E29A760D100178CA1 /* KMRegisterPresenter.swift in Sources */,
+				AD055EBA2B8843FD0035F824 /* SKToolbarItem.m in Sources */,
 				BB146FB5299DC0D100784A6A /* GTLRUtilities.m in Sources */,
 				BBC745F8296178BD0072C2ED /* KMCropTools.swift in Sources */,
 				BBDA8A6E2A31F9A6006A2C4E /* KMDesignStepperView.swift in Sources */,
@@ -16979,6 +17158,7 @@
 				BBFA1CE42B60DD970053AD4A /* KMScreenShotEditViewController.swift in Sources */,
 				BB146FD1299DC0D100784A6A /* GTMMIMEDocument.m in Sources */,
 				9FCFECA62AD237B500EAD2CB /* KMBatchTableRowView.swift in Sources */,
+				AD055E832B88294F0035F824 /* SKBookmarkController.m in Sources */,
 				BBAC26A62AFE134300563A08 /* KMToolbarItemPopViewController.swift in Sources */,
 				BB93CDEB2AE7B6E100B29C57 /* KMToolbarView.swift in Sources */,
 				AD1D48232AFB6BBA007AC1F0 /* KMMergeView.swift in Sources */,
@@ -17240,6 +17420,7 @@
 				ADBC2D2A299DCA76006280C8 /* NSTextField+Layer.swift in Sources */,
 				AD867FB529DFBB2700F00440 /* KMAnnotationOutlineSectionView.swift in Sources */,
 				ADBC373E29CA9AE100D93208 /* KMComparativeManager.swift in Sources */,
+				AD055E682B872FB50035F824 /* SKAlias.m in Sources */,
 				BB5F8A1329BB04F000365ADB /* GBDeviceInfo_Common.m in Sources */,
 				BBFCCE0A2B56988C003742B3 /* KMPreferenceCommon.swift in Sources */,
 				BB2F9AB12AFCAE1F00F9DD93 /* KMProfileTitleCellView.swift in Sources */,
@@ -17398,6 +17579,7 @@
 				89E4E7842967BF5A002DBA6F /* KMCustomizeStampViewController.m in Sources */,
 				BBFA1CD82B60A0670053AD4A /* KMScreenShotMaskView.swift in Sources */,
 				BB146FFB299DC0D100784A6A /* OIDExternalUserAgentMac.m in Sources */,
+				AD055ECB2B8848400035F824 /* NSMenu_SKExtensions.m in Sources */,
 				ADDEEA5C2AD399BB00EF675D /* KMSignature.swift in Sources */,
 				BBBB6CD82AD150D20035AA66 /* CPDFCircleAnnotation+PDFListView.swift in Sources */,
 				BBD7FE092A13241E00F96075 /* KMOutlineEditViewController.swift in Sources */,
@@ -17436,6 +17618,7 @@
 				9F8810872B564E9700F69815 /* KMAnnotationButtonWidgetOptionsViewController.swift in Sources */,
 				9F0CB527298656BA00007028 /* KMDesignToken+BorderWidth.swift in Sources */,
 				AD055E622B85E04C0035F824 /* KMTextWithIconCell.swift in Sources */,
+				AD055E802B88294F0035F824 /* SKBookmarkSheetController.m in Sources */,
 				ADDF835B2B391A5C00A81A4E /* CDSignatureCertificateStateViewController.swift in Sources */,
 				ADE86AB82B0343E600414DFA /* KMWatermarkView.swift in Sources */,
 				BB897277294DC04F0045787C /* KMWatermartAdjectivePageRangeView.swift in Sources */,
@@ -17525,6 +17708,7 @@
 				8997012128F41AB8009AF911 /* KMLeftSideViewController.swift in Sources */,
 				9F88109F2B5762BD00F69815 /* KMAnnotationButtonOptionsViewController.swift in Sources */,
 				ADDF832B2B391A5C00A81A4E /* CPDFSelection+PDFListView.m in Sources */,
+				AD055EC62B8846EB0035F824 /* SKOutlineView.m in Sources */,
 				BB90E4F42AF37F9F00B04B9F /* KMCustomViewButton.swift in Sources */,
 				BB4A948F2B04726A00940F8B /* KMOCTool.m in Sources */,
 				F35B484D29A4903300756255 /* NSPointerArray+PDFListView.m in Sources */,
@@ -17728,6 +17912,7 @@
 				9F53D5592AD6908600CCF9D8 /* KMAnnotationLinkViewController.swift in Sources */,
 				89E4E7372964148E002DBA6F /* KMAnnotationPropertiesViewController.m in Sources */,
 				BB276A542B03776200AB5578 /* KMConvertOperationQueue.swift in Sources */,
+				AD055E8A2B882E7F0035F824 /* SKBookmark.m in Sources */,
 				ADDF83462B391A5C00A81A4E /* DSignatureManager.swift in Sources */,
 				BB1BFF7B2AEA0B8E003EB179 /* KMBatchOperateRightViewController.swift in Sources */,
 				F37322F8292DF9410013862C /* CSelfSignAnnotation.m in Sources */,
@@ -17813,9 +17998,11 @@
 				BBEFD02A2AFA285A003FABD8 /* KMHeaderFooterTableCellView.swift in Sources */,
 				BBC3482629559506008D2CD1 /* KMBackgroundManager.swift in Sources */,
 				BBCE57162A72713A00508EFC /* NSViewController+KMExtension.swift in Sources */,
+				AD055E6E2B8732680035F824 /* SKTextWithIconCell.m in Sources */,
 				BB146FB6299DC0D100784A6A /* GTLRUtilities.m in Sources */,
 				9F8539CD29430BF300DF644E /* KMBrowserWindowController.swift in Sources */,
 				BB67EE1C2B54FFEF00573BF0 /* ASIHTTPRequest.m in Sources */,
+				AD055E732B8732E00035F824 /* SKDictionaryFormatter.m in Sources */,
 				BB8F4567295AA3ED0037EA22 /* KMHeaderFooterManager.swift in Sources */,
 				9F705F78291A3A84005199AD /* KMHistoryFileDeleteWindowController.swift in Sources */,
 				BB8810872B4F7C2200AFA63E /* KMVerificationAlertViewController.m in Sources */,
@@ -17876,6 +18063,7 @@
 				89D2D2C7294972B900BFF5FE /* KMFormCellView.swift in Sources */,
 				9F080B16298CFDB300FC27DA /* KMTextImageButtonVC.swift in Sources */,
 				BBFBE74828DD7DB8008B2335 /* AppDelegate.swift in Sources */,
+				AD055EBB2B8843FD0035F824 /* SKToolbarItem.m in Sources */,
 				BB3A66AD2B078FB200575343 /* KMNoteTableViewCell.swift in Sources */,
 				BB1B0AC12B4FC6E900889528 /* KMGuideInfoWindowController.swift in Sources */,
 				BB853C932AF8DCBF009C20C1 /* KMBatchOperateRemovePasswordViewController.swift in Sources */,
@@ -17913,6 +18101,7 @@
 				BBAFFB1D29CDD19C00C56112 /* KMMergeSelect.swift in Sources */,
 				9F8539D42943121100DF644E /* KMSegmentedBox.swift in Sources */,
 				ADDF833D2B391A5C00A81A4E /* CPDFSignatureWidgetAnnotation+PDFListView.m in Sources */,
+				AD055EA12B8836AE0035F824 /* SKDocumentController.m in Sources */,
 				9F1FE4DD29406E4700E952CA /* NSURL+Utils.m in Sources */,
 				ADDF83A92B391A5D00A81A4E /* DSignatureApperanceManager.swift in Sources */,
 				BB4F7E972B0C857D0077EC8C /* KMNoteTypeCollectionViewItem.swift in Sources */,
@@ -17972,6 +18161,7 @@
 				BBB1A3A829F6B66400E54E47 /* NSPanel+KMExtension.swift in Sources */,
 				AD867FB129DFBB1200F00440 /* KMAnnotationOutlineCellView.swift in Sources */,
 				9F1FE50129406E4700E952CA /* CTTabStripModel.m in Sources */,
+				AD055EB62B8841780035F824 /* SKSeparatorCell.m in Sources */,
 				BBF729B12B1962C900576AC5 /* KMRemoveHeaderFooterQueue.swift in Sources */,
 				AD85D1A62AF09864000F4D28 /* KMHomeQuickToolsWindowController.swift in Sources */,
 				BB35C4A12975362900D46EE2 /* KMRedactTopToolBar.swift in Sources */,

+ 1 - 1
PDF Office/PDF Reader Pro.xcodeproj/xcshareddata/xcschemes/PDF Reader Pro Edition.xcscheme

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Scheme
    LastUpgradeVersion = "1520"
-   version = "1.8">
+   version = "1.7">
    <BuildAction
       parallelizeBuildables = "YES"
       buildImplicitDependencies = "YES">