Browse Source

【2025】【Markup】便签注释逻辑调整

niehaoyu 3 months ago
parent
commit
582fdc71cf
26 changed files with 1321 additions and 186 deletions
  1. 16 16
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/AppKitCategories/CPDFListAnnotationNoteWindowController.xib
  2. 2 2
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/AppKitCategories/CPDFListEditAnnotationViewController.xib
  3. 6 1
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/CPDFAnnotationConfig.swift
  4. 6 5
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/CPDFTextAnnotation+PDFListView.swift
  5. 1 1
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.h
  6. 23 2
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListViewExtension/CPDFListView+Annotations.swift
  7. 6 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/Toolbar/Markup/Note/Contents.json
  8. 12 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/Toolbar/Markup/Note/note_1.imageset/Contents.json
  9. 90 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/Toolbar/Markup/Note/note_1.imageset/note_1.pdf
  10. 12 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/Toolbar/Markup/Note/note_2.imageset/Contents.json
  11. 97 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/Toolbar/Markup/Note/note_2.imageset/note_2.pdf
  12. 12 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/Toolbar/Markup/Note/note_3.imageset/Contents.json
  13. 83 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/Toolbar/Markup/Note/note_3.imageset/note_3.pdf
  14. 12 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/Toolbar/Markup/Note/note_4.imageset/Contents.json
  15. 60 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/Toolbar/Markup/Note/note_4.imageset/note_4.pdf
  16. 12 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/Toolbar/Markup/Note/note_5.imageset/Contents.json
  17. 88 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/Toolbar/Markup/Note/note_5.imageset/note_5.pdf
  18. 12 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/Toolbar/Markup/Note/note_6.imageset/Contents.json
  19. 70 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/Toolbar/Markup/Note/note_6.imageset/note_6.pdf
  20. 12 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/Toolbar/Markup/Note/note_7.imageset/Contents.json
  21. 102 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/Toolbar/Markup/Note/note_7.imageset/note_7.pdf
  22. 94 67
      PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/KMRightSideController.swift
  23. 12 24
      PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/Highlight/KMHighlightController.swift
  24. 182 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/Note/KMNoteController.swift
  25. 171 5
      PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/Note/KMNoteController.xib
  26. 128 63
      PDF Office/PDF Reader Pro.xcodeproj/xcuserdata/kdanmobile.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

+ 16 - 16
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/AppKitCategories/CPDFListAnnotationNoteWindowController.xib

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21507" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22505" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
     <dependencies>
         <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21507"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22505"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
@@ -22,7 +22,7 @@
             <windowStyleMask key="styleMask" titled="YES" fullSizeContentView="YES"/>
             <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
             <rect key="contentRect" x="1019" y="610" width="432" height="222"/>
-            <rect key="screenRect" x="0.0" y="0.0" width="1680" height="1025"/>
+            <rect key="screenRect" x="0.0" y="0.0" width="1920" height="1055"/>
             <value key="minSize" type="size" width="432" height="222"/>
             <value key="maxSize" type="size" width="432" height="222"/>
             <value key="minFullScreenContentSize" type="size" width="432" height="222"/>
@@ -33,10 +33,6 @@
                 <subviews>
                     <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="oTs-Lx-i2P">
                         <rect key="frame" x="233" y="9" width="94" height="44"/>
-                        <constraints>
-                            <constraint firstAttribute="width" constant="80" id="GJJ-WK-ESM"/>
-                            <constraint firstAttribute="height" constant="32" id="fAB-6b-WIL"/>
-                        </constraints>
                         <buttonCell key="cell" type="push" title="Cancel" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="nTr-Lz-ngY">
                             <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                             <font key="font" metaFont="system"/>
@@ -44,6 +40,10 @@
 Gw
 </string>
                         </buttonCell>
+                        <constraints>
+                            <constraint firstAttribute="width" constant="80" id="GJJ-WK-ESM"/>
+                            <constraint firstAttribute="height" constant="32" id="fAB-6b-WIL"/>
+                        </constraints>
                         <connections>
                             <action selector="buttonItemClick_Cancel:" target="-2" id="NKY-2l-jfb"/>
                         </connections>
@@ -57,15 +57,15 @@ Gw
                                 <scrollView borderType="none" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" translatesAutoresizingMaskIntoConstraints="NO" id="DMr-kv-h9X">
                                     <rect key="frame" x="0.0" y="0.0" width="398" height="106"/>
                                     <clipView key="contentView" drawsBackground="NO" id="i1t-gU-3aH">
-                                        <rect key="frame" x="0.0" y="0.0" width="398" height="106"/>
+                                        <rect key="frame" x="0.0" y="0.0" width="383" height="106"/>
                                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                         <subviews>
                                             <textView drawsBackground="NO" importsGraphics="NO" richText="NO" verticallyResizable="YES" spellingCorrection="YES" smartInsertDelete="YES" id="Uh9-lF-veX">
-                                                <rect key="frame" x="0.0" y="0.0" width="398" height="106"/>
+                                                <rect key="frame" x="0.0" y="0.0" width="383" height="106"/>
                                                 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                                 <color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
                                                 <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                                                <size key="minSize" width="398" height="106"/>
+                                                <size key="minSize" width="383" height="106"/>
                                                 <size key="maxSize" width="398" height="10000000"/>
                                                 <color key="insertionPointColor" name="textColor" catalog="System" colorSpace="catalog"/>
                                             </textView>
@@ -76,7 +76,7 @@ Gw
                                         <autoresizingMask key="autoresizingMask"/>
                                     </scroller>
                                     <scroller key="verticalScroller" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="e6O-T1-Mzb">
-                                        <rect key="frame" x="382" y="0.0" width="16" height="106"/>
+                                        <rect key="frame" x="383" y="0.0" width="15" height="106"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                     </scroller>
                                 </scrollView>
@@ -96,10 +96,6 @@ Gw
                     </box>
                     <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="5YO-PQ-Jry">
                         <rect key="frame" x="329" y="9" width="94" height="44"/>
-                        <constraints>
-                            <constraint firstAttribute="height" constant="32" id="7L0-nN-vjJ"/>
-                            <constraint firstAttribute="width" constant="80" id="DDp-cb-6ct"/>
-                        </constraints>
                         <buttonCell key="cell" type="push" title="OK" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="PGR-iC-CVd">
                             <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                             <font key="font" metaFont="system"/>
@@ -107,11 +103,15 @@ Gw
 DQ
 </string>
                         </buttonCell>
+                        <constraints>
+                            <constraint firstAttribute="height" constant="32" id="7L0-nN-vjJ"/>
+                            <constraint firstAttribute="width" constant="80" id="DDp-cb-6ct"/>
+                        </constraints>
                         <connections>
                             <action selector="buttonItemClick_Sure:" target="-2" id="wk4-Fn-MYM"/>
                         </connections>
                     </button>
-                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="lFm-XQ-Nwc">
+                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="lFm-XQ-Nwc">
                         <rect key="frame" x="14" y="187" width="73" height="19"/>
                         <textFieldCell key="cell" lineBreakMode="clipping" title="Add Note" id="jgq-BQ-kjA">
                             <font key="font" metaFont="system" size="16"/>

+ 2 - 2
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/AppKitCategories/CPDFListEditAnnotationViewController.xib

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22154" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22505" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
     <dependencies>
         <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22154"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22505"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>

+ 6 - 1
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/CPDFAnnotationConfig.swift

@@ -27,8 +27,10 @@ class CPDFAnnotationConfig: NSObject {
             CPDFAnnotationConfig.setDefaultColor(color, toKey: CUnderlineNoteColorKey)
         } else if type == .squiggly {
             CPDFAnnotationConfig.setDefaultColor(color, toKey: CSquigglyNoteColorKey)
+        } else if type == .anchored {
+            CPDFAnnotationConfig.setDefaultColor(color, toKey: CAnchoredNoteColorKey)
         }
-    }
+    } 
     
     func colorWithType(_ type: CAnnotationType) -> NSColor? {
         if type == .highlight {
@@ -39,6 +41,8 @@ class CPDFAnnotationConfig: NSObject {
             return CPDFAnnotationConfig.getDefaultColor(forKey: CUnderlineNoteColorKey)
         } else if type == .squiggly {
             return CPDFAnnotationConfig.getDefaultColor(forKey: CSquigglyNoteColorKey)
+        } else if type == .anchored {
+            return CPDFAnnotationConfig.getDefaultColor(forKey: CAnchoredNoteColorKey)
         }
         return nil
     }
@@ -70,6 +74,7 @@ class CPDFAnnotationConfig: NSObject {
     }
     
     
+    
 }
 
 //MARK: - Class

+ 6 - 5
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/CPDFTextAnnotation+PDFListView.swift

@@ -10,11 +10,12 @@ import Foundation
 @objc extension CPDFTextAnnotation {
     convenience init(PDFListViewNoteWith document: CPDFDocument) {
         self.init(document: document)
-        if let model = CPDFAnnotationModel(annotationType: .anchored) {
-            self.color = model.color()
-            self.opacity = model.opacity()
-            self.setIconType(model.anchoredIconType())
-        }
+     
+        self.color = CPDFAnnotationConfig.standard.colorWithType(.anchored)
+        self.opacity = 1
+        let type = CPDFTextAnnotationIconType(rawValue: CPDFAnnotationConfig.getIntValue(forKey: CAnchoredNoteIconTypeKey)) ?? .comment
+        self.setIconType(type)
+        
     }
     
     override func isMovable() -> Bool {

+ 1 - 1
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.h

@@ -45,7 +45,7 @@ typedef NS_ENUM(NSInteger, CPDFViewSidebarSpeedMode) {
 
 typedef NS_ENUM(NSInteger, CAnnotationType) {
     CAnnotationTypeUnkown = 0,
-    CAnnotationTypeAnchored,
+    CAnnotationTypeAnchored,  //Note
     CAnnotationTypeLink,
     CAnnotationTypeFreeText,
     CAnnotationTypeLine,

+ 23 - 2
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListViewExtension/CPDFListView+Annotations.swift

@@ -9,7 +9,7 @@ import Foundation
 
 extension CPDFListView {
     
-    
+    //MARK: -Color
     func setAnnotationsColor(_ annotations: [CPDFAnnotation], _ color: NSColor?) {
         guard let resultColor = color else {
             return
@@ -25,10 +25,17 @@ extension CPDFListView {
                 }
                 
                 CPDFAnnotationConfig.standard.setColor(resultColor, toType: (annotation as! CPDFMarkupAnnotation).exchangeToAnnotationType((annotation as! CPDFMarkupAnnotation).markupType()))
-             }
+            } else if annotation is CPDFTextAnnotation {
+                (annotation as! CPDFTextAnnotation).color = resultColor
+                
+                self.setNeedsDisplay(annotation)
+                
+                CPDFAnnotationConfig.standard.setColor(resultColor, toType: .anchored)
+            }
         }
     }
      
+    //MARK: -Opacity
     func setAnnotationsOpacity(_ annotations: [CPDFAnnotation], _ opacity: CGFloat) {
         for annotation in annotations {
             if annotation is CPDFMarkupAnnotation {
@@ -45,4 +52,18 @@ extension CPDFListView {
             }
         }
     }
+    
+    //MARK: -AnchoredType
+    func setAnchoredAnnotationType(_ annotations: [CPDFAnnotation], _ type: CPDFTextAnnotationIconType) {
+        for annotation in annotations {
+            if annotation is CPDFTextAnnotation {
+                (annotation as! CPDFTextAnnotation).setIconType(type)
+                self.setNeedsDisplay(annotation)
+                
+                CPDFAnnotationConfig.setDefaultIntValue(type.rawValue, toKey: CAnchoredNoteIconTypeKey)
+            }
+        }
+    }
+    
+    
 }

+ 6 - 0
PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/Toolbar/Markup/Note/Contents.json

@@ -0,0 +1,6 @@
+{
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

+ 12 - 0
PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/Toolbar/Markup/Note/note_1.imageset/Contents.json

@@ -0,0 +1,12 @@
+{
+  "images" : [
+    {
+      "filename" : "note_1.pdf",
+      "idiom" : "universal"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

+ 90 - 0
PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/Toolbar/Markup/Note/note_1.imageset/note_1.pdf

@@ -0,0 +1,90 @@
+%PDF-1.7
+
+1 0 obj
+  << >>
+endobj
+
+2 0 obj
+  << /Length 3 0 R >>
+stream
+/DeviceRGB CS
+/DeviceRGB cs
+q
+1.000000 0.000000 -0.000000 1.000000 2.000000 2.000000 cm
+0.000000 0.000000 0.000000 scn
+0.000000 10.000000 m
+0.000000 10.552285 0.447715 11.000000 1.000000 11.000000 c
+11.000001 11.000000 l
+11.552286 11.000000 12.000001 10.552284 12.000001 10.000000 c
+12.000001 3.000000 l
+12.000001 2.447715 11.552285 2.000000 11.000001 2.000000 c
+5.000000 2.000000 l
+2.000000 0.000000 l
+2.000000 2.000000 l
+1.000000 2.000000 l
+0.447715 2.000000 0.000000 2.447715 0.000000 3.000000 c
+0.000000 10.000000 l
+h
+2.000000 8.000000 m
+9.000000 8.000000 l
+9.000000 9.000000 l
+2.000000 9.000000 l
+2.000000 8.000000 l
+h
+2.000000 5.000000 m
+7.000000 5.000000 l
+7.000000 6.000000 l
+2.000000 6.000000 l
+2.000000 5.000000 l
+h
+f*
+n
+Q
+
+endstream
+endobj
+
+3 0 obj
+  733
+endobj
+
+4 0 obj
+  << /Annots []
+     /Type /Page
+     /MediaBox [ 0.000000 0.000000 16.000000 16.000000 ]
+     /Resources 1 0 R
+     /Contents 2 0 R
+     /Parent 5 0 R
+  >>
+endobj
+
+5 0 obj
+  << /Kids [ 4 0 R ]
+     /Count 1
+     /Type /Pages
+  >>
+endobj
+
+6 0 obj
+  << /Pages 5 0 R
+     /Type /Catalog
+  >>
+endobj
+
+xref
+0 7
+0000000000 65535 f
+0000000010 00000 n
+0000000034 00000 n
+0000000823 00000 n
+0000000845 00000 n
+0000001018 00000 n
+0000001092 00000 n
+trailer
+<< /ID [ (some) (id) ]
+   /Root 6 0 R
+   /Size 7
+>>
+startxref
+1151
+%%EOF

+ 12 - 0
PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/Toolbar/Markup/Note/note_2.imageset/Contents.json

@@ -0,0 +1,12 @@
+{
+  "images" : [
+    {
+      "filename" : "note_2.pdf",
+      "idiom" : "universal"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

+ 97 - 0
PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/Toolbar/Markup/Note/note_2.imageset/note_2.pdf

@@ -0,0 +1,97 @@
+%PDF-1.7
+
+1 0 obj
+  << >>
+endobj
+
+2 0 obj
+  << /Length 3 0 R >>
+stream
+/DeviceRGB CS
+/DeviceRGB cs
+q
+1.000000 0.000000 -0.000000 1.000000 3.000000 2.000000 cm
+0.000000 0.000000 0.000000 scn
+0.000000 11.000000 m
+0.000000 11.552285 0.447715 12.000000 1.000000 12.000000 c
+9.000000 12.000000 l
+9.552284 12.000000 10.000000 11.552284 10.000000 11.000000 c
+10.000000 4.600000 l
+10.000000 4.047716 9.552284 3.600000 9.000000 3.600000 c
+7.428572 3.600000 l
+6.876287 3.600000 6.428572 3.152285 6.428572 2.600000 c
+6.428572 1.000001 l
+6.428572 0.447716 5.980856 0.000000 5.428572 0.000000 c
+1.000000 0.000000 l
+0.447715 0.000000 0.000000 0.447716 0.000000 1.000000 c
+0.000000 11.000000 l
+h
+7.000000 2.000000 m
+7.000000 2.552285 7.447715 3.000000 8.000000 3.000000 c
+10.000000 3.000000 l
+7.000000 0.000000 l
+7.000000 2.000000 l
+h
+8.000000 9.000000 m
+8.000000 8.000000 l
+2.000000 8.000000 l
+2.000000 9.000000 l
+8.000000 9.000000 l
+h
+6.000000 6.000000 m
+6.000000 5.000000 l
+2.000000 5.000000 l
+2.000000 6.000000 l
+6.000000 6.000000 l
+h
+f*
+n
+Q
+
+endstream
+endobj
+
+3 0 obj
+  960
+endobj
+
+4 0 obj
+  << /Annots []
+     /Type /Page
+     /MediaBox [ 0.000000 0.000000 16.000000 16.000000 ]
+     /Resources 1 0 R
+     /Contents 2 0 R
+     /Parent 5 0 R
+  >>
+endobj
+
+5 0 obj
+  << /Kids [ 4 0 R ]
+     /Count 1
+     /Type /Pages
+  >>
+endobj
+
+6 0 obj
+  << /Pages 5 0 R
+     /Type /Catalog
+  >>
+endobj
+
+xref
+0 7
+0000000000 65535 f
+0000000010 00000 n
+0000000034 00000 n
+0000001050 00000 n
+0000001072 00000 n
+0000001245 00000 n
+0000001319 00000 n
+trailer
+<< /ID [ (some) (id) ]
+   /Root 6 0 R
+   /Size 7
+>>
+startxref
+1378
+%%EOF

+ 12 - 0
PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/Toolbar/Markup/Note/note_3.imageset/Contents.json

@@ -0,0 +1,12 @@
+{
+  "images" : [
+    {
+      "filename" : "note_3.pdf",
+      "idiom" : "universal"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

+ 83 - 0
PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/Toolbar/Markup/Note/note_3.imageset/note_3.pdf

@@ -0,0 +1,83 @@
+%PDF-1.7
+
+1 0 obj
+  << >>
+endobj
+
+2 0 obj
+  << /Length 3 0 R >>
+stream
+/DeviceRGB CS
+/DeviceRGB cs
+q
+0.710741 0.703454 -0.710741 0.703454 11.621276 -0.769540 cm
+0.000000 0.000000 0.000000 scn
+4.740851 7.533303 m
+6.199245 8.003308 7.254364 9.371593 7.254364 10.986313 c
+7.254364 12.989551 5.630419 14.613495 3.627182 14.613495 c
+1.623945 14.613495 0.000000 12.989551 0.000000 10.986313 c
+0.000000 9.448393 0.957136 8.134025 2.308223 7.606393 c
+2.308223 2.412928 l
+3.627198 1.093953 l
+5.605661 3.072415 l
+4.616430 4.391391 l
+5.935405 6.040110 l
+4.740851 7.533303 l
+h
+4.616572 11.975391 m
+4.616572 11.429054 4.173678 10.986160 3.627340 10.986160 c
+3.081003 10.986160 2.638109 11.429054 2.638109 11.975391 c
+2.638109 12.521729 3.081003 12.964622 3.627340 12.964622 c
+4.173678 12.964622 4.616572 12.521729 4.616572 11.975391 c
+h
+f*
+n
+Q
+
+endstream
+endobj
+
+3 0 obj
+  760
+endobj
+
+4 0 obj
+  << /Annots []
+     /Type /Page
+     /MediaBox [ 0.000000 0.000000 16.000000 15.999817 ]
+     /Resources 1 0 R
+     /Contents 2 0 R
+     /Parent 5 0 R
+  >>
+endobj
+
+5 0 obj
+  << /Kids [ 4 0 R ]
+     /Count 1
+     /Type /Pages
+  >>
+endobj
+
+6 0 obj
+  << /Pages 5 0 R
+     /Type /Catalog
+  >>
+endobj
+
+xref
+0 7
+0000000000 65535 f
+0000000010 00000 n
+0000000034 00000 n
+0000000850 00000 n
+0000000872 00000 n
+0000001045 00000 n
+0000001119 00000 n
+trailer
+<< /ID [ (some) (id) ]
+   /Root 6 0 R
+   /Size 7
+>>
+startxref
+1178
+%%EOF

+ 12 - 0
PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/Toolbar/Markup/Note/note_4.imageset/Contents.json

@@ -0,0 +1,12 @@
+{
+  "images" : [
+    {
+      "filename" : "note_4.pdf",
+      "idiom" : "universal"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

+ 60 - 0
PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/Toolbar/Markup/Note/note_4.imageset/note_4.pdf

@@ -0,0 +1,60 @@
+%PDF-1.7
+
+1 0 obj
+  << >>
+endobj
+
+2 0 obj
+  << /Filter /FlateDecode
+     /Length 3 0 R
+  >>
+stream
+xm“Ín1…÷ów�Dj;þË�X�0*©­„*ñüœÌ�z"•»ò|‰�í߇/�ï�ß¿~º}þ±=\_ûëögãFÇïFoÁÇŠêLÞûóV×Þ¯ûËæoEŸ·Ñ:÷ ¼—¢4O—!*‰}»`iTp�UÂ…öíæVùÒ(Rû5à© oÿçz‘}û…Ù»‹wºió1„³/lÓž·§‹YÓèÃ:ôLÜQÊZ �ó-“©QаD…@™$`*œA·ld1t’!�,‚Ë=Ýy+ÓˆdôP,›¥�8%”r:Œ¡‡+DYÌ�/²oÚR�L.¦�ï]A‰Ó˜¥cÖ³yIŽ¼…G XÂ]ùÎà„Þ™Ì8Ø‘{0O8\%a“’ÙAÎîaÓèaÓ€“ìð9B"ýb˜‘IÂX‚‹Àòð™·01
xZ³Z$‚X"o	玧RÜöùF}CËZš
+ÁÌNB½›ãiAÑL—I0§æô¹XíÒ²7›[GbÛ)˜R]ì¾uC­/Ì››ÊT:Û>IÇhI9Pua682pëTêÄ™�Ý¿×+2»�sÃýb†<ÆN‚œJ©zŪ«RZ:?ë™ÿµŸ¶—íÛö±|õT
+endstream
+endobj
+
+3 0 obj
+  483
+endobj
+
+4 0 obj
+  << /Annots []
+     /Type /Page
+     /MediaBox [ 0.000000 0.000000 16.000000 16.000000 ]
+     /Resources 1 0 R
+     /Contents 2 0 R
+     /Parent 5 0 R
+  >>
+endobj
+
+5 0 obj
+  << /Kids [ 4 0 R ]
+     /Count 1
+     /Type /Pages
+  >>
+endobj
+
+6 0 obj
+  << /Pages 5 0 R
+     /Type /Catalog
+  >>
+endobj
+
+xref
+0 7
+0000000000 65535 f
+0000000010 00000 n
+0000000034 00000 n
+0000000601 00000 n
+0000000623 00000 n
+0000000796 00000 n
+0000000870 00000 n
+trailer
+<< /ID [ (some) (id) ]
+   /Root 6 0 R
+   /Size 7
+>>
+startxref
+929
+%%EOF

+ 12 - 0
PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/Toolbar/Markup/Note/note_5.imageset/Contents.json

@@ -0,0 +1,12 @@
+{
+  "images" : [
+    {
+      "filename" : "note_5.pdf",
+      "idiom" : "universal"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

+ 88 - 0
PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/Toolbar/Markup/Note/note_5.imageset/note_5.pdf

@@ -0,0 +1,88 @@
+%PDF-1.7
+
+1 0 obj
+  << >>
+endobj
+
+2 0 obj
+  << /Length 3 0 R >>
+stream
+/DeviceRGB CS
+/DeviceRGB cs
+q
+1.000000 0.000000 -0.000000 1.000000 3.666504 3.000000 cm
+0.000000 0.000000 0.000000 scn
+2.999919 9.995184 m
+2.944798 9.998380 2.889255 10.000000 2.833333 10.000000 c
+1.268526 10.000000 0.000000 8.731474 0.000000 7.166667 c
+0.000000 5.601860 1.268526 4.333333 2.833333 4.333333 c
+3.003999 4.333333 3.171140 4.348423 3.333496 4.377340 c
+3.333496 0.000000 l
+4.666830 0.000000 l
+4.666830 8.666661 l
+5.999918 8.666661 l
+5.999918 -0.000006 l
+7.333252 -0.000006 l
+7.333252 8.666661 l
+8.333252 8.666661 l
+8.333252 9.999995 l
+7.333252 9.999995 l
+5.999918 9.999995 l
+4.666830 9.999995 l
+4.666830 10.000000 l
+3.333496 10.000000 l
+3.333496 9.999995 l
+2.999919 9.999995 l
+2.999919 9.995184 l
+h
+f*
+n
+Q
+
+endstream
+endobj
+
+3 0 obj
+  719
+endobj
+
+4 0 obj
+  << /Annots []
+     /Type /Page
+     /MediaBox [ 0.000000 0.000000 16.000000 16.000000 ]
+     /Resources 1 0 R
+     /Contents 2 0 R
+     /Parent 5 0 R
+  >>
+endobj
+
+5 0 obj
+  << /Kids [ 4 0 R ]
+     /Count 1
+     /Type /Pages
+  >>
+endobj
+
+6 0 obj
+  << /Pages 5 0 R
+     /Type /Catalog
+  >>
+endobj
+
+xref
+0 7
+0000000000 65535 f
+0000000010 00000 n
+0000000034 00000 n
+0000000809 00000 n
+0000000831 00000 n
+0000001004 00000 n
+0000001078 00000 n
+trailer
+<< /ID [ (some) (id) ]
+   /Root 6 0 R
+   /Size 7
+>>
+startxref
+1137
+%%EOF

+ 12 - 0
PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/Toolbar/Markup/Note/note_6.imageset/Contents.json

@@ -0,0 +1,12 @@
+{
+  "images" : [
+    {
+      "filename" : "note_6.pdf",
+      "idiom" : "universal"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

+ 70 - 0
PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/Toolbar/Markup/Note/note_6.imageset/note_6.pdf

@@ -0,0 +1,70 @@
+%PDF-1.7
+
+1 0 obj
+  << >>
+endobj
+
+2 0 obj
+  << /Length 3 0 R >>
+stream
+/DeviceRGB CS
+/DeviceRGB cs
+q
+1.000000 0.000000 -0.000000 1.000000 3.333496 3.999969 cm
+0.000000 0.000000 0.000000 scn
+4.666667 9.333344 m
+9.333333 0.000010 l
+-0.000000 0.000010 l
+4.666667 9.333344 l
+h
+f*
+n
+Q
+
+endstream
+endobj
+
+3 0 obj
+  209
+endobj
+
+4 0 obj
+  << /Annots []
+     /Type /Page
+     /MediaBox [ 0.000000 0.000000 16.000000 16.000000 ]
+     /Resources 1 0 R
+     /Contents 2 0 R
+     /Parent 5 0 R
+  >>
+endobj
+
+5 0 obj
+  << /Kids [ 4 0 R ]
+     /Count 1
+     /Type /Pages
+  >>
+endobj
+
+6 0 obj
+  << /Pages 5 0 R
+     /Type /Catalog
+  >>
+endobj
+
+xref
+0 7
+0000000000 65535 f
+0000000010 00000 n
+0000000034 00000 n
+0000000299 00000 n
+0000000321 00000 n
+0000000494 00000 n
+0000000568 00000 n
+trailer
+<< /ID [ (some) (id) ]
+   /Root 6 0 R
+   /Size 7
+>>
+startxref
+627
+%%EOF

+ 12 - 0
PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/Toolbar/Markup/Note/note_7.imageset/Contents.json

@@ -0,0 +1,12 @@
+{
+  "images" : [
+    {
+      "filename" : "note_7.pdf",
+      "idiom" : "universal"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

+ 102 - 0
PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/Toolbar/Markup/Note/note_7.imageset/note_7.pdf

@@ -0,0 +1,102 @@
+%PDF-1.7
+
+1 0 obj
+  << >>
+endobj
+
+2 0 obj
+  << /Length 3 0 R >>
+stream
+/DeviceRGB CS
+/DeviceRGB cs
+q
+1.000000 0.000000 -0.000000 1.000000 3.333496 1.333344 cm
+0.000000 0.000000 0.000000 scn
+9.333333 6.000010 m
+4.666667 13.333344 l
+0.000000 6.000010 l
+9.333333 6.000010 l
+h
+1.307780 3.305013 m
+1.307780 0.000000 l
+0.272949 0.000000 l
+0.272949 5.166992 l
+1.175293 5.166992 l
+3.560059 1.876302 l
+3.617350 1.876302 l
+3.617350 5.166992 l
+4.652181 5.166992 l
+4.652181 0.000000 l
+3.756999 0.000000 l
+1.365072 3.305013 l
+1.307780 3.305013 l
+h
+6.720215 1.629231 m
+6.720215 0.000000 l
+5.638834 0.000000 l
+5.638834 5.166992 l
+7.769368 5.166992 l
+8.857910 5.166992 9.584798 4.465169 9.584798 3.401692 c
+9.584798 3.394531 l
+9.584798 2.331055 8.857910 1.629231 7.769368 1.629231 c
+6.720215 1.629231 l
+h
+7.504395 2.474284 m
+6.720215 2.474284 l
+6.720215 4.311198 l
+7.504395 4.311198 l
+8.123861 4.311198 8.489095 3.985352 8.489095 3.398112 c
+8.489095 3.390950 l
+8.489095 2.803711 8.123861 2.474284 7.504395 2.474284 c
+h
+f*
+n
+Q
+
+endstream
+endobj
+
+3 0 obj
+  939
+endobj
+
+4 0 obj
+  << /Annots []
+     /Type /Page
+     /MediaBox [ 0.000000 0.000000 16.000000 16.000000 ]
+     /Resources 1 0 R
+     /Contents 2 0 R
+     /Parent 5 0 R
+  >>
+endobj
+
+5 0 obj
+  << /Kids [ 4 0 R ]
+     /Count 1
+     /Type /Pages
+  >>
+endobj
+
+6 0 obj
+  << /Pages 5 0 R
+     /Type /Catalog
+  >>
+endobj
+
+xref
+0 7
+0000000000 65535 f
+0000000010 00000 n
+0000000034 00000 n
+0000001029 00000 n
+0000001051 00000 n
+0000001224 00000 n
+0000001298 00000 n
+trailer
+<< /ID [ (some) (id) ]
+   /Root 6 0 R
+   /Size 7
+>>
+startxref
+1357
+%%EOF

+ 94 - 67
PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/KMRightSideController.swift

@@ -29,6 +29,8 @@ class KMRightSideController: NSViewController {
     //Markup
     var highlight_Controller: KMHighlightController?
     
+    var note_Controller: KMNoteController?
+    
     //Edit
     var edit_textController: KMEditPDFTextPropertyViewController?
     var edit_imageController: KMEditImageController?
@@ -59,27 +61,32 @@ class KMRightSideController: NSViewController {
         var exitMulitAnnotation: Bool = false //判断是否存在不同类型注释
         let annotations: [CPDFAnnotation] = self.pdfView?.activeAnnotations as? [CPDFAnnotation] ?? []
         if annotations.count == 0 {
-            exitMulitAnnotation = true
+            exitMulitAnnotation = true //空状态先暂时判断为多种注释。
         } else {
-            var markupType: CPDFMarkupType = .highlight
-            if subToolMode == .Underline {
-                markupType = .underline
-            } else if subToolMode == .Waveline {
-                markupType = .squiggly
-            } else if subToolMode == .Strikethrough {
-                markupType = .strikeOut
-            }
-            for annotation in annotations {
-                if annotation is CPDFMarkupAnnotation {
-                    let markupAnnotation = (annotation as! CPDFMarkupAnnotation)
+            for annotationA in annotations {
+                var markupType: CPDFMarkupType = .highlight
+                if annotationA is CPDFMarkupAnnotation {
+                    markupType = (annotationA as! CPDFMarkupAnnotation).markupType()
+                }
+                for annotationB in annotations {
+                    if annotationA != annotationB {
+                        if annotationA.className != annotationB.className {
+                            exitMulitAnnotation = true
+                            break
+                        } else {
+                            if annotationB is CPDFMarkupAnnotation {
+                                let markupAnnotation = (annotationB as! CPDFMarkupAnnotation)
+                                if markupAnnotation.markupType() != markupType {
+                                    exitMulitAnnotation = true
+                                    break
+                                }
+                            }
+                        }
+                    }
                     
-                    if markupAnnotation.markupType() != markupType {
-                        exitMulitAnnotation = true
+                    if exitMulitAnnotation == true {
                         break
                     }
-                } else {
-                    exitMulitAnnotation = true
-                    break
                 }
             }
         }
@@ -127,57 +134,77 @@ class KMRightSideController: NSViewController {
          
         let exitMulitAnnotation = self.checkMultiAnnotation()
         
-        if viewManager?.toolMode == .Markup {
-            if subToolMode == .Highlight ||
-                subToolMode == .Underline ||
-                subToolMode == .Waveline ||
-                subToolMode == .Strikethrough {
-                 
-                if exitMulitAnnotation == false {
-                    if highlight_Controller == nil {
-                        highlight_Controller = KMHighlightController.init()
-                    }
-                    highlight_Controller?.subToolMode = subToolMode
-                    highlight_Controller?.pdfView = self.pdfView
-                    contentViewController = highlight_Controller
-                }
+        let annotations: [CPDFAnnotation] = self.pdfView?.activeAnnotations as? [CPDFAnnotation] ?? []
+        
+        if exitMulitAnnotation == true {
+            headerBGView.isHidden = true
+            infoContendView.isHidden = true
+            
+            emptyView.isHidden = false
+        
+            return
+        }
+        
+        if annotations.count == 0 {
+            return
+        }
+        
+        infoContendView.isHidden = false
+        headerBGView.isHidden = false
+        emptyView.isHidden = true
+        
+        let firstAnnotation = annotations.first
+        
+        if firstAnnotation is CPDFMarkupAnnotation {
+            if highlight_Controller == nil {
+                highlight_Controller = KMHighlightController.init()
             }
+            highlight_Controller?.pdfView = self.pdfView
             
+            contentViewController = highlight_Controller
+        } else if firstAnnotation is CPDFTextAnnotation {
+            if note_Controller == nil {
+                note_Controller = KMNoteController.init()
+            }
+            note_Controller?.pdfView = self.pdfView
             
-        } else if viewManager?.toolMode == .Edit {
-            if pdfView?.km_EditingAreas().isEmpty == true {
-                
-            } else if pdfView?.km_editingImageAreas().isEmpty == true && pdfView?.km_editingTextAreas().isEmpty == false {
-                //编辑文字
-                if edit_textController == nil {
-                    edit_textController = KMEditPDFTextPropertyViewController.init()
-                }
-                edit_textController?.pdfView = self.pdfView
-                
-                contentViewController = edit_textController
-                
-            } else if pdfView?.km_editingImageAreas().isEmpty == false && pdfView?.km_editingTextAreas().isEmpty == true {
-                //编辑图片
-                if edit_imageController == nil {
-                    edit_imageController = KMEditImageController.init()
-                }
-                contentViewController = edit_imageController
-                
-            } else {
-                //多选
+            contentViewController = note_Controller
+        }
+        
+        
+        if pdfView?.km_EditingAreas().isEmpty == true {
+            
+        } else if pdfView?.km_editingImageAreas().isEmpty == true && pdfView?.km_editingTextAreas().isEmpty == false {
+            //编辑文字
+            if edit_textController == nil {
+                edit_textController = KMEditPDFTextPropertyViewController.init()
             }
+            edit_textController?.pdfView = self.pdfView
             
-            if viewManager?.subToolMode == .Edit_Link {
-                //链接
-                if edit_linkController == nil {
-                    edit_linkController = KMLinkViewController.init()
-                }
-                edit_linkController?.pdfView = self.pdfView
-                contentViewController = edit_linkController
-                
+            contentViewController = edit_textController
+            
+        } else if pdfView?.km_editingImageAreas().isEmpty == false && pdfView?.km_editingTextAreas().isEmpty == true {
+            //编辑图片
+            if edit_imageController == nil {
+                edit_imageController = KMEditImageController.init()
             }
+            contentViewController = edit_imageController
+            
+        } else {
+            //多选
+        }
+        
+        if viewManager?.subToolMode == .Edit_Link {
+            //链接
+            if edit_linkController == nil {
+                edit_linkController = KMLinkViewController.init()
+            }
+            edit_linkController?.pdfView = self.pdfView
+            contentViewController = edit_linkController
+            
         }
         
+        
         if let contendVC = contentViewController {
             contendVC.view.frame = infoContendView.bounds
             contendVC.view.autoresizingMask = [.width, .height]
@@ -187,13 +214,6 @@ class KMRightSideController: NSViewController {
         
         
         
-        if exitMulitAnnotation == true {
-            headerBGView.isHidden = true
-            emptyView.isHidden = false
-        } else {
-            headerBGView.isHidden = false
-            emptyView.isHidden = true
-        }
         
         
         
@@ -206,6 +226,13 @@ class KMRightSideController: NSViewController {
         let toolMode = viewManager?.toolMode ?? .None
         let subToolMode = viewManager?.subToolMode ?? .None
          
+        
+        if (contentViewController is KMHighlightController) {
+            (contentViewController as? KMHighlightController)?.reloadData()
+        } else if (contentViewController is KMNoteController) {
+            (contentViewController as? KMNoteController)?.reloadData()
+        }
+        
         if toolMode == .Markup {
             if (subToolMode == .Highlight ||
                 subToolMode == .Underline ||

+ 12 - 24
PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/Highlight/KMHighlightController.swift

@@ -9,7 +9,7 @@ import Cocoa
 import KMComponentLibrary
 
 class KMHighlightController: NSViewController {
-
+    
     @IBOutlet var colorBGView: NSView!
     @IBOutlet var colorLabel: NSTextField!
     @IBOutlet var colorGroup: ComponentCColorGroup!
@@ -19,12 +19,11 @@ class KMHighlightController: NSViewController {
     private var annotations: [CPDFAnnotation] = []
     
     var pdfView: CPDFListView?
-    var subToolMode: KMPDFSubToolMode = .Highlight
     
     //MARK: - func
     override func viewDidAppear() {
         super.viewDidAppear()
-    
+        
         
         colorSlider.reloadData()
     }
@@ -75,42 +74,31 @@ class KMHighlightController: NSViewController {
         guard let pdfView = self.pdfView else {
             return
         }
-        self.annotations.removeAll()
+        let manager = KMAnnotationPropertiesColorManager.manager
         
+        self.annotations.removeAll()
         let allAnnotations: [CPDFAnnotation] = pdfView.activeAnnotations as? [CPDFAnnotation] ?? []
-        
         for annotation in allAnnotations {
             if annotation is CPDFMarkupAnnotation {
-                if subToolMode == .Highlight && (annotation as! CPDFMarkupAnnotation).markupType() == .highlight {
-                    self.annotations.append((annotation as! CPDFMarkupAnnotation))
-                } else if subToolMode == .Underline && (annotation as! CPDFMarkupAnnotation).markupType() == .underline {
-                    self.annotations.append((annotation as! CPDFMarkupAnnotation))
-                } else if subToolMode == .Waveline && (annotation as! CPDFMarkupAnnotation).markupType() == .squiggly {
-                    self.annotations.append((annotation as! CPDFMarkupAnnotation))
-                } else if subToolMode == .Strikethrough && (annotation as! CPDFMarkupAnnotation).markupType() == .strikeOut {
-                    self.annotations.append((annotation as! CPDFMarkupAnnotation))
-                }
+                annotations.append((annotation as! CPDFMarkupAnnotation))
             }
         }
-        
-        let manager = KMAnnotationPropertiesColorManager.manager
+        if annotations.count == 0 {
+            return
+        }
+        let firstAnnotation = annotations.first
         
         if annotations.count == 1 {
-            let curAnnotation = annotations.first
-            
-            colorGroup.currentColor = curAnnotation?.color
+            colorGroup.currentColor = firstAnnotation?.color
             colorGroup.refreshUI()
             
-            let opacity = curAnnotation?.opacity ?? 0
+            let opacity = firstAnnotation?.opacity ?? 0
             colorSlider.properties.percent = opacity
             colorSlider.reloadData()
             
             colorOpacitySelect.properties.text = String(format: "%.0f%@", opacity*100, "%")
             colorOpacitySelect.reloadData()
-            
         } else {
-            let firstAnnotation = annotations.first
-            
             var multiColor: Bool = false
             for annotationA in annotations {
                 for annotationB in annotations {
@@ -131,7 +119,7 @@ class KMHighlightController: NSViewController {
                 colorGroup.currentColor = firstAnnotation?.color
             }
             colorGroup.refreshUI()
-             
+            
             var multiOpacity: Bool = false
             for annotationA in annotations {
                 for annotationB in annotations {

+ 182 - 0
PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/Note/KMNoteController.swift

@@ -6,12 +6,194 @@
 //
 
 import Cocoa
+import KMComponentLibrary
 
 class KMNoteController: NSViewController {
+    @IBOutlet var colorBGView: NSView!
+    @IBOutlet var colorLabel: NSTextField!
+    @IBOutlet var colorGroup: ComponentCColorGroup!
 
+    @IBOutlet var typeBGView: NSView!
+    @IBOutlet var typeLabel: NSTextField!
+    @IBOutlet var typeItemA: ComponentCSelector!
+    @IBOutlet var typeItemB: ComponentCSelector!
+    @IBOutlet var typeItemC: ComponentCSelector!
+    @IBOutlet var typeItemD: ComponentCSelector!
+    @IBOutlet var typeItemE: ComponentCSelector!
+    @IBOutlet var typeItemF: ComponentCSelector!
+    @IBOutlet var typeItemG: ComponentCSelector!
+    
+    private var annotations: [CPDFAnnotation] = []
+    
+    var pdfView: CPDFListView?
+    
     override func viewDidLoad() {
         super.viewDidLoad()
         // Do view setup here.
+        setupProperty()
     }
     
+    func setupProperty() {
+        
+        colorLabel.stringValue = KMLocalizedString("Color")
+        colorLabel.textColor = ComponentLibrary.shared.getComponentColorFromKey("colorText/2")
+        colorLabel.font = ComponentLibrary.shared.getFontFromKey("mac/body-s-medium")
+        
+        let colorAProperty = ComponentCColorProperty(colorType: .color, state: .normal, isCustom: false, color: KMPDFWatermarkData.watermarkDefaultColors()[0])
+        let colorBProperty = ComponentCColorProperty(colorType: .color, state: .normal, isCustom: false, color: KMPDFWatermarkData.watermarkDefaultColors()[1])
+        let colorCProperty = ComponentCColorProperty(colorType: .color, state: .normal, isCustom: false, color: KMPDFWatermarkData.watermarkDefaultColors()[2])
+        let colorDProperty = ComponentCColorProperty(colorType: .color, state: .normal, isCustom: false, color: KMPDFWatermarkData.watermarkDefaultColors()[3])
+        let colorEProperty = ComponentCColorProperty(colorType: .color, state: .normal, isCustom: true, color: KMPDFWatermarkData.watermarkDefaultColors()[4])
+        colorGroup.setUpWithColorPropertys([colorAProperty, colorBProperty, colorCProperty, colorDProperty], customItemProperty: colorEProperty)
+        colorGroup.delegate = self
+        
+        typeLabel.stringValue = KMLocalizedString("Color")
+        typeLabel.textColor = ComponentLibrary.shared.getComponentColorFromKey("colorText/2")
+        typeLabel.font = ComponentLibrary.shared.getFontFromKey("mac/body-s-medium")
+        
+        typeItemA.properties = ComponentCSelectorProperty(size: .m, state: .normal, iconImage: NSImage(named: "note_1"), identifier: "")
+        typeItemB.properties = ComponentCSelectorProperty(size: .m, state: .normal, iconImage: NSImage(named: "note_2"), identifier: "")
+        typeItemC.properties = ComponentCSelectorProperty(size: .m, state: .normal, iconImage: NSImage(named: "note_3"), identifier: "")
+        typeItemD.properties = ComponentCSelectorProperty(size: .m, state: .normal, iconImage: NSImage(named: "note_4"), identifier: "")
+        typeItemE.properties = ComponentCSelectorProperty(size: .m, state: .normal, iconImage: NSImage(named: "note_5"), identifier: "")
+        typeItemF.properties = ComponentCSelectorProperty(size: .m, state: .normal, iconImage: NSImage(named: "note_6"), identifier: "")
+        typeItemG.properties = ComponentCSelectorProperty(size: .m, state: .normal, iconImage: NSImage(named: "note_7"), identifier: "")
+        
+        for item in [typeItemA, typeItemB, typeItemC, typeItemD, typeItemE, typeItemF, typeItemG] {
+            item!.setTarget(self, action: #selector(selectItemClick(_:)))
+        }
+        
+    }
+    
+    func reloadData() {
+        guard let pdfView = self.pdfView else {
+            return
+        }
+        
+        self.annotations.removeAll()
+        let allAnnotations: [CPDFAnnotation] = pdfView.activeAnnotations as? [CPDFAnnotation] ?? []
+        for annotation in allAnnotations {
+            if annotation is CPDFTextAnnotation {
+                annotations.append((annotation as! CPDFTextAnnotation))
+            }
+        }
+        if annotations.count == 0 {
+            return
+        }
+        
+        for item in [typeItemA, typeItemB, typeItemC, typeItemD, typeItemE, typeItemF, typeItemG] {
+            item!.properties.state = .normal
+        }
+        
+        let firstAnnotation = annotations.first as! CPDFTextAnnotation
+        
+        if annotations.count == 1 {
+            colorGroup.currentColor = firstAnnotation.color
+            colorGroup.refreshUI()
+          
+            let anchoredIconType: CPDFTextAnnotationIconType = firstAnnotation.iconType()
+            if anchoredIconType == .comment {
+                typeItemA.properties.state = .pressed
+            } else if anchoredIconType == .key {
+                typeItemC.properties.state = .pressed
+            } else if anchoredIconType == .note {
+                typeItemB.properties.state = .pressed
+            } else if anchoredIconType == .help {
+                typeItemD.properties.state = .pressed
+            } else if anchoredIconType == .newParagraph {
+                typeItemG.properties.state = .pressed
+            } else if anchoredIconType == .paragraph {
+                typeItemE.properties.state = .pressed
+            } else if anchoredIconType == .insert {
+                typeItemF.properties.state = .pressed
+            }
+            
+        } else {
+            var multiColor: Bool = false
+            for annotationA in annotations {
+                for annotationB in annotations {
+                    if annotationA != annotationB {
+                        if annotationA.color != annotationB.color {
+                            multiColor = true
+                            break
+                        }
+                    }
+                }
+                if multiColor == true {
+                    break
+                }
+            }
+            if multiColor == true {
+                colorGroup.currentColor = NSColor.clear
+            } else {
+                colorGroup.currentColor = firstAnnotation.color
+            }
+            colorGroup.refreshUI()
+//            
+//            var multiOpacity: Bool = false
+//            for annotationA in annotations {
+//                for annotationB in annotations {
+//                    if annotationA != annotationB {
+//                        if annotationA.opacity != annotationB.opacity {
+//                            multiOpacity = true
+//                            break
+//                        }
+//                    }
+//                }
+//                if multiOpacity == true {
+//                    break
+//                }
+//            }
+//            
+//            if multiOpacity {
+//                colorSlider.properties.percent = 0
+//                colorSlider.reloadData()
+//                
+//                colorOpacitySelect.resetText("-")
+//            } else {
+//                let opacity = firstAnnotation?.opacity ?? 0
+//                
+//                colorSlider.properties.percent = opacity
+//                colorSlider.reloadData()
+//                
+//                colorOpacitySelect.properties.text = String(format: "%.0f%@", opacity*100, "%")
+//                colorOpacitySelect.reloadData()
+//            }
+        }
+        for item in [typeItemA, typeItemB, typeItemC, typeItemD, typeItemE, typeItemF, typeItemG] {
+            item!.reloadData()
+        }
+        
+        
+    }
+    
+    @objc func selectItemClick(_ sender: ComponentCSelector) {
+        var anchoredIconType: CPDFTextAnnotationIconType = .comment
+        if sender == typeItemA {
+            anchoredIconType = .comment
+        } else if sender == typeItemB {
+            anchoredIconType = .note
+        } else if sender == typeItemC {
+            anchoredIconType = .key
+        } else if sender == typeItemD {
+            anchoredIconType = .help
+        } else if sender == typeItemE {
+            anchoredIconType = .paragraph
+        } else if sender == typeItemF {
+            anchoredIconType = .insert
+        } else if sender == typeItemG {
+            anchoredIconType = .newParagraph
+        }
+        pdfView?.setAnchoredAnnotationType(annotations, anchoredIconType)
+        
+        reloadData()
+    }
+}
+
+extension KMNoteController: ComponentCColorDelegate {
+    func componentCColorDidChooseColor(_ view: NSView, _ color: NSColor?) {
+        pdfView?.setAnnotationsColor(annotations, color)
+        
+        reloadData()
+    }
 }

+ 171 - 5
PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/Note/KMNoteController.xib

@@ -1,19 +1,185 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="11134" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+<?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" customObjectInstantitationMethod="direct">
     <dependencies>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="11134"/>
+        <deployment 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="KMNoteController" customModuleProvider="target">
+        <customObject id="-2" userLabel="File's Owner" customClass="KMNoteController" customModule="PDF_Reader_Pro" customModuleProvider="target">
             <connections>
+                <outlet property="colorBGView" destination="uJp-X3-x82" id="KmX-Io-7aY"/>
+                <outlet property="colorGroup" destination="9zu-F0-d03" id="aSm-Dh-oFI"/>
+                <outlet property="colorLabel" destination="7eE-OE-3wV" id="L7G-js-Chd"/>
+                <outlet property="typeBGView" destination="vHN-95-KRz" id="pIB-d7-wmU"/>
+                <outlet property="typeItemA" destination="Nnl-pK-E3p" id="7ew-zT-RQP"/>
+                <outlet property="typeItemB" destination="jxO-VJ-upz" id="ELK-tw-gHr"/>
+                <outlet property="typeItemC" destination="1LB-0v-0Wl" id="wBx-GR-0IN"/>
+                <outlet property="typeItemD" destination="DGa-Xj-Eln" id="N8d-kx-mhT"/>
+                <outlet property="typeItemE" destination="wUb-O6-a7c" id="yqv-LL-uz9"/>
+                <outlet property="typeItemF" destination="UB6-iv-l2b" id="bF7-ZA-hU8"/>
+                <outlet property="typeItemG" destination="8lh-qC-b4n" id="KHD-jD-6g9"/>
+                <outlet property="typeLabel" destination="nBa-jd-8Eq" id="t5Q-4N-zm0"/>
                 <outlet property="view" destination="Hz6-mo-xeY" id="0bl-1N-x8E"/>
             </connections>
         </customObject>
         <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
         <customObject id="-3" userLabel="Application" customClass="NSObject"/>
         <customView id="Hz6-mo-xeY">
-            <rect key="frame" x="0.0" y="0.0" width="480" height="272"/>
+            <rect key="frame" x="0.0" y="0.0" width="305" height="383"/>
             <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+            <subviews>
+                <customView translatesAutoresizingMaskIntoConstraints="NO" id="Iao-5a-xU9">
+                    <rect key="frame" x="0.0" y="0.0" width="305" height="383"/>
+                    <subviews>
+                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="uJp-X3-x82">
+                            <rect key="frame" x="37" y="311" width="232" height="72"/>
+                            <subviews>
+                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="Bma-9G-xat">
+                                    <rect key="frame" x="0.0" y="32" width="232" height="40"/>
+                                    <subviews>
+                                        <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="7eE-OE-3wV">
+                                            <rect key="frame" x="-2" y="12" width="37" height="16"/>
+                                            <textFieldCell key="cell" lineBreakMode="clipping" title="Color" id="f3C-py-sN9">
+                                                <font key="font" usesAppearanceFont="YES"/>
+                                                <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
+                                                <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+                                            </textFieldCell>
+                                        </textField>
+                                    </subviews>
+                                    <constraints>
+                                        <constraint firstAttribute="height" constant="40" id="9Zg-ST-ZL6"/>
+                                        <constraint firstItem="7eE-OE-3wV" firstAttribute="centerY" secondItem="Bma-9G-xat" secondAttribute="centerY" id="Egq-2s-FlI"/>
+                                        <constraint firstItem="7eE-OE-3wV" firstAttribute="leading" secondItem="Bma-9G-xat" secondAttribute="leading" id="X7N-ZY-1gk"/>
+                                    </constraints>
+                                </customView>
+                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="9zu-F0-d03" customClass="ComponentCColorGroup" customModule="KMComponentLibrary">
+                                    <rect key="frame" x="0.0" y="0.0" width="232" height="32"/>
+                                    <constraints>
+                                        <constraint firstAttribute="height" constant="32" id="ROV-0h-Gn6"/>
+                                    </constraints>
+                                </customView>
+                            </subviews>
+                            <constraints>
+                                <constraint firstAttribute="trailing" secondItem="Bma-9G-xat" secondAttribute="trailing" id="2Xs-Aa-6HV"/>
+                                <constraint firstAttribute="trailing" secondItem="9zu-F0-d03" secondAttribute="trailing" id="Fik-wE-ai2"/>
+                                <constraint firstAttribute="height" constant="72" id="QvN-br-6Fh"/>
+                                <constraint firstItem="9zu-F0-d03" firstAttribute="top" secondItem="Bma-9G-xat" secondAttribute="bottom" id="UFn-ko-pmT"/>
+                                <constraint firstItem="Bma-9G-xat" firstAttribute="leading" secondItem="uJp-X3-x82" secondAttribute="leading" id="XUi-oS-Jgo"/>
+                                <constraint firstItem="9zu-F0-d03" firstAttribute="leading" secondItem="uJp-X3-x82" secondAttribute="leading" id="nWa-jR-12b"/>
+                                <constraint firstAttribute="width" constant="232" id="rqK-SH-9np"/>
+                                <constraint firstItem="Bma-9G-xat" firstAttribute="top" secondItem="uJp-X3-x82" secondAttribute="top" id="zdd-41-X6G"/>
+                            </constraints>
+                        </customView>
+                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="vHN-95-KRz">
+                            <rect key="frame" x="37" y="183" width="232" height="112"/>
+                            <subviews>
+                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="mAF-bV-Jy8">
+                                    <rect key="frame" x="0.0" y="72" width="232" height="40"/>
+                                    <subviews>
+                                        <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="nBa-jd-8Eq">
+                                            <rect key="frame" x="-2" y="12" width="34" height="16"/>
+                                            <textFieldCell key="cell" lineBreakMode="clipping" title="Type" id="RRn-D4-djt">
+                                                <font key="font" usesAppearanceFont="YES"/>
+                                                <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
+                                                <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+                                            </textFieldCell>
+                                        </textField>
+                                    </subviews>
+                                    <constraints>
+                                        <constraint firstItem="nBa-jd-8Eq" firstAttribute="leading" secondItem="mAF-bV-Jy8" secondAttribute="leading" id="DR8-ew-HXx"/>
+                                        <constraint firstItem="nBa-jd-8Eq" firstAttribute="centerY" secondItem="mAF-bV-Jy8" secondAttribute="centerY" id="LO3-Bi-7ZS"/>
+                                        <constraint firstAttribute="height" constant="40" id="awa-2y-ZJw"/>
+                                    </constraints>
+                                </customView>
+                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="Nnl-pK-E3p" customClass="ComponentCSelector" customModule="KMComponentLibrary">
+                                    <rect key="frame" x="0.0" y="40" width="32" height="32"/>
+                                    <constraints>
+                                        <constraint firstAttribute="width" constant="32" id="9t9-ir-Ihd"/>
+                                        <constraint firstAttribute="height" constant="32" id="rW0-IQ-AvK"/>
+                                    </constraints>
+                                </customView>
+                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="jxO-VJ-upz" customClass="ComponentCSelector" customModule="KMComponentLibrary">
+                                    <rect key="frame" x="40" y="40" width="32" height="32"/>
+                                    <constraints>
+                                        <constraint firstAttribute="height" constant="32" id="Kfh-gn-t6Z"/>
+                                        <constraint firstAttribute="width" constant="32" id="PZD-kh-9aj"/>
+                                    </constraints>
+                                </customView>
+                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="1LB-0v-0Wl" customClass="ComponentCSelector" customModule="KMComponentLibrary">
+                                    <rect key="frame" x="80" y="40" width="32" height="32"/>
+                                    <constraints>
+                                        <constraint firstAttribute="height" constant="32" id="0uc-sT-0Jb"/>
+                                        <constraint firstAttribute="width" constant="32" id="jNU-sH-fWN"/>
+                                    </constraints>
+                                </customView>
+                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="DGa-Xj-Eln" customClass="ComponentCSelector" customModule="KMComponentLibrary">
+                                    <rect key="frame" x="120" y="40" width="32" height="32"/>
+                                    <constraints>
+                                        <constraint firstAttribute="height" constant="32" id="i54-UM-cUQ"/>
+                                        <constraint firstAttribute="width" constant="32" id="s25-JP-T6Q"/>
+                                    </constraints>
+                                </customView>
+                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="wUb-O6-a7c" customClass="ComponentCSelector" customModule="KMComponentLibrary">
+                                    <rect key="frame" x="160" y="40" width="32" height="32"/>
+                                    <constraints>
+                                        <constraint firstAttribute="height" constant="32" id="0pU-se-xiw"/>
+                                        <constraint firstAttribute="width" constant="32" id="flE-F4-f8M"/>
+                                    </constraints>
+                                </customView>
+                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="UB6-iv-l2b" customClass="ComponentCSelector" customModule="KMComponentLibrary">
+                                    <rect key="frame" x="200" y="40" width="32" height="32"/>
+                                    <constraints>
+                                        <constraint firstAttribute="width" constant="32" id="0a5-3a-JFT"/>
+                                        <constraint firstAttribute="height" constant="32" id="B4Y-uD-Is2"/>
+                                    </constraints>
+                                </customView>
+                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="8lh-qC-b4n" customClass="ComponentCSelector" customModule="KMComponentLibrary">
+                                    <rect key="frame" x="0.0" y="0.0" width="32" height="32"/>
+                                    <constraints>
+                                        <constraint firstAttribute="width" constant="32" id="m5A-1Z-cgf"/>
+                                        <constraint firstAttribute="height" constant="32" id="wfo-JW-ya3"/>
+                                    </constraints>
+                                </customView>
+                            </subviews>
+                            <constraints>
+                                <constraint firstItem="UB6-iv-l2b" firstAttribute="top" secondItem="mAF-bV-Jy8" secondAttribute="bottom" id="66P-Co-dag"/>
+                                <constraint firstAttribute="width" constant="232" id="JVB-KV-dWU"/>
+                                <constraint firstItem="1LB-0v-0Wl" firstAttribute="top" secondItem="mAF-bV-Jy8" secondAttribute="bottom" id="KLO-nc-1m8"/>
+                                <constraint firstItem="1LB-0v-0Wl" firstAttribute="leading" secondItem="jxO-VJ-upz" secondAttribute="trailing" constant="8" id="M9b-f6-BuZ"/>
+                                <constraint firstItem="8lh-qC-b4n" firstAttribute="top" secondItem="Nnl-pK-E3p" secondAttribute="bottom" constant="8" id="Mga-Zu-RhH"/>
+                                <constraint firstAttribute="height" constant="112" id="Ox4-Cy-mIA"/>
+                                <constraint firstItem="mAF-bV-Jy8" firstAttribute="top" secondItem="vHN-95-KRz" secondAttribute="top" id="Tnu-6F-shF"/>
+                                <constraint firstItem="UB6-iv-l2b" firstAttribute="leading" secondItem="wUb-O6-a7c" secondAttribute="trailing" constant="8" id="Ujf-ng-Xpo"/>
+                                <constraint firstItem="jxO-VJ-upz" firstAttribute="leading" secondItem="Nnl-pK-E3p" secondAttribute="trailing" constant="8" id="V9O-nR-SbL"/>
+                                <constraint firstItem="Nnl-pK-E3p" firstAttribute="leading" secondItem="vHN-95-KRz" secondAttribute="leading" id="b4j-SO-b29"/>
+                                <constraint firstItem="8lh-qC-b4n" firstAttribute="leading" secondItem="vHN-95-KRz" secondAttribute="leading" id="cxO-U3-lOb"/>
+                                <constraint firstItem="jxO-VJ-upz" firstAttribute="top" secondItem="mAF-bV-Jy8" secondAttribute="bottom" id="d76-2m-uV2"/>
+                                <constraint firstItem="DGa-Xj-Eln" firstAttribute="top" secondItem="mAF-bV-Jy8" secondAttribute="bottom" id="ihQ-Q4-iul"/>
+                                <constraint firstItem="wUb-O6-a7c" firstAttribute="leading" secondItem="DGa-Xj-Eln" secondAttribute="trailing" constant="8" id="nEs-Mo-7FX"/>
+                                <constraint firstItem="Nnl-pK-E3p" firstAttribute="top" secondItem="mAF-bV-Jy8" secondAttribute="bottom" id="nor-ug-QgC"/>
+                                <constraint firstAttribute="trailing" secondItem="mAF-bV-Jy8" secondAttribute="trailing" id="oV2-ia-ddL"/>
+                                <constraint firstItem="mAF-bV-Jy8" firstAttribute="leading" secondItem="vHN-95-KRz" secondAttribute="leading" id="xTR-m8-gNy"/>
+                                <constraint firstItem="wUb-O6-a7c" firstAttribute="top" secondItem="mAF-bV-Jy8" secondAttribute="bottom" id="xXF-wZ-IL8"/>
+                                <constraint firstItem="DGa-Xj-Eln" firstAttribute="leading" secondItem="1LB-0v-0Wl" secondAttribute="trailing" constant="8" id="xjG-Ad-ucP"/>
+                            </constraints>
+                        </customView>
+                    </subviews>
+                    <constraints>
+                        <constraint firstItem="vHN-95-KRz" firstAttribute="top" secondItem="uJp-X3-x82" secondAttribute="bottom" constant="16" id="0RX-br-yFj"/>
+                        <constraint firstItem="vHN-95-KRz" firstAttribute="centerX" secondItem="Iao-5a-xU9" secondAttribute="centerX" id="6xQ-bK-o7h"/>
+                        <constraint firstItem="uJp-X3-x82" firstAttribute="top" secondItem="Iao-5a-xU9" secondAttribute="top" id="Cdo-5Q-rRY"/>
+                        <constraint firstItem="uJp-X3-x82" firstAttribute="centerX" secondItem="Iao-5a-xU9" secondAttribute="centerX" id="MTG-Ed-S0y"/>
+                    </constraints>
+                </customView>
+            </subviews>
+            <constraints>
+                <constraint firstAttribute="bottom" secondItem="Iao-5a-xU9" secondAttribute="bottom" id="Lpk-14-mdY"/>
+                <constraint firstAttribute="trailing" secondItem="Iao-5a-xU9" secondAttribute="trailing" id="NKt-bl-SC4"/>
+                <constraint firstItem="Iao-5a-xU9" firstAttribute="top" secondItem="Hz6-mo-xeY" secondAttribute="top" id="q7Y-iO-QgY"/>
+                <constraint firstItem="Iao-5a-xU9" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" id="vIC-HB-B2M"/>
+            </constraints>
+            <point key="canvasLocation" x="64" y="145"/>
         </customView>
     </objects>
 </document>

+ 128 - 63
PDF Office/PDF Reader Pro.xcodeproj/xcuserdata/kdanmobile.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -3362,69 +3362,6 @@
             </Locations>
          </BreakpointContent>
       </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            uuid = "829A2007-5055-4924-B2CB-8003D30BE87C"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "PDF Master/KMClass/KMPDFViewController/KMMainViewController.swift"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "2859"
-            endingLineNumber = "2859"
-            landmarkName = "pdfListViewChangeatioActiveAnnotations(_:forActiveAnnotations:isRightMenu:)"
-            landmarkType = "7">
-            <Locations>
-               <Location
-                  uuid = "829A2007-5055-4924-B2CB-8003D30BE87C - 55adff6b3ed3d51"
-                  shouldBeEnabled = "Yes"
-                  ignoreCount = "0"
-                  continueAfterRunningActions = "No"
-                  symbolName = "PDF_Reader_Pro.KMMainViewController.pdfListViewMenuItemsEditing(at: __C.CGPoint, for: Swift.Optional&lt;__C.CPDFPage&gt;, menuItems: Swift.Optional&lt;Swift.Array&lt;__C.NSMenuItem&gt;&gt;) -&gt; Swift.Optional&lt;Swift.Array&lt;__C.NSMenuItem&gt;&gt;"
-                  moduleName = "PDF Reader Pro"
-                  usesParentBreakpointCondition = "Yes"
-                  urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/KMClass/KMPDFViewController/KMMainViewController.swift"
-                  startingColumnNumber = "9223372036854775807"
-                  endingColumnNumber = "9223372036854775807"
-                  startingLineNumber = "2857"
-                  endingLineNumber = "2857"
-                  offsetFromSymbolStart = "312">
-               </Location>
-               <Location
-                  uuid = "829A2007-5055-4924-B2CB-8003D30BE87C - f9f96c359432b0f3"
-                  shouldBeEnabled = "Yes"
-                  ignoreCount = "0"
-                  continueAfterRunningActions = "No"
-                  symbolName = "PDF_Reader_Pro.KMMainViewController.pdfListViewChangeatioActiveAnnotations(_: Swift.Optional&lt;__C.CPDFListView&gt;, forActiveAnnotations: Swift.Optional&lt;Swift.Array&lt;__C.CPDFAnnotation&gt;&gt;, isRightMenu: Swift.Bool) -&gt; ()"
-                  moduleName = "PDF Reader Pro"
-                  usesParentBreakpointCondition = "Yes"
-                  urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/KMClass/KMPDFViewController/KMMainViewController.swift"
-                  startingColumnNumber = "9223372036854775807"
-                  endingColumnNumber = "9223372036854775807"
-                  startingLineNumber = "2859"
-                  endingLineNumber = "2859"
-                  offsetFromSymbolStart = "7316">
-               </Location>
-               <Location
-                  uuid = "829A2007-5055-4924-B2CB-8003D30BE87C - f9f96c359432b0f3"
-                  shouldBeEnabled = "Yes"
-                  ignoreCount = "0"
-                  continueAfterRunningActions = "No"
-                  symbolName = "PDF_Reader_Pro.KMMainViewController.pdfListViewChangeatioActiveAnnotations(_: Swift.Optional&lt;__C.CPDFListView&gt;, forActiveAnnotations: Swift.Optional&lt;Swift.Array&lt;__C.CPDFAnnotation&gt;&gt;, isRightMenu: Swift.Bool) -&gt; ()"
-                  moduleName = "PDF Reader Pro"
-                  usesParentBreakpointCondition = "Yes"
-                  urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/KMClass/KMPDFViewController/KMMainViewController.swift"
-                  startingColumnNumber = "9223372036854775807"
-                  endingColumnNumber = "9223372036854775807"
-                  startingLineNumber = "2859"
-                  endingLineNumber = "2859"
-                  offsetFromSymbolStart = "1132">
-               </Location>
-            </Locations>
-         </BreakpointContent>
-      </BreakpointProxy>
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
@@ -3788,5 +3725,133 @@
             landmarkType = "3">
          </BreakpointContent>
       </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "76A27C4D-5AF5-48C1-BD55-869F07F57A9F"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/CPDFStampAnnotation+PDFListView.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "18"
+            endingLineNumber = "18"
+            landmarkName = "annotationImage(annotationModel:)"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "35B78EF8-C795-442A-93E5-177779E9600F"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/CPDFCircleAnnotation+PDFListView.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "41"
+            endingLineNumber = "41"
+            landmarkName = "annotationImage(annotationModel:)"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "9848EEF5-7F9F-47EF-957E-C8843D1B3883"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/CPDFFreeTextAnnotation+PDFListView.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "94"
+            endingLineNumber = "94"
+            landmarkName = "annotationImage(annotationModel:)"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "0C95D7BA-3681-47AA-9277-5F7552FB3C71"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/CPDFInkAnnotation+PDFListView.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "107"
+            endingLineNumber = "107"
+            landmarkName = "annotationImage(annotationModel:)"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "A0A71635-2537-47F3-9687-908806EFCEDE"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/CPDFLineAnnotation+PDFListView.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "222"
+            endingLineNumber = "222"
+            landmarkName = "annotationImage(annotationModel:)"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "87B48903-BAFC-4FE6-BB8B-A204DBEA1231"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/CPDFMarkupAnnotation+PDFListView.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "164"
+            endingLineNumber = "164"
+            landmarkName = "annotationImage(annotationModel:)"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "717DC01A-1851-4BD1-83E4-C10F171AE039"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/CPDFSquareAnnotation+PDFListView.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "41"
+            endingLineNumber = "41"
+            landmarkName = "annotationImage(annotationModel:)"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "D275146B-3F3D-4482-B2E4-08A12C2A9698"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "745"
+            endingLineNumber = "745"
+            landmarkName = "-addAnnotationWithType:selection:page:bounds:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
    </Breakpoints>
 </Bucket>