瀏覽代碼

Merge branch 'develop_2025' of git.kdan.cc:Mac_PDF/PDF_Office into develop_2025

tangchao 3 月之前
父節點
當前提交
bddad82802
共有 45 個文件被更改,包括 2924 次插入4251 次删除
  1. 9 1
      PDF Office/KMComponentLibrary/KMComponentLibrary.xcodeproj/project.pbxproj
  2. 15 25
      PDF Office/KMComponentLibrary/KMComponentLibrary/View/Controller/ComponentCSelectorGroup.swift
  3. 22 10
      PDF Office/KMComponentLibrary/KMComponentLibrary/View/Controller/ComponentCSelectorGroup.xib
  4. 166 0
      PDF Office/KMComponentLibrary/KMComponentLibrary/View/Controller/ComponentCSelectorItem.swift
  5. 56 0
      PDF Office/KMComponentLibrary/KMComponentLibrary/View/Controller/ComponentCSelectorItem.xib
  6. 5 54
      PDF Office/KMComponentLibrary/KMComponentLibrary/View/Slider/ComponentSlider.swift
  7. 1 40
      PDF Office/KMComponentLibrary/KMComponentLibrary/View/Slider/ComponentSlider.xib
  8. 2 11
      PDF Office/KMComponentLibrary/KMComponentLibrary/View/Slider/ComponentSliderProperty.swift
  9. 0 2
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.h
  10. 178 0
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListViewExtension/CPDFListView+Edit.swift
  11. 3 3
      PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController+Action.swift
  12. 1 10
      PDF Office/PDF Master/KMClass/ComponentLibraryDemo/Demo/SliderVC.swift
  13. 0 2
      PDF Office/PDF Master/KMClass/KMHomeViewController/Views/KMHomeOpenView/KMHomeOpenView.swift
  14. 4 1
      PDF Office/PDF Master/KMClass/KMPDFViewController/EditTool/Bates/KMBatesManager.swift
  15. 19 22
      PDF Office/PDF Master/KMClass/KMPDFViewController/EditTool/KMLinkViewController/KMLinkViewController.swift
  16. 3 2
      PDF Office/PDF Master/KMClass/KMPDFViewController/EditTool/KMLinkViewController/Views/KMLinkPageView/KMLinkPageView.swift
  17. 29 24
      PDF Office/PDF Master/KMClass/KMPDFViewController/EditTool/KMLinkViewController/Views/KMNLinkMultiController/KMNLinkMultiController.swift
  18. 9 9
      PDF Office/PDF Master/KMClass/KMPDFViewController/EditTool/KMLinkViewController/Views/KMNLinkMultiController/KMNLinkMultiController.xib
  19. 59 30
      PDF Office/PDF Master/KMClass/KMPDFViewController/KMMainViewController.swift
  20. 0 13
      PDF Office/PDF Master/KMClass/KMPDFViewController/KMPDFConfig.swift
  21. 1 1
      PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/Alignment/alignAverageVertical_dis.imageset/Contents.json
  22. 3 3
      PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/Alignment/alignAverageVertical_dis.imageset/alignAverageVertical_dis.pdf
  23. 12 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/Alignment/alignHorizonal.imageset/Contents.json
  24. 3 3
      PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/Alignment/alignHorizonal_dis.imageset/alignHorizonal_dis.pdf
  25. 1 1
      PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/Alignment/alignHorizonal_dis.imageset/Contents.json
  26. 二進制
      PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/PDF_Edit/flipHorizontal.imageset/flipHorizontal.pdf
  27. 12 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/PDF_Edit/flipVertical.imageset/Contents.json
  28. 二進制
      PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/PDF_Edit/flipVertical.imageset/flipVertical.pdf
  29. 12 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/PDF_Edit/fontAlign_center.imageset/Contents.json
  30. 89 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/PDF_Edit/fontAlign_center.imageset/fontAlign_center.pdf
  31. 12 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/PDF_Edit/fontAlign_justify.imageset/Contents.json
  32. 89 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/PDF_Edit/fontAlign_justify.imageset/fontAlign_justify.pdf
  33. 12 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/PDF_Edit/fontAlign_left.imageset/Contents.json
  34. 89 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/PDF_Edit/fontAlign_left.imageset/fontAlign_left.pdf
  35. 12 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/PDF_Edit/fontAlign_right.imageset/Contents.json
  36. 89 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/PDF_Edit/fontAlign_right.imageset/fontAlign_right.pdf
  37. 105 132
      PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/KMRightSideController.swift
  38. 167 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/KMEditImageController.swift
  39. 347 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/KMEditImageController.xib
  40. 128 1423
      PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/KMEditPDFTextPropertyViewController.swift
  41. 195 1941
      PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/KMEditPDFTextPropertyViewController.xib
  42. 214 390
      PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/Manager/KMEditPDfHanddler.swift
  43. 87 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/Toolbar/KMEditPDFToolbarItemView.swift
  44. 40 16
      PDF Office/PDF Reader Pro.xcodeproj/project.pbxproj
  45. 624 82
      PDF Office/PDF Reader Pro.xcodeproj/xcuserdata/kdanmobile.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

+ 9 - 1
PDF Office/KMComponentLibrary/KMComponentLibrary.xcodeproj/project.pbxproj

@@ -179,6 +179,8 @@
 		BB5A9D1C2CB64D4800F64C1F /* Component.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = BB5A9C732CB64D4800F64C1F /* Component.xcassets */; };
 		BB5A9D1D2CB64D4800F64C1F /* brand-variables.json in Resources */ = {isa = PBXBuildFile; fileRef = BB5A9C742CB64D4800F64C1F /* brand-variables.json */; };
 		BB7221562CD1E3B500331DEA /* ComponentManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB7221552CD1E3B500331DEA /* ComponentManager.swift */; };
+		BB79E7142CE60FDE0052CAD5 /* ComponentCSelectorItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB79E7132CE60FDE0052CAD5 /* ComponentCSelectorItem.swift */; };
+		BB79E7162CE60FEB0052CAD5 /* ComponentCSelectorItem.xib in Resources */ = {isa = PBXBuildFile; fileRef = BB79E7152CE60FEB0052CAD5 /* ComponentCSelectorItem.xib */; };
 		BBE788472CBCFCD2008086E2 /* ComponentBaseView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBE788462CBCFCD2008086E2 /* ComponentBaseView.swift */; };
 /* End PBXBuildFile section */
 
@@ -356,6 +358,8 @@
 		BB5A9C732CB64D4800F64C1F /* Component.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Component.xcassets; sourceTree = "<group>"; };
 		BB5A9C742CB64D4800F64C1F /* brand-variables.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "brand-variables.json"; sourceTree = "<group>"; };
 		BB7221552CD1E3B500331DEA /* ComponentManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ComponentManager.swift; sourceTree = "<group>"; };
+		BB79E7132CE60FDE0052CAD5 /* ComponentCSelectorItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ComponentCSelectorItem.swift; sourceTree = "<group>"; };
+		BB79E7152CE60FEB0052CAD5 /* ComponentCSelectorItem.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ComponentCSelectorItem.xib; sourceTree = "<group>"; };
 		BBE788462CBCFCD2008086E2 /* ComponentBaseView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ComponentBaseView.swift; sourceTree = "<group>"; };
 /* End PBXFileReference section */
 
@@ -762,9 +766,9 @@
 		BB5A9C152CB64D4700F64C1F /* Slider */ = {
 			isa = PBXGroup;
 			children = (
+				BB5A9C172CB64D4700F64C1F /* ComponentSliderProperty.swift */,
 				BB5A9C1B2CB64D4700F64C1F /* ComponentSlider.swift */,
 				BB5A9C162CB64D4700F64C1F /* ComponentSlider.xib */,
-				BB5A9C172CB64D4700F64C1F /* ComponentSliderProperty.swift */,
 				BB5A9C182CB64D4700F64C1F /* ComponentSliderPoint */,
 			);
 			path = Slider;
@@ -825,6 +829,8 @@
 				BB5A9C2C2CB64D4700F64C1F /* ComponentCSelectorProperty.swift */,
 				BB5A9C3B2CB64D4700F64C1F /* ComponentCSelector.swift */,
 				BB5A9C3A2CB64D4700F64C1F /* ComponentCSelector.xib */,
+				BB79E7132CE60FDE0052CAD5 /* ComponentCSelectorItem.swift */,
+				BB79E7152CE60FEB0052CAD5 /* ComponentCSelectorItem.xib */,
 				BB5A9C3C2CB64D4700F64C1F /* ComponentCSelectorGroup.swift */,
 				BB5A9C2D2CB64D4700F64C1F /* ComponentCSelectorGroup.xib */,
 				BB5A9C2E2CB64D4700F64C1F /* Position */,
@@ -1068,6 +1074,7 @@
 				BB5A9CC22CB64D4800F64C1F /* ComponentAlert.xib in Resources */,
 				BB5A9D062CB64D4800F64C1F /* ComponentGroup.xib in Resources */,
 				BB5A9CD22CB64D4800F64C1F /* ComponentSlider.xib in Resources */,
+				BB79E7162CE60FEB0052CAD5 /* ComponentCSelectorItem.xib in Resources */,
 				BB5A9D0A2CB64D4800F64C1F /* ComponentToolTip.xib in Resources */,
 				BB5A9D052CB64D4800F64C1F /* ComponentSelect.xib in Resources */,
 				BB5A9CE62CB64D4800F64C1F /* ComponentCPosition.xib in Resources */,
@@ -1187,6 +1194,7 @@
 				BB5A9C7A2CB64D4800F64C1F /* ComponentTabsProperty.swift in Sources */,
 				BB5A9CBF2CB64D4800F64C1F /* ComponentNotification.swift in Sources */,
 				BB5A9C932CB64D4800F64C1F /* ComponentRadio.swift in Sources */,
+				BB79E7142CE60FDE0052CAD5 /* ComponentCSelectorItem.swift in Sources */,
 				BB5A9C802CB64D4800F64C1F /* ComponentSidebarPageTurnerProperty.swift in Sources */,
 				BB5A9CDF2CB64D4800F64C1F /* ComponentStepper.swift in Sources */,
 				BB5A9CF22CB64D4800F64C1F /* ComponentButton.swift in Sources */,

+ 15 - 25
PDF Office/KMComponentLibrary/KMComponentLibrary/View/Controller/ComponentCSelectorGroup.swift

@@ -9,6 +9,7 @@ import Cocoa
 
 public class ComponentCSelectorGroup: ComponentBaseXibView {
 
+    @IBOutlet var contendView: NSView!
     @IBOutlet var contendBox: NSBox!
 
     var csPropertyArr: [ComponentCSelectorProperty] = []
@@ -36,6 +37,8 @@ public class ComponentCSelectorGroup: ComponentBaseXibView {
     public override func awakeFromNib() {
         super.awakeFromNib()
        
+        contendView.wantsLayer = true
+        contendView.layer?.masksToBounds = true
     }
     
     public func updateItemProperty(_ propertys: [ComponentCSelectorProperty]) {
@@ -48,43 +51,30 @@ public class ComponentCSelectorGroup: ComponentBaseXibView {
         if csPropertyArr.count == 0 {
             return
         }
-        contendBox.borderWidth = 1
-        
-        if let value = ComponentLibrary.shared.getComponentValueFromKey("comp-field/colorFill-nor") {
-            let currentValue = value as! [String : Any]
-            contendBox.fillColor = ComponentLibrary.shared.getColor(rgbaDict: currentValue)
-        } else {
-            contendBox.fillColor = NSColor.clear
-        }
-        
-        if let value = ComponentLibrary.shared.getComponentValueFromKey("comp-field/colorBorder-nor") {
-            let currentValue = value as! [String : Any]
-            contendBox.borderColor = ComponentLibrary.shared.getColor(rgbaDict: currentValue)
-        } else {
-            contendBox.borderColor = NSColor.clear
-        }
-        
+        contendView.layer?.borderWidth = 1
+        contendView.layer?.backgroundColor = ComponentLibrary.shared.getComponentColorFromKey("comp-field/colorFill-nor").cgColor
+        contendView.layer?.borderColor = ComponentLibrary.shared.getComponentColorFromKey("comp-field/colorBorder-nor").cgColor
         if let value = ComponentLibrary.shared.getComponentValueFromKey("radius/xs") {
             let currentValue = value as! CGFloat
-            contendBox.cornerRadius = currentValue
+            contendView.layer?.cornerRadius = currentValue
         }
         
         if let subviews = contendBox.contentView?.subviews {
             for view in subviews {
-                if view is ComponentCSelector {
+                if view is ComponentCSelectorItem {
                     view.removeFromSuperview()
                 }
             }
         }
         
         var itemXValue: CGFloat = 0
+        let viewWidth: CGFloat = CGRectGetWidth(bounds)/CGFloat(csPropertyArr.count)
         for i in 0...csPropertyArr.count - 1 {
             let itemProperty = csPropertyArr[i]
-            let item = ComponentCSelector.init()
+            let item = ComponentCSelectorItem.init()
+            item.frame = CGRectMake(itemXValue, 0, viewWidth, CGRectGetHeight(contendBox.contentView!.bounds))
             item.properties = itemProperty
-            let viewWidth = itemProperty.propertyInfo.viewWidth
-            item.frame = CGRectMake(itemXValue, 0, viewWidth, viewWidth)
-            item.autoresizingMask = [.maxXMargin,.maxYMargin]
+            item.autoresizingMask = [.maxXMargin, .height]
             item.setTarget(self, action: #selector(cSelectorItemClicked(_:)))
             contendBox.contentView?.addSubview(item)
             
@@ -93,13 +83,13 @@ public class ComponentCSelectorGroup: ComponentBaseXibView {
         
     }
     
-    @objc func cSelectorItemClicked(_ item: ComponentCSelector) {
+    @objc func cSelectorItemClicked(_ item: ComponentCSelectorItem) {
         let property = item.properties
         
         if let subviews = contendBox.contentView?.subviews {
             for view in subviews {
-                if view is ComponentCSelector {
-                    let itemView = view as! ComponentCSelector
+                if view is ComponentCSelectorItem {
+                    let itemView = view as! ComponentCSelectorItem
                     if itemView.properties != property {
                         itemView.properties.state = .normal
                         itemView.refreshUI()

+ 22 - 10
PDF Office/KMComponentLibrary/KMComponentLibrary/View/Controller/ComponentCSelectorGroup.xib

@@ -9,6 +9,7 @@
         <customObject id="-2" userLabel="File's Owner" customClass="ComponentCSelectorGroup" customModule="KMComponentLibrary" customModuleProvider="target">
             <connections>
                 <outlet property="contendBox" destination="I5v-gf-gRb" id="8bV-6K-Baj"/>
+                <outlet property="contendView" destination="tA7-3x-bbE" id="NMh-p9-aRs"/>
             </connections>
         </customObject>
         <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
@@ -17,19 +18,30 @@
             <rect key="frame" x="0.0" y="0.0" width="191" height="38"/>
             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
             <subviews>
-                <box boxType="custom" cornerRadius="4" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="I5v-gf-gRb">
+                <customView translatesAutoresizingMaskIntoConstraints="NO" id="tA7-3x-bbE">
                     <rect key="frame" x="0.0" y="0.0" width="191" height="38"/>
-                    <view key="contentView" id="lAk-SY-Xh7">
-                        <rect key="frame" x="1" y="1" width="189" height="36"/>
-                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                    </view>
-                </box>
+                    <subviews>
+                        <box boxType="custom" borderWidth="0.0" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="I5v-gf-gRb">
+                            <rect key="frame" x="1" y="1" width="189" height="36"/>
+                            <view key="contentView" id="lAk-SY-Xh7">
+                                <rect key="frame" x="0.0" y="0.0" width="189" height="36"/>
+                                <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                            </view>
+                        </box>
+                    </subviews>
+                    <constraints>
+                        <constraint firstAttribute="bottom" secondItem="I5v-gf-gRb" secondAttribute="bottom" constant="1" id="0D6-Du-5IG"/>
+                        <constraint firstItem="I5v-gf-gRb" firstAttribute="top" secondItem="tA7-3x-bbE" secondAttribute="top" constant="1" id="P95-Oh-3ez"/>
+                        <constraint firstAttribute="trailing" secondItem="I5v-gf-gRb" secondAttribute="trailing" constant="1" id="nFe-vh-lrg"/>
+                        <constraint firstItem="I5v-gf-gRb" firstAttribute="leading" secondItem="tA7-3x-bbE" secondAttribute="leading" constant="1" id="w9c-6f-SVU"/>
+                    </constraints>
+                </customView>
             </subviews>
             <constraints>
-                <constraint firstAttribute="bottom" secondItem="I5v-gf-gRb" secondAttribute="bottom" id="lP6-SS-qbM"/>
-                <constraint firstItem="I5v-gf-gRb" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" id="qAL-gf-mEH"/>
-                <constraint firstAttribute="trailing" secondItem="I5v-gf-gRb" secondAttribute="trailing" id="tNg-1s-m5a"/>
-                <constraint firstItem="I5v-gf-gRb" firstAttribute="top" secondItem="c22-O7-iKe" secondAttribute="top" id="z7g-tq-12H"/>
+                <constraint firstItem="tA7-3x-bbE" firstAttribute="top" secondItem="c22-O7-iKe" secondAttribute="top" id="O53-FJ-Ua8"/>
+                <constraint firstAttribute="trailing" secondItem="tA7-3x-bbE" secondAttribute="trailing" id="T0C-y7-FZc"/>
+                <constraint firstAttribute="bottom" secondItem="tA7-3x-bbE" secondAttribute="bottom" id="d4g-NU-FW7"/>
+                <constraint firstItem="tA7-3x-bbE" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" id="qxO-7L-MEh"/>
             </constraints>
             <point key="canvasLocation" x="99.5" y="68"/>
         </customView>

+ 166 - 0
PDF Office/KMComponentLibrary/KMComponentLibrary/View/Controller/ComponentCSelectorItem.swift

@@ -0,0 +1,166 @@
+//
+//  ComponentCSelectorItem.swift
+//  KMComponentLibrary
+//
+//  Created by Niehaoyu on 2024/11/14.
+//
+
+import Cocoa
+
+class ComponentCSelectorItem: ComponentBaseXibView {
+    
+    @IBOutlet var iconBox: NSBox!
+    @IBOutlet var iconImage: NSImageView!
+    
+    @IBOutlet var iconImgWidthConst: NSLayoutConstraint!
+    
+    // MARK: Private Property
+    private var _properties : ComponentCSelectorProperty = ComponentCSelectorProperty()
+    
+    private var action: Selector?   // 点击事件
+    private weak var target: AnyObject? // 对象目标
+    
+    public var customData: Any? //提供给外部关联自定义数据
+    
+    public override func draw(_ dirtyRect: NSRect) {
+        super.draw(dirtyRect)
+
+        // Drawing code here.
+    }
+    
+    // MARK: 初始化
+    deinit {
+        NotificationCenter.default.removeObserver(self)
+        
+    }
+    public required init?(coder decoder: NSCoder) {
+        super.init(coder: decoder)
+        
+    }
+    
+    override init(frame frameRect: NSRect) {
+        super.init(frame: frameRect)
+    }
+    
+    public override func awakeFromNib() {
+        super.awakeFromNib()
+        
+    }
+    
+    // MARK: - Set & Get
+    public var properties : ComponentCSelectorProperty {
+        get {
+           return _properties
+        }
+        set {
+            _properties = newValue
+            
+            ComponentLibrary.shared.configCSelectorComponent(properties: _properties)
+            
+            reloadData()
+        }
+    }
+    
+    //MARK: - SetupUI
+    func setupUI() {
+        
+        if properties.size == .s {
+            iconImgWidthConst.constant = 16
+        } else {
+            iconImgWidthConst.constant = 20
+        }
+    }
+    
+    func refreshUI() {
+        
+        var fillColor: NSColor?
+        var borderWidth: CGFloat = 0
+        var borderColor: NSColor?
+        
+        var iconImage = properties.iconImage
+        
+        if properties.state == .normal {
+            fillColor = properties.propertyInfo.color_nor
+            borderWidth = 0
+            borderColor = properties.propertyInfo.borderColor_nor
+        } else if properties.state == .hover {
+            fillColor = properties.propertyInfo.color_hov
+            borderWidth = properties.propertyInfo.borderWidth
+            borderColor = properties.propertyInfo.borderColor_hov
+            if let image = properties.icon_hov_Image {
+                iconImage = image
+            }
+        } else if properties.state == .pressed {
+            fillColor = properties.propertyInfo.color_active
+            borderWidth = properties.propertyInfo.borderWidth
+            borderColor = properties.propertyInfo.borderColor_active
+        }
+        
+        self.iconImage.image = iconImage
+        
+        if let color = fillColor {
+            iconBox.fillColor = color
+        }
+        iconBox.borderWidth = borderWidth
+        
+        if let color = borderColor {
+            iconBox.borderColor = color
+        }
+        
+    }
+    
+    public func setTarget(_ target: AnyObject?, action: Selector?) {
+        self.target = target!
+        self.action = action!
+    }
+    
+    public func reloadData() {
+        
+        setupUI()
+        
+        refreshUI()
+    }
+    
+    //MARK: - MouseEvent
+    public override func mouseEntered(with event: NSEvent) {
+        super.mouseEntered(with: event)
+         
+        if properties.state != .pressed {
+            properties.state = .hover
+        }
+        refreshUI()
+        
+    }
+    
+    public override func mouseMoved(with event: NSEvent) {
+        super.mouseMoved(with: event)
+        
+    }
+     
+    public override func mouseExited(with event: NSEvent) {
+        super.mouseExited(with: event)
+        
+        if properties.state != .pressed {
+            properties.state = .normal
+        }
+        
+        refreshUI()
+        
+    }
+    
+    public override func mouseDown(with event: NSEvent) {
+        super.mouseDown(with: event)
+        
+        properties.state = .pressed
+        
+        refreshUI()
+    }
+    
+    public override func mouseUp(with event: NSEvent) {
+        super.mouseUp(with: event)
+        
+        if let target = target, let action = action {
+            _ = target.perform(action, with: self)
+        }
+    }
+}

+ 56 - 0
PDF Office/KMComponentLibrary/KMComponentLibrary/View/Controller/ComponentCSelectorItem.xib

@@ -0,0 +1,56 @@
+<?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>
+        <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="ComponentCSelectorItem" customModule="KMComponentLibrary" customModuleProvider="target">
+            <connections>
+                <outlet property="iconBox" destination="Zq7-b9-BWd" id="Gx7-Ws-ZEl"/>
+                <outlet property="iconImage" destination="Q5Z-rT-97U" id="9K8-E3-NPU"/>
+                <outlet property="iconImgWidthConst" destination="kaG-FD-9Bf" id="xde-RP-7Ue"/>
+            </connections>
+        </customObject>
+        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
+        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
+        <customView id="c22-O7-iKe">
+            <rect key="frame" x="0.0" y="0.0" width="32" height="32"/>
+            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+            <subviews>
+                <box boxType="custom" borderWidth="0.0" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="Zq7-b9-BWd">
+                    <rect key="frame" x="0.0" y="0.0" width="32" height="32"/>
+                    <view key="contentView" id="INB-uN-M6r">
+                        <rect key="frame" x="0.0" y="0.0" width="32" height="32"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <subviews>
+                            <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Q5Z-rT-97U">
+                                <rect key="frame" x="6" y="6" width="20" height="20"/>
+                                <constraints>
+                                    <constraint firstAttribute="width" secondItem="Q5Z-rT-97U" secondAttribute="height" multiplier="1:1" id="X3w-wX-l7Y"/>
+                                    <constraint firstAttribute="width" constant="20" id="kaG-FD-9Bf"/>
+                                </constraints>
+                                <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="test" id="CkP-mY-4Ow"/>
+                            </imageView>
+                        </subviews>
+                        <constraints>
+                            <constraint firstItem="Q5Z-rT-97U" firstAttribute="centerY" secondItem="INB-uN-M6r" secondAttribute="centerY" id="0z8-Kx-e8t"/>
+                            <constraint firstItem="Q5Z-rT-97U" firstAttribute="centerX" secondItem="INB-uN-M6r" secondAttribute="centerX" id="ZCB-2W-M7q"/>
+                        </constraints>
+                    </view>
+                </box>
+            </subviews>
+            <constraints>
+                <constraint firstAttribute="trailing" secondItem="Zq7-b9-BWd" secondAttribute="trailing" id="Blf-BF-Dvk"/>
+                <constraint firstAttribute="bottom" secondItem="Zq7-b9-BWd" secondAttribute="bottom" id="bv3-ej-tLh"/>
+                <constraint firstItem="Zq7-b9-BWd" firstAttribute="top" secondItem="c22-O7-iKe" secondAttribute="top" id="cDs-cj-zKo"/>
+                <constraint firstItem="Zq7-b9-BWd" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" id="iNc-9M-STr"/>
+            </constraints>
+            <point key="canvasLocation" x="-64" y="77.5"/>
+        </customView>
+    </objects>
+    <resources>
+        <image name="test" width="200" height="200"/>
+    </resources>
+</document>

+ 5 - 54
PDF Office/KMComponentLibrary/KMComponentLibrary/View/Slider/ComponentSlider.swift

@@ -19,16 +19,10 @@ public class ComponentSlider: ComponentBaseXibView {
     @IBOutlet var contendBox: NSBox!
     @IBOutlet var bottomBox: NSBox!
     @IBOutlet var upBox: NSBox!
-    @IBOutlet var leftIconImageView: NSImageView!
-    @IBOutlet var rightIconImageView: NSImageView!
-    @IBOutlet var sliderBGView: NSView!
+     @IBOutlet var sliderBGView: NSView!
 
     @IBOutlet var sliderPoint: ComponentSliderPoint!
-    @IBOutlet var selectItem: ComponentSelect!
-     
-    @IBOutlet var rightIconRightConst: NSLayoutConstraint!
-    @IBOutlet var selectItemHeightConst: NSLayoutConstraint!
-    
+ 
     // MARK: Private Property
     private var _properties : ComponentSliderProperty = ComponentSliderProperty()
     
@@ -69,8 +63,7 @@ public class ComponentSlider: ComponentBaseXibView {
         bottomBox.borderWidth = 0
         bottomBox.fillColor = .clear
         bottomBox.autoresizingMask = [.minXMargin, .width, .maxXMargin, .minYMargin, .maxYMargin]
-        
-        
+         
         sliderPoint.autoresizingMask = [.minXMargin, .maxXMargin, .minYMargin, .maxYMargin]
         
         upBox.fillColor = .clear
@@ -116,47 +109,8 @@ public class ComponentSlider: ComponentBaseXibView {
         
         bottomBox.fillColor = properties.propertyInfo.color_nor
         
-        var bottomBorRightValue: CGFloat = 0
-        
-        if properties.showInput == true {
-            bottomBorRightValue += 96
-            selectItem.isHidden = false
-        } else {
-            selectItem.isHidden = true
-        }
-        
-        rightIconImageView.isHidden = true
-        if properties.rightIcon != nil {
-            rightIconRightConst.constant = bottomBorRightValue
-            bottomBorRightValue += 24
-            rightIconImageView.isHidden = false
-            rightIconImageView.image = properties.rightIcon
-        }
-
-        var sliderViewXValue: CGFloat = 0
-        leftIconImageView.isHidden = true
-        if properties.leftIcon != nil {
-            leftIconImageView.isHidden = false
-            leftIconImageView.image = properties.leftIcon
-            sliderViewXValue += 24
-        }
-        
-        sliderBGView.frame = CGRectMake(sliderViewXValue, 0, CGRectGetWidth(frame)-sliderViewXValue-bottomBorRightValue, CGRectGetHeight(frame))
         sliderBGView.autoresizingMask = [.minXMargin, .width, .maxXMargin, .minYMargin, .maxYMargin, .height]
-        
-        let size = properties.size
-        let isDisabled = properties.isDisabled
-        let selectItemProperty: ComponentSelectProperties = ComponentSelectProperties.init(size: size,
-                                                                                           state: .normal,
-                                                                                           isDisabled: isDisabled,
-                                                                                           isError: false,
-                                                                                           leftIcon: false,
-                                                                                           placeholder: "placeholder",
-                                                                                           errorText: "errorText")
-        selectItem.properties = selectItemProperty
-        
-        selectItemHeightConst.constant = selectItem.properties.propertyInfo.viewHeight
-        
+ 
     }
     
     func refreshUI() {
@@ -200,10 +154,7 @@ public class ComponentSlider: ComponentBaseXibView {
         refreshUI()
         
         updatePercentValue()
-        
-        DispatchQueue.main.asyncAfter(deadline: .now()+0.01) {
-            self.setupUI()
-        }
+ 
     }
     
     //MARK: - MouseEvent

+ 1 - 40
PDF Office/KMComponentLibrary/KMComponentLibrary/View/Slider/ComponentSlider.xib

@@ -10,11 +10,6 @@
             <connections>
                 <outlet property="bottomBox" destination="axx-9V-fmT" id="Fiw-9b-DYi"/>
                 <outlet property="contendBox" destination="r9G-JW-6fU" id="NWX-X7-Q4P"/>
-                <outlet property="leftIconImageView" destination="I3x-xa-xQi" id="Jv1-1F-EEO"/>
-                <outlet property="rightIconImageView" destination="Yg9-JU-qLQ" id="G9H-Qb-oVY"/>
-                <outlet property="rightIconRightConst" destination="bI6-kl-mH2" id="mca-7S-rXl"/>
-                <outlet property="selectItem" destination="oYl-7x-Jya" id="2jb-s3-Nhs"/>
-                <outlet property="selectItemHeightConst" destination="UYp-eE-5TL" id="qhD-2x-By3"/>
                 <outlet property="sliderBGView" destination="9AB-vP-I5h" id="YUa-h5-DQy"/>
                 <outlet property="sliderPoint" destination="lZ8-WZ-fWl" id="fxW-BZ-Xga"/>
                 <outlet property="upBox" destination="uyy-IZ-qtK" id="Apy-ED-5q9"/>
@@ -32,17 +27,9 @@
                         <rect key="frame" x="0.0" y="0.0" width="360" height="40"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
-                            <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="I3x-xa-xQi">
-                                <rect key="frame" x="2" y="12" width="16" height="16"/>
-                                <constraints>
-                                    <constraint firstAttribute="height" constant="16" id="EeM-PH-UXj"/>
-                                    <constraint firstAttribute="width" constant="16" id="fT7-xG-gnk"/>
-                                </constraints>
-                                <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="test" id="xPM-nu-Q26"/>
-                            </imageView>
                             <customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="9AB-vP-I5h">
                                 <rect key="frame" x="0.0" y="0.0" width="360" height="40"/>
-                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+                                <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                 <subviews>
                                     <box fixedFrame="YES" boxType="custom" cornerRadius="2" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="axx-9V-fmT">
                                         <rect key="frame" x="0.0" y="18" width="360" height="4"/>
@@ -66,30 +53,7 @@
                                     </customView>
                                 </subviews>
                             </customView>
-                            <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Yg9-JU-qLQ">
-                                <rect key="frame" x="342" y="12" width="16" height="16"/>
-                                <constraints>
-                                    <constraint firstAttribute="width" constant="16" id="VlE-Nk-XP4"/>
-                                    <constraint firstAttribute="height" constant="16" id="W5c-ys-sAf"/>
-                                </constraints>
-                                <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="test" id="Jlm-gC-xKn"/>
-                            </imageView>
-                            <customView translatesAutoresizingMaskIntoConstraints="NO" id="oYl-7x-Jya" customClass="ComponentSelect" customModule="KMComponentLibrary" customModuleProvider="target">
-                                <rect key="frame" x="280" y="0.0" width="80" height="40"/>
-                                <constraints>
-                                    <constraint firstAttribute="width" constant="80" id="RDF-ds-yyJ"/>
-                                    <constraint firstAttribute="height" constant="40" id="UYp-eE-5TL"/>
-                                </constraints>
-                            </customView>
                         </subviews>
-                        <constraints>
-                            <constraint firstItem="Yg9-JU-qLQ" firstAttribute="centerY" secondItem="wNM-LL-DmW" secondAttribute="centerY" id="0sx-nF-ZBW"/>
-                            <constraint firstItem="I3x-xa-xQi" firstAttribute="centerY" secondItem="wNM-LL-DmW" secondAttribute="centerY" id="PGe-jq-db9"/>
-                            <constraint firstAttribute="trailing" secondItem="Yg9-JU-qLQ" secondAttribute="trailing" constant="2" id="bI6-kl-mH2"/>
-                            <constraint firstItem="I3x-xa-xQi" firstAttribute="leading" secondItem="wNM-LL-DmW" secondAttribute="leading" constant="2" id="d8O-Eq-o4G"/>
-                            <constraint firstItem="oYl-7x-Jya" firstAttribute="centerY" secondItem="wNM-LL-DmW" secondAttribute="centerY" id="qLi-mC-Ids"/>
-                            <constraint firstAttribute="trailing" secondItem="oYl-7x-Jya" secondAttribute="trailing" id="sr3-89-Ij0"/>
-                        </constraints>
                     </view>
                 </box>
             </subviews>
@@ -102,7 +66,4 @@
             <point key="canvasLocation" x="151" y="129"/>
         </customView>
     </objects>
-    <resources>
-        <image name="test" width="200" height="200"/>
-    </resources>
 </document>

+ 2 - 11
PDF Office/KMComponentLibrary/KMComponentLibrary/View/Slider/ComponentSliderProperty.swift

@@ -12,29 +12,20 @@ import AppKit
 public class ComponentSliderProperty: NSObject {
     
     public var size: ComponentSize = .m
-    public var state: ComponentState = .normal 
-    public var leftIcon: NSImage?       //左侧icon
-    public var rightIcon: NSImage?      //右侧icon
+    public var state: ComponentState = .normal
     public var isDisabled: Bool = false //禁用状态
-    public var showInput: Bool = false //显示右侧输入框
     public var percent: CGFloat = 0.5 // 0-1,当前进度
-     
+    
     public var propertyInfo = SliderPropertyInfo()
     
     public init(size: ComponentSize = .m,
                 state: ComponentState = .normal,
-                leftIcon: NSImage? = nil,
-                rightIcon: NSImage? = nil,
                 isDisabled: Bool = false,
-                showInput: Bool = false,
                 percent: CGFloat = 0.5) {
         
         self.size = size
         self.state = state
-        self.leftIcon = leftIcon
-        self.rightIcon = rightIcon
         self.isDisabled = isDisabled
-        self.showInput = showInput
         self.percent = percent
         
     }

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

@@ -105,8 +105,6 @@ typedef NS_ENUM(NSInteger, CToolMode) {
     CMeasureToolMode,
     CRedactErasureToolMode,
     CEditPDFToolMode,         //编辑模式
-    CEditPDFToolMode_Text,    //编辑模式_文字
-    CEditPDFToolMode_Image    //编辑模式_图片
 };
 
 typedef NS_ENUM(NSUInteger, KMPDFActiveFormsAlignType) {

+ 178 - 0
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListViewExtension/CPDFListView+Edit.swift

@@ -0,0 +1,178 @@
+//
+//  CPDFListView+Edit.swift
+//  PDF Reader Pro
+//
+//  Created by Niehaoyu on 2024/11/15.
+//
+
+import Foundation
+
+
+extension CPDFListView {
+    
+    func km_EditingAreas() -> [CPDFEditArea] {
+        return self.editingAreas() as? [CPDFEditArea] ?? []
+    }
+    
+    func km_editAreasBounds(_ areas: [CPDFEditArea]) -> [NSRect] {
+        var rects: [NSRect] = []
+        for area in areas {
+            rects.append(area.bounds)
+        }
+        return rects
+    }
+    
+    func km_editAreasOpacitys(_ areas: [CPDFEditArea]) -> [CGFloat] {
+        var arr: [CGFloat] = []
+        for area in areas {
+            let data = self.opacityByRange(for: area)
+            arr.append(data)
+        }
+        return arr
+    }
+    
+    
+    //Image
+    func km_editingImageAreas() -> [CPDFEditImageArea] {
+        var areas: [CPDFEditImageArea] = []
+        for area in self.km_EditingAreas() {
+            if let data = area as? CPDFEditImageArea {
+                areas.append(data)
+            }
+        }
+        return areas
+    }
+    
+    func km_editAreasRotates(_ areas: [CPDFEditImageArea]) -> [CGFloat] {
+        var arr: [CGFloat] = []
+        for area in areas {
+            let data = self.getRotateWith(area)
+            arr.append(data)
+            
+        }
+        return arr
+    }
+    
+    //Text
+    func km_editingTextAreas() -> [CPDFEditTextArea] {
+        var areas: [CPDFEditTextArea] = []
+        for area in self.km_EditingAreas() {
+            if let data = area as? CPDFEditTextArea {
+                areas.append(data)
+            }
+        }
+        return areas
+    }
+    
+    func km_editTextAreasFontColors(_ textAreas: [CPDFEditTextArea]) -> [NSColor] {
+        var datas: [NSColor] = []
+        for area in textAreas {
+            if let data = self.editingSelectionFontColor(with: area) {
+                datas.append(data)
+            }
+        }
+        return datas
+    }
+    
+    func km_editTextAreasFontStyles(_ textAreas: [CPDFEditTextArea]) -> [String] {
+        var datas: [String] = []
+        for area in textAreas {
+            if let data = self.editingSelectionCFont(with: area)?.styleName {
+                datas.append(data)
+            }
+        }
+        return datas
+    }
+    
+    func km_editTextAreasFontNames(_ textAreas: [CPDFEditTextArea]) -> [String] {
+        var datas: [String] = []
+        for area in textAreas {
+            if let data = self.editingSelectionCFont(with: area)?.familyName {
+                datas.append(data)
+            }
+        }
+        return datas
+    }
+    
+    func km_editTextAreasFontSizes(_ textAreas: [CPDFEditTextArea]) -> [CGFloat] {
+        var datas: [CGFloat] = []
+        for area in textAreas {
+            let data = self.editingSelectionFontSize(byRangeEdit: area)
+            datas.append(data)
+        }
+        return datas
+    }
+    
+    func km_editTextAreasFontBolds(_ textAreas: [CPDFEditTextArea]) -> [Bool] {
+        var datas: [Bool] = []
+        for area in textAreas {
+            let data = self.isBoldCurrentSelection(byRangeEdit: area)
+            datas.append(data)
+            
+        }
+        return datas
+    }
+    
+    func km_editTextAreasFontItalics(_ textAreas: [CPDFEditTextArea]) -> [Bool] {
+        var datas: [Bool] = []
+        for area in textAreas {
+            let data = self.isItalicCurrentSelection(byRangeEdit: area)
+            datas.append(data)
+            
+        }
+        return datas
+    }
+    
+    func km_editTextAreasTextAlignments(_ textAreas: [CPDFEditTextArea]) -> [NSTextAlignment] {
+        var datas: [NSTextAlignment] = []
+        for area in textAreas {
+            let data = self.currentSelectionAlignment(byRangeEdit: area)
+            datas.append(data)
+            
+        }
+        return datas
+    }
+    
+    //MARK: - 开始&结束编辑
+    func enterEditPDF() {
+        self.updateActiveAnnotations([])
+        self.setNeedsDisplayForVisiblePages()
+        self.commitEditFormText()
+        self.annotationType = .editTextImage
+        
+        // 设置边框颜色
+        self.editingConfig().editingBorderColor = .clear
+        
+        self.editingConfig().isShowMouseAreaHover = true
+        
+        // 边框颜色
+        self.editingConfig().mouseHoverBorderColor = NSColor(hex: "#999999")
+        // 边框虚线设置
+        self.editingConfig().mouseHoverBorderDashPattern = [3,3,3]
+        // 块填充颜色(拖拽中)
+        // 是否显示位置辅助线
+        self.editingConfig().isShowEditingAreaHover = true
+        // 辅助线颜色
+        // 支持多选
+        self.editingConfig().isSupportMultipleSelectEditingArea = true
+        // 图片是否显示8个操作点
+        self.editingConfig().isDrawRectWithDot = true
+        
+        self.editingConfig().editingMouseSelectionBorderWidth = 1
+        self.editingConfig().editingMouseSelectionBorderDashPattern = [3, 3, 3]
+    }
+    
+    func exitEditPDF() {
+        self.updateActiveAnnotations([])
+        
+        self.setNeedsDisplayForVisiblePages()
+        
+        self.commitEditFormText()
+        
+        self.commitEditing()
+        
+        self.layoutDocumentView()
+    }
+    
+    
+}

+ 3 - 3
PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController+Action.swift

@@ -763,7 +763,7 @@ extension KMMainViewController {
     
     @objc func menuItemEditingClick_CutImage(sender: NSMenuItem) {
         
-        self.editPDFHanddler.cropAction()
+        self.editPDFHanddler?.cropAction()
     }
     
     @objc func menuItemEditingClick_ReplaceImage(sender: NSMenuItem) {
@@ -3100,7 +3100,7 @@ extension KMMainViewController : KMToolbarViewControllerDelegate {
     
     func mainToolDidClicked(_ toolController: KMToolbarController, _ beforeType: KMToolbarViewType, _ type: KMToolbarViewType, _ item: KMToolbarItemView , _ pages: [Int]) {
         if beforeType == .editPDF {
-            self.editPDFHanddler.enterEditPDF()
+
         }
         
         if(type != .Page) {
@@ -3909,7 +3909,7 @@ extension KMMainViewController : KMToolbarViewControllerDelegate {
                     self.toggleRightPane()
                     
                     if self.listView.toolMode == .editPDFToolMode {
-                        self.editPDFHanddler.rightSideLastState = toolbarItem.isSelected ? .open : .close
+                        self.editPDFHanddler?.rightSideLastState = toolbarItem.isSelected ? .open : .close
                     }
                 } else if itemID == KMDocumentRedactToolbarItemIdentifier {
                     self.listView.toolMode = .redactToolMode

+ 1 - 10
PDF Office/PDF Master/KMClass/ComponentLibraryDemo/Demo/SliderVC.swift

@@ -41,16 +41,7 @@ class SliderVC: NSViewController {
         }
         
         let showInput = self.inputButton.state == .on
-        
-        let properties: ComponentSliderProperty = ComponentSliderProperty.init(size: size, 
-                                                                               state: .normal,
-                                                                               leftIcon: self.leftIconBtn.state == .on ? ComponentLibrary.shared.image(forResource: "test") : nil,
-                                                                               rightIcon: self.rightIconBtn.state == .on ? ComponentLibrary.shared.image(forResource: "test") : nil,
-                                                                               isDisabled: isDisable,
-                                                                               showInput: showInput)
-        
-        slider.properties = properties
-        self.sliderHeightConst.constant = properties.propertyInfo.viewHeight
+         
         
         
     }

+ 0 - 2
PDF Office/PDF Master/KMClass/KMHomeViewController/Views/KMHomeOpenView/KMHomeOpenView.swift

@@ -65,8 +65,6 @@ class KMHomeOpenView: BaseXibView {
                                                               buttonText: KMLocalizedString("Create PDF"))
         createFileButton.properties.propertyInfo.rightIcon_nor = NSImage(named: "arrowDown")
         createFileButton.properties.propertyInfo.rightIcon_press = NSImage(named: "arrowDown_press")
-        createFileButton.properties.propertyInfo.cornerRadius_topLeft = 0
-        createFileButton.properties.propertyInfo.cornerRadius_bottomLeft = 0
         createFileButton.reloadData()
         createFileButton.setTarget(self, action: #selector(createFileAction(_:)))
         

+ 4 - 1
PDF Office/PDF Master/KMClass/KMPDFViewController/EditTool/Bates/KMBatesManager.swift

@@ -264,7 +264,10 @@ class KMBatesManager: NSObject {
         model.suffixString = dict["suffixString"] as! String
         model.digits = dict["digits"] as! Int
         model.startString = dict["startString"] as! String
-        model.tag = dict["tag"] as! String
+        if let value = dict["tag"] {
+            model.tag = value as! String
+        }
+        
          
         return model
     }

+ 19 - 22
PDF Office/PDF Master/KMClass/KMPDFViewController/EditTool/KMLinkViewController/KMLinkViewController.swift

@@ -43,7 +43,7 @@ import KMComponentLibrary
     
     private var annotation: CPDFLinkAnnotation? = nil
     
-    var multiController: KMNLinkMultiController = KMNLinkMultiController.init() //注释多选界面
+    var multiController: KMNMultiController = KMNMultiController.init() //注释多选界面
     
     let pageProperty = ComponentTabsProperty(tabsType: .underline_Fill, state: .normal, showIcon: false, title: NSLocalizedString("Page", comment: ""))
     let webProperty = ComponentTabsProperty(tabsType: .underline_Fill, state: .normal, showIcon: false, title: NSLocalizedString("Web", comment: ""))
@@ -125,14 +125,24 @@ import KMComponentLibrary
         if annotations.count == 0 {
             infoContendView.isHidden = true
         } else if annotations.count > 1 {
-            multiController.view.frame = infoContendView.bounds
-            multiController.view.autoresizingMask = [.width, .height]
+            multiController.view.frame = CGRectMake((CGRectGetWidth(infoContendView.frame) - 232)/2, CGRectGetHeight(infoContendView.frame)-112, 232, 112)
+            multiController.view.autoresizingMask = [.width, .maxYMargin]
             infoContendView.addSubview(multiController.view)
             
             multiController.view.isHidden = false
             tabsBGView.isHidden = true
             typeContendView.isHidden = true
             
+            if annotations.count > 2 {
+                multiController.aligHorizontalXButton.properties.isDisabled = false
+                multiController.aligVerticalYButton.properties.isDisabled = false
+            } else {
+                multiController.aligHorizontalXButton.properties.isDisabled = true
+                multiController.aligVerticalYButton.properties.isDisabled = true
+            }
+            multiController.aligHorizontalXButton.reloadData()
+            multiController.aligVerticalYButton.reloadData()
+            
         } else {
             multiController.view.isHidden = true
             tabsBGView.isHidden = false
@@ -301,26 +311,13 @@ extension KMLinkViewController: KMLinkEmailViewDelegate {
     
 }
 
-//MARK: - KMNLinkMultiControllerDelegate
-extension KMLinkViewController: KMNLinkMultiControllerDelegate {
-    func multiControllerDidClick(_ controller: KMNLinkMultiController, _ alignmentType: KMAnnotationsAlignmentType) {
- 
-        var alignType: KMPDFActiveFormsAlignType = .left
-        if alignmentType == .Left {
-            alignType = .left
-        } else if alignmentType == .XCenter {
-            alignType = .horizontally
-        } else if alignmentType == .Right {
-            alignType = .right
-        } else if alignmentType == .Top {
-            alignType = .top
-        } else if alignmentType == .YCenter {
-            alignType = .vertical
-        } else if alignmentType == .Bottom {
-            alignType = .bottom
-        }
+//MARK: - KMNMultiControllerDelegate
+extension KMLinkViewController: KMNMultiControllerDelegate {
+    func multiControllerDidClick(_ controller: KMNMultiController, _ alignmentType: KMPDFActiveFormsAlignType) {
+         
+        pdfView?.change(annotations, alignmentType: alignmentType)
         
-        pdfView?.change(annotations, alignmentType: alignType)
+        pdfView?.setNeedsDisplayForVisiblePages()
         
     }
 }

+ 3 - 2
PDF Office/PDF Master/KMClass/KMPDFViewController/EditTool/KMLinkViewController/Views/KMLinkPageView/KMLinkPageView.swift

@@ -85,8 +85,9 @@ public class KMLinkPageView: BaseXibView {
         paginationView.delegate = self
         
         goButton.properties = ComponentButtonProperty(type: .default_tertiary,
-                                                           size: .s,
-                                                           buttonText: KMLocalizedString("Go"))
+                                                      size: .s,
+                                                      buttonText: KMLocalizedString("Go"),
+                                                      keepPressState: false)
         goButton.setTarget(self, action: #selector(buttonClicked(_:)))
     }
     

+ 29 - 24
PDF Office/PDF Master/KMClass/KMPDFViewController/EditTool/KMLinkViewController/Views/KMNLinkMultiController/KMNLinkMultiController.swift

@@ -1,5 +1,5 @@
 //
-//  KMNLinkMultiController.swift
+//  KMNMultiController.swift
 //  PDF Reader Pro
 //
 //  Created by Niehaoyu on 2024/10/21.
@@ -8,13 +8,13 @@
 import Cocoa
 import KMComponentLibrary
 
-@objc protocol KMNLinkMultiControllerDelegate: AnyObject {
+@objc protocol KMNMultiControllerDelegate: AnyObject {
     
-    @objc optional func multiControllerDidClick(_ controller: KMNLinkMultiController, _ alignmentType: KMAnnotationsAlignmentType)
+    @objc optional func multiControllerDidClick(_ controller: KMNMultiController, _ alignmentType: KMPDFActiveFormsAlignType)
  
 }
  
-class KMNLinkMultiController: NSViewController {
+class KMNMultiController: NSViewController {
 
     @IBOutlet var contendBox: NSBox!
     @IBOutlet var titleLabel: NSTextField!
@@ -28,7 +28,7 @@ class KMNLinkMultiController: NSViewController {
     @IBOutlet var aligHorizontalXButton: ComponentButton!
     @IBOutlet var aligVerticalYButton: ComponentButton!
     
-    weak open var delegate: KMNLinkMultiControllerDelegate?
+    weak open var delegate: KMNMultiControllerDelegate?
     
     override func viewDidLoad() {
         super.viewDidLoad()
@@ -36,30 +36,30 @@ class KMNLinkMultiController: NSViewController {
         
         titleLabel.stringValue = KMLocalizedString("Alignment")
         
-        aligLeftButton.properties = ComponentButtonProperty(type: .text_gray, size: .s, onlyIcon: true)
+        aligLeftButton.properties = ComponentButtonProperty(type: .text_gray, size: .s, onlyIcon: true, keepPressState: false)
         aligLeftButton.properties.propertyInfo.leftIcon_nor = NSImage(named: "alignLeft")
         
-        aligLeftCenterButton.properties = ComponentButtonProperty(type: .text_gray, size: .s, onlyIcon: true)
+        aligLeftCenterButton.properties = ComponentButtonProperty(type: .text_gray, size: .s, onlyIcon: true, keepPressState: false)
         aligLeftCenterButton.properties.propertyInfo.leftIcon_nor = NSImage(named: "alignXCenter")
         
-        aligRightButton.properties = ComponentButtonProperty(type: .text_gray, size: .s, onlyIcon: true)
+        aligRightButton.properties = ComponentButtonProperty(type: .text_gray, size: .s, onlyIcon: true, keepPressState: false)
         aligRightButton.properties.propertyInfo.leftIcon_nor = NSImage(named: "alignRight")
         
-        aligTopButton.properties = ComponentButtonProperty(type: .text_gray, size: .s, onlyIcon: true)
+        aligTopButton.properties = ComponentButtonProperty(type: .text_gray, size: .s, onlyIcon: true, keepPressState: false)
         aligTopButton.properties.propertyInfo.leftIcon_nor = NSImage(named: "alignTop")
         
-        aligTopCenterButton.properties = ComponentButtonProperty(type: .text_gray, size: .s, onlyIcon: true)
+        aligTopCenterButton.properties = ComponentButtonProperty(type: .text_gray, size: .s, onlyIcon: true, keepPressState: false)
         aligTopCenterButton.properties.propertyInfo.leftIcon_nor = NSImage(named: "alignYCenter")
         
-        aligBottomButton.properties = ComponentButtonProperty(type: .text_gray, size: .s, onlyIcon: true)
+        aligBottomButton.properties = ComponentButtonProperty(type: .text_gray, size: .s, onlyIcon: true, keepPressState: false)
         aligBottomButton.properties.propertyInfo.leftIcon_nor = NSImage(named: "alignBottom")
         
-        aligHorizontalXButton.properties = ComponentButtonProperty(type: .text_gray, size: .s, onlyIcon: true)
-        aligHorizontalXButton.properties.propertyInfo.leftIcon_dis = NSImage(named: "alignHorizonal_dis")
+        aligHorizontalXButton.properties = ComponentButtonProperty(type: .text_gray, size: .s, onlyIcon: true, keepPressState: false)
+        aligHorizontalXButton.properties.propertyInfo.leftIcon_nor = NSImage(named: "alignHorizonal")
         aligHorizontalXButton.properties.isDisabled = true
         
-        aligVerticalYButton.properties = ComponentButtonProperty(type: .text_gray, size: .s, onlyIcon: true)
-        aligVerticalYButton.properties.propertyInfo.leftIcon_dis = NSImage(named: "alignAverageVertical_dis")
+        aligVerticalYButton.properties = ComponentButtonProperty(type: .text_gray, size: .s, onlyIcon: true, keepPressState: false)
+        aligVerticalYButton.properties.propertyInfo.leftIcon_nor = NSImage(named: "alignAverageVertical")
         aligVerticalYButton.properties.isDisabled = true
         
         for button in [aligLeftButton, aligLeftCenterButton, aligRightButton, aligTopButton,
@@ -72,22 +72,27 @@ class KMNLinkMultiController: NSViewController {
     }
    
     @objc func buttonClicked(_ sender: ComponentButton) {
-        var alignmentType: KMAnnotationsAlignmentType = .None
+        var alignType: KMPDFActiveFormsAlignType = .left
+         
         if sender == aligLeftButton {
-            alignmentType = .Left
+            alignType = .left
         } else if sender == aligLeftCenterButton {
-            alignmentType = .XCenter
+            alignType = .horizontally
         } else if sender == aligRightButton {
-            alignmentType = .Right
+            alignType = .right
         } else if sender == aligTopButton {
-            alignmentType = .Top
+            alignType = .top
         } else if sender == aligTopCenterButton {
-            alignmentType = .YCenter
+            alignType = .vertical
         } else if sender == aligBottomButton {
-            alignmentType = .Bottom
+            alignType = .bottom
+        } else if sender == aligHorizontalXButton {
+            alignType = .disHorizontally
+        } else if sender == aligVerticalYButton {
+            alignType = .disVertical
         }
-        
-        delegate?.multiControllerDidClick?(self, alignmentType)
+       
+        delegate?.multiControllerDidClick?(self, alignType)
     }
     
 }

+ 9 - 9
PDF Office/PDF Master/KMClass/KMPDFViewController/EditTool/KMLinkViewController/Views/KMNLinkMultiController/KMNLinkMultiController.xib

@@ -6,7 +6,7 @@
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="KMNLinkMultiController" customModule="PDF_Reader_Pro" customModuleProvider="target">
+        <customObject id="-2" userLabel="File's Owner" customClass="KMNMultiController">
             <connections>
                 <outlet property="aligBottomButton" destination="c5m-oJ-Mrg" id="cTD-cq-fos"/>
                 <outlet property="aligHorizontalXButton" destination="xex-s9-yRv" id="u2j-y5-9is"/>
@@ -24,20 +24,20 @@
         <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="264" height="373"/>
+            <rect key="frame" x="0.0" y="0.0" width="232" height="112"/>
             <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
             <subviews>
                 <box boxType="custom" borderWidth="0.0" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="wds-Gi-bXC">
-                    <rect key="frame" x="0.0" y="0.0" width="264" height="373"/>
+                    <rect key="frame" x="0.0" y="0.0" width="232" height="112"/>
                     <view key="contentView" id="68H-im-AUh">
-                        <rect key="frame" x="0.0" y="0.0" width="264" height="373"/>
+                        <rect key="frame" x="0.0" y="0.0" width="232" height="112"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
                             <customView translatesAutoresizingMaskIntoConstraints="NO" id="uts-mo-cZM">
-                                <rect key="frame" x="0.0" y="333" width="264" height="40"/>
+                                <rect key="frame" x="0.0" y="72" width="232" height="40"/>
                                 <subviews>
-                                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="5ez-oE-1Ci">
-                                        <rect key="frame" x="14" y="12" width="37" height="16"/>
+                                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="5ez-oE-1Ci">
+                                        <rect key="frame" x="-2" y="12" width="37" height="16"/>
                                         <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="sSS-VW-cXZ">
                                             <font key="font" usesAppearanceFont="YES"/>
                                             <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@@ -46,13 +46,13 @@
                                     </textField>
                                 </subviews>
                                 <constraints>
-                                    <constraint firstItem="5ez-oE-1Ci" firstAttribute="leading" secondItem="uts-mo-cZM" secondAttribute="leading" constant="16" id="J2Y-wA-fu9"/>
+                                    <constraint firstItem="5ez-oE-1Ci" firstAttribute="leading" secondItem="uts-mo-cZM" secondAttribute="leading" id="J2Y-wA-fu9"/>
                                     <constraint firstAttribute="height" constant="40" id="geO-eJ-2Ud"/>
                                     <constraint firstItem="5ez-oE-1Ci" firstAttribute="centerY" secondItem="uts-mo-cZM" secondAttribute="centerY" id="ndv-uT-XBn"/>
                                 </constraints>
                             </customView>
                             <customView translatesAutoresizingMaskIntoConstraints="NO" id="pR5-9r-pOd">
-                                <rect key="frame" x="16" y="261" width="232" height="72"/>
+                                <rect key="frame" x="0.0" y="0.0" width="232" height="72"/>
                                 <subviews>
                                     <customView translatesAutoresizingMaskIntoConstraints="NO" id="JsC-iM-uae" customClass="ComponentButton" customModule="KMComponentLibrary">
                                         <rect key="frame" x="0.0" y="40" width="32" height="32"/>

+ 59 - 30
PDF Office/PDF Master/KMClass/KMPDFViewController/KMMainViewController.swift

@@ -77,6 +77,8 @@ import KMComponentLibrary
     //右边
     var rightSideController: KMRightSideController?
     
+    var editPDFHanddler: KMEditPDfHanddler?
+    
     //MARK: - 旧代码,有需要用到的拿出来,写好备注
     
     @IBOutlet weak var leftView: NSView!
@@ -252,7 +254,6 @@ import KMComponentLibrary
         }
     }
     
-    let editPDFHanddler = KMEditPDfHanddler()
     
     var distanceMeasureInfoWindowController: CDistanceMeasureInfoWindowController?
     var perimeterMeasureInfoWindowController: CPerimeterMeasureInfoWindowController?
@@ -267,7 +268,7 @@ import KMComponentLibrary
         self.listView.delegate = nil
         self.listView.document?.delegate = nil
         
-        self.editPDFHanddler.clearData()
+        self.editPDFHanddler?.clearData()
         self.removeEventMonitor()
         self.removeKeyEventMonitor()
     }
@@ -349,17 +350,42 @@ import KMComponentLibrary
     func updatePDFViewAnnotationMode() {
         let toolbarMode = viewManager.toolMode
         
+        listView.toolMode = .noteToolMode
+        
         let subToolMode = viewManager.subToolMode
         
-        if subToolMode == .None {
+        if toolbarMode == .None {
             listView.annotationType = .unkown
             
-        } else if subToolMode == .Edit_Link {
+        } else if toolbarMode == .Markup {
+            
+        } else if toolbarMode == .Edit {
+            listView.toolMode = .editPDFToolMode
+            if editPDFHanddler == nil {
+                editPDFHanddler = KMEditPDfHanddler()
+            }
+            editPDFHanddler?.listView = self.listView
+            
+            self.listView.enterEditPDF()
+            
+            if subToolMode == .None {
+                
+            } else if subToolMode == .Edit_text {
+                
+            } else if subToolMode == .Edit_Image {
+
+            } else if subToolMode == .Edit_Link {
+                listView.toolMode = .noteToolMode
+                
+                listView.annotationType = .link
+                
+            }
+        } else if toolbarMode == .Form {
             
-            listView.toolMode = .noteToolMode
-            listView.annotationType = .link
+        } else if toolbarMode == .Fill {
             
         }
+        
     }
     
     //MARK: - SplitView
@@ -496,7 +522,7 @@ import KMComponentLibrary
         
         infoSplitViewRightConst.constant = 264
         
-        rightSideController?.subToolMode = viewManager.subToolMode
+        rightSideController?.viewManager = self.viewManager
         
     }
     
@@ -1951,44 +1977,46 @@ extension KMMainViewController: CPDFViewDelegate,CPDFListViewDelegate {
     }
     
     func pdfViewEditingSelectionDidChanged(_ pdfView: CPDFView!) {
-        self.editPDFHanddler.pdfViewEditingSelectionDidChanged(pdfView)
+        // 文本区块 选中文本已经变化
+        self.editPDFHanddler?.pdfViewEditingSelectionDidChanged(pdfView)
     }
     
     func pdfViewEditingAreaDidChanged(_ pdfView: CPDFView!) {
-        self.editPDFHanddler.pdfViewEditingAreaDidChanged(pdfView)
+        //编辑模块变化
+        rightSideController?.reloadDataWithPDFView(pdfView: (pdfView as! CPDFListView))
     }
     
     func pdfViewEditingCropBoundsDidChanged(_ pdfView: CPDFView!, editing editArea: CPDFEditArea!) {
-        self.editPDFHanddler.pdfViewEditingCropBoundsDidChanged(pdfView, editing: editArea)
+        self.editPDFHanddler?.pdfViewEditingCropBoundsDidChanged(pdfView, editing: editArea)
     }
     
     //编辑PDF 创建图片区域回调
     func pdfViewEditingAddImageArea(_ pdfView: CPDFView!, add page: CPDFPage!, add rect: CGRect) {
-        self.editPDFHanddler.pdfViewEditingAddImageArea(pdfView, add: page, add: rect)
+        self.editPDFHanddler?.pdfViewEditingAddImageArea(pdfView, add: page, add: rect)
     }
     
     func pdfViewEditingAddTextArea(_ pdfView: CPDFView!, add page: CPDFPage!, add rect: CGRect) {
-        self.editPDFHanddler.pdfViewEditingAddTextArea(pdfView, add: page, add: rect)
+        self.editPDFHanddler?.pdfViewEditingAddTextArea(pdfView, add: page, add: rect)
     }
     
     func pdfViewMobileEditingBegan(_ point: CGPoint, for pdfView: CPDFView!, forEditing editingAreas: [CPDFEditArea]!) {
-        self.editPDFHanddler.pdfViewMobileEditingBegan(point, for: pdfView, forEditing: editingAreas)
+        self.editPDFHanddler?.pdfViewMobileEditingBegan(point, for: pdfView, forEditing: editingAreas)
     }
     
     func pdfViewMobileEditingMove(_ point: CGPoint, for pdfView: CPDFView!, forEditing editingAreas: [CPDFEditArea]!) {
-        self.editPDFHanddler.pdfViewMobileEditingMove(point, for: pdfView, forEditing: editingAreas)
+        self.editPDFHanddler?.pdfViewMobileEditingMove(point, for: pdfView, forEditing: editingAreas)
     }
     
     func pdfViewMobileEditingEnd(_ point: CGPoint, for pdfView: CPDFView!, forEditing editingAreas: [CPDFEditArea]!) {
-        self.editPDFHanddler.pdfViewMobileEditingEnd(point, for: pdfView, forEditing: editingAreas)
+        self.editPDFHanddler?.pdfViewMobileEditingEnd(point, for: pdfView, forEditing: editingAreas)
     }
     
     func pdfViewEditingSelectCharDidChanged(_ pdfView: CPDFView!) {
-        self.editPDFHanddler.pdfViewEditingSelectCharDidChanged(pdfView)
+        self.editPDFHanddler?.pdfViewEditingSelectCharDidChanged(pdfView)
     }
     
     func pdfViewEditingExitCropMode(_ pdfView: CPDFView!, forEditing editingArea: CPDFEditImageArea!) {
-        self.editPDFHanddler.pdfViewEditingExitCropMode(pdfView, forEditing: editingArea)
+        self.editPDFHanddler?.pdfViewEditingExitCropMode(pdfView, forEditing: editingArea)
     }
     
     func pdfListViewKeyDownIsContinue(_ pdfListView: CPDFListView!, theEvent: NSEvent!) -> Bool {
@@ -1998,14 +2026,14 @@ extension KMMainViewController: CPDFViewDelegate,CPDFListViewDelegate {
         KMPrint(theEvent.keyCode)
         if self.listView.isEditing() == true {
             if control && theEvent.keyCode == 11 { // ctr + b
-                self.editPDFHanddler.fontBoldAction()
+                self.editPDFHanddler?.fontBoldAction()
                 return false
             } else if control && theEvent.keyCode == 34 { // ctr +i
-                self.editPDFHanddler.fontItalicAction()
+                self.editPDFHanddler?.fontItalicAction()
                 return false
             } else if theEvent.keyCode == 36 { // enter
                 if self.listView.isCropMode {
-                    self.editPDFHanddler.cropComfirmAction()
+                    self.editPDFHanddler?.cropComfirmAction()
                     return false
                 }
             }
@@ -2107,11 +2135,11 @@ extension KMMainViewController: CPDFViewDelegate,CPDFListViewDelegate {
     }
     
     func pdfViewEditingOperationDidChanged(_ pdfView: CPDFView!) {
-        self.editPDFHanddler.pdfViewEditingOperationDidChanged(pdfView)
+        self.editPDFHanddler?.pdfViewEditingOperationDidChanged(pdfView)
     }
     
     func pdfViewEditingDoubleClick(_ pdfView: CPDFView!, imageArea editArea: CPDFEditArea!) {
-        self.editPDFHanddler.pdfViewEditingDoubleClick(pdfView, imageArea: editArea)
+        self.editPDFHanddler?.pdfViewEditingDoubleClick(pdfView, imageArea: editArea)
     }
     
     //MARK: - CPDFListViewDelegate
@@ -2148,9 +2176,10 @@ extension KMMainViewController: CPDFViewDelegate,CPDFListViewDelegate {
                 if isSameAnnotation == false {
 
                 } else {
-                     
                     self.openRightPane()
                 }
+                
+                self.rightSideController?.reloadDataWithPDFView(pdfView: pdfListView)
             } else {
                 let fristAnnotation  = annotations.first
                 let className =  NSStringFromClass(fristAnnotation!.classForCoder)
@@ -2901,7 +2930,7 @@ extension KMMainViewController {
             self.removeEventMonitor()
         }
         
-        self.editPDFHanddler.hiddenWindows()
+        self.editPDFHanddler?.hiddenWindows()
     }
     
     func viewWillLayoutFunction() {
@@ -2922,7 +2951,7 @@ extension KMMainViewController {
     
     func viewDidLoadOld() {
         mwcFlags.settingUpWindow = 1
-        self.editPDFHanddler.viewC = self
+       
         self.srHanddler.pdfView = self.listView
         
         self.initToolbar()
@@ -3514,7 +3543,7 @@ extension KMMainViewController {
         
         
         
-        self.editPDFHanddler.clearData()
+        self.editPDFHanddler?.clearData()
         
         let controller = KMPDFEditViewController(self.listView.document)
         
@@ -3588,7 +3617,7 @@ extension KMMainViewController {
     // MARK: - Edit PDF
     
     func enterEditPDF() {
-        self.editPDFHanddler.enterEditPDF()
+        
     }
     
     // MARK: - 数字签名
@@ -4308,9 +4337,9 @@ extension KMMainViewController {
                     let cmd = event.modifierFlags.contains(.command)
                     let shift = event.modifierFlags.contains(.shift)
                     if event.keyCode == 6 { // z
-                        let editPDFIng = self?.editPDFHanddler.isEditing ?? false
+                        let editPDFIng = self?.editPDFHanddler?.isEditing ?? false
                         if cmd && shift { // 恢复
-                            let can = self?.editPDFHanddler.listView?.canEditTextRedo() ?? false
+                            let can = self?.editPDFHanddler?.listView?.canEditTextRedo() ?? false
                             if can == false {
                                 return event
                             }
@@ -4319,7 +4348,7 @@ extension KMMainViewController {
                                 
                             }
                         } else if cmd { // 撤回
-                            let can = self?.editPDFHanddler.listView?.canEditTextUndo() ?? false
+                            let can = self?.editPDFHanddler?.listView?.canEditTextUndo() ?? false
                             if can == false {
                                 return event
                             }

+ 0 - 13
PDF Office/PDF Master/KMClass/KMPDFViewController/KMPDFConfig.swift

@@ -7,19 +7,6 @@
 
 import Cocoa
 
-//注释对齐方式
-@objc public enum KMAnnotationsAlignmentType: Int, CaseIterable {
-    case None = 0
-    case Left
-    case XCenter
-    case Right
-    case Top
-    case YCenter
-    case Bottom
-    case Horizontal
-    case Vertical
-}
-
 //工具类型
 @objc public enum KMPDFViewToolsType: Int, CaseIterable {
     case Select = 0

+ 1 - 1
PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/Alignment/alignAverageVertical_dis.imageset/Contents.json

@@ -1,7 +1,7 @@
 {
   "images" : [
     {
-      "filename" : "alignAverageVertical_dis.pdf",
+      "filename" : "alignAverageVertical.pdf",
       "idiom" : "universal"
     }
   ],

+ 3 - 3
PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/Alignment/alignAverageVertical_dis.imageset/alignAverageVertical_dis.pdf

@@ -10,8 +10,8 @@ stream
 /DeviceRGB CS
 /DeviceRGB cs
 q
--1.000000 0.000000 -0.000000 -1.000000 15.000001 18.000000 cm
-0.717647 0.729412 0.749020 scn
+-1.000000 0.000000 -0.000000 -1.000000 15.000001 14.000000 cm
+0.000000 0.000000 0.000000 scn
 0.000000 10.499999 m
 14.000000 10.500000 l
 14.000000 12.000000 l
@@ -44,7 +44,7 @@ endobj
 4 0 obj
   << /Annots []
      /Type /Page
-     /MediaBox [ 0.000000 0.000000 20.000000 20.000000 ]
+     /MediaBox [ 0.000000 0.000000 16.000000 16.000000 ]
      /Resources 1 0 R
      /Contents 2 0 R
      /Parent 5 0 R

+ 12 - 0
PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/Alignment/alignHorizonal.imageset/Contents.json

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

+ 3 - 3
PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/Alignment/alignHorizonal_dis.imageset/alignHorizonal_dis.pdf

@@ -10,8 +10,8 @@ stream
 /DeviceRGB CS
 /DeviceRGB cs
 q
-1.000000 0.000000 -0.000000 1.000000 2.000000 5.000000 cm
-0.717647 0.729412 0.749020 scn
+1.000000 0.000000 -0.000000 1.000000 2.000000 1.000000 cm
+0.000000 0.000000 0.000000 scn
 0.000000 0.000000 m
 0.000000 14.000000 l
 1.500000 14.000000 l
@@ -44,7 +44,7 @@ endobj
 4 0 obj
   << /Annots []
      /Type /Page
-     /MediaBox [ 0.000000 0.000000 20.000000 20.000000 ]
+     /MediaBox [ 0.000000 0.000000 16.000000 16.000000 ]
      /Resources 1 0 R
      /Contents 2 0 R
      /Parent 5 0 R

+ 1 - 1
PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/Alignment/alignHorizonal_dis.imageset/Contents.json

@@ -1,7 +1,7 @@
 {
   "images" : [
     {
-      "filename" : "alignHorizonal_dis.pdf",
+      "filename" : "flipHorizontal.pdf",
       "idiom" : "universal"
     }
   ],

二進制
PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/PDF_Edit/flipHorizontal.imageset/flipHorizontal.pdf


+ 12 - 0
PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/PDF_Edit/flipVertical.imageset/Contents.json

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

二進制
PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/PDF_Edit/flipVertical.imageset/flipVertical.pdf


+ 12 - 0
PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/PDF_Edit/fontAlign_center.imageset/Contents.json

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

+ 89 - 0
PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/PDF_Edit/fontAlign_center.imageset/fontAlign_center.pdf

@@ -0,0 +1,89 @@
+%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 1.250000 2.500000 cm
+0.062745 0.094118 0.156863 scn
+17.500000 15.000000 m
+0.000000 15.000000 l
+0.000000 13.125000 l
+17.500000 13.125000 l
+17.500000 15.000000 l
+h
+13.750000 10.625000 m
+3.750000 10.625000 l
+3.750000 8.750000 l
+13.750000 8.750000 l
+13.750000 10.625000 l
+h
+0.000000 6.250000 m
+17.500000 6.250000 l
+17.500000 4.375000 l
+0.000000 4.375000 l
+0.000000 6.250000 l
+h
+13.750000 1.875000 m
+3.750000 1.875000 l
+3.750000 0.000000 l
+13.750000 0.000000 l
+13.750000 1.875000 l
+h
+f*
+n
+Q
+
+endstream
+endobj
+
+3 0 obj
+  553
+endobj
+
+4 0 obj
+  << /Annots []
+     /Type /Page
+     /MediaBox [ 0.000000 0.000000 20.000000 20.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
+0000000643 00000 n
+0000000665 00000 n
+0000000838 00000 n
+0000000912 00000 n
+trailer
+<< /ID [ (some) (id) ]
+   /Root 6 0 R
+   /Size 7
+>>
+startxref
+971
+%%EOF

+ 12 - 0
PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/PDF_Edit/fontAlign_justify.imageset/Contents.json

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

+ 89 - 0
PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/PDF_Edit/fontAlign_justify.imageset/fontAlign_justify.pdf

@@ -0,0 +1,89 @@
+%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 1.250000 2.500000 cm
+0.062745 0.094118 0.156863 scn
+17.500000 15.000000 m
+0.000000 15.000000 l
+0.000000 13.125000 l
+17.500000 13.125000 l
+17.500000 15.000000 l
+h
+17.500000 10.625000 m
+0.000000 10.625000 l
+0.000000 8.750000 l
+17.500000 8.750000 l
+17.500000 10.625000 l
+h
+0.000000 6.250000 m
+17.500000 6.250000 l
+17.500000 4.375000 l
+0.000000 4.375000 l
+0.000000 6.250000 l
+h
+17.500000 1.875000 m
+0.000000 1.875000 l
+0.000000 0.000000 l
+17.500000 0.000000 l
+17.500000 1.875000 l
+h
+f*
+n
+Q
+
+endstream
+endobj
+
+3 0 obj
+  553
+endobj
+
+4 0 obj
+  << /Annots []
+     /Type /Page
+     /MediaBox [ 0.000000 0.000000 20.000000 20.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
+0000000643 00000 n
+0000000665 00000 n
+0000000838 00000 n
+0000000912 00000 n
+trailer
+<< /ID [ (some) (id) ]
+   /Root 6 0 R
+   /Size 7
+>>
+startxref
+971
+%%EOF

+ 12 - 0
PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/PDF_Edit/fontAlign_left.imageset/Contents.json

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

+ 89 - 0
PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/PDF_Edit/fontAlign_left.imageset/fontAlign_left.pdf

@@ -0,0 +1,89 @@
+%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 1.250000 2.500000 cm
+0.062745 0.094118 0.156863 scn
+17.500000 15.000000 m
+0.000000 15.000000 l
+0.000000 13.125000 l
+17.500000 13.125000 l
+17.500000 15.000000 l
+h
+10.000000 10.625000 m
+0.000000 10.625000 l
+0.000000 8.750000 l
+10.000000 8.750000 l
+10.000000 10.625000 l
+h
+0.000000 6.250000 m
+17.500000 6.250000 l
+17.500000 4.375000 l
+0.000000 4.375000 l
+0.000000 6.250000 l
+h
+10.000000 1.875000 m
+0.000000 1.875000 l
+0.000000 0.000000 l
+10.000000 0.000000 l
+10.000000 1.875000 l
+h
+f*
+n
+Q
+
+endstream
+endobj
+
+3 0 obj
+  553
+endobj
+
+4 0 obj
+  << /Annots []
+     /Type /Page
+     /MediaBox [ 0.000000 0.000000 20.000000 20.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
+0000000643 00000 n
+0000000665 00000 n
+0000000838 00000 n
+0000000912 00000 n
+trailer
+<< /ID [ (some) (id) ]
+   /Root 6 0 R
+   /Size 7
+>>
+startxref
+971
+%%EOF

+ 12 - 0
PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/PDF_Edit/fontAlign_right.imageset/Contents.json

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

+ 89 - 0
PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/PDF_Edit/fontAlign_right.imageset/fontAlign_right.pdf

@@ -0,0 +1,89 @@
+%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 1.250000 2.500000 cm
+0.062745 0.094118 0.156863 scn
+17.500000 15.000000 m
+0.000000 15.000000 l
+0.000000 13.125000 l
+17.500000 13.125000 l
+17.500000 15.000000 l
+h
+17.500000 10.625000 m
+7.500000 10.625000 l
+7.500000 8.750000 l
+17.500000 8.750000 l
+17.500000 10.625000 l
+h
+0.000000 6.250000 m
+17.500000 6.250000 l
+17.500000 4.375000 l
+0.000000 4.375000 l
+0.000000 6.250000 l
+h
+17.500000 1.875000 m
+7.500000 1.875000 l
+7.500000 0.000000 l
+17.500000 0.000000 l
+17.500000 1.875000 l
+h
+f*
+n
+Q
+
+endstream
+endobj
+
+3 0 obj
+  553
+endobj
+
+4 0 obj
+  << /Annots []
+     /Type /Page
+     /MediaBox [ 0.000000 0.000000 20.000000 20.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
+0000000643 00000 n
+0000000665 00000 n
+0000000838 00000 n
+0000000912 00000 n
+trailer
+<< /ID [ (some) (id) ]
+   /Root 6 0 R
+   /Size 7
+>>
+startxref
+971
+%%EOF

+ 105 - 132
PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/KMRightSideController.swift

@@ -17,30 +17,39 @@ class KMRightSideController: NSViewController {
     
     @IBOutlet var infoContendView: NSView!
     
-    var annotations: [CPDFAnnotation] = [] {
-        didSet {
-            reloadData()
+    var annotations: [CPDFAnnotation] {
+        get {
+            return self.pdfView?.activeAnnotations as? [CPDFAnnotation] ?? []
         }
     }
-    
+ 
     var pdfView: CPDFListView?
+    var viewManager: KMPDFViewManager?
     
-    var subToolMode: KMPDFSubToolMode = .None {
-        //二级工具栏
-        didSet {
-            updateUI()
-        }
-    }
+    //Controller
+    //Markup
+    
+    //Edit
+    var edit_textController: KMEditPDFTextPropertyViewController?
+    var edit_imageController: KMEditImageController?
+    var edit_linkController: KMLinkViewController?
+    
+    //Form
+    
+    //Fill
+    
+    //
     
     var contentViewController: NSViewController?
 
+    //MARK: - func
     override func viewDidLoad() {
         super.viewDidLoad()
         // Do view setup here.
         
         setupUI()
         
-        updateUI()
+        setupContentController()
     }
     
     func setupUI() {
@@ -55,155 +64,119 @@ class KMRightSideController: NSViewController {
     }
     
     func updateTitleLabel() {
-        if subToolMode == .Edit_text {
+        if viewManager?.subToolMode == .Edit_text {
             titleLabel.stringValue = KMLocalizedString("Text")
-        } else if subToolMode == .Edit_Image {
+        } else if viewManager?.subToolMode == .Edit_Image {
             titleLabel.stringValue = KMLocalizedString("Image")
-        } else if subToolMode == .Edit_Link {
+        } else if viewManager?.subToolMode == .Edit_Link {
             titleLabel.stringValue = KMLocalizedString("Link")
-        } else if subToolMode == .Edit_Crop {
+        } else if viewManager?.subToolMode == .Edit_Crop {
             titleLabel.stringValue = KMLocalizedString("Crop")
         }
     }
     
-    func updateUI() {
+    func setupContentController() {
         updateTitleLabel()
          
         contentViewController?.view.removeFromSuperview()
         contentViewController = nil
         
-        if subToolMode == .Edit_Link {
-            let controller = KMLinkViewController.init()
-            controller.view.frame = infoContendView.bounds
-            controller.view.autoresizingMask = [.width, .height]
-            infoContendView.addSubview(controller.view)
-            contentViewController = controller
+        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 {
+                //多选
+            }
             
-            controller.pdfView = self.pdfView
+            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]
+            infoContendView.addSubview(contendVC.view)
         }
+        
     }
     
     func reloadData() {
-        if subToolMode == .Edit_Link && contentViewController is KMLinkViewController {
-            if (contentViewController as! KMLinkViewController).pdfView != self.pdfView {
-                (contentViewController as! KMLinkViewController).pdfView = self.pdfView
-            }
+        if viewManager?.toolMode == .Edit {
             
-            var linkAnnotations: [CPDFLinkAnnotation] = []
-            for annotation in self.annotations {
-                if annotation is CPDFLinkAnnotation {
-                    linkAnnotations.append(annotation as! CPDFLinkAnnotation)
+            //图片&文字
+            if pdfView?.km_EditingAreas().isEmpty == true {
+                
+            } else if pdfView?.km_editingImageAreas().isEmpty == true && pdfView?.km_editingTextAreas().isEmpty == false {
+                //编辑文字
+                 
+                edit_textController?.reloadData()
+            } else if pdfView?.km_editingImageAreas().isEmpty == false && pdfView?.km_editingTextAreas().isEmpty == true {
+                //编辑图片
+                edit_imageController?.reloadData()
+                
+            } else {
+                //多选
+            }
+                
+            //Link
+            if viewManager?.subToolMode == .Edit_Link && contentViewController is KMLinkViewController {
+                if (contentViewController as! KMLinkViewController).pdfView != self.pdfView {
+                    (contentViewController as! KMLinkViewController).pdfView = self.pdfView
+                }
+                
+                var linkAnnotations: [CPDFLinkAnnotation] = []
+                for annotation in self.annotations {
+                    if annotation is CPDFLinkAnnotation {
+                        linkAnnotations.append(annotation as! CPDFLinkAnnotation)
+                    }
                 }
+                (contentViewController as! KMLinkViewController).annotations = linkAnnotations
+                (contentViewController as! KMLinkViewController).reloadData()
+                
+                if linkAnnotations.count == 0 {
+                    (contentViewController as! KMLinkViewController).view.isHidden = true
+                } else {
+                    (contentViewController as! KMLinkViewController).view.isHidden = false
+                }
+                
             }
-            (contentViewController as! KMLinkViewController).annotations = linkAnnotations
-            (contentViewController as! KMLinkViewController).reloadData()
+            
         }
         
+        
+        
     }
     
     public func reloadDataWithPDFView(pdfView: CPDFListView) {
         self.pdfView = pdfView
         
-        var selectedAnnotation : CPDFAnnotation? = nil
-        var activeAnnotations : [CPDFAnnotation] = []
-        if pdfView.activeAnnotations != nil && pdfView.activeAnnotations.count > 0 {
-            selectedAnnotation = pdfView.activeAnnotations.firstObject as? CPDFAnnotation
-            for annotation in pdfView.activeAnnotations {
-                activeAnnotations.append(annotation as! CPDFAnnotation)
-            }
-        }
-        var isSameAnnotation: Bool = true
-        for tAnnotation in activeAnnotations {
-            if tAnnotation.className != selectedAnnotation?.className {
-                isSameAnnotation = false
-                break
-            }
-        }
-        
-        self.annotations = activeAnnotations
+        setupContentController()
         
-//        if !isSameAnnotation {
-//            self.annotationProperties.annotations = []
-//            self.annotationProperties.isEmptyAnnotation = true
-//            return
-//        } else if selectedAnnotation is CPDFTextWidgetAnnotation || selectedAnnotation is CPDFChoiceWidgetAnnotation || selectedAnnotation is CPDFButtonWidgetAnnotation {
-//            if pdfView.toolMode != .formToolMode {
-//                self.annotationProperties.annotations = []
-//                self.annotationProperties.isEmptyAnnotation = true
-//                return
-//            }
-//        } else if (selectedAnnotation is KMAnnotationFromSignature) && (activeAnnotations.count > 1) {
-//            self.annotationProperties.annotations = []
-//            self.annotationProperties.isEmptyAnnotation = true
-//            return
-//        }
-//       
-//        let annotationType = pdfView.annotationType
-//        if KMAnnotationPropertiesViewController.height(with: selectedAnnotation) > 0 {
-//            if activeAnnotations.count > 0{
-//                if self.subViewType != .AnnotationProperts {
-//                    self.subViewType = .AnnotationProperts
-//                }
-//            }
-//            self.annotationProperties.annotations = activeAnnotations
-//            self.isHidden = !(activeAnnotations.count > 0)
-//        } else if self.listView.toolMode == .noteToolMode && KMAnnotationPropertiesViewController.height(withAnnotationMode: pdfView.annotationType) > 0 {
-//            self.isHidden = false
-//            if pdfView.activeAnnotation is CPDFLinkAnnotation {
-//                if activeAnnotations.count > 0 {
-//                    self.annotationProperties.annotations = activeAnnotations
-//                } else {
-//                    self.annotationProperties.annotations = []
-//                    self.annotationProperties.annotationMode = annotationType
-//                }
-//            } else {
-//                self.annotationProperties.annotations = []
-//                self.annotationProperties.annotationMode = annotationType
-//            }
-//        } else if listView.toolMode == .formToolMode && KMAnnotationPropertiesViewController.height(withAnnotationMode: pdfView.annotationType) > 0 {
-//            self.isHidden = false
-//            self.annotationProperties.annotations = []
-//            self.annotationProperties.annotationMode = annotationType
-//        }  else if listView.toolMode == .selfSignMode && KMAnnotationPropertiesViewController.height(withAnnotationMode: pdfView.annotationType) > 0 {
-//            self.isHidden = false
-//            self.annotationProperties.annotations = []
-//            self.annotationProperties.kEventTag = self.kEventTag
-//            self.kEventTag = 0
-//            self.annotationProperties.annotationMode = annotationType
-//        } else if (annotationType == .line || annotationType == .polyLine || annotationType == .polyGon || (annotationType == .square && self.listView.toolMode != .noteToolMode)) && KMAnnotationPropertiesViewController.height(withAnnotationMode: pdfView.annotationType) > 0 {
-//            self.isHidden = false
-//            self.annotationProperties.annotations = []
-//            self.annotationProperties.measureMode = annotationType
-//        } else {
-//            self.isHidden = true
-//        }
-//        
-//        if (self.isHidden) {
-//            self.annotationProperties.isEmptyAnnotation = self.isHidden
-//        } else {
-//            var isShowEmpty = self.isHidden;
-//            if annotationType == .link && activeAnnotations.count == 0 {
-//                self.isHidden = true
-//            } else if (annotationType == .stamp || annotationType == .signSignature) && isShowEmpty {
-//                let continuousAddStamp = UserDefaults.standard.bool(forKey: "KMContinuousAdditionStamp")
-//                if continuousAddStamp {
-//                    isShowEmpty = false
-//                    self.annotationProperties.isContinuousAddStamp = true
-//                    
-//                    UserDefaults.standard.setValue(false, forKey: "KMContinuousAdditionStamp")
-//                    UserDefaults.standard.synchronize()
-//                }
-//            } else {
-//                if isShowEmpty {
-//                    
-//                } else {
-//                    if _subViewType == RightSubViewType.AnnotationProperts {
-//                        self.contextBox.contentView = self.annotationProperties.view
-//                    }
-//                }
-//            }
-//            self.annotationProperties.isEmptyAnnotation = isShowEmpty
-//        }
+        reloadData()
+         
     }
     
 }

+ 167 - 0
PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/KMEditImageController.swift

@@ -0,0 +1,167 @@
+//
+//  KMEditImageController.swift
+//  PDF Reader Pro
+//
+//  Created by Niehaoyu on 2024/11/14.
+//
+
+import Cocoa
+import KMComponentLibrary
+
+class KMEditImageController: NSViewController {
+  
+    @IBOutlet var scrollView: NSScrollView!
+    @IBOutlet var contendView: NSView!
+    
+    @IBOutlet var sizeBGView: NSView!
+    @IBOutlet var sizeLabel: NSTextField!
+    @IBOutlet var sizeSyncButton: ComponentButton!
+    
+    @IBOutlet var rotateBGView: NSView!
+    @IBOutlet var rotateLabel: NSTextField!
+    @IBOutlet var rotateSelect: ComponentSelect!
+    @IBOutlet var rotateLeftButton: ComponentButton!
+    @IBOutlet var rotateRightButton: ComponentButton!
+    @IBOutlet var flipVerticalButton: ComponentButton!
+    @IBOutlet var flipHorizontalButton: ComponentButton!
+
+    @IBOutlet var opacityBGView: NSView!
+    @IBOutlet var opacityLabel: NSTextField!
+    @IBOutlet var opacitySlider: ComponentSlider!
+    @IBOutlet var opacitySelect: ComponentSelect!
+    
+    @IBOutlet var cropButton: ComponentButton!
+    @IBOutlet var replaceButton: ComponentButton!
+    @IBOutlet var ExtrackButton: ComponentButton!
+    
+    var pdfView: CPDFListView? {
+        didSet {
+            reloadData()
+        }
+    }
+     
+    var currentArea: CPDFEditTextArea?
+    
+    //MARK: - func
+    override func viewDidAppear() {
+        super.viewDidAppear()
+         
+        opacitySlider.reloadData()
+        
+    }
+    
+    override func viewDidLoad() {
+        super.viewDidLoad()
+      
+        setupProperty()
+    }
+    
+    func setupProperty() {
+        
+        //Font
+        sizeLabel.stringValue = KMLocalizedString("Size")
+        sizeLabel.textColor = ComponentLibrary.shared.getComponentColorFromKey("colorText/2")
+        sizeLabel.font = ComponentLibrary.shared.getFontFromKey("mac/body-s-medium")
+
+        //Rotate
+        rotateLabel.stringValue = KMLocalizedString("Rotate & Flip")
+        rotateLabel.textColor = ComponentLibrary.shared.getComponentColorFromKey("colorText/2")
+        rotateLabel.font = ComponentLibrary.shared.getFontFromKey("mac/body-s-medium")
+        
+        rotateSelect.properties = ComponentSelectProperties(size: .s,
+                                                            state: .normal,
+                                                            creatable: true,
+                                                            text: "100%",
+                                                            regexString: "0123456789%")
+        if true {
+            var opacityItems: [ComponentMenuitemProperty] = []
+            for string in ["25%", "50%", "75%", "100%"] {
+                let item = ComponentMenuitemProperty(type: .normal, text: string)
+                opacityItems.append(item)
+            }
+            rotateSelect.updateMenuItemsArr(opacityItems)
+        }
+        rotateSelect.delegate = self
+        
+        rotateLeftButton.properties = ComponentButtonProperty(type: .text_gray, size: .s, onlyIcon: true, icon: NSImage(named: "pageEdit_rotateLeft"), keepPressState: false)
+        rotateLeftButton.setTarget(self, action: #selector(buttonClicked(_:)))
+        
+        rotateRightButton.properties = ComponentButtonProperty(type: .text_gray, size: .s, onlyIcon: true, icon: NSImage(named: "pageEdit_rotateRight"), keepPressState: false)
+        rotateRightButton.setTarget(self, action: #selector(buttonClicked(_:)))
+        
+        flipVerticalButton.properties = ComponentButtonProperty(type: .text_gray, size: .s, onlyIcon: true, icon: NSImage(named: "flipVertical"), keepPressState: false)
+        flipVerticalButton.setTarget(self, action: #selector(buttonClicked(_:)))
+        
+        flipHorizontalButton.properties = ComponentButtonProperty(type: .text_gray, size: .s, onlyIcon: true, icon: NSImage(named: "flipHorizontal"), keepPressState: false)
+        flipHorizontalButton.setTarget(self, action: #selector(buttonClicked(_:)))
+        
+        //Opacity
+        opacityLabel.stringValue = KMLocalizedString("Opacity")
+        opacityLabel.textColor = ComponentLibrary.shared.getComponentColorFromKey("colorText/2")
+        opacityLabel.font = ComponentLibrary.shared.getFontFromKey("mac/body-s-medium")
+        
+        opacitySlider.properties = ComponentSliderProperty(size: .m, percent: 1)
+        
+        opacitySelect.properties = ComponentSelectProperties(size: .s,
+                                                                  state: .normal,
+                                                                  creatable: true,
+                                                                  text: "100%",
+                                                                  regexString: "0123456789%")
+        if true {
+            var opacityItems: [ComponentMenuitemProperty] = []
+            for string in ["25%", "50%", "75%", "100%"] {
+                let item = ComponentMenuitemProperty(type: .normal, text: string)
+                opacityItems.append(item)
+            }
+            opacitySelect.updateMenuItemsArr(opacityItems)
+        }
+        opacitySelect.delegate = self
+        
+        cropButton.properties = ComponentButtonProperty(type: .default_tertiary, size: .s, buttonText: KMLocalizedString("Crop"), keepPressState: false)
+        replaceButton.properties = ComponentButtonProperty(type: .default_tertiary, size: .s, buttonText: KMLocalizedString("Replace"), keepPressState: false)
+        ExtrackButton.properties = ComponentButtonProperty(type: .default_tertiary, size: .s, buttonText: KMLocalizedString("Extract"), keepPressState: false)
+        
+        
+    }
+    
+    func reloadData() {
+        
+        let areas = pdfView?.km_editingTextAreas() ?? []
+        if areas.count == 0 {
+            currentArea = nil
+        } else if areas.count == 1 {
+            currentArea = areas.first
+        } else if areas.count == 2 {
+            currentArea = nil
+        }
+        
+        if let area = currentArea {
+            let fontName = pdfView?.km_editTextAreasFontNames([area])
+            let fontStyle = pdfView?.km_editTextAreasFontStyles([area])
+            let fontSize = pdfView?.km_editTextAreasFontSizes([area])
+            let bold = pdfView?.km_editTextAreasFontBolds([area])
+            let itality = pdfView?.km_editTextAreasFontItalics([area])
+            let alignment = pdfView?.km_editTextAreasTextAlignments([area])
+            let colors = pdfView?.km_editTextAreasFontColors([area])
+            let opacity = pdfView?.km_editAreasOpacitys([area])
+            print("1")
+        }
+        
+        
+    }
+    
+    //MARK: - Action
+    @objc func buttonClicked(_ sender: ComponentButton) {
+        
+    }
+    
+}
+
+
+extension KMEditImageController: ComponentSelectDelegate {
+    
+}
+
+extension KMEditImageController: ComponentCColorDelegate {
+ 
+}

+ 347 - 0
PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/KMEditImageController.xib

@@ -0,0 +1,347 @@
+<?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>
+        <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="KMEditImageController" customModule="PDF_Reader_Pro" customModuleProvider="target">
+            <connections>
+                <outlet property="ExtrackButton" destination="UTd-IX-9gP" id="tqd-JT-qTT"/>
+                <outlet property="contendView" destination="5d4-9i-VqM" id="Zz9-Aa-SrJ"/>
+                <outlet property="cropButton" destination="V5t-7B-Xe1" id="kBN-y7-R9f"/>
+                <outlet property="flipHorizontalButton" destination="JYo-PF-eR4" id="vQO-zY-WrV"/>
+                <outlet property="flipVerticalButton" destination="Gx1-06-lSN" id="GFE-Nk-kQo"/>
+                <outlet property="opacityBGView" destination="7ge-14-THB" id="byg-j9-eEx"/>
+                <outlet property="opacityLabel" destination="nL4-oY-ZBk" id="oHO-6h-nNQ"/>
+                <outlet property="opacitySelect" destination="AMT-VE-5Un" id="zen-0z-0qw"/>
+                <outlet property="opacitySlider" destination="IDn-kE-RRr" id="18H-ce-LnO"/>
+                <outlet property="replaceButton" destination="CkA-vp-ac0" id="iTk-Og-eap"/>
+                <outlet property="rotateBGView" destination="pRo-Pb-Vwc" id="gFr-oj-DXe"/>
+                <outlet property="rotateLabel" destination="yEz-sB-7uR" id="vJ1-hY-uWe"/>
+                <outlet property="rotateLeftButton" destination="Y8Z-Yy-5Ef" id="q1M-Rj-lyl"/>
+                <outlet property="rotateRightButton" destination="KeZ-Xp-Vdv" id="u1j-ci-qBU"/>
+                <outlet property="rotateSelect" destination="Vt5-L8-3oj" id="fCG-rZ-JQy"/>
+                <outlet property="scrollView" destination="Tk5-ad-SSW" id="Ve5-LR-qLK"/>
+                <outlet property="sizeBGView" destination="Pzv-Qn-Qjl" id="bsy-nt-uhR"/>
+                <outlet property="sizeLabel" destination="4DO-V6-JUJ" id="3pl-k5-tgY"/>
+                <outlet property="sizeSyncButton" destination="JQh-Yd-qje" id="uPt-D1-dUz"/>
+                <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="255" height="716"/>
+            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+            <subviews>
+                <scrollView borderType="none" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" hasVerticalScroller="NO" usesPredominantAxisScrolling="NO" id="Tk5-ad-SSW">
+                    <rect key="frame" x="0.0" y="0.0" width="255" height="716"/>
+                    <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                    <clipView key="contentView" id="ULX-jS-BxX">
+                        <rect key="frame" x="0.0" y="0.0" width="255" height="716"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <subviews>
+                            <view id="dAm-DP-gRn">
+                                <rect key="frame" x="0.0" y="68" width="260" height="648"/>
+                                <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                            </view>
+                        </subviews>
+                        <color key="backgroundColor" red="0.96862745100000003" green="0.97254901959999995" blue="0.98039215690000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                    </clipView>
+                    <scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="P0R-jA-Fig">
+                        <rect key="frame" x="-100" y="-100" width="308" height="15"/>
+                        <autoresizingMask key="autoresizingMask"/>
+                    </scroller>
+                    <scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="NO" id="StG-qN-Tew">
+                        <rect key="frame" x="-100" y="-100" width="15" height="559"/>
+                        <autoresizingMask key="autoresizingMask"/>
+                    </scroller>
+                </scrollView>
+                <view translatesAutoresizingMaskIntoConstraints="NO" id="5d4-9i-VqM">
+                    <rect key="frame" x="0.0" y="0.0" width="255" height="716"/>
+                    <subviews>
+                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="Pzv-Qn-Qjl">
+                            <rect key="frame" x="12" y="644" width="232" height="72"/>
+                            <subviews>
+                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="3Xa-fV-tFr">
+                                    <rect key="frame" x="0.0" y="32" width="232" height="40"/>
+                                    <subviews>
+                                        <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="4DO-V6-JUJ">
+                                            <rect key="frame" x="-2" y="12" width="30" height="16"/>
+                                            <textFieldCell key="cell" lineBreakMode="clipping" title="Size" id="BYF-9G-Zr2">
+                                                <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="4DO-V6-JUJ" firstAttribute="centerY" secondItem="3Xa-fV-tFr" secondAttribute="centerY" id="G8s-PP-Byu"/>
+                                        <constraint firstItem="4DO-V6-JUJ" firstAttribute="leading" secondItem="3Xa-fV-tFr" secondAttribute="leading" id="brW-VB-7oC"/>
+                                        <constraint firstAttribute="height" constant="40" id="gAc-ub-qBw"/>
+                                    </constraints>
+                                </customView>
+                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="LY2-Dz-RWD">
+                                    <rect key="frame" x="0.0" y="0.0" width="232" height="32"/>
+                                    <subviews>
+                                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="i3D-eY-uoe" customClass="ComponentInputNumber" customModule="KMComponentLibrary">
+                                            <rect key="frame" x="0.0" y="0.0" width="96" height="32"/>
+                                            <constraints>
+                                                <constraint firstAttribute="height" constant="32" id="Utk-Ee-9IM"/>
+                                                <constraint firstAttribute="width" constant="96" id="vbU-48-rja"/>
+                                            </constraints>
+                                        </customView>
+                                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="JQh-Yd-qje" customClass="ComponentButton" customModule="KMComponentLibrary">
+                                            <rect key="frame" x="104" y="4" width="24" height="24"/>
+                                            <constraints>
+                                                <constraint firstAttribute="width" constant="24" id="PUw-eN-vkQ"/>
+                                                <constraint firstAttribute="height" constant="24" id="fm5-bj-s6l"/>
+                                            </constraints>
+                                        </customView>
+                                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="pST-7Y-5EX" customClass="ComponentInputNumber" customModule="KMComponentLibrary">
+                                            <rect key="frame" x="136" y="0.0" width="96" height="32"/>
+                                            <constraints>
+                                                <constraint firstAttribute="height" constant="32" id="IxF-F1-932"/>
+                                                <constraint firstAttribute="width" constant="96" id="OqW-uy-hXv"/>
+                                            </constraints>
+                                        </customView>
+                                    </subviews>
+                                    <constraints>
+                                        <constraint firstItem="JQh-Yd-qje" firstAttribute="centerY" secondItem="LY2-Dz-RWD" secondAttribute="centerY" id="2c4-tu-Ay5"/>
+                                        <constraint firstItem="i3D-eY-uoe" firstAttribute="top" secondItem="LY2-Dz-RWD" secondAttribute="top" id="6KM-Zs-ey5"/>
+                                        <constraint firstItem="JQh-Yd-qje" firstAttribute="leading" secondItem="i3D-eY-uoe" secondAttribute="trailing" constant="8" id="8i0-ne-64b"/>
+                                        <constraint firstAttribute="height" constant="32" id="JlX-WM-qUd"/>
+                                        <constraint firstItem="pST-7Y-5EX" firstAttribute="leading" secondItem="JQh-Yd-qje" secondAttribute="trailing" constant="8" id="hNT-2P-SeM"/>
+                                        <constraint firstItem="i3D-eY-uoe" firstAttribute="leading" secondItem="LY2-Dz-RWD" secondAttribute="leading" id="vIh-I6-WaC"/>
+                                        <constraint firstItem="pST-7Y-5EX" firstAttribute="top" secondItem="LY2-Dz-RWD" secondAttribute="top" id="xXS-zf-yrA"/>
+                                    </constraints>
+                                </customView>
+                            </subviews>
+                            <constraints>
+                                <constraint firstItem="3Xa-fV-tFr" firstAttribute="leading" secondItem="Pzv-Qn-Qjl" secondAttribute="leading" id="7Bb-Ae-s94"/>
+                                <constraint firstAttribute="height" constant="72" id="7DR-6M-wHT"/>
+                                <constraint firstAttribute="trailing" secondItem="3Xa-fV-tFr" secondAttribute="trailing" id="G1X-B0-e7M"/>
+                                <constraint firstItem="LY2-Dz-RWD" firstAttribute="leading" secondItem="Pzv-Qn-Qjl" secondAttribute="leading" id="LBR-eT-Ady"/>
+                                <constraint firstAttribute="trailing" secondItem="LY2-Dz-RWD" secondAttribute="trailing" id="Ucc-Gy-baM"/>
+                                <constraint firstItem="3Xa-fV-tFr" firstAttribute="top" secondItem="Pzv-Qn-Qjl" secondAttribute="top" id="enK-NY-760"/>
+                                <constraint firstAttribute="width" constant="232" id="fVX-d8-Kga"/>
+                                <constraint firstItem="LY2-Dz-RWD" firstAttribute="top" secondItem="3Xa-fV-tFr" secondAttribute="bottom" id="z8D-qT-b8e"/>
+                            </constraints>
+                        </customView>
+                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="pRo-Pb-Vwc">
+                            <rect key="frame" x="12" y="556" width="232" height="72"/>
+                            <subviews>
+                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="Sm5-0s-19e">
+                                    <rect key="frame" x="0.0" y="32" width="232" height="40"/>
+                                    <subviews>
+                                        <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="yEz-sB-7uR">
+                                            <rect key="frame" x="-2" y="12" width="82" height="16"/>
+                                            <textFieldCell key="cell" lineBreakMode="clipping" title="Rotate &amp; Flip" id="N6G-fq-qFA">
+                                                <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="yEz-sB-7uR" firstAttribute="leading" secondItem="Sm5-0s-19e" secondAttribute="leading" id="0du-y5-Okr"/>
+                                        <constraint firstItem="yEz-sB-7uR" firstAttribute="centerY" secondItem="Sm5-0s-19e" secondAttribute="centerY" id="764-Vx-l1K"/>
+                                        <constraint firstAttribute="height" constant="40" id="v5O-xo-KM0"/>
+                                    </constraints>
+                                </customView>
+                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="aif-BO-RTN">
+                                    <rect key="frame" x="0.0" y="0.0" width="232" height="32"/>
+                                    <subviews>
+                                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="Vt5-L8-3oj" customClass="ComponentSelect" customModule="KMComponentLibrary">
+                                            <rect key="frame" x="0.0" y="0.0" width="72" height="32"/>
+                                            <constraints>
+                                                <constraint firstAttribute="width" constant="72" id="Ryt-CI-JH7"/>
+                                                <constraint firstAttribute="height" constant="32" id="eBK-V4-kyC"/>
+                                            </constraints>
+                                        </customView>
+                                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="Y8Z-Yy-5Ef" customClass="ComponentButton" customModule="KMComponentLibrary">
+                                            <rect key="frame" x="80" y="0.0" width="32" height="32"/>
+                                            <constraints>
+                                                <constraint firstAttribute="width" constant="32" id="Shw-Kk-FwF"/>
+                                                <constraint firstAttribute="height" constant="32" id="oAR-1g-7OK"/>
+                                            </constraints>
+                                        </customView>
+                                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="KeZ-Xp-Vdv" customClass="ComponentButton" customModule="KMComponentLibrary">
+                                            <rect key="frame" x="120" y="0.0" width="32" height="32"/>
+                                            <constraints>
+                                                <constraint firstAttribute="width" constant="32" id="Uxb-8a-4hE"/>
+                                                <constraint firstAttribute="height" constant="32" id="pLi-J7-1fm"/>
+                                            </constraints>
+                                        </customView>
+                                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="Gx1-06-lSN" customClass="ComponentButton" customModule="KMComponentLibrary">
+                                            <rect key="frame" x="160" y="0.0" width="32" height="32"/>
+                                            <constraints>
+                                                <constraint firstAttribute="width" constant="32" id="6Mc-sF-n0y"/>
+                                                <constraint firstAttribute="height" constant="32" id="ti0-vf-nN5"/>
+                                            </constraints>
+                                        </customView>
+                                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="JYo-PF-eR4" customClass="ComponentButton" customModule="KMComponentLibrary">
+                                            <rect key="frame" x="200" y="0.0" width="32" height="32"/>
+                                            <constraints>
+                                                <constraint firstAttribute="width" constant="32" id="14z-qL-w6s"/>
+                                                <constraint firstAttribute="height" constant="32" id="faK-a1-LhC"/>
+                                            </constraints>
+                                        </customView>
+                                    </subviews>
+                                    <constraints>
+                                        <constraint firstItem="Gx1-06-lSN" firstAttribute="centerY" secondItem="aif-BO-RTN" secondAttribute="centerY" id="BU1-hO-VCZ"/>
+                                        <constraint firstItem="Y8Z-Yy-5Ef" firstAttribute="leading" secondItem="Vt5-L8-3oj" secondAttribute="trailing" constant="8" id="EZ9-6e-hqV"/>
+                                        <constraint firstItem="KeZ-Xp-Vdv" firstAttribute="centerY" secondItem="aif-BO-RTN" secondAttribute="centerY" id="EuX-ss-ODb"/>
+                                        <constraint firstItem="Vt5-L8-3oj" firstAttribute="top" secondItem="aif-BO-RTN" secondAttribute="top" id="LId-hq-aTM"/>
+                                        <constraint firstItem="Vt5-L8-3oj" firstAttribute="leading" secondItem="aif-BO-RTN" secondAttribute="leading" id="Ojk-7n-Ia5"/>
+                                        <constraint firstItem="Y8Z-Yy-5Ef" firstAttribute="centerY" secondItem="aif-BO-RTN" secondAttribute="centerY" id="QCf-T8-e6O"/>
+                                        <constraint firstAttribute="height" constant="32" id="Spo-2J-Wfw"/>
+                                        <constraint firstItem="KeZ-Xp-Vdv" firstAttribute="leading" secondItem="Y8Z-Yy-5Ef" secondAttribute="trailing" constant="8" id="WOq-jB-z5Q"/>
+                                        <constraint firstItem="JYo-PF-eR4" firstAttribute="centerY" secondItem="aif-BO-RTN" secondAttribute="centerY" id="Ycv-Mw-9Gz"/>
+                                        <constraint firstItem="Gx1-06-lSN" firstAttribute="leading" secondItem="KeZ-Xp-Vdv" secondAttribute="trailing" constant="8" id="khL-dM-SfH"/>
+                                        <constraint firstItem="JYo-PF-eR4" firstAttribute="leading" secondItem="Gx1-06-lSN" secondAttribute="trailing" constant="8" id="sih-iS-cgT"/>
+                                    </constraints>
+                                </customView>
+                            </subviews>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="72" id="6lt-xB-6bv"/>
+                                <constraint firstItem="aif-BO-RTN" firstAttribute="leading" secondItem="pRo-Pb-Vwc" secondAttribute="leading" id="NeD-n3-NKF"/>
+                                <constraint firstAttribute="width" constant="232" id="eAx-qh-suI"/>
+                                <constraint firstItem="Sm5-0s-19e" firstAttribute="leading" secondItem="pRo-Pb-Vwc" secondAttribute="leading" id="f5D-xD-SDe"/>
+                                <constraint firstItem="Sm5-0s-19e" firstAttribute="top" secondItem="pRo-Pb-Vwc" secondAttribute="top" id="fps-Qr-auw"/>
+                                <constraint firstAttribute="trailing" secondItem="Sm5-0s-19e" secondAttribute="trailing" id="h1K-De-zap"/>
+                                <constraint firstAttribute="trailing" secondItem="aif-BO-RTN" secondAttribute="trailing" id="jta-F3-cdw"/>
+                                <constraint firstItem="aif-BO-RTN" firstAttribute="top" secondItem="Sm5-0s-19e" secondAttribute="bottom" id="sq6-pG-WT4"/>
+                            </constraints>
+                        </customView>
+                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="7ge-14-THB">
+                            <rect key="frame" x="12" y="468" width="232" height="72"/>
+                            <subviews>
+                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="XM6-r1-dTE">
+                                    <rect key="frame" x="0.0" y="32" width="232" height="40"/>
+                                    <subviews>
+                                        <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="nL4-oY-ZBk">
+                                            <rect key="frame" x="-2" y="12" width="51" height="16"/>
+                                            <textFieldCell key="cell" lineBreakMode="clipping" title="Opacity" id="ru5-az-dPn">
+                                                <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="ELH-sD-fIm"/>
+                                        <constraint firstItem="nL4-oY-ZBk" firstAttribute="centerY" secondItem="XM6-r1-dTE" secondAttribute="centerY" id="iJD-t3-Jby"/>
+                                        <constraint firstItem="nL4-oY-ZBk" firstAttribute="leading" secondItem="XM6-r1-dTE" secondAttribute="leading" id="yJH-rz-Tvo"/>
+                                    </constraints>
+                                </customView>
+                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="6go-mZ-DsC">
+                                    <rect key="frame" x="0.0" y="0.0" width="232" height="32"/>
+                                    <subviews>
+                                        <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="g2L-6i-iTF">
+                                            <rect key="frame" x="0.0" y="6" width="20" height="20"/>
+                                            <constraints>
+                                                <constraint firstAttribute="width" constant="20" id="LZK-Ir-yNi"/>
+                                                <constraint firstAttribute="height" constant="20" id="bYh-Ah-hy7"/>
+                                            </constraints>
+                                            <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="edit_ocapity" id="eCF-8V-TPR"/>
+                                        </imageView>
+                                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="IDn-kE-RRr" customClass="ComponentSlider" customModule="KMComponentLibrary">
+                                            <rect key="frame" x="28" y="10" width="116" height="12"/>
+                                            <constraints>
+                                                <constraint firstAttribute="height" constant="12" id="y0D-oD-5FJ"/>
+                                            </constraints>
+                                        </customView>
+                                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="AMT-VE-5Un" customClass="ComponentSelect" customModule="KMComponentLibrary">
+                                            <rect key="frame" x="152" y="0.0" width="80" height="32"/>
+                                            <constraints>
+                                                <constraint firstAttribute="height" constant="32" id="P9H-n0-r8I"/>
+                                                <constraint firstAttribute="width" constant="80" id="Zjf-lm-K2V"/>
+                                            </constraints>
+                                        </customView>
+                                    </subviews>
+                                    <constraints>
+                                        <constraint firstItem="g2L-6i-iTF" firstAttribute="centerY" secondItem="6go-mZ-DsC" secondAttribute="centerY" id="Ax3-2q-I7Z"/>
+                                        <constraint firstAttribute="trailing" secondItem="AMT-VE-5Un" secondAttribute="trailing" id="G5x-yf-JJz"/>
+                                        <constraint firstItem="AMT-VE-5Un" firstAttribute="leading" secondItem="IDn-kE-RRr" secondAttribute="trailing" constant="8" id="JKa-qF-R40"/>
+                                        <constraint firstItem="g2L-6i-iTF" firstAttribute="leading" secondItem="6go-mZ-DsC" secondAttribute="leading" id="OaX-DG-Ztf"/>
+                                        <constraint firstItem="AMT-VE-5Un" firstAttribute="centerY" secondItem="6go-mZ-DsC" secondAttribute="centerY" id="dWt-CC-NeG"/>
+                                        <constraint firstAttribute="height" constant="32" id="iQF-Nf-OYZ"/>
+                                        <constraint firstItem="IDn-kE-RRr" firstAttribute="centerY" secondItem="6go-mZ-DsC" secondAttribute="centerY" id="xr8-a8-nKu"/>
+                                        <constraint firstItem="IDn-kE-RRr" firstAttribute="leading" secondItem="6go-mZ-DsC" secondAttribute="leading" constant="28" id="y17-9C-1wO"/>
+                                    </constraints>
+                                </customView>
+                            </subviews>
+                            <constraints>
+                                <constraint firstItem="6go-mZ-DsC" firstAttribute="leading" secondItem="7ge-14-THB" secondAttribute="leading" id="DRE-qK-sHS"/>
+                                <constraint firstAttribute="trailing" secondItem="XM6-r1-dTE" secondAttribute="trailing" id="EOi-d5-MTf"/>
+                                <constraint firstItem="XM6-r1-dTE" firstAttribute="top" secondItem="7ge-14-THB" secondAttribute="top" id="YOo-hd-eJI"/>
+                                <constraint firstAttribute="width" constant="232" id="YyD-Zd-MVZ"/>
+                                <constraint firstItem="6go-mZ-DsC" firstAttribute="top" secondItem="XM6-r1-dTE" secondAttribute="bottom" id="Zue-k2-Akv"/>
+                                <constraint firstAttribute="trailing" secondItem="6go-mZ-DsC" secondAttribute="trailing" id="qY6-F1-zVu"/>
+                                <constraint firstAttribute="height" constant="72" id="x5M-zy-vcK"/>
+                                <constraint firstItem="XM6-r1-dTE" firstAttribute="leading" secondItem="7ge-14-THB" secondAttribute="leading" id="zHm-hN-VBq"/>
+                            </constraints>
+                        </customView>
+                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="gdP-34-FsW">
+                            <rect key="frame" x="12" y="451" width="232" height="1"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="1" id="FXQ-vd-cHP"/>
+                                <constraint firstAttribute="width" constant="232" id="jyY-sC-Yys"/>
+                            </constraints>
+                        </customView>
+                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="V5t-7B-Xe1" customClass="ComponentButton" customModule="KMComponentLibrary">
+                            <rect key="frame" x="12" y="403" width="232" height="32"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="32" id="NTa-TV-NOK"/>
+                                <constraint firstAttribute="width" constant="232" id="S7H-HD-BWs"/>
+                            </constraints>
+                        </customView>
+                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="CkA-vp-ac0" customClass="ComponentButton" customModule="KMComponentLibrary">
+                            <rect key="frame" x="12" y="307" width="232" height="32"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="32" id="hLN-Pk-kIN"/>
+                                <constraint firstAttribute="width" constant="232" id="kHb-FV-MRk"/>
+                            </constraints>
+                        </customView>
+                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="UTd-IX-9gP" customClass="ComponentButton" customModule="KMComponentLibrary">
+                            <rect key="frame" x="12" y="355" width="232" height="32"/>
+                            <constraints>
+                                <constraint firstAttribute="width" constant="232" id="CZk-DA-weR"/>
+                                <constraint firstAttribute="height" constant="32" id="WWS-wJ-59r"/>
+                            </constraints>
+                        </customView>
+                    </subviews>
+                    <constraints>
+                        <constraint firstItem="Pzv-Qn-Qjl" firstAttribute="top" secondItem="5d4-9i-VqM" secondAttribute="top" id="5XC-B1-7y4"/>
+                        <constraint firstItem="V5t-7B-Xe1" firstAttribute="centerX" secondItem="5d4-9i-VqM" secondAttribute="centerX" id="BTV-ja-7Uc"/>
+                        <constraint firstItem="7ge-14-THB" firstAttribute="centerX" secondItem="5d4-9i-VqM" secondAttribute="centerX" id="Dyb-ea-rmC"/>
+                        <constraint firstItem="Pzv-Qn-Qjl" firstAttribute="centerX" secondItem="5d4-9i-VqM" secondAttribute="centerX" id="WwA-IT-SmF"/>
+                        <constraint firstItem="gdP-34-FsW" firstAttribute="centerX" secondItem="5d4-9i-VqM" secondAttribute="centerX" id="Xnk-KO-7Bg"/>
+                        <constraint firstItem="CkA-vp-ac0" firstAttribute="top" secondItem="UTd-IX-9gP" secondAttribute="bottom" constant="16" id="e00-zP-hFu"/>
+                        <constraint firstItem="pRo-Pb-Vwc" firstAttribute="top" secondItem="Pzv-Qn-Qjl" secondAttribute="bottom" constant="16" id="ivK-cd-DUh"/>
+                        <constraint firstItem="UTd-IX-9gP" firstAttribute="centerX" secondItem="5d4-9i-VqM" secondAttribute="centerX" id="lAL-Hb-VMQ"/>
+                        <constraint firstItem="pRo-Pb-Vwc" firstAttribute="centerX" secondItem="5d4-9i-VqM" secondAttribute="centerX" id="lEW-2D-6rT"/>
+                        <constraint firstItem="gdP-34-FsW" firstAttribute="top" secondItem="7ge-14-THB" secondAttribute="bottom" constant="16" id="nQL-6l-wIw"/>
+                        <constraint firstItem="UTd-IX-9gP" firstAttribute="top" secondItem="V5t-7B-Xe1" secondAttribute="bottom" constant="16" id="sLr-Lt-Fdp"/>
+                        <constraint firstItem="V5t-7B-Xe1" firstAttribute="top" secondItem="gdP-34-FsW" secondAttribute="bottom" constant="16" id="sZ3-Bm-nOm"/>
+                        <constraint firstItem="7ge-14-THB" firstAttribute="top" secondItem="pRo-Pb-Vwc" secondAttribute="bottom" constant="16" id="u3C-T8-X8Z"/>
+                        <constraint firstItem="CkA-vp-ac0" firstAttribute="centerX" secondItem="5d4-9i-VqM" secondAttribute="centerX" id="uQg-UM-9Al"/>
+                    </constraints>
+                </view>
+            </subviews>
+            <constraints>
+                <constraint firstItem="5d4-9i-VqM" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" id="Okm-M6-mAX"/>
+                <constraint firstItem="5d4-9i-VqM" firstAttribute="top" secondItem="Hz6-mo-xeY" secondAttribute="top" id="RRq-iu-RrX"/>
+                <constraint firstAttribute="bottom" secondItem="5d4-9i-VqM" secondAttribute="bottom" id="nOA-LJ-M6J"/>
+                <constraint firstAttribute="trailing" secondItem="5d4-9i-VqM" secondAttribute="trailing" id="uBf-KZ-Ftm"/>
+            </constraints>
+            <point key="canvasLocation" x="94.5" y="187"/>
+        </customView>
+    </objects>
+    <resources>
+        <image name="edit_ocapity" width="16" height="16"/>
+    </resources>
+</document>

File diff suppressed because it is too large
+ 128 - 1423
PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/KMEditPDFTextPropertyViewController.swift


File diff suppressed because it is too large
+ 195 - 1941
PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/KMEditPDFTextPropertyViewController.xib


+ 214 - 390
PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/Manager/KMEditPDfHanddler.swift

@@ -12,12 +12,10 @@ import Cocoa
     case open = 1
     case close = 2
 }
-
-
+ 
 // EditPDF处理对象
 class KMEditPDfHanddler: NSObject {
-    weak var viewC: KMMainViewController?
-    
+ 
     static let kRightSideLastStateKey = "KMRightSideLastStateKey"
     
     // 正在新增文本块
@@ -25,10 +23,11 @@ class KMEditPDfHanddler: NSObject {
     var fontSizeChanging = false
     var textAlignChanging = false
     
-    weak var listView: CPDFListView? {
-        get {
-            return self.viewC?.listView
-        }
+    weak var listView: CPDFListView?
+    
+    init(listView: CPDFListView? = nil) {
+        self.listView = listView
+        
     }
     
     var annotationType: CAnnotationType {
@@ -103,70 +102,11 @@ class KMEditPDfHanddler: NSObject {
     
     private var startPoint_: NSPoint = .zero
     
-    //MARK: - func
-    func enterEditPDF() {
-        let cnt = self.viewC?.leftSideViewController.leftView.segmentedControl.selectedSegment ?? UInt8.max
-        if cnt == 0 {
-            self.viewC?.search(searchString: "", isCase: false, display: true, needShowAll: false)
-            self.viewC?.leftSideViewController.showSearchMode("")
-        }
-        
-        let toolMode = self.listView?.toolMode ?? .none
-        if toolMode != .editPDFToolMode { // 退出
-            self.listView?.updateActiveAnnotations([])
-            self.listView?.setNeedsDisplayForVisiblePages()
-            self.listView?.commitEditFormText()
-            self.listView?.commitEditing()
-            self.listView?.layoutDocumentView()
-            KMThumbnailCache.shared.clearCache()
-            NotificationCenter.default.post(name: NSNotification.Name.init(rawValue: "CPDFDocumentPageCountChangedNotification"), object: self.listView?.document)
-            
-            self.closeRightPane()
-            
-            self.clearData()
-            return
-        }
-        
-        self._addNotification()
-        
-        if self.rightSideLastState == .open {
-            self.openRightPane()
-        } else {
-            self.closeRightPane()
-        }
-        
-        self.listView?.updateActiveAnnotations([])
-        self.listView?.setNeedsDisplayForVisiblePages()
-        self.listView?.commitEditFormText()
-        self.listView?.annotationType = .editTextImage
-        
-        // 设置边框颜色
-        self.editingConfig?.editingBorderColor = .clear
  
-        self.editingConfig?.isShowMouseAreaHover = true
-      
-        // 边框颜色
-        self.editingConfig?.mouseHoverBorderColor = NSColor(hex: "#999999")
-        // 边框虚线设置
-        self.editingConfig?.mouseHoverBorderDashPattern = [3,3,3]
-        // 块填充颜色(拖拽中)
-         // 是否显示位置辅助线
-        self.editingConfig?.isShowEditingAreaHover = true
-        // 辅助线颜色
-         // 支持多选
-        self.editingConfig?.isSupportMultipleSelectEditingArea = true
-        // 图片是否显示8个操作点
-        self.editingConfig?.isDrawRectWithDot = true
-        
-         self.editingConfig?.editingMouseSelectionBorderWidth = 1
-        self.editingConfig?.editingMouseSelectionBorderDashPattern = [3, 3, 3]
-    }
-    
+    //MARK: - func
     func commitEditing() {
         let isEdited = self.listView?.isEdited() ?? false
-        let isPDFTextImageEdited = self.viewC?.model.isPDFTextImageEdited ?? false
-        if isEdited || isPDFTextImageEdited {
-            self.viewC?.model.isPDFTextImageEdited = false
+        if isEdited {
             self.listView?.commitEditing()
             self.listView?.layoutDocumentView()
         }
@@ -174,17 +114,6 @@ class KMEditPDfHanddler: NSObject {
         self.clearData()
     }
     
-    func openRightPane() {
-        let state = self.rightSideLastState
-        if state == .none || state == .open {
-            self.viewC?.openRightPane()
-        }
-    }
-    
-    func closeRightPane() {
-        self.viewC?.closeRightPane()
-    }
-    
     func showPopWindow(positionRect: NSRect, showGuide: Bool) {
         if self.editAreasIsEmpty() {
             return
@@ -223,13 +152,13 @@ class KMEditPDfHanddler: NSObject {
         win.style = style
         win.model.editingAreas = areas
         win.model.fontColors = fontColors
-        win.model.fontNames = self._editAreasFontNames()
-        win.model.fontSizes = self._editAreasFontSizes()
-        win.model.fontBolds = self._editAreasFontBolds()
-        win.model.fontItalics = self._editAreasFontItalics()
-        win.model.textAlignments = self._editAreasTextAlignments()
-        win.model.rotates = self._editAreasRotates()
-        win.model.opacitys = self._editAreasOpacitys()
+//        win.model.fontNames = self._editAreasFontNames()
+//        win.model.fontSizes = self._editAreasFontSizes()
+//        win.model.fontBolds = self._editAreasFontBolds()
+//        win.model.fontItalics = self._editAreasFontItalics()
+//        win.model.textAlignments = self._editAreasTextAlignments()
+//        win.model.rotates = self._editAreasRotates()
+//        win.model.opacitys = self._editAreasOpacitys()
         
         let area = (self.listView?.editingAreas().first as? CPDFEditArea)
         var areaBounds = (self.listView?.convert(area!.bounds, from: area!.page) as? NSRect) ?? .zero
@@ -249,7 +178,7 @@ class KMEditPDfHanddler: NSObject {
         }
         
         self.startPoint_ = self.listView?.documentView().documentVisibleRect.origin ?? .zero
-        win.show(relativeTo: areaBounds, of: self.viewC!.listView, preferredEdge: .maxY)
+        win.show(relativeTo: areaBounds, of: self.listView!, preferredEdge: .maxY)
         
         win.animator().alphaValue = 1
         self._kAddchildwindow(win)
@@ -383,16 +312,16 @@ extension KMEditPDfHanddler {
         guard let win = childW else {
             return
         }
-        self.viewC?.view.window?.addChildWindow(win, ordered: .above)
+        self.listView?.window?.addChildWindow(win, ordered: .above)
     }
     
     private func _kRemoveChildWindow(_ childW: NSWindow?) {
         guard let win = childW else {
             return
         }
-        let contains = self.viewC?.view.window?.childWindows?.contains(win) ?? false
+        let contains = self.listView?.window?.childWindows?.contains(win) ?? false
         if contains {
-            self.viewC?.view.window?.removeChildWindow(win)
+            self.listView?.window?.removeChildWindow(win)
         }
     }
     
@@ -524,326 +453,230 @@ extension KMEditPDfHanddler {
     }
     
     func editAreasFontColorIsEqual() -> Bool {
-        if self.editAreasIsEmpty() {
-            return false
-        }
-        let datas = self._editAreasFontColors()
-        if datas.count == 1 {
-            return true
-        }
-        let color = datas.first
-        for (i, d) in datas.enumerated() {
-            if i == 0 {
-                continue
-            }
-            if d != color {
-                return false
-            }
-        }
+//        if self.editAreasIsEmpty() {
+//            return false
+//        }
+//        let datas = self._editAreasFontColors()
+//        if datas.count == 1 {
+//            return true
+//        }
+//        let color = datas.first
+//        for (i, d) in datas.enumerated() {
+//            if i == 0 {
+//                continue
+//            }
+//            if d != color {
+//                return false
+//            }
+//        }
         return true
     }
     
     func editAreasFontNameIsEqual() -> Bool {
-        if self.editAreasIsEmpty() {
-            return false
-        }
-        let datas = self._editAreasFontNames()
-        if datas.count == 1 {
-            return true
-        }
-        let data = datas.first
-        for (i, d) in datas.enumerated() {
-            if i == 0 {
-                continue
-            }
-            if d != data {
-                return false
-            }
-        }
+//        if self.editAreasIsEmpty() {
+//            return false
+//        }
+//        let datas = self._editAreasFontNames()
+//        if datas.count == 1 {
+//            return true
+//        }
+//        let data = datas.first
+//        for (i, d) in datas.enumerated() {
+//            if i == 0 {
+//                continue
+//            }
+//            if d != data {
+//                return false
+//            }
+//        }
         return true
     }
     
     func editAreasFontStyleIsEqual() -> Bool {
-        if self.editAreasIsEmpty() {
-            return false
-        }
-        let datas = self._editAreasFontStyles()
-        if datas.count == 1 {
-            return true
-        }
-        let data = datas.first
-        for (i, d) in datas.enumerated() {
-            if i == 0 {
-                continue
-            }
-            if d != data {
-                return false
-            }
-        }
+//        if self.editAreasIsEmpty() {
+//            return false
+//        }
+//        let datas = self._editAreasFontStyles()
+//        if datas.count == 1 {
+//            return true
+//        }
+//        let data = datas.first
+//        for (i, d) in datas.enumerated() {
+//            if i == 0 {
+//                continue
+//            }
+//            if d != data {
+//                return false
+//            }
+//        }
         return true
     }
     
     func editAreasFontSizeIsEqual() -> Bool {
-        if self.editAreasIsEmpty() {
-            return false
-        }
-        let datas = self._editAreasFontSizes()
-        if datas.count == 1 {
-            return true
-        }
-        let data = datas.first
-        for (i, d) in datas.enumerated() {
-            if i == 0 {
-                continue
-            }
-            if d != data {
-                return false
-            }
-        }
+//        if self.editAreasIsEmpty() {
+//            return false
+//        }
+//        let datas = self._editAreasFontSizes()
+//        if datas.count == 1 {
+//            return true
+//        }
+//        let data = datas.first
+//        for (i, d) in datas.enumerated() {
+//            if i == 0 {
+//                continue
+//            }
+//            if d != data {
+//                return false
+//            }
+//        }
         return true
     }
     
     func editAreasFontBoldIsEqual() -> Bool {
-        if self.editAreasIsEmpty() {
-            return false
-        }
-        let datas = self._editAreasFontBolds()
-        if datas.count == 1 {
-            return true
-        }
-        let data = datas.first
-        for (i, d) in datas.enumerated() {
-            if i == 0 {
-                continue
-            }
-            if d != data {
-                return false
-            }
-        }
+//        if self.editAreasIsEmpty() {
+//            return false
+//        }
+//        let datas = self._editAreasFontBolds()
+//        if datas.count == 1 {
+//            return true
+//        }
+//        let data = datas.first
+//        for (i, d) in datas.enumerated() {
+//            if i == 0 {
+//                continue
+//            }
+//            if d != data {
+//                return false
+//            }
+//        }
         return true
     }
     
     func editAreasFontItalicIsEqual() -> Bool {
-        if self.editAreasIsEmpty() {
-            return false
-        }
-        let datas = self._editAreasFontItalics()
-        if datas.count == 1 {
-            return true
-        }
-        let data = datas.first
-        for (i, d) in datas.enumerated() {
-            if i == 0 {
-                continue
-            }
-            if d != data {
-                return false
-            }
-        }
+//        if self.editAreasIsEmpty() {
+//            return false
+//        }
+//        let datas = self._editAreasFontItalics()
+//        if datas.count == 1 {
+//            return true
+//        }
+//        let data = datas.first
+//        for (i, d) in datas.enumerated() {
+//            if i == 0 {
+//                continue
+//            }
+//            if d != data {
+//                return false
+//            }
+//        }
         return true
     }
     
     func editAreasTextAlignmentIsEqual() -> Bool {
-        if self.editAreasIsEmpty() {
-            return false
-        }
-        let datas = self._editAreasTextAlignments()
-        if datas.count == 1 {
-            return true
-        }
-        let data = datas.first?.rawValue ?? 0
-        for (i, d) in datas.enumerated() {
-            if i == 0 {
-                continue
-            }
-            if d.rawValue != data {
-                return false
-            }
-        }
+//        if self.editAreasIsEmpty() {
+//            return false
+//        }
+//        let datas = self._editAreasTextAlignments()
+//        if datas.count == 1 {
+//            return true
+//        }
+//        let data = datas.first?.rawValue ?? 0
+//        for (i, d) in datas.enumerated() {
+//            if i == 0 {
+//                continue
+//            }
+//            if d.rawValue != data {
+//                return false
+//            }
+//        }
         return true
     }
     
     func editAreasBoundsIsEqualForWidth() -> Bool {
-        if self.editAreasIsEmpty() {
-            return false
-        }
-        let rects = self._editAreasBounds()
-        if rects.count == 1 {
-            return true
-        }
-        let width = rects.first?.width ?? 0
-        for (i, rect) in rects.enumerated() {
-            if i == 0 {
-                continue
-            }
-            
-            if abs(width-rect.size.width) > 0.01 {
-                 return false
-            }
-        }
+//        if self.editAreasIsEmpty() {
+//            return false
+//        }
+//        let rects = self._editAreasBounds()
+//        if rects.count == 1 {
+//            return true
+//        }
+//        let width = rects.first?.width ?? 0
+//        for (i, rect) in rects.enumerated() {
+//            if i == 0 {
+//                continue
+//            }
+//            
+//            if abs(width-rect.size.width) > 0.01 {
+//                 return false
+//            }
+//        }
         return true
     }
     
     func editAreasBoundsIsEqualForHeight() -> Bool {
-        if self.editAreasIsEmpty() {
-            return false
-        }
-        let rects = self._editAreasBounds()
-        if rects.count == 1 {
-            return true
-        }
-        let height = rects.first?.height ?? 0
-        for (i, rect) in rects.enumerated() {
-            if i == 0 {
-                continue
-            }
-             if abs(height-rect.size.height) > 0.01 {
-                return false
-            }
-        }
+//        if self.editAreasIsEmpty() {
+//            return false
+//        }
+//        let rects = self._editAreasBounds()
+//        if rects.count == 1 {
+//            return true
+//        }
+//        let height = rects.first?.height ?? 0
+//        for (i, rect) in rects.enumerated() {
+//            if i == 0 {
+//                continue
+//            }
+//             if abs(height-rect.size.height) > 0.01 {
+//                return false
+//            }
+//        }
         return true
     }
     
     func editAreasRotateIsEqual() -> Bool {
-        if self.editAreasIsEmpty() {
-            return false
-        }
-        if self.editAreasHavTextArea() {
-            return false
-        }
-        let datas = self._editAreasRotates()
-        if datas.count == 1 {
-            return true
-        }
-        let data = datas.first ?? 0
-        for (i, d) in datas.enumerated() {
-            if i == 0 {
-                continue
-            }
-            if data != d {
-                return false
-            }
-        }
+//        if self.editAreasIsEmpty() {
+//            return false
+//        }
+//        if self.editAreasHavTextArea() {
+//            return false
+//        }
+//        let datas = self._editAreasRotates()
+//        if datas.count == 1 {
+//            return true
+//        }
+//        let data = datas.first ?? 0
+//        for (i, d) in datas.enumerated() {
+//            if i == 0 {
+//                continue
+//            }
+//            if data != d {
+//                return false
+//            }
+//        }
         return true
     }
     
     func editAreasOpacityIsEqual() -> Bool {
-        if self.editAreasIsEmpty() {
-            return false
-        }
-        let datas = self._editAreasOpacitys()
-        if datas.count == 1 {
-            return true
-        }
-        let data = datas.first ?? 0
-        for (i, d) in datas.enumerated() {
-            if i == 0 {
-                continue
-            }
-            if data != d {
-                return false
-            }
-        }
+//        if self.editAreasIsEmpty() {
+//            return false
+//        }
+//        let datas = self._editAreasOpacitys()
+//        if datas.count == 1 {
+//            return true
+//        }
+//        let data = datas.first ?? 0
+//        for (i, d) in datas.enumerated() {
+//            if i == 0 {
+//                continue
+//            }
+//            if data != d {
+//                return false
+//            }
+//        }
         return true
     }
+     
     
-    private func _editAreasFontColors() -> [NSColor] {
-        var datas: [NSColor] = []
-        for area in self.editingTextAreas {
-            if let data = self.listView?.editingSelectionFontColor(with: area) {
-                 datas.append(data)
-            }
-        }
-        return datas
-    }
-    
-    private func _editAreasFontStyles() -> [String] {
-        var datas: [String] = []
-        for area in self.editingTextAreas {
-            if let data = self.listView?.editingSelectionCFont(byRangeEdit: area)?.styleName {
-                 datas.append(data)
-            }
-        }
-        return datas
-    }
-    
-    private func _editAreasFontNames() -> [String] {
-        var datas: [String] = []
-        for area in self.editingTextAreas {
-            if let data = self.listView?.editingSelectionCFont(byRangeEdit: area)?.familyName {
-                 datas.append(data)
-            }
-        }
-        return datas
-    }
-    
-    private func _editAreasFontSizes() -> [CGFloat] {
-        var datas: [CGFloat] = []
-        for area in self.editingTextAreas {
-            if let data = self.listView?.editingSelectionFontSize(byRangeEdit: area) {
-                datas.append(data)
-            }
-        }
-        return datas
-    }
-    
-    private func _editAreasFontBolds() -> [Bool] {
-        var datas: [Bool] = []
-        for area in self.editingTextAreas {
-            if let data = self.listView?.isBoldCurrentSelection(byRangeEdit: area) {
-                datas.append(data)
-            }
-        }
-        return datas
-    }
-    
-    private func _editAreasFontItalics() -> [Bool] {
-        var datas: [Bool] = []
-        for area in self.editingTextAreas {
-            if let data = self.listView?.isItalicCurrentSelection(byRangeEdit: area) {
-                datas.append(data)
-            }
-        }
-        return datas
-    }
-    
-    private func _editAreasTextAlignments() -> [NSTextAlignment] {
-        var datas: [NSTextAlignment] = []
-        for area in self.editingTextAreas {
-            if let data = self.listView?.currentSelectionAlignment(byRangeEdit: area) {
-                datas.append(data)
-            }
-        }
-        return datas
-    }
-    
-    private func _editAreasBounds() -> [NSRect] {
-        var rects: [NSRect] = []
-        for area in self.editingAreas {
-            rects.append(area.bounds)
-        }
-        return rects
-    }
-    
-    private func _editAreasRotates() -> [CGFloat] {
-        var arr: [CGFloat] = []
-        for area in self.editingImageAreas {
-            if let data = self.listView?.getRotateWith(area) {
-                arr.append(data)
-            }
-        }
-        return arr
-    }
-    
-    private func _editAreasOpacitys() -> [CGFloat] {
-        var arr: [CGFloat] = []
-        for area in self.editingAreas {
-            if let data = self.listView?.opacityByRange(for: area) {
-                arr.append(data)
-            }
-        }
-        return arr
-    }
 }
 
 // MARK: - Action
@@ -907,7 +740,7 @@ extension KMEditPDfHanddler {
             }
         }
         if needTip {
-            if let data = self.viewC?.view {
+            if let data = listView {
                 _ = CustomAlertView.alertView(message: NSLocalizedString("Please reset the font weight via the drop-down box", comment: ""), fromView: data, withStyle: .black)
             }
         }
@@ -926,7 +759,7 @@ extension KMEditPDfHanddler {
             }
         }
         if needTip {
-            if let data = self.viewC?.view {
+            if let data = listView {
                 _ = CustomAlertView.alertView(message: NSLocalizedString("Please reset the font weight via the drop-down box", comment: ""), fromView: data, withStyle: .black)
             }
         }
@@ -986,7 +819,7 @@ extension KMEditPDfHanddler {
             self.showCropComfirmWindow()
         }
        
-        self.viewC?.view.window?.makeFirstResponder(self.listView)
+        self.listView?.window?.makeFirstResponder(self.listView)
     }
     
     func cropCancelAction() {
@@ -1083,7 +916,7 @@ extension KMEditPDfHanddler {
                 pdfdocument?.km_insert(image: image, at: 0)
                 let savePanel = NSSavePanel()
                 savePanel.allowedFileTypes = ["pdf"]
-                savePanel.beginSheetModal(for: self.viewC!.view.window!) { response in
+                savePanel.beginSheetModal(for: self.listView!.window!) { response in
                     if (response != .OK) {
                         return
                     }
@@ -1352,8 +1185,7 @@ extension KMEditPDfHanddler: CPDFViewDelegate {
     func pdfViewEditingAreaDidChanged(_ pdfView: CPDFView!) {
         let isEdited = self.listView?.isEdited() ?? false
         if isEdited {
-            // 记录编辑状态
-            self.viewC?.recordIsPDFDocumentEdited(type: .editText)
+
         }
         if annotationType != .addText {
             NotificationCenter.default.post(name: NSNotification.Name(rawValue: "kPDFViewEditingAreaDidChanged"), object: self.listView?.document)
@@ -1369,7 +1201,7 @@ extension KMEditPDfHanddler: CPDFViewDelegate {
             if toolMode == .editPDFToolMode {
                 if annotationType == .addImage || annotationType == .addText {
                     if self.isEditImage {
-                        self.viewC?.menuItemEditingClick_CropImage(sender: NSMenuItem())
+
                     } else {
                         if annotationType == .addImage {
                            
@@ -1380,8 +1212,7 @@ extension KMEditPDfHanddler: CPDFViewDelegate {
                 }
                 self.listView?.isEditImage = false
             } else {
-               
-                self.viewC?.closeRightPane()
+                
                 if self.subViewType == .EditPDFAddText && annotationType == .addText {
                   
                 }
@@ -1390,8 +1221,7 @@ extension KMEditPDfHanddler: CPDFViewDelegate {
         }
         
         self.hiddenCropComfirmWindow()
-        self.viewC?.model.isPDFTextImageEdited = true
-         if self.annotationType == .addImage {
+          if self.annotationType == .addImage {
             var isImageArea = false
             for i in 0 ..< areas.count {
                 if areas[i] is CPDFEditImageArea {
@@ -1403,7 +1233,6 @@ extension KMEditPDfHanddler: CPDFViewDelegate {
                 if self.subViewType == .EditPDFAddImage {
                    
                 }
-                self.openRightPane()
             } else {
              
              }
@@ -1411,8 +1240,7 @@ extension KMEditPDfHanddler: CPDFViewDelegate {
          
             let count = self.listView?.editingSelectionString()?.count ?? 0
  
-        
-            self.openRightPane()
+         
         } else {
             var textsAreas : [CPDFEditTextArea] = []
             var imagesAreas : [CPDFEditImageArea] = []
@@ -1429,11 +1257,9 @@ extension KMEditPDfHanddler: CPDFViewDelegate {
                 }
             }
             if textsAreas.count > 0 && textsAreas.count == areas.count {
-            
-                self.openRightPane()
+             
             } else if imagesAreas.count > 0 {
- 
-                self.openRightPane()
+  
             }
         }
         
@@ -1462,7 +1288,7 @@ extension KMEditPDfHanddler: CPDFViewDelegate {
     
     func pdfViewEditingAddImageArea(_ pdfView: CPDFView!, add page: CPDFPage!, add rect: CGRect) {
         if self.isEditImage {
-            self.viewC?.menuItemEditingClick_CropImage(sender: NSMenuItem())
+
         } else {
             let window = KMEditPDFPopToolBarWindow.shared
             if (window.isVisible) {
@@ -1552,9 +1378,7 @@ extension KMEditPDfHanddler: CPDFViewDelegate {
                         
                         DispatchQueue.main.async {
                             self.listView?.createImagePath(filePath, rect: imageRect, page: pdfView.currentPage())
-                            self.viewC?.model.isPDFTextImageEdited = true
-                            self.viewC?.recordIsPDFDocumentEdited(type: .editImage)
-                            
+ 
                             self.showPopWindow(positionRect: imageRect, showGuide: true)
                         }
                     }

+ 87 - 0
PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/Toolbar/KMEditPDFToolbarItemView.swift

@@ -7,6 +7,93 @@
 
 import Cocoa
 
+class KMSliderItemView: NSView {
+    var titleLabel: NSTextField {
+        get {
+            return self.titleLabel_
+        }
+    }
+    private lazy var titleLabel_: NSTextField = {
+        let view = NSTextField(labelWithString: "")
+        return view
+    }()
+    
+    var slider: NSSlider {
+        get {
+            return self.slider_
+        }
+    }
+    private lazy var slider_: NSSlider = {
+        let view = NSSlider()
+        view.minValue = 0
+        view.maxValue = 1
+        view.target = self
+        view.action = #selector(sliderValueDidChange)
+        return view
+    }()
+    
+    var box: NSBox {
+        get {
+            return self.box_
+        }
+    }
+    
+    private lazy var box_: NSBox = {
+        let view = NSBox()
+        view.boxType = .custom
+        view.titlePosition = .noTitle
+        view.contentViewMargins = .zero
+        view.borderWidth = 0
+        return view
+    }()
+    
+    var minValue: Double = 0 {
+        didSet {
+            self.slider.minValue = self.minValue
+        }
+    }
+    
+    var maxValue: Double = 1 {
+        didSet {
+            self.slider.maxValue = self.maxValue
+        }
+    }
+    
+    var doubleValue: Double = 1 {
+        didSet {
+            self.slider.doubleValue = self.doubleValue
+        }
+    }
+    
+    var valueChange: ((Double)->Void)?
+    
+    convenience init() {
+        self.init(frame: .zero)
+        self.initSubViews()
+    }
+    
+    func initSubViews() {
+        self.addSubview(self.titleLabel_)
+        self.addSubview(self.slider_)
+        self.addSubview(self.box_)
+        
+        self.titleLabel_.km_add_top_constraint(constant: 0)
+        self.titleLabel_.km_add_left_constraint(constant: 4)
+        
+        self.slider_.km_add_left_constraint(constant: 4)
+        self.slider_.km_add_top_constraint(equalTo: self.titleLabel_, attribute: .bottom, constant: 4)
+        self.slider_.km_add_height_constraint(constant: 26)
+        self.slider_.km_add_right_constraint(equalTo: self.box_, attribute: .left, constant: -8)
+        
+        self.box_.km_add_right_constraint(constant: 0)
+        self.box_.km_add_bottom_constraint(constant: -4)
+    }
+    
+    @objc func sliderValueDidChange(_ sender: NSSlider) {
+        self.valueChange?(sender.doubleValue)
+    }
+}
+
 class KMEditPDFToolbarItemView: NSView {
     private lazy var contentBox_: NSBox = {
         let view = NSBox()

+ 40 - 16
PDF Office/PDF Reader Pro.xcodeproj/project.pbxproj

@@ -3941,6 +3941,12 @@
 		BB78EAAA2B561F9700121691 /* KMFullScreenWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB78EAA92B561F9700121691 /* KMFullScreenWindow.swift */; };
 		BB78EAAB2B561F9700121691 /* KMFullScreenWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB78EAA92B561F9700121691 /* KMFullScreenWindow.swift */; };
 		BB78EAAC2B561F9700121691 /* KMFullScreenWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB78EAA92B561F9700121691 /* KMFullScreenWindow.swift */; };
+		BB79E7192CE617CB0052CAD5 /* KMEditImageController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB79E7172CE617CB0052CAD5 /* KMEditImageController.swift */; };
+		BB79E71A2CE617CB0052CAD5 /* KMEditImageController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB79E7172CE617CB0052CAD5 /* KMEditImageController.swift */; };
+		BB79E71B2CE617CB0052CAD5 /* KMEditImageController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB79E7172CE617CB0052CAD5 /* KMEditImageController.swift */; };
+		BB79E71C2CE617CB0052CAD5 /* KMEditImageController.xib in Resources */ = {isa = PBXBuildFile; fileRef = BB79E7182CE617CB0052CAD5 /* KMEditImageController.xib */; };
+		BB79E71D2CE617CB0052CAD5 /* KMEditImageController.xib in Resources */ = {isa = PBXBuildFile; fileRef = BB79E7182CE617CB0052CAD5 /* KMEditImageController.xib */; };
+		BB79E71E2CE617CB0052CAD5 /* KMEditImageController.xib in Resources */ = {isa = PBXBuildFile; fileRef = BB79E7182CE617CB0052CAD5 /* KMEditImageController.xib */; };
 		BB79FAB22CDC65BA00BF7B39 /* KMBGTemplateController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB79FAB02CDC65BA00BF7B39 /* KMBGTemplateController.swift */; };
 		BB79FAB32CDC65BA00BF7B39 /* KMBGTemplateController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB79FAB02CDC65BA00BF7B39 /* KMBGTemplateController.swift */; };
 		BB79FAB42CDC65BA00BF7B39 /* KMBGTemplateController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB79FAB02CDC65BA00BF7B39 /* KMBGTemplateController.swift */; };
@@ -4182,12 +4188,12 @@
 		BB89DD7E2953F863007C3FFA /* KMWatermarkFileOutsideView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB89DD7D2953F863007C3FFA /* KMWatermarkFileOutsideView.swift */; };
 		BB89DD7F2953F863007C3FFA /* KMWatermarkFileOutsideView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB89DD7D2953F863007C3FFA /* KMWatermarkFileOutsideView.swift */; };
 		BB89DD802953F863007C3FFA /* KMWatermarkFileOutsideView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB89DD7D2953F863007C3FFA /* KMWatermarkFileOutsideView.swift */; };
-		BB8AA5382CC65C900084F183 /* KMNLinkMultiController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB8AA5362CC65C900084F183 /* KMNLinkMultiController.swift */; };
-		BB8AA5392CC65C900084F183 /* KMNLinkMultiController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB8AA5362CC65C900084F183 /* KMNLinkMultiController.swift */; };
-		BB8AA53A2CC65C900084F183 /* KMNLinkMultiController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB8AA5362CC65C900084F183 /* KMNLinkMultiController.swift */; };
-		BB8AA53B2CC65C900084F183 /* KMNLinkMultiController.xib in Resources */ = {isa = PBXBuildFile; fileRef = BB8AA5372CC65C900084F183 /* KMNLinkMultiController.xib */; };
-		BB8AA53C2CC65C900084F183 /* KMNLinkMultiController.xib in Resources */ = {isa = PBXBuildFile; fileRef = BB8AA5372CC65C900084F183 /* KMNLinkMultiController.xib */; };
-		BB8AA53D2CC65C900084F183 /* KMNLinkMultiController.xib in Resources */ = {isa = PBXBuildFile; fileRef = BB8AA5372CC65C900084F183 /* KMNLinkMultiController.xib */; };
+		BB8AA5382CC65C900084F183 /* KMNMultiController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB8AA5362CC65C900084F183 /* KMNMultiController.swift */; };
+		BB8AA5392CC65C900084F183 /* KMNMultiController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB8AA5362CC65C900084F183 /* KMNMultiController.swift */; };
+		BB8AA53A2CC65C900084F183 /* KMNMultiController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB8AA5362CC65C900084F183 /* KMNMultiController.swift */; };
+		BB8AA53B2CC65C900084F183 /* KMNMultiController.xib in Resources */ = {isa = PBXBuildFile; fileRef = BB8AA5372CC65C900084F183 /* KMNMultiController.xib */; };
+		BB8AA53C2CC65C900084F183 /* KMNMultiController.xib in Resources */ = {isa = PBXBuildFile; fileRef = BB8AA5372CC65C900084F183 /* KMNMultiController.xib */; };
+		BB8AA53D2CC65C900084F183 /* KMNMultiController.xib in Resources */ = {isa = PBXBuildFile; fileRef = BB8AA5372CC65C900084F183 /* KMNMultiController.xib */; };
 		BB8AA53F2CC66E490084F183 /* PDFImages.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = BB8AA53E2CC66E490084F183 /* PDFImages.xcassets */; };
 		BB8AA5402CC66E490084F183 /* PDFImages.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = BB8AA53E2CC66E490084F183 /* PDFImages.xcassets */; };
 		BB8AA5412CC66E490084F183 /* PDFImages.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = BB8AA53E2CC66E490084F183 /* PDFImages.xcassets */; };
@@ -4341,6 +4347,9 @@
 		BB96A0B82AFCE45800559E24 /* WaitingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB96A0B72AFCE45800559E24 /* WaitingView.swift */; };
 		BB96A0B92AFCE45800559E24 /* WaitingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB96A0B72AFCE45800559E24 /* WaitingView.swift */; };
 		BB96A0BA2AFCE45800559E24 /* WaitingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB96A0B72AFCE45800559E24 /* WaitingView.swift */; };
+		BB96C4292CE6DDB2003F3668 /* CPDFListView+Edit.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB96C4282CE6DDB2003F3668 /* CPDFListView+Edit.swift */; };
+		BB96C42A2CE6DDB2003F3668 /* CPDFListView+Edit.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB96C4282CE6DDB2003F3668 /* CPDFListView+Edit.swift */; };
+		BB96C42B2CE6DDB2003F3668 /* CPDFListView+Edit.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB96C4282CE6DDB2003F3668 /* CPDFListView+Edit.swift */; };
 		BB97BE242BC3E02D00BECEA8 /* SKExportAccessoryController.m in Sources */ = {isa = PBXBuildFile; fileRef = BB97BE222BC3E02D00BECEA8 /* SKExportAccessoryController.m */; };
 		BB97BE252BC3E02D00BECEA8 /* SKExportAccessoryController.m in Sources */ = {isa = PBXBuildFile; fileRef = BB97BE222BC3E02D00BECEA8 /* SKExportAccessoryController.m */; };
 		BB97BE262BC3E02D00BECEA8 /* SKExportAccessoryController.m in Sources */ = {isa = PBXBuildFile; fileRef = BB97BE222BC3E02D00BECEA8 /* SKExportAccessoryController.m */; };
@@ -7319,6 +7328,8 @@
 		BB7648EB29ECEEF400931039 /* KMAppearance.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMAppearance.swift; sourceTree = "<group>"; };
 		BB77C85E2BD506BE0065AFF2 /* CPDFAnnotation+KMExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CPDFAnnotation+KMExtension.swift"; sourceTree = "<group>"; };
 		BB78EAA92B561F9700121691 /* KMFullScreenWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMFullScreenWindow.swift; sourceTree = "<group>"; };
+		BB79E7172CE617CB0052CAD5 /* KMEditImageController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMEditImageController.swift; sourceTree = "<group>"; };
+		BB79E7182CE617CB0052CAD5 /* KMEditImageController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KMEditImageController.xib; sourceTree = "<group>"; };
 		BB79FAB02CDC65BA00BF7B39 /* KMBGTemplateController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMBGTemplateController.swift; sourceTree = "<group>"; };
 		BB79FAB12CDC65BA00BF7B39 /* KMBGTemplateController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KMBGTemplateController.xib; sourceTree = "<group>"; };
 		BB7BC4D72AD3D6B700D6BEE6 /* PDFListView+KMExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "PDFListView+KMExtensions.swift"; sourceTree = "<group>"; };
@@ -7427,8 +7438,8 @@
 		BB897274294DC04F0045787C /* KMWatermartAdjectivePageRangeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMWatermartAdjectivePageRangeView.swift; sourceTree = "<group>"; };
 		BB897278294DFD1E0045787C /* KMWatermarkTextView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMWatermarkTextView.swift; sourceTree = "<group>"; };
 		BB89DD7D2953F863007C3FFA /* KMWatermarkFileOutsideView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMWatermarkFileOutsideView.swift; sourceTree = "<group>"; };
-		BB8AA5362CC65C900084F183 /* KMNLinkMultiController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMNLinkMultiController.swift; sourceTree = "<group>"; };
-		BB8AA5372CC65C900084F183 /* KMNLinkMultiController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KMNLinkMultiController.xib; sourceTree = "<group>"; };
+		BB8AA5362CC65C900084F183 /* KMNMultiController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMNMultiController.swift; sourceTree = "<group>"; };
+		BB8AA5372CC65C900084F183 /* KMNMultiController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KMNMultiController.xib; sourceTree = "<group>"; };
 		BB8AA53E2CC66E490084F183 /* PDFImages.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = PDFImages.xcassets; sourceTree = "<group>"; };
 		BB8AA5422CC6711B0084F183 /* KMPDFConfig.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMPDFConfig.swift; sourceTree = "<group>"; };
 		BB8B17312907B63D001C5EA5 /* CipherTextView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CipherTextView.swift; sourceTree = "<group>"; };
@@ -7493,6 +7504,7 @@
 		BB96A0AF2AFCD56100559E24 /* KMToolCompareWindowController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMToolCompareWindowController.swift; sourceTree = "<group>"; };
 		BB96A0B32AFCD56B00559E24 /* KMToolCompareWindowController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = KMToolCompareWindowController.xib; sourceTree = "<group>"; };
 		BB96A0B72AFCE45800559E24 /* WaitingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WaitingView.swift; sourceTree = "<group>"; };
+		BB96C4282CE6DDB2003F3668 /* CPDFListView+Edit.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CPDFListView+Edit.swift"; sourceTree = "<group>"; };
 		BB97BE212BC3E02D00BECEA8 /* SKExportAccessoryController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SKExportAccessoryController.h; sourceTree = "<group>"; };
 		BB97BE222BC3E02D00BECEA8 /* SKExportAccessoryController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SKExportAccessoryController.m; sourceTree = "<group>"; };
 		BB981E502AD4F637001988CA /* KMCoverButton.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KMCoverButton.swift; sourceTree = "<group>"; };
@@ -8650,6 +8662,8 @@
 				ADC31FA92A0E0C1E00ED44A2 /* View */,
 				89D2D306295A83B500BFF5FE /* KMEditPDFTextPropertyViewController.swift */,
 				89E9B3F8295BE2EC00AEFA61 /* KMEditPDFTextPropertyViewController.xib */,
+				BB79E7172CE617CB0052CAD5 /* KMEditImageController.swift */,
+				BB79E7182CE617CB0052CAD5 /* KMEditImageController.xib */,
 				89E9B404295D268E00AEFA61 /* KMEditImagePropertyViewController.swift */,
 				89E9B405295D268E00AEFA61 /* KMEditImagePropertyViewController.xib */,
 			);
@@ -13330,6 +13344,7 @@
 				F36AD77629642FE80015AD53 /* CPDFListView+UndoManager.m */,
 				9FF0D0522B6A3EE40018A732 /* CPDFListView+Form.swift */,
 				AD7D5CA82B906E36006562CD /* CPDFListView+Sync.swift */,
+				BB96C4282CE6DDB2003F3668 /* CPDFListView+Edit.swift */,
 			);
 			path = CPDFListViewExtension;
 			sourceTree = "<group>";
@@ -13505,8 +13520,8 @@
 		BB8AA5342CC65C310084F183 /* KMNLinkMultiController */ = {
 			isa = PBXGroup;
 			children = (
-				BB8AA5362CC65C900084F183 /* KMNLinkMultiController.swift */,
-				BB8AA5372CC65C900084F183 /* KMNLinkMultiController.xib */,
+				BB8AA5362CC65C900084F183 /* KMNMultiController.swift */,
+				BB8AA5372CC65C900084F183 /* KMNMultiController.xib */,
 			);
 			path = KMNLinkMultiController;
 			sourceTree = "<group>";
@@ -15391,7 +15406,7 @@
 				BBE788A22CBD2463008086E2 /* DropdownDemoVC.xib in Resources */,
 				9F0CB4622966C9E200007028 /* KMFormPropertPanelViewController.xib in Resources */,
 				BB10E16A2CDC94E300471D47 /* KMBGTemplateItem.xib in Resources */,
-				BB8AA53B2CC65C900084F183 /* KMNLinkMultiController.xib in Resources */,
+				BB8AA53B2CC65C900084F183 /* KMNMultiController.xib in Resources */,
 				658FDBB52C9D90CE00EFA72E /* KMNoteFilterStateCollevtionViewItem.xib in Resources */,
 				BB5F8A1929BB15AD00365ADB /* pic_mail.pdf in Resources */,
 				9FDD0F962952FF4D000C4DAD /* $metadata.json in Resources */,
@@ -15480,6 +15495,7 @@
 				BB716D6B2CDDB727009787ED /* KMHeaderPropertyController.xib in Resources */,
 				AD055E902B88304E0035F824 /* BookmarksWindow.xib in Resources */,
 				BB99ACC5292DE22E0048AFD9 /* KMMergeViewController.xib in Resources */,
+				BB79E71C2CE617CB0052CAD5 /* KMEditImageController.xib in Resources */,
 				BB6347B82AF224E200F5438E /* KMConvertCollectionViewHeader.xib in Resources */,
 				8942F7F32926087200389627 /* KMSearchViewController.xib in Resources */,
 				BB072D612C05AC8F00779B45 /* KMToolbarConfigViewItem.xib in Resources */,
@@ -15976,7 +15992,7 @@
 				658FDBB62C9D90CE00EFA72E /* KMNoteFilterStateCollevtionViewItem.xib in Resources */,
 				AD1D481D2AFB6B96007AC1F0 /* KMMergeWindowController.xib in Resources */,
 				ADFCEB652B4FBFC50001EBAF /* ad_cancel_button00@2x.png in Resources */,
-				BB8AA53C2CC65C900084F183 /* KMNLinkMultiController.xib in Resources */,
+				BB8AA53C2CC65C900084F183 /* KMNMultiController.xib in Resources */,
 				BB19A7532CB7C710008204DC /* KMHistoryFileThumbItem.xib in Resources */,
 				BBFE6E69293097A600142C01 /* KMPageRangePickerWindowController.xib in Resources */,
 				652E95532C6914770061FA40 /* KMLineAndBorderItemView.xib in Resources */,
@@ -16274,6 +16290,7 @@
 				F337CC402CC78B9400D46AF4 /* KMNThumbnailImage.xcassets in Resources */,
 				9F0CB46B2967E5CB00007028 /* KMPropertiesPanelSubViewController.xib in Resources */,
 				ADAFDA522AEB43BF00F084BC /* KMAdvertisement.xcassets in Resources */,
+				BB79E71D2CE617CB0052CAD5 /* KMEditImageController.xib in Resources */,
 				9FF371DC2C69B937005F9CC5 /* CDistanceSettingWindowController.xib in Resources */,
 				9FF371D02C69B8B6005F9CC5 /* KMMeasureSideVC.xib in Resources */,
 				BBB789972BE8BF2400F7E09C /* AIInfoInputView.xib in Resources */,
@@ -16697,7 +16714,7 @@
 				9F56648C2988B16F00020985 /* KMTextfieldVC.xib in Resources */,
 				9FA607E328FD4C9F00B46586 /* KMHomePopViewController.xib in Resources */,
 				F356720A29AF184A00740FF3 /* CPDFListAnnotationNoteWindowController.xib in Resources */,
-				BB8AA53D2CC65C900084F183 /* KMNLinkMultiController.xib in Resources */,
+				BB8AA53D2CC65C900084F183 /* KMNMultiController.xib in Resources */,
 				658FDBB72C9D90CE00EFA72E /* KMNoteFilterStateCollevtionViewItem.xib in Resources */,
 				BB10FAF42AFE23BE00F18D65 /* LineInspector.xib in Resources */,
 				BB183DD62B4EAD5400F99C7E /* Ubuntu-Bold.ttf in Resources */,
@@ -16731,6 +16748,7 @@
 				AD5374972C65A426002DE248 /* default.metallib in Resources */,
 				F35BC6CB2CA3AD710022CDE9 /* Texture.bundle in Resources */,
 				AD7D5C972B8F20FE006562CD /* synctex_parser_version.txt in Resources */,
+				BB79E71E2CE617CB0052CAD5 /* KMEditImageController.xib in Resources */,
 				BB19A7482CB7B7A0008204DC /* KMHomeFilesHeaderView.xib in Resources */,
 				BBD922352B50D61200DB9585 /* KMRateWindowController.xib in Resources */,
 				BBE789012CBD2464008086E2 /* MessageVC.xib in Resources */,
@@ -17223,12 +17241,14 @@
 				BBC745EA295F067B0072C2ED /* KMCropSettingWindowController.swift in Sources */,
 				9FCFEC6C2AC3D96800EAD2CB /* CPDFListViewAnimatedBorderlessWindow.swift in Sources */,
 				89752DF62938A236003FF08E /* PublicKey.swift in Sources */,
+				BB96C4292CE6DDB2003F3668 /* CPDFListView+Edit.swift in Sources */,
 				AD7D5CCB2B95728C006562CD /* KMBookmarkOutlineTitleCellView.swift in Sources */,
 				AD867FB329DFBB2700F00440 /* KMAnnotationOutlineSectionView.swift in Sources */,
 				BBEC00A8295BDECF00A26C98 /* KMHeaderFooterContentInfoView.swift in Sources */,
 				9FDD0F6F294AD13C000C4DAD /* KMMainViewController+Action.swift in Sources */,
 				BB67EE1D2B54FFEF00573BF0 /* ASIFormDataRequest.m in Sources */,
 				9F69DBB22B512614003D4C45 /* KMAnnotationTextWidgetOptionsViewController.swift in Sources */,
+				BB79E7192CE617CB0052CAD5 /* KMEditImageController.swift in Sources */,
 				ADDF839B2B391A5D00A81A4E /* PDFCertExportAccessoryView.swift in Sources */,
 				9F0CB4E52986557F00007028 /* KMDesignToken+PaddingRight.swift in Sources */,
 				BB86C1ED28F544F4005AD968 /* CPDFListView+Event.m in Sources */,
@@ -18252,7 +18272,7 @@
 				BB4A94A42B04DA0C00940F8B /* KMGOCRManagerNew.swift in Sources */,
 				BB3D07632CD0821F00EB94DF /* KMPDFSplitView.swift in Sources */,
 				9F1FE3DE293EE51F00E952CA /* KMMainDocument.swift in Sources */,
-				BB8AA5382CC65C900084F183 /* KMNLinkMultiController.swift in Sources */,
+				BB8AA5382CC65C900084F183 /* KMNMultiController.swift in Sources */,
 				AD85D1A42AF09864000F4D28 /* KMHomeQuickToolsWindowController.swift in Sources */,
 				BBB9B31F299A5D6D004F3235 /* KMGoogleDriveManager.m in Sources */,
 				BB1BFF8E2AEA547B003EB179 /* NSButton+CustomAppearance.swift in Sources */,
@@ -18900,6 +18920,7 @@
 				9FF0D0612B6A5DCF0018A732 /* KMPDFAnnotationTextWidgetSub.swift in Sources */,
 				AD85D1AE2AF09C79000F4D28 /* KMHomeQuickToolsWindowCollectionViewItem.swift in Sources */,
 				BB19A7582CB7C724008204DC /* KMHistoryFileListItem.swift in Sources */,
+				BB96C42A2CE6DDB2003F3668 /* CPDFListView+Edit.swift in Sources */,
 				BB6719F62AD2C949003D44D5 /* CPDFRedactAnnotation+PDFListView.swift in Sources */,
 				AD055E892B882E7F0035F824 /* SKBookmark.m in Sources */,
 				ADDEEA872AD7805200EF675D /* KMGeneralButton.swift in Sources */,
@@ -19388,7 +19409,7 @@
 				BB7256B42CDB816100B6CE64 /* KMBackgroundPropertyController.swift in Sources */,
 				BB146FE5299DC0D100784A6A /* GTLRURITemplate.m in Sources */,
 				9F1FE4F129406E4700E952CA /* BackgroundGradientView.m in Sources */,
-				BB8AA5392CC65C900084F183 /* KMNLinkMultiController.swift in Sources */,
+				BB8AA5392CC65C900084F183 /* KMNMultiController.swift in Sources */,
 				BBAC26A52AFE134300563A08 /* KMToolbarItemPopViewController.swift in Sources */,
 				9F0CB4BE2977C06300007028 /* KMPropertiesPanelColorSubVC.swift in Sources */,
 				9F94617E2BD643720076574B /* KMTableAnnotation.m in Sources */,
@@ -19404,6 +19425,7 @@
 				BB65A0792AF8E2F2003A27A0 /* KMSyncPreferences.swift in Sources */,
 				BBE788F42CBD2464008086E2 /* TreeVC.swift in Sources */,
 				ADE3C1EE29A5AFB100793B13 /* KMRequestServerManager.swift in Sources */,
+				BB79E71A2CE617CB0052CAD5 /* KMEditImageController.swift in Sources */,
 				9F9461882BD644BF0076574B /* KMTableCellData.m in Sources */,
 				ADDF837E2B391A5D00A81A4E /* DSignatureDetailsViewController.swift in Sources */,
 				9F1FE50029406E4700E952CA /* CTTabStripModel.m in Sources */,
@@ -19965,6 +19987,7 @@
 				9F1FE4B929406E4700E952CA /* CTBrowserFrameView.m in Sources */,
 				BB3A42982B4BC72C006D0642 /* KMNotesPanelController.swift in Sources */,
 				9F0CB4E72986557F00007028 /* KMDesignToken+PaddingRight.swift in Sources */,
+				BB79E71B2CE617CB0052CAD5 /* KMEditImageController.swift in Sources */,
 				BB853C842AF8BAF0009C20C1 /* KMSetPasswordObject.swift in Sources */,
 				BBD1F789296FAC7C00343885 /* KMPageEditSettingBaseView.swift in Sources */,
 				BB2C6ACF28F41BA000478A33 /* CPDFListView.m in Sources */,
@@ -20428,6 +20451,7 @@
 				9F53D5492AD664C300CCF9D8 /* CPDFListHoverAnnotationViewController.swift in Sources */,
 				BBB3FF9A2B567D0300145C4A /* KMApplication.swift in Sources */,
 				9FDD0F862952FC9C000C4DAD /* KMAliasLightParser.swift in Sources */,
+				BB96C42B2CE6DDB2003F3668 /* CPDFListView+Edit.swift in Sources */,
 				BB27BF3E2B33E85200A0BAAE /* CPDFView+KMExtension.swift in Sources */,
 				BBDE52BD2BF3676C000545B2 /* KMPresentTableViewCell.swift in Sources */,
 				ADB2D6E8294740F30029D2B3 /* KMPrintPaperSetWindowController.swift in Sources */,
@@ -20498,7 +20522,7 @@
 				ADE3C1A129A3894900793B13 /* KMSearchTableRowView.swift in Sources */,
 				BB2C845C2BAE6DC100AF6142 /* KMLeftMethodMode.swift in Sources */,
 				AD1CA41B2A061CE10070541F /* KMAnnotationScreenTypeViewItem.swift in Sources */,
-				BB8AA53A2CC65C900084F183 /* KMNLinkMultiController.swift in Sources */,
+				BB8AA53A2CC65C900084F183 /* KMNMultiController.swift in Sources */,
 				BBE0689C2CDDF137000512BC /* KMBatesTemplateController.swift in Sources */,
 				BB276A4E2B03760000AB5578 /* KMOperationQueue.swift in Sources */,
 				9F94617F2BD643720076574B /* KMTableAnnotation.m in Sources */,

+ 624 - 82
PDF Office/PDF Reader Pro.xcodeproj/xcuserdata/kdanmobile.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -14,13 +14,13 @@
             filePath = "PDF Master/Class/PDFWindowController/ViewController/KMMainViewController+Action.swift"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "2948"
-            endingLineNumber = "2948"
+            startingLineNumber = "2914"
+            endingLineNumber = "2914"
             landmarkName = "toolbarViewController(_:zoomModel:)"
             landmarkType = "7">
             <Locations>
                <Location
-                  uuid = "CBD5F2A0-D33B-4635-AABA-000A5C35975E - 89ff5705237bd58c"
+                  uuid = "CBD5F2A0-D33B-4635-AABA-000A5C35975E - 89ff5705237bd04f"
                   shouldBeEnabled = "Yes"
                   ignoreCount = "0"
                   continueAfterRunningActions = "No"
@@ -30,12 +30,12 @@
                   urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/Class/PDFWindowController/ViewController/KMMainViewController+Action.swift"
                   startingColumnNumber = "9223372036854775807"
                   endingColumnNumber = "9223372036854775807"
-                  startingLineNumber = "2948"
-                  endingLineNumber = "2948"
+                  startingLineNumber = "2915"
+                  endingLineNumber = "2915"
                   offsetFromSymbolStart = "52">
                </Location>
                <Location
-                  uuid = "CBD5F2A0-D33B-4635-AABA-000A5C35975E - b2a76df927114c5e"
+                  uuid = "CBD5F2A0-D33B-4635-AABA-000A5C35975E - b2a76df9271149fc"
                   shouldBeEnabled = "Yes"
                   ignoreCount = "0"
                   continueAfterRunningActions = "No"
@@ -45,8 +45,8 @@
                   urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/Class/PDFWindowController/ViewController/KMMainViewController+Action.swift"
                   startingColumnNumber = "9223372036854775807"
                   endingColumnNumber = "9223372036854775807"
-                  startingLineNumber = "2948"
-                  endingLineNumber = "2948"
+                  startingLineNumber = "2914"
+                  endingLineNumber = "2914"
                   offsetFromSymbolStart = "192">
                </Location>
             </Locations>
@@ -830,22 +830,6 @@
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            uuid = "A08D6542-3468-45BA-A764-52C1A1E1D1F6"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "KMComponentLibrary/KMComponentLibrary/View/Slider/ComponentSlider.swift"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "287"
-            endingLineNumber = "287"
-            landmarkName = "mouseUp(with:)"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
@@ -984,10 +968,42 @@
             filePath = "PDF Master/KMClass/ComponentLibraryDemo/Demo/SliderVC.swift"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "64"
-            endingLineNumber = "64"
-            landmarkName = "mouseDown(with:)"
+            startingLineNumber = "55"
+            endingLineNumber = "55"
+            landmarkName = "reloadData()"
             landmarkType = "7">
+            <Locations>
+               <Location
+                  uuid = "01E14FC3-2AF8-467D-9740-30AF856BCEC1 - 10466fa7eb6e3544"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "PDF_Reader_Pro.SliderVC.mouseDown(with: __C.NSEvent) -&gt; ()"
+                  moduleName = "PDF Reader Pro"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/KMClass/ComponentLibraryDemo/Demo/SliderVC.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "64"
+                  endingLineNumber = "64"
+                  offsetFromSymbolStart = "56">
+               </Location>
+               <Location
+                  uuid = "01E14FC3-2AF8-467D-9740-30AF856BCEC1 - 10466fa7eb6e342b"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "PDF_Reader_Pro.SliderVC.mouseDown(with: __C.NSEvent) -&gt; ()"
+                  moduleName = "PDF Reader Pro"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/KMClass/ComponentLibraryDemo/Demo/SliderVC.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "55"
+                  endingLineNumber = "55"
+                  offsetFromSymbolStart = "56">
+               </Location>
+            </Locations>
          </BreakpointContent>
       </BreakpointProxy>
       <BreakpointProxy
@@ -1836,22 +1852,6 @@
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            uuid = "F980362C-09A5-4CBA-A0C3-0390D50B8805"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "KMComponentLibrary/KMComponentLibrary/View/Slider/ComponentSlider.swift"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "234"
-            endingLineNumber = "234"
-            landmarkName = "mouseDown(with:)"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
@@ -2146,13 +2146,28 @@
             filePath = "PDF Master/KMClass/KMPDFViewController/KMMainViewController.swift"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "221"
-            endingLineNumber = "221"
+            startingLineNumber = "225"
+            endingLineNumber = "225"
             landmarkName = "setDocument"
             landmarkType = "24">
             <Locations>
                <Location
-                  uuid = "E3962D60-30EF-4185-BF07-EA1A34784887 - c44283d1f17e1b9c"
+                  uuid = "E3962D60-30EF-4185-BF07-EA1A34784887 - d80aac5b2f97b27d"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "PDF_Reader_Pro.KMMainViewController.setDocument.getter : Swift.Optional&lt;__C.CPDFDocument&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 = "223"
+                  endingLineNumber = "223"
+                  offsetFromSymbolStart = "28">
+               </Location>
+               <Location
+                  uuid = "E3962D60-30EF-4185-BF07-EA1A34784887 - c44283d1f17e1a62"
                   shouldBeEnabled = "Yes"
                   ignoreCount = "0"
                   continueAfterRunningActions = "No"
@@ -2162,8 +2177,8 @@
                   urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/KMClass/KMPDFViewController/KMMainViewController.swift"
                   startingColumnNumber = "9223372036854775807"
                   endingColumnNumber = "9223372036854775807"
-                  startingLineNumber = "221"
-                  endingLineNumber = "221"
+                  startingLineNumber = "223"
+                  endingLineNumber = "223"
                   offsetFromSymbolStart = "0">
                </Location>
                <Location
@@ -2181,6 +2196,21 @@
                   endingLineNumber = "0"
                   offsetFromSymbolStart = "20">
                </Location>
+               <Location
+                  uuid = "E3962D60-30EF-4185-BF07-EA1A34784887 - c44283d1f17e1a20"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "PDF_Reader_Pro.KMMainViewController.setDocument.modify : Swift.Optional&lt;__C.CPDFDocument&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 = "225"
+                  endingLineNumber = "225"
+                  offsetFromSymbolStart = "0">
+               </Location>
             </Locations>
          </BreakpointContent>
       </BreakpointProxy>
@@ -2338,28 +2368,13 @@
             filePath = "PDF Master/KMClass/KMPDFViewController/KMMainViewController.swift"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "835"
-            endingLineNumber = "835"
+            startingLineNumber = "923"
+            endingLineNumber = "923"
             landmarkName = "removePDFWatermark()"
             landmarkType = "7">
             <Locations>
                <Location
-                  uuid = "14EF9D11-330E-4DB1-A4D2-AA533CF55782 - 6f5bea311ccf51e"
-                  shouldBeEnabled = "Yes"
-                  ignoreCount = "0"
-                  continueAfterRunningActions = "No"
-                  symbolName = "PDF_Reader_Pro.KMMainViewController.batchAddWatermark() -&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 = "836"
-                  endingLineNumber = "836"
-                  offsetFromSymbolStart = "16">
-               </Location>
-               <Location
-                  uuid = "14EF9D11-330E-4DB1-A4D2-AA533CF55782 - ae5dbea256bdda5d"
+                  uuid = "14EF9D11-330E-4DB1-A4D2-AA533CF55782 - ae5dbea256bda162"
                   shouldBeEnabled = "Yes"
                   ignoreCount = "0"
                   continueAfterRunningActions = "No"
@@ -2369,12 +2384,12 @@
                   urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/KMClass/KMPDFViewController/KMMainViewController.swift"
                   startingColumnNumber = "9223372036854775807"
                   endingColumnNumber = "9223372036854775807"
-                  startingLineNumber = "835"
-                  endingLineNumber = "835"
-                  offsetFromSymbolStart = "1740">
+                  startingLineNumber = "922"
+                  endingLineNumber = "922"
+                  offsetFromSymbolStart = "1496">
                </Location>
                <Location
-                  uuid = "14EF9D11-330E-4DB1-A4D2-AA533CF55782 - ae5dbea256bdda5d"
+                  uuid = "14EF9D11-330E-4DB1-A4D2-AA533CF55782 - ae5dbea256bda105"
                   shouldBeEnabled = "Yes"
                   ignoreCount = "0"
                   continueAfterRunningActions = "No"
@@ -2384,8 +2399,8 @@
                   urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/KMClass/KMPDFViewController/KMMainViewController.swift"
                   startingColumnNumber = "9223372036854775807"
                   endingColumnNumber = "9223372036854775807"
-                  startingLineNumber = "835"
-                  endingLineNumber = "835"
+                  startingLineNumber = "923"
+                  endingLineNumber = "923"
                   offsetFromSymbolStart = "1496">
                </Location>
             </Locations>
@@ -2561,13 +2576,13 @@
             filePath = "PDF Master/Class/PDFWindowController/ViewController/KMMainViewController+UI.swift"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "303"
-            endingLineNumber = "303"
+            startingLineNumber = "301"
+            endingLineNumber = "301"
             landmarkName = "changeAnnotationModeAction(item:)"
             landmarkType = "7">
             <Locations>
                <Location
-                  uuid = "8E901A1F-2E46-45A2-8AAA-ABB5D9E11491 - da5f8849423c2d0b"
+                  uuid = "8E901A1F-2E46-45A2-8AAA-ABB5D9E11491 - da5f8849423c2d45"
                   shouldBeEnabled = "Yes"
                   ignoreCount = "0"
                   continueAfterRunningActions = "No"
@@ -2577,12 +2592,12 @@
                   urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/Class/PDFWindowController/ViewController/KMMainViewController+UI.swift"
                   startingColumnNumber = "9223372036854775807"
                   endingColumnNumber = "9223372036854775807"
-                  startingLineNumber = "303"
-                  endingLineNumber = "303"
-                  offsetFromSymbolStart = "9048">
+                  startingLineNumber = "301"
+                  endingLineNumber = "301"
+                  offsetFromSymbolStart = "9792">
                </Location>
                <Location
-                  uuid = "8E901A1F-2E46-45A2-8AAA-ABB5D9E11491 - da5f8849423c2d0b"
+                  uuid = "8E901A1F-2E46-45A2-8AAA-ABB5D9E11491 - da5f8849423c2d45"
                   shouldBeEnabled = "Yes"
                   ignoreCount = "0"
                   continueAfterRunningActions = "No"
@@ -2592,9 +2607,9 @@
                   urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/Class/PDFWindowController/ViewController/KMMainViewController+UI.swift"
                   startingColumnNumber = "9223372036854775807"
                   endingColumnNumber = "9223372036854775807"
-                  startingLineNumber = "303"
-                  endingLineNumber = "303"
-                  offsetFromSymbolStart = "9928">
+                  startingLineNumber = "301"
+                  endingLineNumber = "301"
+                  offsetFromSymbolStart = "9132">
                </Location>
             </Locations>
          </BreakpointContent>
@@ -2758,5 +2773,532 @@
             </Locations>
          </BreakpointContent>
       </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "9747EB20-6548-4349-9F49-A51F152A3948"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/Manager/KMEditPDfHanddler.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "697"
+            endingLineNumber = "697"
+            landmarkName = "fontStyleAction(fontName:)"
+            landmarkType = "7">
+            <Locations>
+               <Location
+                  uuid = "9747EB20-6548-4349-9F49-A51F152A3948 - 620f0da3051df72"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "PDF_Reader_Pro.KMEditPDfHanddler._editAreasOpacitys() -&gt; Swift.Array&lt;CoreGraphics.CGFloat&gt;"
+                  moduleName = "PDF Reader Pro"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/Manager/KMEditPDfHanddler.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "698"
+                  endingLineNumber = "698"
+                  offsetFromSymbolStart = "76">
+               </Location>
+               <Location
+                  uuid = "9747EB20-6548-4349-9F49-A51F152A3948 - 1dc108dd3fe47af0"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "PDF_Reader_Pro.KMEditPDfHanddler.fontStyleAction(fontName: Swift.Optional&lt;Swift.String&gt;) -&gt; ()"
+                  moduleName = "PDF Reader Pro"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/Manager/KMEditPDfHanddler.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "697"
+                  endingLineNumber = "697"
+                  offsetFromSymbolStart = "104">
+               </Location>
+            </Locations>
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "86F561DC-543F-4374-86F1-2B340E19C220"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/Manager/KMEditPDfHanddler.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "686"
+            endingLineNumber = "686"
+            landmarkName = "fontColorAction(color:)"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "065BE60D-F083-4EED-A226-E1582D4A0973"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/Manager/KMEditPDfHanddler.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "733"
+            endingLineNumber = "733"
+            landmarkName = "fontBoldAction()"
+            landmarkType = "7">
+            <Locations>
+               <Location
+                  uuid = "065BE60D-F083-4EED-A226-E1582D4A0973 - c7acb89ecb6c0c9c"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "PDF_Reader_Pro.KMEditPDfHanddler.fontAddAction() -&gt; ()"
+                  moduleName = "PDF Reader Pro"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/Manager/KMEditPDfHanddler.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "734"
+                  endingLineNumber = "734"
+                  offsetFromSymbolStart = "88">
+               </Location>
+               <Location
+                  uuid = "065BE60D-F083-4EED-A226-E1582D4A0973 - a42f8f2f051b7c22"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "PDF_Reader_Pro.KMEditPDfHanddler.fontBoldAction() -&gt; ()"
+                  moduleName = "PDF Reader Pro"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/Manager/KMEditPDfHanddler.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "733"
+                  endingLineNumber = "733"
+                  offsetFromSymbolStart = "144">
+               </Location>
+            </Locations>
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "D61BEEC2-5105-49D7-94AE-19C41A90F069"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/Manager/KMEditPDfHanddler.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "752"
+            endingLineNumber = "752"
+            landmarkName = "fontItalicAction()"
+            landmarkType = "7">
+            <Locations>
+               <Location
+                  uuid = "D61BEEC2-5105-49D7-94AE-19C41A90F069 - 45672c937b7f66bc"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "PDF_Reader_Pro.KMEditPDfHanddler.fontReduceAction() -&gt; ()"
+                  moduleName = "PDF Reader Pro"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/Manager/KMEditPDfHanddler.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "752"
+                  endingLineNumber = "752"
+                  offsetFromSymbolStart = "696">
+               </Location>
+               <Location
+                  uuid = "D61BEEC2-5105-49D7-94AE-19C41A90F069 - c55cef9c5f6288ba"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "PDF_Reader_Pro.KMEditPDfHanddler.fontItalicAction() -&gt; ()"
+                  moduleName = "PDF Reader Pro"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/Manager/KMEditPDfHanddler.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "752"
+                  endingLineNumber = "752"
+                  offsetFromSymbolStart = "144">
+               </Location>
+            </Locations>
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "D69F6364-3AF1-43FF-A44B-A7E27841FEA0"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/Manager/KMEditPDfHanddler.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "770"
+            endingLineNumber = "770"
+            landmarkName = "textAlignmentAction(align:)"
+            landmarkType = "7">
+            <Locations>
+               <Location
+                  uuid = "D69F6364-3AF1-43FF-A44B-A7E27841FEA0 - a42f8f2f051b7167"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "PDF_Reader_Pro.KMEditPDfHanddler.fontBoldAction() -&gt; ()"
+                  moduleName = "PDF Reader Pro"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/Manager/KMEditPDfHanddler.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "770"
+                  endingLineNumber = "770"
+                  offsetFromSymbolStart = "1312">
+               </Location>
+               <Location
+                  uuid = "D69F6364-3AF1-43FF-A44B-A7E27841FEA0 - a42f8f2f051b7167"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "PDF_Reader_Pro.KMEditPDfHanddler.fontBoldAction() -&gt; ()"
+                  moduleName = "PDF Reader Pro"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/Manager/KMEditPDfHanddler.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "770"
+                  endingLineNumber = "770"
+                  offsetFromSymbolStart = "1404">
+               </Location>
+               <Location
+                  uuid = "D69F6364-3AF1-43FF-A44B-A7E27841FEA0 - 1a21d580b3fb9f3b"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "PDF_Reader_Pro.KMEditPDfHanddler.textAlignmentAction(align: __C.NSTextAlignment) -&gt; ()"
+                  moduleName = "PDF Reader Pro"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/Manager/KMEditPDfHanddler.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "770"
+                  endingLineNumber = "770"
+                  offsetFromSymbolStart = "108">
+               </Location>
+            </Locations>
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "E378A308-C290-4212-B943-EEEBCA0494B1"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/Manager/KMEditPDfHanddler.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "1284"
+            endingLineNumber = "1284"
+            landmarkName = "pdfViewEditingCropBoundsDidChanged(_:editing:)"
+            landmarkType = "7">
+            <Locations>
+               <Location
+                  uuid = "E378A308-C290-4212-B943-EEEBCA0494B1 - bd8f0416d669bc17"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "PDF_Reader_Pro.KMEditPDfHanddler.pdfViewEditingAreaDidChanged(Swift.Optional&lt;__C.CPDFView&gt;) -&gt; ()"
+                  moduleName = "PDF Reader Pro"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/Manager/KMEditPDfHanddler.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "1284"
+                  endingLineNumber = "1284"
+                  offsetFromSymbolStart = "6052">
+               </Location>
+               <Location
+                  uuid = "E378A308-C290-4212-B943-EEEBCA0494B1 - d857f4a8b9c464db"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "PDF_Reader_Pro.KMEditPDfHanddler.pdfViewEditingCropBoundsDidChanged(_: Swift.Optional&lt;__C.CPDFView&gt;, editing: Swift.Optional&lt;__C.CPDFEditArea&gt;) -&gt; ()"
+                  moduleName = "PDF Reader Pro"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/Manager/KMEditPDfHanddler.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "1284"
+                  endingLineNumber = "1284"
+                  offsetFromSymbolStart = "80">
+               </Location>
+            </Locations>
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "80647B90-A0DE-42AE-91B7-367037BDCED6"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/Manager/KMEditPDfHanddler.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "1290"
+            endingLineNumber = "1290"
+            landmarkName = "pdfViewEditingAddImageArea(_:add:add:)"
+            landmarkType = "7">
+            <Locations>
+               <Location
+                  uuid = "80647B90-A0DE-42AE-91B7-367037BDCED6 - bd8f0416d669bf51"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "PDF_Reader_Pro.KMEditPDfHanddler.pdfViewEditingAreaDidChanged(Swift.Optional&lt;__C.CPDFView&gt;) -&gt; ()"
+                  moduleName = "PDF Reader Pro"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/Manager/KMEditPDfHanddler.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "1290"
+                  endingLineNumber = "1290"
+                  offsetFromSymbolStart = "6436">
+               </Location>
+               <Location
+                  uuid = "80647B90-A0DE-42AE-91B7-367037BDCED6 - 9d05d6f48d680a0e"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "PDF_Reader_Pro.KMEditPDfHanddler.pdfViewEditingAddImageArea(_: Swift.Optional&lt;__C.CPDFView&gt;, add: Swift.Optional&lt;__C.CPDFPage&gt;, add: __C.CGRect) -&gt; ()"
+                  moduleName = "PDF Reader Pro"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/Manager/KMEditPDfHanddler.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "1290"
+                  endingLineNumber = "1290"
+                  offsetFromSymbolStart = "204">
+               </Location>
+            </Locations>
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "4BB8D06C-7F05-4DE7-BB46-68B3C14F4050"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/Manager/KMEditPDfHanddler.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "1391"
+            endingLineNumber = "1391"
+            landmarkName = "pdfViewEditingAddTextArea(_:add:add:)"
+            landmarkType = "7">
+            <Locations>
+               <Location
+                  uuid = "4BB8D06C-7F05-4DE7-BB46-68B3C14F4050 - 4e5cf8a90023d845"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "closure #1 (__C.NSModalResponse) -&gt; () in PDF_Reader_Pro.KMEditPDfHanddler.pdfViewEditingAddImageArea(_: Swift.Optional&lt;__C.CPDFView&gt;, add: Swift.Optional&lt;__C.CPDFPage&gt;, add: __C.CGRect) -&gt; ()"
+                  moduleName = "PDF Reader Pro"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/Manager/KMEditPDfHanddler.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "1392"
+                  endingLineNumber = "1392"
+                  offsetFromSymbolStart = "4460">
+               </Location>
+               <Location
+                  uuid = "4BB8D06C-7F05-4DE7-BB46-68B3C14F4050 - 573968b405d89f14"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "PDF_Reader_Pro.KMEditPDfHanddler.pdfViewEditingAddTextArea(_: Swift.Optional&lt;__C.CPDFView&gt;, add: Swift.Optional&lt;__C.CPDFPage&gt;, add: __C.CGRect) -&gt; ()"
+                  moduleName = "PDF Reader Pro"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/Manager/KMEditPDfHanddler.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "1391"
+                  endingLineNumber = "1391"
+                  offsetFromSymbolStart = "268">
+               </Location>
+            </Locations>
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "E3A209A5-D1EA-44E7-AEB7-0145B2D71654"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/Manager/KMEditPDfHanddler.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "1449"
+            endingLineNumber = "1449"
+            landmarkName = "pdfViewEditingOperationDidChanged(_:)"
+            landmarkType = "7">
+            <Locations>
+               <Location
+                  uuid = "E3A209A5-D1EA-44E7-AEB7-0145B2D71654 - 573968b405d8868e"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "PDF_Reader_Pro.KMEditPDfHanddler.pdfViewEditingAddTextArea(_: Swift.Optional&lt;__C.CPDFView&gt;, add: Swift.Optional&lt;__C.CPDFPage&gt;, add: __C.CGRect) -&gt; ()"
+                  moduleName = "PDF Reader Pro"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/Manager/KMEditPDfHanddler.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "1449"
+                  endingLineNumber = "1449"
+                  offsetFromSymbolStart = "2544">
+               </Location>
+               <Location
+                  uuid = "E3A209A5-D1EA-44E7-AEB7-0145B2D71654 - 7f88fb4643a917f5"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "PDF_Reader_Pro.KMEditPDfHanddler.pdfViewEditingOperationDidChanged(Swift.Optional&lt;__C.CPDFView&gt;) -&gt; ()"
+                  moduleName = "PDF Reader Pro"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/Manager/KMEditPDfHanddler.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "1449"
+                  endingLineNumber = "1449"
+                  offsetFromSymbolStart = "88">
+               </Location>
+            </Locations>
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "8516B689-DE97-4681-8B1F-48328CDD5975"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/KMClass/KMPDFViewController/KMMainViewController.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "1990"
+            endingLineNumber = "1990"
+            landmarkName = "pdfViewEditingCropBoundsDidChanged(_:editing:)"
+            landmarkType = "7">
+            <Locations>
+               <Location
+                  uuid = "8516B689-DE97-4681-8B1F-48328CDD5975 - 4f3bbbeae86e63dc"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "PDF_Reader_Pro.KMMainViewController.pdfViewEditingCropBoundsDidChanged(_: Swift.Optional&lt;__C.CPDFView&gt;, editing: Swift.Optional&lt;__C.CPDFEditArea&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 = "1989"
+                  endingLineNumber = "1989"
+                  offsetFromSymbolStart = "64">
+               </Location>
+               <Location
+                  uuid = "8516B689-DE97-4681-8B1F-48328CDD5975 - 4f3bbbeae86e63fd"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "PDF_Reader_Pro.KMMainViewController.pdfViewEditingCropBoundsDidChanged(_: Swift.Optional&lt;__C.CPDFView&gt;, editing: Swift.Optional&lt;__C.CPDFEditArea&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 = "1990"
+                  endingLineNumber = "1990"
+                  offsetFromSymbolStart = "64">
+               </Location>
+            </Locations>
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "BD533CE4-36D9-445C-9ABF-895A3F401155"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/Manager/KMEditPDfHanddler.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "1442"
+            endingLineNumber = "1442"
+            landmarkName = "pdfViewEditingSelectionDidChanged(_:)"
+            landmarkType = "7">
+            <Locations>
+               <Location
+                  uuid = "BD533CE4-36D9-445C-9ABF-895A3F401155 - 573968b405d885a7"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "PDF_Reader_Pro.KMEditPDfHanddler.pdfViewEditingAddTextArea(_: Swift.Optional&lt;__C.CPDFView&gt;, add: Swift.Optional&lt;__C.CPDFPage&gt;, add: __C.CGRect) -&gt; ()"
+                  moduleName = "PDF Reader Pro"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/Manager/KMEditPDfHanddler.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "1442"
+                  endingLineNumber = "1442"
+                  offsetFromSymbolStart = "2144">
+               </Location>
+               <Location
+                  uuid = "BD533CE4-36D9-445C-9ABF-895A3F401155 - e33b1107b2fdbb07"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "PDF_Reader_Pro.KMEditPDfHanddler.pdfViewEditingSelectionDidChanged(Swift.Optional&lt;__C.CPDFView&gt;) -&gt; ()"
+                  moduleName = "PDF Reader Pro"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/Manager/KMEditPDfHanddler.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "1442"
+                  endingLineNumber = "1442"
+                  offsetFromSymbolStart = "68">
+               </Location>
+            </Locations>
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "A7BE78A6-E828-4C4B-B7C6-B65EE0532C31"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/KMClass/KMPDFViewController/KMMainViewController.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "1981"
+            endingLineNumber = "1981"
+            landmarkName = "pdfViewEditingSelectionDidChanged(_:)"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
    </Breakpoints>
 </Bucket>