浏览代码

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

tangchao 3 月之前
父节点
当前提交
28ec1c6497
共有 47 个文件被更改,包括 535 次插入1530 次删除
  1. 34 0
      PDF Office/PDF Master/Class/Common/KMEnumExtensions.swift
  2. 1 57
      PDF Office/PDF Master/Class/Common/Tools/KMTools.swift
  3. 1 1
      PDF Office/PDF Master/Class/PDFTools/Measure/Side/KMMeasureSideVC.xib
  4. 3 3
      PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/CipherTextView/CipherTextView.xib
  5. 0 47
      PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/KMLinkAnnotationPropertyEmptyController.swift
  6. 0 33
      PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/KMRightSideEmptyVC.swift
  7. 0 86
      PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/KMRightSideEmptyVC.xib
  8. 0 385
      PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/KMRightSideViewController.swift
  9. 0 38
      PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/KMRightSideViewController.xib
  10. 22 115
      PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController+Action.swift
  11. 4 11
      PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController+UI.swift
  12. 4 9
      PDF Office/PDF Master/KMClass/KMPDFViewController/EditTool/KMLinkViewController/KMLinkViewController.swift
  13. 7 38
      PDF Office/PDF Master/KMClass/KMPDFViewController/EditTool/KMLinkViewController/KMLinkViewController.xib
  14. 13 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/EditTool/Watermark/Tools/KMWatermarkAdjectiveTools.swift
  15. 83 40
      PDF Office/PDF Master/KMClass/KMPDFViewController/KMMainViewController.swift
  16. 1 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/KMMainViewController.xib
  17. 157 3
      PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/KMRightSideController.swift
  18. 10 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/KMRightSideController.xib
  19. 5 18
      PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/EditPDF/Category/KMImageOptimization.swift
  20. 0 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/Controller/KMAlignmentController.swift
  21. 0 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/Controller/KMAlignmentController.xib
  22. 0 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/Controller/KMEditPDFPopToolBarController.swift
  23. 0 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/Controller/KMEditPDFPopToolBarController.xib
  24. 0 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/Controller/KMTextAlignmentController.swift
  25. 0 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/Controller/KMTextAlignmentController.xib
  26. 6 62
      PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/EditPDF/KMEditImagePropertyViewController.swift
  27. 41 41
      PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/KMEditImagePropertyViewController.xib
  28. 38 176
      PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/EditPDF/KMEditPDFTextPropertyViewController.swift
  29. 0 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/KMEditPDFTextPropertyViewController.xib
  30. 1 7
      PDF Office/PDF Master/Class/PDFTools/EditPDF/Model/KMEditPDFModel.swift
  31. 17 22
      PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/EditPDF/Manager/KMEditPDFTextManager.swift
  32. 48 248
      PDF Office/PDF Master/Class/PDFTools/EditPDF/Tools/KMEditPDfHanddler.swift
  33. 0 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/Source/KMEditPDFAssets.xcassets/Contents.json
  34. 0 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/Source/KMEditPDFAssets.xcassets/No_addimage.imageset/Contents.json
  35. 0 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/Source/KMEditPDFAssets.xcassets/No_addimage.imageset/addimage.pdf
  36. 0 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/Toolbar/KMEditPDFToolbarItemView.swift
  37. 0 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/Toolbar/KMEditPDFToolbarView.swift
  38. 0 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/View/AlignmentView/KMEditPropertyAlignmentView.swift
  39. 0 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/View/AlignmentView/KMEditPropertyAlignmentView.xib
  40. 0 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/View/KMEditPDFColorView.swift
  41. 0 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/View/KMEditPDFPopGuideView.swift
  42. 0 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/View/KMGuideTargetView.swift
  43. 0 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/Window/KMEditPDFCropComfirmWindowController.swift
  44. 0 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/Window/KMEditPDFCropComfirmWindowController.xib
  45. 0 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/Window/KMEditPDFPopToolBarWindow.swift
  46. 30 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/Toolbar/KMPDFToolbarController.swift
  47. 9 90
      PDF Office/PDF Reader Pro.xcodeproj/project.pbxproj

+ 34 - 0
PDF Office/PDF Master/Class/Common/KMEnumExtensions.swift

@@ -7,6 +7,40 @@
 
 import Foundation
 
+@objc enum KMSubscribeWaterMarkType: Int {
+    case none       = 0
+    case stamp      = 1
+    case link
+    case sign
+    case editText
+    case editImage
+    case insert
+    case extract
+    case replace
+    case split
+    case delete
+    case rotate
+    case copy
+    case toWord
+    case toExcel
+    case toPPT
+    case toRTF
+    case toCSV
+    case toHTML
+    case toText
+    case toImage
+    case compress
+    case merge
+    case setPassword
+    case removePassword
+    case crop
+    case aiTranslate
+    case aiRewrite
+    case aiCorrect
+    case save
+     
+}
+
 protocol KMSubscribeWaterMarkTypeConvertProtocol {
     func toSubscribeWaterMarkType() -> KMSubscribeWaterMarkType
 }

+ 1 - 57
PDF Office/PDF Master/Class/Common/Tools/KMTools.swift

@@ -669,63 +669,7 @@ extension KMTools {
     }
     
     @objc class func trackEvent(type: KMSubscribeWaterMarkType) -> Void {
-        if (type == .stamp) {
-            KMAnalytics.trackEvent(eventName: "PDFReaderPro_Subscribe_Stamp", parameters: nil, appTarget: .all)
-        } else if (type == .link) {
-            KMAnalytics.trackEvent(eventName: "PDFReaderPro_Subscribe_Link", parameters: nil, appTarget: .all)
-        } else if (type == .sign) {
-            KMAnalytics.trackEvent(eventName: "PDFReaderPro_Subscribe_Sign", parameters: nil, appTarget: .all)
-        } else if (type == .editText) {
-            KMAnalytics.trackEvent(eventName: "PDFReaderPro_Subscribe_EditText", parameters: nil, appTarget: .all)
-        } else if (type == .editImage) {
-            KMAnalytics.trackEvent(eventName: "PDFReaderPro_Subscribe_EditImage", parameters: nil, appTarget: .all)
-        } else if (type == .insert) {
-            KMAnalytics.trackEvent(eventName: "PDFReaderPro_Subscribe_Insert", parameters: nil, appTarget: .all)
-        } else if (type == .extract) {
-            KMAnalytics.trackEvent(eventName: "PDFReaderPro_Subscribe_Extract", parameters: nil, appTarget: .all)
-        } else if (type == .replace) {
-            KMAnalytics.trackEvent(eventName: "PDFReaderPro_Subscribe_Replace", parameters: nil, appTarget: .all)
-        } else if (type == .split) {
-            KMAnalytics.trackEvent(eventName: "PDFReaderPro_Subscribe_Split", parameters: nil, appTarget: .all)
-        } else if (type == .delete) {
-            KMAnalytics.trackEvent(eventName: "PDFReaderPro_Subscribe_Delete", parameters: nil, appTarget: .all)
-        } else if (type == .rotate) {
-            KMAnalytics.trackEvent(eventName: "PDFReaderPro_Subscribe_Rotate", parameters: nil, appTarget: .all)
-        } else if (type == .copy) {
-            KMAnalytics.trackEvent(eventName: "PDFReaderPro_Subscribe_Copy", parameters: nil, appTarget: .all)
-        } else if (type == .toWord) {
-            KMAnalytics.trackEvent(eventName: "PDFReaderPro_Subscribe_ToWord", parameters: nil, appTarget: .all)
-        } else if (type == .toExcel) {
-            KMAnalytics.trackEvent(eventName: "PDFReaderPro_Subscribe_ToExcel", parameters: nil, appTarget: .all)
-        } else if (type == .toPPT) {
-            KMAnalytics.trackEvent(eventName: "PDFReaderPro_Subscribe_ToPPT", parameters: nil, appTarget: .all)
-        } else if (type == .toRTF) {
-            KMAnalytics.trackEvent(eventName: "PDFReaderPro_Subscribe_ToRTF", parameters: nil, appTarget: .all)
-        } else if (type == .toCSV) {
-            KMAnalytics.trackEvent(eventName: "PDFReaderPro_Subscribe_ToCSV", parameters: nil, appTarget: .all)
-        } else if (type == .toHTML) {
-            KMAnalytics.trackEvent(eventName: "PDFReaderPro_Subscribe_ToHTML", parameters: nil, appTarget: .all)
-        } else if (type == .toText) {
-            KMAnalytics.trackEvent(eventName: "PDFReaderPro_Subscribe_ToText", parameters: nil, appTarget: .all)
-        } else if (type == .toImage) {
-            KMAnalytics.trackEvent(eventName: "PDFReaderPro_Subscribe_ToImage", parameters: nil, appTarget: .all)
-        } else if (type == .compress) {
-            KMAnalytics.trackEvent(eventName: "PDFReaderPro_Subscribe_Compress", parameters: nil, appTarget: .all)
-        } else if (type == .merge) {
-            KMAnalytics.trackEvent(eventName: "PDFReaderPro_Subscribe_Merge", parameters: nil, appTarget: .all)
-        } else if (type == .setPassword) {
-            KMAnalytics.trackEvent(eventName: "PDFReaderPro_Subscribe_SetPassword", parameters: nil, appTarget: .all)
-        } else if (type == .removePassword) {
-            KMAnalytics.trackEvent(eventName: "PDFReaderPro_Subscribe_RemovePassword", parameters: nil, appTarget: .all)
-        } else if (type == .crop) {
-            KMAnalytics.trackEvent(eventName: "PDFReaderPro_Subscribe_Crop", parameters: nil, appTarget: .all)
-        } else if (type == .aiTranslate) {
-            KMAnalytics.trackEvent(eventName: "PDFReaderPro_Subscribe_AITranslate", parameters: nil, appTarget: .all)
-        } else if (type == .aiRewrite) {
-            KMAnalytics.trackEvent(eventName: "PDFReaderPro_Subscribe_AIRewrite", parameters: nil, appTarget: .all)
-        } else if (type == .aiCorrect) {
-            KMAnalytics.trackEvent(eventName: "PDFReaderPro_Subscribe_AICorrect", parameters: nil, appTarget: .all)
-        }
+         
     }
     
     private static var dateFormatter_: DateFormatter?

+ 1 - 1
PDF Office/PDF Master/Class/PDFTools/Measure/Side/KMMeasureSideVC.xib

@@ -826,7 +826,7 @@
                 <rect key="frame" x="-100" y="-100" width="303" height="15"/>
                 <autoresizingMask key="autoresizingMask"/>
             </scroller>
-            <scroller key="verticalScroller" wantsLayer="YES" verticalHuggingPriority="750" doubleValue="0.94047619047619047" horizontal="NO" id="GYX-OK-zPd">
+            <scroller key="verticalScroller" wantsLayer="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="NO" id="GYX-OK-zPd">
                 <rect key="frame" x="466" y="0.0" width="15" height="661"/>
                 <autoresizingMask key="autoresizingMask"/>
             </scroller>

+ 3 - 3
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/CipherTextView/CipherTextView.xib

@@ -1,15 +1,15 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21225" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22505" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
     <dependencies>
         <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21225"/>
+        <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"/>
         <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
         <customObject id="-3" userLabel="Application" customClass="NSObject"/>
-        <customView id="c22-O7-iKe" customClass="CipherTextView" customModule="PDF_Office" customModuleProvider="target">
+        <customView id="c22-O7-iKe" customClass="CipherTextView" customModule="PDF_Reader_Pro" customModuleProvider="target">
             <rect key="frame" x="0.0" y="0.0" width="300" height="400"/>
             <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
             <subviews>

+ 0 - 47
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/KMLinkAnnotationPropertyEmptyController.swift

@@ -1,47 +0,0 @@
-//
-//  KMLinkAnnotationPropertyEmptyController.swift
-//  PDF Reader Pro
-//
-//  Created by tangchao on 2023/4/23.
-//
-
-import Cocoa
-// Link 注释 [属性面板] [空状态]
-class KMLinkAnnotationPropertyEmptyController: KMRightSideEmptyVC {
-    
-    private lazy var titleLabel: NSTextField = {
-        let label = NSTextField(labelWithString: "")
-        return label
-    }()
-    
-    convenience init() {
-        self.init(nibName: "KMRightSideEmptyVC", bundle: nil)
-    }
-
-    override func viewDidLoad() {
-        super.viewDidLoad()
-        // Do view setup here.
-    }
-    
-    override func updateUI() {
-        super.updateUI()
-        
-        self.view.addSubview(self.titleLabel)
-        
-        let titleLabelX: CGFloat = 8
-        let titleLabelH: CGFloat = 20
-        let titleLabelY: CGFloat = 12
-        self.titleLabel.frame = NSMakeRect(titleLabelX, NSHeight(self.view.bounds)-titleLabelH-titleLabelY, NSWidth(self.view.bounds)-titleLabelX, titleLabelH)
-        self.titleLabel.autoresizingMask = [.width, .minYMargin]
-        self.titleLabel.stringValue = NSLocalizedString("Link", comment: "") 
-        
-        self.emptyImageView.image = NSImage(named: "KMImageNameEmptyLink")
-    }
-    
-    override func initLocalization() {
-        super.initLocalization()
-        
-        self.emptyLabel.stringValue = NSLocalizedString("Select an area or text on a page for a link to be inserted.", comment: "")
-    }
-    
-}

+ 0 - 33
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/KMRightSideEmptyVC.swift

@@ -1,33 +0,0 @@
-//
-//  KMRightSideEmptyVC.swift
-//  PDF Reader Pro
-//
-//  Created by wanjun on 2023/3/24.
-//
-
-import Cocoa
-
-class KMRightSideEmptyVC: NSViewController {
-    
-    @IBOutlet weak var emptyImageView: NSImageView!
-    @IBOutlet weak var emptyLabel: NSTextField!
-
-    override func viewDidLoad() {
-        super.viewDidLoad()
-        // Do view setup here.
-        
-        updateUI()
-        initLocalization()
-    }
-    
-    // MARK: Private Methods
-    
-    func updateUI() -> Void {
-        emptyLabel.font = NSFont.SFProTextRegularFont(12)
-        emptyLabel.textColor = NSColor.km_init(hex: "#94989C")
-    }
-    
-    func initLocalization() {
-        emptyLabel.stringValue = NSLocalizedString("Show/Hide Annotation Properties Panel", comment: "")
-    }
-}

+ 0 - 86
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/KMRightSideEmptyVC.xib

@@ -1,86 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21507" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
-    <dependencies>
-        <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21507"/>
-        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
-    </dependencies>
-    <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="KMRightSideEmptyVC" customModule="PDF_Reader_Pro" customModuleProvider="target">
-            <connections>
-                <outlet property="emptyImageView" destination="9PW-14-bKa" id="O4X-3K-alP"/>
-                <outlet property="emptyLabel" destination="cwY-ba-Aw0" id="DWG-LH-t2p"/>
-                <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="291" height="630"/>
-            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
-            <subviews>
-                <customView translatesAutoresizingMaskIntoConstraints="NO" id="OBa-iW-efm">
-                    <rect key="frame" x="62" y="227" width="168" height="176"/>
-                    <subviews>
-                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="6q6-Ub-zoO">
-                            <rect key="frame" x="0.0" y="0.0" width="168" height="40"/>
-                            <subviews>
-                                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="cwY-ba-Aw0">
-                                    <rect key="frame" x="-2" y="0.0" width="172" height="32"/>
-                                    <textFieldCell key="cell" alignment="center" title="Label" id="o6y-4P-ieZ">
-                                        <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="bottom" secondItem="cwY-ba-Aw0" secondAttribute="bottom" id="QO8-uE-dlz"/>
-                                <constraint firstItem="cwY-ba-Aw0" firstAttribute="top" secondItem="6q6-Ub-zoO" secondAttribute="top" constant="8" id="XP2-Ig-yjp"/>
-                                <constraint firstAttribute="height" constant="40" id="bM2-Z9-xZo"/>
-                                <constraint firstAttribute="trailing" secondItem="cwY-ba-Aw0" secondAttribute="trailing" id="pHj-Ud-yd0"/>
-                                <constraint firstItem="cwY-ba-Aw0" firstAttribute="leading" secondItem="6q6-Ub-zoO" secondAttribute="leading" id="yeh-md-abj"/>
-                            </constraints>
-                        </customView>
-                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="ZxT-vU-j7X">
-                            <rect key="frame" x="0.0" y="40" width="168" height="136"/>
-                            <subviews>
-                                <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="9PW-14-bKa">
-                                    <rect key="frame" x="20" y="4" width="128" height="128"/>
-                                    <constraints>
-                                        <constraint firstAttribute="width" constant="128" id="6bs-H0-K2b"/>
-                                        <constraint firstAttribute="height" constant="128" id="f0J-uF-Caz"/>
-                                    </constraints>
-                                    <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="KMImageNameEmptyProperty" id="dKj-bI-Pbr"/>
-                                </imageView>
-                            </subviews>
-                            <constraints>
-                                <constraint firstItem="9PW-14-bKa" firstAttribute="centerX" secondItem="ZxT-vU-j7X" secondAttribute="centerX" id="7S2-zB-CLH"/>
-                                <constraint firstItem="9PW-14-bKa" firstAttribute="centerY" secondItem="ZxT-vU-j7X" secondAttribute="centerY" id="NVX-Or-kGk"/>
-                            </constraints>
-                        </customView>
-                    </subviews>
-                    <constraints>
-                        <constraint firstAttribute="width" constant="168" id="Kpz-Qo-Ggi"/>
-                        <constraint firstItem="ZxT-vU-j7X" firstAttribute="top" secondItem="OBa-iW-efm" secondAttribute="top" id="Qku-pk-gjZ"/>
-                        <constraint firstAttribute="height" constant="176" id="UEA-mZ-mkm"/>
-                        <constraint firstAttribute="bottom" secondItem="6q6-Ub-zoO" secondAttribute="bottom" id="Wh3-lx-uNl"/>
-                        <constraint firstAttribute="trailing" secondItem="ZxT-vU-j7X" secondAttribute="trailing" id="XVj-26-Cep"/>
-                        <constraint firstItem="6q6-Ub-zoO" firstAttribute="top" secondItem="ZxT-vU-j7X" secondAttribute="bottom" id="b9J-qa-Flw"/>
-                        <constraint firstAttribute="trailing" secondItem="6q6-Ub-zoO" secondAttribute="trailing" id="scN-21-1qY"/>
-                        <constraint firstItem="ZxT-vU-j7X" firstAttribute="leading" secondItem="OBa-iW-efm" secondAttribute="leading" id="uVO-YQ-UJK"/>
-                        <constraint firstItem="6q6-Ub-zoO" firstAttribute="leading" secondItem="OBa-iW-efm" secondAttribute="leading" id="uxV-f1-81G"/>
-                    </constraints>
-                </customView>
-            </subviews>
-            <constraints>
-                <constraint firstItem="OBa-iW-efm" firstAttribute="centerX" secondItem="Hz6-mo-xeY" secondAttribute="centerX" id="0rD-46-phT"/>
-                <constraint firstItem="OBa-iW-efm" firstAttribute="centerY" secondItem="Hz6-mo-xeY" secondAttribute="centerY" id="Lqj-7A-Igd"/>
-            </constraints>
-            <point key="canvasLocation" x="-8.5" y="333"/>
-        </customView>
-    </objects>
-    <resources>
-        <image name="KMImageNameEmptyProperty" width="140" height="140"/>
-    </resources>
-</document>

+ 0 - 385
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/KMRightSideViewController.swift

@@ -1,385 +0,0 @@
-//
-//  KMRightSideViewController.swift
-//  PDF Reader Pro
-//
-//  Created by Niehaoyu on 2022/10/26.
-//
-
-import Cocoa
-
-enum RightSubViewType : Int {
-    case None
-    case CipherTextType
-    case EditPDFAddText
-    case EditPDFAddImage
-    case AnnotationProperts
-    case Bates
-    case Headerfooter
-    case Background
-    case Watermark
-    case ViewSettings
-}
-
-typealias KMRightSidePropertyDidChange = (_ model: AnyObject?) -> ()
-class KMRightSideViewController: NSViewController,CipherTextViewDelegate {
-
-    var cipherTextView : CipherTextView!
-    var eidtPDFTextProperty : KMEditPDFTextPropertyViewController!
-    var eidtPDFImageProperty : KMEditImagePropertyViewController!
-    var annotationProperties : KMAnnotationPropertiesViewController!
-    var listView : CPDFListView!
-    var _subViewType : RightSubViewType?
-    @IBOutlet weak var contextBox: NSBox!
-    var emptyVC : KMRightSideEmptyVC!
-    var emptyVC_link: KMLinkAnnotationPropertyEmptyController?
-    var _isHidden: Bool = false
-    
-    var propertyDidChange: KMRightSidePropertyDidChange!
-    var model: AnyObject?
-    
-    weak var delegate: KMEditImagePropertyViewControllerDelegate?
-    weak var mainController: KMMainViewController?
-    
-    override func viewDidLoad() {
-        super.viewDidLoad()
-        // Do view setup here.
-        
-//        self.view.wantsLayer = true
-//        self.view.layer?.backgroundColor = NSColor.red.cgColor
-        emptyVC = KMRightSideEmptyVC.init(nibName: "KMRightSideEmptyVC", bundle: nil)
-        contextBox.contentView = emptyVC.view
-        self.emptyVC_link = KMLinkAnnotationPropertyEmptyController()
-        
-        NotificationCenter.default.addObserver(self, selector: #selector(PDFViewActiveAnnotationDidChangeNotification(_:)), name: NSNotification.Name("KMPDFViewActiveAnnotationDidChangeNotification"), object: nil)
-        NotificationCenter.default.addObserver(self, selector: #selector(signatureSelectedNotification(_:)), name: NSNotification.Name("KMSignatureListSelectNotification"), object: nil)
-    }
-    
-    public func reloadDataWithPDFView(pdfView:CPDFListView,isShow:Bool) {
-        if self.annotationProperties == nil {
-            self.subViewType = .AnnotationProperts
-        }
-        if(!isShow) {
-            self.isHidden = true
-            return
-        }
-        self.annotationProperties.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
-            }
-        }
-        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
-        }
-    }
-    
-    //MARK: Setter && Get
-    var subViewType : RightSubViewType? {
-        set {
-            _subViewType = newValue
-            if _subViewType == RightSubViewType.CipherTextType {
-                self.initCipherTextView()
-            } else if _subViewType == RightSubViewType.EditPDFAddText{
-                self.initEditPDFTextPropertyViewController()
-            } else if _subViewType == RightSubViewType.EditPDFAddImage{
-                self.initEditPDFImagePropertyViewController()
-            } else if _subViewType == RightSubViewType.AnnotationProperts {
-                self.initAnnotationProperts()
-            } else if _subViewType == .Bates {
-                self.initBatesViewController()
-            } else if subViewType == .Headerfooter {
-                self.initHeaderFooterViewController()
-            } else if subViewType == .Background {
-                self.initBackgroundViewController()
-            } else if subViewType == .Watermark {
-                self.initWatermarkViewController()
-            } else if subViewType == .ViewSettings {
-                self.initViewSettingsViewController()
-            }
-        }
-        get {
-            return _subViewType
-        }
-    }
-    
-    var isHidden: Bool {
-        get {
-            return _isHidden
-        }
-        set {
-            _isHidden = newValue
-            if _isHidden {
-                if (self.listView.annotationType == .link) {
-                    self.contextBox.contentView = self.emptyVC_link?.view
-                } else {
-                    self.contextBox.contentView = emptyVC.view
-                }
-            }
-        }
-    }
-    
-    //MARK: InitSubViews
-    func removeSubViews() {
-        
-    }
-    
-    private func initEditPDFTextPropertyViewController() {
-        _ = KMEditPDFTextManager.manager.updateTextFontNames(listView: self.listView)
-        self.eidtPDFTextProperty = KMEditPDFTextPropertyViewController()
-        self.eidtPDFTextProperty.listView = self.listView
-        self.eidtPDFTextProperty.view.frame = self.view.bounds
-        self.eidtPDFTextProperty.view.autoresizingMask = [.height]
-        self.contextBox.contentView =  self.eidtPDFTextProperty.view
-    }
-    
-    private func initEditPDFImagePropertyViewController() {
-        self.eidtPDFImageProperty = KMEditImagePropertyViewController()
-        self.eidtPDFImageProperty.listView = self.listView
-        self.eidtPDFImageProperty.delegate = self
-        self.eidtPDFImageProperty.view.frame = self.view.bounds
-        self.eidtPDFImageProperty.view.autoresizingMask = [.height]
-        self.contextBox.contentView =  self.eidtPDFImageProperty.view
-    }
-    
-    private func initCipherTextView() {
-        self.cipherTextView = CipherTextView.createFromNib()
-        self.cipherTextView.frame = self.view.bounds
-        self.cipherTextView.autoresizingMask = [.height]
-        self.cipherTextView.setUp()
-        self.contextBox.contentView =  self.cipherTextView
-    }
-    
-    private func initAnnotationProperts() {
-        self.annotationProperties = KMAnnotationPropertiesViewController()
-        self.annotationProperties.view.frame = self.view.bounds
-        self.annotationProperties.pdfView = self.listView
-        self.annotationProperties.view.autoresizingMask = [.height,.maxXMargin]
-        self.contextBox.contentView = self.annotationProperties.view
-        self.annotationProperties.annoTypeDidChange = { [weak self] anno in
-            guard let callback = self?.propertyDidChange else {
-                return
-            }
-            callback(anno)
-        }
-        if self.listView.toolMode == .noteToolMode || self.listView.toolMode == .formToolMode
-            || self.listView.toolMode == .selfSignMode {
-            self.reloadDataWithPDFView(pdfView: self.listView, isShow: true)
-        }
-    }
-    
-    var curcontroller: NSViewController?
-    private func initBatesViewController() {
-        let Controller: KMBatchOperateAddHeaderFooterViewController = KMBatchOperateAddHeaderFooterViewController(files: [])
-        Controller.onlyManagerTemplate = true
-        Controller.isBatchOperation = false
-        Controller.pdfView = self.listView
-        Controller.isBatchOperation = false
-        Controller.isBates = true
-        self.contextBox.contentView? = Controller.view
-        curcontroller = Controller
-        Controller.view.mas_makeConstraints { make in
-            make?.edges.equalTo()(self.view)
-        }
-    }
-    
-    private func initHeaderFooterViewController() {
-        let headerFooterViewController: KMBatchOperateAddHeaderFooterViewController = KMBatchOperateAddHeaderFooterViewController(files: [])
-        headerFooterViewController.onlyManagerTemplate = true
-        headerFooterViewController.isBatchOperation = false
-        headerFooterViewController.pdfView = self.listView
-        self.contextBox.contentView? = headerFooterViewController.view
-        curcontroller = headerFooterViewController
-        headerFooterViewController.view.mas_makeConstraints { make in
-            make?.edges.equalTo()(self.view)
-        }
-    }
-    
-    private func initBackgroundViewController() {
-        let Controller: KMBatchOperateAddWatermarkViewController = KMBatchOperateAddWatermarkViewController(files: [])
-        Controller.onlyManagerTemplate = true
-        Controller.isBatchOperation = false
-        Controller.pdfView = self.listView
-        Controller.isBackground = true
-        self.contextBox.contentView? = Controller.view
-        curcontroller = Controller
-        Controller.view.mas_makeConstraints { make in
-            make?.edges.equalTo()(self.view)
-        }
-    }
-    
-    private func initWatermarkViewController() {
-        let addWatermarkViewController: KMBatchOperateAddWatermarkViewController = KMBatchOperateAddWatermarkViewController(files: [])
-        addWatermarkViewController.onlyManagerTemplate = true
-        addWatermarkViewController.isBatchOperation = false
-        addWatermarkViewController.pdfView = self.listView
-        self.contextBox.contentView? = addWatermarkViewController.view
-        curcontroller = addWatermarkViewController
-        addWatermarkViewController.view.mas_makeConstraints { make in
-            make?.edges.equalTo()(self.view)
-        }
-    }
-    
-    private func initViewSettingsViewController() {
-        annotationProperties = KMAnnotationPropertiesViewController()
-        annotationProperties.view.frame = self.view.bounds
-        annotationProperties.view.autoresizingMask = [.height,.maxXMargin]
-        annotationProperties.mainController = mainController
-        annotationProperties.pdfView = listView
-        annotationProperties.pageDisplayReaderMode = { [weak self] isReaderMode in
-            guard let self = self else { return }
-        }
-        annotationProperties.isEmptyAnnotation = false
-        contextBox.contentView = self.annotationProperties.view
-    }
-    
-    //MARK: CipherTextViewDelegate
-    func cipherTextViewButtonClicked(textView: CipherTextView, buttonIndex: Int) {
-        if buttonIndex == 0 {
-            
-        }
-    }
-    
-    // MARK: NSNotification Methods
-    
-    @objc func PDFViewActiveAnnotationDidChangeNotification(_ notification: Notification) {
-        if let pdfView = notification.object as? CPDFListView {
-            reloadDataWithPDFView(pdfView: pdfView, isShow: true)
-        }
-    }
-    
-    override func interfaceThemeDidChanged(_ appearance: NSAppearance.Name) {
-        super.interfaceThemeDidChanged(appearance)
-        
-        self.view.wantsLayer = true
-        self.view.superview?.wantsLayer = true
-        if KMAppearance.isDarkMode() {
-            self.view.layer?.backgroundColor = NSColor(red: 0.149, green: 0.157, blue: 0.169, alpha: 1).cgColor
-//            self.view.superview?.layer?.backgroundColor = NSColor(red: 0.149, green: 0.157, blue: 0.169, alpha: 1).cgColor
-        } else {
-            self.view.layer?.backgroundColor = NSColor(red: 0.988, green: 0.992, blue: 1, alpha: 1).cgColor
-//            self.view.superview?.layer?.backgroundColor = NSColor(red: 0.988, green: 0.992, blue: 1, alpha: 1).cgColor
-        }
-    }
-    
-    
-    @objc func signatureSelectedNotification(_ notification: Notification) {
-        guard let theWindow = self.view.window else {
-            return
-        }
-        
-        guard let pdfView = notification.userInfo?["pdfView"] as? CPDFView else {
-            return
-        }
-        if pdfView.window != theWindow {
-            return
-        }
-        
-        if self.contextBox.contentView != self.annotationProperties.view {
-            self.contextBox.contentView = self.annotationProperties.view
-        }
-        let editAnnotation: CPDFAnnotation = notification.object as! CPDFAnnotation
-        if self.mainController?.model.rightPanelIsOpen == false {
-            self.mainController?.openRightPane()
-        }
-        self.annotationProperties.mainController = self.mainController
-        self.annotationProperties.isClickFormSignature = true;
-        self.annotationProperties.annotations = [editAnnotation]
-        self.annotationProperties.openPropertiesType = .formSignatureClick
-        self.annotationProperties.isEmptyAnnotation = false
-    }
-}
-
-extension KMRightSideViewController: KMEditImagePropertyViewControllerDelegate {
-    func editImagePropertyViewControllerDidChanged(controller: KMEditImagePropertyViewController, type: KMEditImagePropertyViewControllerChangeType) {
-        self.delegate?.editImagePropertyViewControllerDidChanged(controller: controller, type: type)
-    }
-}

+ 0 - 38
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/KMRightSideViewController.xib

@@ -1,38 +0,0 @@
-<?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="KMRightSideViewController" customModule="PDF_Reader_Pro" customModuleProvider="target">
-            <connections>
-                <outlet property="contextBox" destination="i3N-8M-mET" id="qnt-Ug-E5R"/>
-                <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="282" height="630"/>
-            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
-            <subviews>
-                <box boxType="custom" borderWidth="0.0" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="i3N-8M-mET">
-                    <rect key="frame" x="0.0" y="0.0" width="282" height="630"/>
-                    <view key="contentView" id="wY9-Aj-ztG">
-                        <rect key="frame" x="0.0" y="0.0" width="282" height="630"/>
-                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                    </view>
-                </box>
-            </subviews>
-            <constraints>
-                <constraint firstItem="i3N-8M-mET" firstAttribute="top" secondItem="Hz6-mo-xeY" secondAttribute="top" id="Ax3-do-adx"/>
-                <constraint firstAttribute="bottom" secondItem="i3N-8M-mET" secondAttribute="bottom" id="Q0E-0Z-eha"/>
-                <constraint firstAttribute="trailing" secondItem="i3N-8M-mET" secondAttribute="trailing" id="mDa-hd-Dbf"/>
-                <constraint firstItem="i3N-8M-mET" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" id="qk2-zo-Avc"/>
-            </constraints>
-            <point key="canvasLocation" x="33" y="107"/>
-        </customView>
-    </objects>
-</document>

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

@@ -741,31 +741,24 @@ extension KMMainViewController {
     }
     
     @objc func menuItemEditingClick_CropImage(sender: NSMenuItem) {
-        if self.rightSideViewController.eidtPDFImageProperty != nil {
-            self.rightSideViewController.eidtPDFImageProperty.confirmVCImageAction((Any).self)
-        } else {
+ 
             if self.listView.cropAreas != nil && self.listView.selectImageAreas != nil{
                 self.listView.cropEditImageArea(self.listView.selectImageAreas, withBounds: self.listView.cropAreas.cropRect)
             }
-        }
     }
     
     @objc func menuItemEditingClick_CancelCrop(sender: NSMenuItem) {
-        if self.rightSideViewController.eidtPDFImageProperty != nil {
-            self.rightSideViewController.eidtPDFImageProperty?.cancelCutImageAction("")
-        } else {
+ 
             self.listView.exitCrop(with: self.listView.selectImageAreas)
             self.listView.cropAreas = nil
             self.listView.isEditImage = false
-        }
+    
     }
     
     @objc func menuItemEditingClick_RestoreCrop(sender: NSMenuItem) {
-        if self.rightSideViewController.eidtPDFImageProperty != nil {
-            self.rightSideViewController.eidtPDFImageProperty?.restoreCutImageAction("")
-        } else {
+    
             self.listView.resetCrop(with: self.listView.selectImageAreas)
-        }
+   
     }
     
     @objc func menuItemEditingClick_CutImage(sender: NSMenuItem) {
@@ -1052,8 +1045,6 @@ extension KMMainViewController {
                     break
                 }
                 
-                self.rightSideViewController.isHidden = true
-                self.rightSideViewController.subViewType = .AnnotationProperts
             } else {
                 if (sender.tag == 7 || sender.tag == 8 || sender.tag == 9) { // Ink & Link & stamp & sign
                   
@@ -1117,8 +1108,6 @@ extension KMMainViewController {
                 default:
                     break
                 }
-                self.rightSideViewController.isHidden = false
-                self.rightSideViewController.subViewType = .AnnotationProperts
                 if annotation != nil{
                     self.listView.activeAnnotations.removeAllObjects()
                     var newAnnonations : [CPDFAnnotation] = []
@@ -2194,32 +2183,9 @@ extension KMMainViewController {
     
     // 开启/关闭右边栏
     @objc func toggleRightPane() -> Void {
-        if self.model.lastRightPanWidth > 5 {
-            self.model.rightPanelIsOpen = false
-            applyLeftSideWidth(self.model.lastLeftPanWidth, rightSideWidth: 0)
-        } else {
-            self.model.rightPanelIsOpen = true
-            applyLeftSideWidth(self.model.lastLeftPanWidth, rightSideWidth: self.model.defaultRightWidth)
-        }
-    }
-    
-    @objc func openRightPane() -> Void {
-        if (KMPreferenceManager.shared.autoExpandPropertyPanel) {
-            if self.model.rightPanelIsOpen {
-                return
-            }
-            self.model.rightPanelIsOpen = true
-            applyLeftSideWidth(self.model.lastLeftPanWidth, rightSideWidth: self.model.defaultRightWidth)
-        }
+        
     }
     
-    @objc func closeRightPane() -> Void {
-        if (KMPreferenceManager.shared.autoExpandPropertyPanel) {
-            self.model.rightPanelIsOpen = false
-             applyLeftSideWidth(self.model.lastLeftPanWidth, rightSideWidth: 0)
-            cancelMeasureType()
-        }
-    }
     
     func rename(_ sender: NSNotification) -> Void {
         if (self.view.window == nil || self.view.window!.isVisible == false) {
@@ -2860,7 +2826,7 @@ extension KMMainViewController {
                 listView.addAnnotation(with: image, isRemoveBGColor: isRemoveBGColor)
                 
                 if (self.listView.activeAnnotation != nil) && (self.listView.activeAnnotation.type == "Image") {
-                    self.rightSideViewController.reloadDataWithPDFView(pdfView: self.listView, isShow: true)
+
                 }
             }
         }
@@ -3168,7 +3134,7 @@ extension KMMainViewController : KMToolbarViewControllerDelegate {
         } else if type == .editPDF {
             self.enterEditPDF()
         } else if type == .Annatiton {
-            self.rightSideViewController.subViewType = .AnnotationProperts
+
         } else if type == .redact {
             if self.needSaveDocument() {
                 self.saveDocumentWithProgressAlert { [unowned self] params in
@@ -3195,7 +3161,7 @@ extension KMMainViewController : KMToolbarViewControllerDelegate {
         }else if type == .Form {
             self.showFormAlertView()
         }else if type == .Select {
-            self.rightSideViewController.isHidden = true
+
             self.closeRightPane()
         }
     }
@@ -3338,8 +3304,7 @@ extension KMMainViewController : KMToolbarViewControllerDelegate {
                     return
                 }
                 if (index == 1) { /// 取消
-                     self.rightSideViewController.isHidden = true
-                    self.rightSideViewController.subViewType = .None
+                    ///
                     self.closeRightPane()
                     return
                 } else if index == 3 {
@@ -3402,51 +3367,11 @@ extension KMMainViewController : KMToolbarViewControllerDelegate {
                             }
                         }
                     }
-                    
-                    return
+                     
                 } else if (index == 2) { /// 应用
-                    let model = self.rightSideViewController.model
-                    if (type == .bates || type == .headerAndFooter) {
-                        if (model == nil || (model?.isKind(of: KMHeaderFooterObject.self) == false)) {
-                            let alert = NSAlert()
-                            alert.alertStyle = .critical
-                            alert.messageText = "没有找到模型"
-                            alert.runModal()
-                            return
-                        }
-                        
-//                        if ((model as! KMHeaderFooterObject).hasVaild == false) {
-//                            let alert = NSAlert()
-//                            alert.alertStyle = .critical
-//                            alert.messageText = "没有找到内容"
-//                            alert.runModal()
-//                            return
-//                        }
-                    }
-                    
-                    KMWatermarkAdjectiveTools.apply(model!, self.listView, self.listView.document.documentURL.path) {
-                        result in
-                        DispatchQueue.main.async {
-                            self.listView.layoutDocumentView()
-                            self.listView.setNeedsDisplayForVisiblePages()
-                        }
-                        if (result) {
-                            let alert = NSAlert()
-                            alert.alertStyle = .warning
-                            alert.messageText = "成功"
-                            alert.runModal()
-                        } else {
-                            let alert = NSAlert()
-                            alert.alertStyle = .critical
-                            alert.messageText = "失败"
-                            alert.runModal()
-                        }
-                    }
-                    return
+                     
                 } else if index == 5 {
-                    self.rightSideViewController.isHidden = false
-                    self.rightSideViewController.subViewType = KMWatermarkAdjectiveTools.KMToolBarTypeToRightSubViewType(type)
-                    self.openRightPane()
+                     self.openRightPane()
                 }
             } else if (type == .redact) { /// 标记密文
                 if !IAPProductsManager.default().isAvailableAllFunction(){
@@ -3763,9 +3688,7 @@ extension KMMainViewController : KMToolbarViewControllerDelegate {
                     let fpath = self.document?.documentURL?.path ?? ""
                     self.showBatchWindow(type: .RemoveWatermark, filepaths: [fpath])
                 } else if index == 5 {
-                    self.rightSideViewController.isHidden = false
-                    self.rightSideViewController.subViewType = KMWatermarkAdjectiveTools.KMToolBarTypeToRightSubViewType(type)
-                    self.openRightPane()
+                     self.openRightPane()
                     return
                 }
             } else if type == .background {
@@ -3816,9 +3739,7 @@ extension KMMainViewController : KMToolbarViewControllerDelegate {
                     let fpath = self.document?.documentURL?.path ?? ""
                     self.showBatchWindow(type: .RemoveBackground, filepaths: [fpath])
                 } else if index == 5 {
-                    self.rightSideViewController.isHidden = false
-                    self.rightSideViewController.subViewType = KMWatermarkAdjectiveTools.KMToolBarTypeToRightSubViewType(type)
-                    self.openRightPane()
+                     self.openRightPane()
                     return
                 }
             } else if type == .measure {
@@ -3938,8 +3859,7 @@ extension KMMainViewController : KMToolbarViewControllerDelegate {
                     
                 }
                 
-                self.rightSideViewController.reloadDataWithPDFView(pdfView: listView, isShow: true)
-                self.openRightPane()
+                 self.openRightPane()
             }
         }
     }
@@ -3970,15 +3890,10 @@ extension KMMainViewController : KMToolbarViewControllerDelegate {
                      toolbarItem.isSelected = !isSelected
                     if toolbarItem.isSelected {
                         FMTrackEventManager.defaultManager.trackEvent(event: "SubTbr_PageDisplay", withProperties: ["SubTbr_Btn": "Btn_SubTbr_PageDisplay_ViewSetting"])
-                        self.rightSideViewController.isHidden = false
-                        self.rightSideViewController.mainController = self
-                        self.rightSideViewController.subViewType = .ViewSettings
-                        
+ 
                         self.openRightPane()
                     }else{
-                        self.rightSideViewController.isHidden = true
-                        self.rightSideViewController.subViewType = .AnnotationProperts
-                        closeRightPane()
+                         closeRightPane()
                     }
                     if toolbarItem.isSelected {
                         FMTrackEventManager.defaultManager.trackEvent(event: "Tbr", withProperties: ["Tbr_Btn": "Btn_Tbr_PageDisplay"])
@@ -3988,7 +3903,7 @@ extension KMMainViewController : KMToolbarViewControllerDelegate {
                     self.leftSideViewController.showPanelView(show: toolbarItem.isSelected)
                 } else if toolbarItem.itemIdentifier == KMRightControlToolbarItemIdentifier {
                     if (self.listView.activeAnnotation != nil) && (self.listView.activeAnnotation.type == "Image") {
-                        self.rightSideViewController.reloadDataWithPDFView(pdfView: self.listView, isShow: true)
+
                     }
                     toolbarItem.isSelected = !toolbarItem.isSelected
                     self.toggleRightPane()
@@ -4051,20 +3966,12 @@ extension KMMainViewController : KMToolbarViewControllerDelegate {
                     self.km_beginSheet(windowC: windowC)
                 } else if toolbarItem.itemIdentifier == KMToolbarViewSettingIdentifier {
                     toolbarItem.isSelected = !toolbarItem.isSelected
-                    rightSideViewController.mainController = self
-                    self.rightSideViewController.isHidden = toolbarItem.isSelected ? false : true
-                    self.rightSideViewController.subViewType = .ViewSettings
-                    self.listView.annotationType = .unkown
+                     self.listView.annotationType = .unkown
                     if toolbarItem.isSelected {
-                        self.rightSideViewController.isHidden = false
-                        self.rightSideViewController.mainController = self
-                        self.rightSideViewController.subViewType = .ViewSettings
-                        
+ 
                          self.openRightPane()
                     }else{
-                        self.rightSideViewController.isHidden = true
-                        self.rightSideViewController.subViewType = .AnnotationProperts
-                        closeRightPane()
+                         closeRightPane()
                     }
                 } else if toolbarItem.itemIdentifier == KMToolbarSnapshotIdentifier {
                     FMTrackEventManager.defaultManager.trackEvent(event: "SubTbr_PageDisplay", withProperties: ["SubTbr_Btn": "Btn_SubTbr_PageDisplay_Snapshot"])

+ 4 - 11
PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController+UI.swift

@@ -185,7 +185,6 @@ extension KMMainViewController {
         super.interfaceThemeDidChanged(appearance)
         
         self.leftSideViewController.interfaceThemeDidChanged(appearance)
-        self.rightSideViewController.interfaceThemeDidChanged(appearance)
         
         self.pdfEditController?.interfaceThemeDidChanged(appearance)
          
@@ -292,43 +291,37 @@ extension KMMainViewController: KMToolbarControllerDelegate {
         }
         
         if self.listView.toolMode != .editPDFToolMode && self.listView.annotationType != .unkown {
-            self.rightSideViewController.isHidden = false
+          
             let toolMode = self.listView.toolMode ?? .none
-            self.rightSideViewController.kEventTag = toolMode == .selfSignMode ? 1 : 0
-            self.rightSideViewController.subViewType = .AnnotationProperts
+           
             if !viewManager.isPDFReadMode {
                 self.openRightPane()
             }
         } else if self.listView.toolMode == .editPDFToolMode {
             if editSelectd {
-                self.rightSideViewController.isHidden = true
                 self.listView.setShouAddEdit([])
                 self.listView.change([.text, .image])
                 self.listView.annotationType = .editTextImage
                 self.closeRightPane()
             } else if self.listView.annotationType == .addText {
-                self.rightSideViewController.isHidden = false
                 if !viewManager.isPDFReadMode {
                     self.openRightPane()
                 }
-                self.rightSideViewController.subViewType = .EditPDFAddText
                 FMTrackEventManager.defaultManager.trackEvent(event: "SubTbr_EditPDF", withProperties: ["SubTbr_Btn" : "Btn_SubTbr_EditPDF_AddText"])
                 self.listView.setShouAddEdit(.text)
                 self.listView.change(.text)
             } else if self.listView.annotationType == .addImage {
-                self.rightSideViewController.isHidden = false
                 if !viewManager.isPDFReadMode {
                     self.openRightPane()
                 }
                 FMTrackEventManager.defaultManager.trackEvent(event: "SubTbr_EditPDF", withProperties: ["SubTbr_Btn" : "Btn_SubTbr_EditPDF_AddImage"])
  
-                self.rightSideViewController.subViewType = .EditPDFAddImage
                 self.listView.setShouAddEdit(.image)
                 self.listView.change(.image)
-                self.rightSideViewController.eidtPDFImageProperty.reloadData()
+
             }
         } else {
-            self.rightSideViewController.isHidden = true
+
             self.closeRightPane()
         }
     }

+ 4 - 9
PDF Office/PDF Master/KMClass/KMPDFViewController/EditTool/KMLinkViewController/KMLinkViewController.swift

@@ -25,8 +25,6 @@ import KMComponentLibrary
 @objcMembers class KMLinkViewController: NSViewController {
 
     @IBOutlet var contendBox: NSBox!
-    @IBOutlet var titleLabel: NSTextField!
-    
     @IBOutlet var infoContendView: NSView!
     
     @IBOutlet var tabsBGView: NSView!
@@ -65,10 +63,6 @@ import KMComponentLibrary
         
         contendBox.fillColor = ComponentLibrary.shared.getComponentColorFromKey("colorBg/layout-middle")
         
-        titleLabel.stringValue = NSLocalizedString("Link", comment: "")
-        titleLabel.textColor = ComponentLibrary.shared.getComponentColorFromKey("colorText/2")
-        titleLabel.font = ComponentLibrary.shared.getFontFromKey("mac/body-m-bold")
-        
         if pdfLinkType == .Page {
             pageProperty.state = .pressed
         } else if pdfLinkType == .Web {
@@ -126,9 +120,11 @@ import KMComponentLibrary
     
     //MARK: - func
     public func reloadData() {
+        infoContendView.isHidden = false
         
-        if annotations.count > 1 {
-            
+        if annotations.count == 0 {
+            infoContendView.isHidden = true
+        } else if annotations.count > 1 {
             multiController.view.frame = infoContendView.bounds
             multiController.view.autoresizingMask = [.width, .height]
             infoContendView.addSubview(multiController.view)
@@ -137,7 +133,6 @@ import KMComponentLibrary
             tabsBGView.isHidden = true
             typeContendView.isHidden = true
             
-            
         } else {
             multiController.view.isHidden = true
             tabsBGView.isHidden = false

+ 7 - 38
PDF Office/PDF Master/KMClass/KMPDFViewController/EditTool/KMLinkViewController/KMLinkViewController.xib

@@ -15,7 +15,6 @@
                 <outlet property="linkWebView" destination="fH6-Uy-dbh" id="WXi-Pk-sCY"/>
                 <outlet property="tabsBGView" destination="ZTL-oi-jx1" id="dwu-Yy-p8f"/>
                 <outlet property="tabsView" destination="7KZ-04-qIH" id="EFi-fc-PS2"/>
-                <outlet property="titleLabel" destination="cWl-1z-Oo9" id="Oks-CT-g1E"/>
                 <outlet property="typeContendView" destination="BK6-TZ-Fw8" id="f6j-6h-YqA"/>
                 <outlet property="view" destination="Hz6-mo-xeY" id="0bl-1N-x8E"/>
             </connections>
@@ -32,38 +31,11 @@
                         <rect key="frame" x="0.0" y="0.0" width="261" height="426"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
-                            <customView translatesAutoresizingMaskIntoConstraints="NO" id="ari-Wn-bbp">
-                                <rect key="frame" x="0.0" y="386" width="261" height="40"/>
-                                <subviews>
-                                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="cWl-1z-Oo9">
-                                        <rect key="frame" x="116" y="12" width="29" height="16"/>
-                                        <textFieldCell key="cell" lineBreakMode="clipping" title="Link" id="DvO-1v-zBv">
-                                            <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>
-                                    <customView translatesAutoresizingMaskIntoConstraints="NO" id="oAT-Uz-RGE" customClass="ComponentDivider" customModule="KMComponentLibrary">
-                                        <rect key="frame" x="0.0" y="0.0" width="261" height="1"/>
-                                        <constraints>
-                                            <constraint firstAttribute="height" constant="1" id="9kh-oH-cKO"/>
-                                        </constraints>
-                                    </customView>
-                                </subviews>
-                                <constraints>
-                                    <constraint firstAttribute="trailing" secondItem="oAT-Uz-RGE" secondAttribute="trailing" id="0aJ-25-0Qc"/>
-                                    <constraint firstAttribute="bottom" secondItem="oAT-Uz-RGE" secondAttribute="bottom" id="NgW-xr-XYC"/>
-                                    <constraint firstAttribute="height" constant="40" id="Ngk-ha-FFg"/>
-                                    <constraint firstItem="cWl-1z-Oo9" firstAttribute="centerX" secondItem="ari-Wn-bbp" secondAttribute="centerX" id="WMR-Gr-glX"/>
-                                    <constraint firstItem="oAT-Uz-RGE" firstAttribute="leading" secondItem="ari-Wn-bbp" secondAttribute="leading" id="f6a-dZ-M9a"/>
-                                    <constraint firstItem="cWl-1z-Oo9" firstAttribute="centerY" secondItem="ari-Wn-bbp" secondAttribute="centerY" id="sJX-Dy-c9K"/>
-                                </constraints>
-                            </customView>
                             <customView translatesAutoresizingMaskIntoConstraints="NO" id="lR7-es-a1N">
-                                <rect key="frame" x="0.0" y="0.0" width="261" height="386"/>
+                                <rect key="frame" x="0.0" y="0.0" width="261" height="426"/>
                                 <subviews>
                                     <customView translatesAutoresizingMaskIntoConstraints="NO" id="ZTL-oi-jx1">
-                                        <rect key="frame" x="0.0" y="330" width="261" height="56"/>
+                                        <rect key="frame" x="0.0" y="370" width="261" height="56"/>
                                         <subviews>
                                             <customView translatesAutoresizingMaskIntoConstraints="NO" id="7KZ-04-qIH" customClass="ComponentTabs" customModule="KMComponentLibrary">
                                                 <rect key="frame" x="15" y="16" width="232" height="32"/>
@@ -80,18 +52,18 @@
                                         </constraints>
                                     </customView>
                                     <customView translatesAutoresizingMaskIntoConstraints="NO" id="BK6-TZ-Fw8">
-                                        <rect key="frame" x="0.0" y="0.0" width="261" height="330"/>
+                                        <rect key="frame" x="0.0" y="0.0" width="261" height="370"/>
                                         <subviews>
                                             <customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="x7p-Hb-EyP" customClass="KMLinkPageView" customModule="PDF_Reader_Pro" customModuleProvider="target">
-                                                <rect key="frame" x="0.0" y="0.0" width="261" height="330"/>
+                                                <rect key="frame" x="0.0" y="0.0" width="261" height="370"/>
                                                 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                             </customView>
                                             <customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="r4k-oX-xpP" customClass="KMLinkEmailView" customModule="PDF_Reader_Pro" customModuleProvider="target">
-                                                <rect key="frame" x="0.0" y="0.0" width="261" height="330"/>
+                                                <rect key="frame" x="0.0" y="0.0" width="261" height="370"/>
                                                 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                             </customView>
                                             <customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="fH6-Uy-dbh" customClass="KMLinkWebView" customModule="PDF_Reader_Pro" customModuleProvider="target">
-                                                <rect key="frame" x="0.0" y="0.0" width="261" height="330"/>
+                                                <rect key="frame" x="0.0" y="0.0" width="261" height="370"/>
                                                 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                             </customView>
                                         </subviews>
@@ -109,12 +81,9 @@
                             </customView>
                         </subviews>
                         <constraints>
-                            <constraint firstItem="lR7-es-a1N" firstAttribute="top" secondItem="ari-Wn-bbp" secondAttribute="bottom" id="2Q9-dr-Haa"/>
                             <constraint firstItem="lR7-es-a1N" firstAttribute="leading" secondItem="O0h-RK-4bo" secondAttribute="leading" id="HMG-ce-fZj"/>
-                            <constraint firstItem="ari-Wn-bbp" firstAttribute="leading" secondItem="O0h-RK-4bo" secondAttribute="leading" id="Iyq-uR-IoN"/>
+                            <constraint firstItem="lR7-es-a1N" firstAttribute="top" secondItem="O0h-RK-4bo" secondAttribute="top" id="Ksj-2g-sv3"/>
                             <constraint firstAttribute="trailing" secondItem="lR7-es-a1N" secondAttribute="trailing" id="PnR-3m-nRx"/>
-                            <constraint firstAttribute="trailing" secondItem="ari-Wn-bbp" secondAttribute="trailing" id="R8J-X6-PPa"/>
-                            <constraint firstItem="ari-Wn-bbp" firstAttribute="top" secondItem="O0h-RK-4bo" secondAttribute="top" id="hAz-0u-UW9"/>
                             <constraint firstAttribute="bottom" secondItem="lR7-es-a1N" secondAttribute="bottom" id="lpY-dJ-F4a"/>
                         </constraints>
                     </view>

+ 13 - 0
PDF Office/PDF Master/KMClass/KMPDFViewController/EditTool/Watermark/Tools/KMWatermarkAdjectiveTools.swift

@@ -14,6 +14,19 @@ enum KMWatermarkAdjectiveType: Int {
     case bates = 4
 }
 
+enum RightSubViewType : Int {
+    case None
+    case CipherTextType
+    case EditPDFAddText
+    case EditPDFAddImage
+    case AnnotationProperts
+    case Bates
+    case Headerfooter
+    case Background
+    case Watermark
+    case ViewSettings
+}
+
 @objc class KMWatermarkAdjectiveTools: NSObject {
     class func fetchAvailableFonts(_ size: CGFloat) -> [NSAttributedString] {
         let fonts = NSFontManager.shared.availableFontFamilies

+ 83 - 40
PDF Office/PDF Master/KMClass/KMPDFViewController/KMMainViewController.swift

@@ -29,6 +29,7 @@ import KMComponentLibrary
     
     @IBOutlet var toolbarBoxHeightConst: NSLayoutConstraint!
     @IBOutlet var infoSplitViewLeftConst: NSLayoutConstraint!
+    @IBOutlet var infoSplitViewRightConst: NSLayoutConstraint!
     
     var viewManager: KMPDFViewManager = KMPDFViewManager.init()
     var toolbarManager: KMPDFToolbarManager = KMPDFToolbarManager.init()
@@ -73,9 +74,11 @@ import KMComponentLibrary
     //左边
     var botaViewController: KMNLeftSideViewController?
     
+    //右边
+    var rightSideController: KMRightSideController?
+    
     //MARK: - 旧代码,有需要用到的拿出来,写好备注
     
-      @IBOutlet weak var rightView: NSView!
     @IBOutlet weak var leftView: NSView!
      
     var model = KMMainModel()
@@ -136,7 +139,6 @@ import KMComponentLibrary
     }
     
     var leftSideViewController: KMLeftSideViewController = KMLeftSideViewController.init(type: KMLeftMethodMode())
-    var rightSideViewController: KMRightSideViewController!
     var searchResults: [KMSearchMode] = []
     var mwcFlags: MwcFlags = MwcFlags()
     
@@ -344,6 +346,22 @@ import KMComponentLibrary
         reloadPDFSplitInfo()
     }
     
+    func updatePDFViewAnnotationMode() {
+        let toolbarMode = viewManager.toolMode
+        
+        let subToolMode = viewManager.subToolMode
+        
+        if subToolMode == .None {
+            listView.annotationType = .unkown
+            
+        } else if subToolMode == .Edit_Link {
+            
+            listView.toolMode = .noteToolMode
+            listView.annotationType = .link
+            
+        }
+    }
+    
     //MARK: - SplitView
     func setUpSplitView() {
         infoContendSplitView.wantsLayer = true
@@ -412,6 +430,18 @@ import KMComponentLibrary
         
     }
     
+    func toolbarViewModeChanged() {
+        updatePDFViewAnnotationMode()
+        
+        if viewManager.showRightSide == true {
+             openRightPane()
+            
+        } else {
+            closeRightPane()
+            
+        }
+    }
+    
     //MARK: - 侧边栏
     func initSideBar() {
         sidebarBox.borderWidth = 0
@@ -444,6 +474,38 @@ import KMComponentLibrary
         }
     }
     
+    //MARK: - 右侧属性栏
+    func initRightSideController() {
+        if rightSideController == nil {
+            rightSideController = KMRightSideController.init()
+        }
+        rightSideController?.view.frame = CGRectMake(0, 0, 264, 680)
+        rightSideController?.view.autoresizingMask = [.height, .maxXMargin]
+    }
+    
+    func removeRightSideController() {
+        rightSideController?.view.removeFromSuperview()
+        rightSideController = nil
+    }
+    
+    @objc func openRightPane() -> Void {
+        initRightSideController()
+        
+        rightSideController?.view.frame = CGRectMake(CGRectGetWidth(bottomContendBox.frame)-264, 0, 264, CGRectGetHeight(bottomContendBox.frame))
+        bottomContendBox.addSubview(rightSideController!.view)
+        
+        infoSplitViewRightConst.constant = 264
+        
+        rightSideController?.subToolMode = viewManager.subToolMode
+        
+    }
+    
+    @objc func closeRightPane() -> Void {
+        removeRightSideController()
+        
+        infoSplitViewRightConst.constant = 0
+    }
+    
     //MARK: - PDFDisplayView
     func updatePDFDisplaySettingView() {
         
@@ -1125,6 +1187,9 @@ extension KMMainViewController: KMPDFToolbarControllerDelegate {
             
         } else if itemIdentifier == KMPDFToolbar_Edit_Identifier {
             
+        } else if itemIdentifier == KMPDFToolbar_edit_link_Identifier {
+            //Link
+            
         } else if itemIdentifier == KMPDFToolbar_Form_Identifier {
             
         } else if itemIdentifier == KMPDFToolbar_Fill_Identifier {
@@ -1273,6 +1338,7 @@ extension KMMainViewController: KMPDFToolbarControllerDelegate {
             }
             controller.refreshSecondToolbarItemsState()
         } else if itemIdentifier == KMPDFToolbar_edit_addWatermark_Identifier {
+            //
             showWatermarkController()
         } else if itemIdentifier == KMPDFToolbar_edit_removeWatermark_Identifier {
             removePDFWatermark()
@@ -1313,6 +1379,8 @@ extension KMMainViewController: KMPDFToolbarControllerDelegate {
         }
         
         refreshToolbarView()
+        
+        toolbarViewModeChanged()
     }
     
     func kmPDFToolbarControllerDidSelectTextDidBeginEditing(_ controller: KMPDFToolbarController, _ view: ComponentSelect) {
@@ -2078,24 +2146,24 @@ extension KMMainViewController: CPDFViewDelegate,CPDFListViewDelegate {
                     }
                 }
                 if isSameAnnotation == false {
-                    self.rightSideViewController?.reloadDataWithPDFView(pdfView: pdfListView, isShow: false)
+
                 } else {
-                    self.rightSideViewController?.reloadDataWithPDFView(pdfView: pdfListView, isShow: true)
+                     
                     self.openRightPane()
                 }
             } else {
                 let fristAnnotation  = annotations.first
                 let className =  NSStringFromClass(fristAnnotation!.classForCoder)
                 if self.viewManager.isPDFReadMode {
-                    self.rightSideViewController?.reloadDataWithPDFView(pdfView: pdfListView, isShow: false)
+
                     self.closeRightPane()
                 } else {
-                    self.rightSideViewController?.reloadDataWithPDFView(pdfView: pdfListView, isShow: true)
                     if className != "CPDFStampAnnotation" &&
                         className != "CPDFSignatureAnnotation" &&
                         className != "CPDFListStampAnnotation" {
                         self.openRightPane()
                     }
+                    self.rightSideController?.reloadDataWithPDFView(pdfView: pdfListView)
                     
                 }
             }
@@ -2129,15 +2197,12 @@ extension KMMainViewController: CPDFViewDelegate,CPDFListViewDelegate {
             }
         } else if (annotations.count == 0){
             if  pdfListView.annotationType == .unkown {
-                self.rightSideViewController?.reloadDataWithPDFView(pdfView: pdfListView, isShow: false)
-                self.closeRightPane()
+                 self.closeRightPane()
             } else {
                 if self.viewManager.isPDFReadMode {
-                    self.rightSideViewController?.reloadDataWithPDFView(pdfView: pdfListView, isShow: false)
-                    self.closeRightPane()
+                     self.closeRightPane()
                 } else {
-                    self.rightSideViewController?.reloadDataWithPDFView(pdfView: pdfListView, isShow: true)
-                    self.openRightPane()
+                     self.openRightPane()
                 }
             }
         }
@@ -2145,8 +2210,7 @@ extension KMMainViewController: CPDFViewDelegate,CPDFListViewDelegate {
     
     func pdfListViewChangedAnnotationType(_ pdfListView: CPDFListView!, for annotationType: CAnnotationType) {
         if(annotationType == .unkown) {
-            self.rightSideViewController.isHidden = true
-            self.closeRightPane()
+             self.closeRightPane()
         }
         let aType = annotationType
         if aType.isMarkup() || aType == .anchored || aType == .freeText || aType.isSquare() || aType == .link {
@@ -2518,13 +2582,11 @@ extension KMMainViewController: CPDFViewDelegate,CPDFListViewDelegate {
     
     //TextEdit
     func pdfListViewDidTextFontChanged(_ pdfListView: CPDFListView!) {
-        self.rightSideViewController.eidtPDFTextProperty.reloadData()
-        
+ 
     }
     
     func pdfListViewDidTextColorChanged(_ pdfListView: CPDFListView!, with color: NSColor!) {
-        self.rightSideViewController.eidtPDFTextProperty.fontColorChangeAction()
-        
+ 
     }
     
     func pdfListViewAnnotationMeasureInfoChange(_ pdfListView: CPDFListView!, with annotation: CPDFAnnotation!) {
@@ -2766,7 +2828,6 @@ extension KMMainViewController {
         
         
         self.initPDFLeftViewVC()
-        self.initRightSideView()
         self.leftSideViewController.mainViewController = self
         
      }
@@ -2974,23 +3035,7 @@ extension KMMainViewController {
         leftSideViewController.delegate = self
         self.leftView.addSubview(leftSideViewController.view)
     }
-    
-    func initRightSideView() {
-        self.rightSideViewController = KMRightSideViewController.init()
-        self.rightSideViewController.view.frame = CGRect(x: 0, y: 0, width: self.rightView.frame.width, height: self.rightView.frame.size.height)
-        self.rightSideViewController.view.autoresizingMask = [.height,.width]
-        self.rightSideViewController.listView = self.listView
-        self.rightSideViewController.isHidden = true
-        self.rightSideViewController.delegate = self
-        self.rightView.addSubview(self.rightSideViewController.view)
-        
-        self.rightSideViewController.propertyDidChange = { [weak self] model in
-            if let anno = model as? CSelfSignAnnotation {
-                self?.leftSideViewController.refreshUIForAnnoAttributeDidChange(anno, attributes: nil)
-            }
-        }
-    }
-    
+     
     func addAdsBannerView() {
 #if VERSION_FREE
         if !IAPProductsManager.default().isAvailableAllFunction(){
@@ -4229,8 +4274,7 @@ extension KMMainViewController {
                                 if self?.listView.annotationType == .addImage ||
                                     self?.listView.annotationType == .addText {
                                  }
-                                self?.rightSideViewController.isHidden = true
-                                self?.listView.endEditIsRemoveBlock(with: self!.listView.editingAreas().first as? CPDFEditArea)
+                                 self?.listView.endEditIsRemoveBlock(with: self!.listView.editingAreas().first as? CPDFEditArea)
                                 self?.listView.updateEditing([])
                                 self?.listView.isEditImage = false
                                 self?.listView.setNeedsDisplayPageViewFor(self!.listView.currentPage())
@@ -4243,8 +4287,7 @@ extension KMMainViewController {
                                 if self?.listView.annotationType == .addImage ||
                                     self?.listView.annotationType == .addText {
                                  }
-                                self?.rightSideViewController.isHidden = true
-                                self?.listView.setShouAddEdit([])
+                                 self?.listView.setShouAddEdit([])
                                 self?.listView.change([.text, .image])
                                 self?.listView.annotationType = .editTextImage
                                 self?.closeRightPane()

+ 1 - 0
PDF Office/PDF Master/KMClass/KMPDFViewController/KMMainViewController.xib

@@ -15,6 +15,7 @@
                 <outlet property="infoSplitLeftView" destination="Rjd-la-yXL" id="4em-z7-4T2"/>
                 <outlet property="infoSplitRightView" destination="MYm-xb-CGc" id="bhn-TK-Tal"/>
                 <outlet property="infoSplitViewLeftConst" destination="VHe-vc-ydV" id="qLy-5H-hT2"/>
+                <outlet property="infoSplitViewRightConst" destination="KEM-An-CzJ" id="hBv-UN-TBa"/>
                 <outlet property="pdfSplitBottomView" destination="ySe-re-pP1" id="9uQ-P8-6iS"/>
                 <outlet property="pdfSplitTopView" destination="imw-ZH-2FU" id="LVc-k3-At8"/>
                 <outlet property="pdfSplitView" destination="hf2-wd-3w7" id="0KE-3F-njx"/>

+ 157 - 3
PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/KMRightSideController.swift

@@ -11,12 +11,28 @@ import KMComponentLibrary
 class KMRightSideController: NSViewController {
 
     @IBOutlet var contendView: NSView!
+    @IBOutlet var contendLeftDivider: ComponentDivider!
+    
     @IBOutlet var titleLabel: NSTextField!
     
     @IBOutlet var infoContendView: NSView!
     
+    var annotations: [CPDFAnnotation] = [] {
+        didSet {
+            reloadData()
+        }
+    }
+    
     var pdfView: CPDFListView?
-    var subToolMode: KMPDFSubToolMode = .None //二级工具栏
+    
+    var subToolMode: KMPDFSubToolMode = .None {
+        //二级工具栏
+        didSet {
+            updateUI()
+        }
+    }
+    
+    var contentViewController: NSViewController?
 
     override func viewDidLoad() {
         super.viewDidLoad()
@@ -24,10 +40,15 @@ class KMRightSideController: NSViewController {
         
         setupUI()
         
-        reloadData()
+        updateUI()
     }
     
     func setupUI() {
+        contendView.wantsLayer = true
+        contendView.layer?.backgroundColor = ComponentLibrary.shared.getComponentColorFromKey("colorBg/layout-middle").cgColor
+        
+        contendLeftDivider.properties = ComponentDividerProperty(type: .vertical)
+        
         titleLabel.textColor = ComponentLibrary.shared.getComponentColorFromKey("colorText/2")
         titleLabel.font = ComponentLibrary.shared.getFontFromKey("mac/body-m-bold")
         
@@ -45,11 +66,144 @@ class KMRightSideController: NSViewController {
         }
     }
     
+    func updateUI() {
+        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
+            
+            controller.pdfView = self.pdfView
+        }
+    }
+    
     func reloadData() {
+        if 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()
+        }
         
-        updateTitleLabel()
+    }
+    
+    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
         
+//        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
+//        }
     }
     
 }

+ 10 - 0
PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/KMRightSideController.xib

@@ -8,6 +8,7 @@
     <objects>
         <customObject id="-2" userLabel="File's Owner" customClass="KMRightSideController" customModule="PDF_Reader_Pro" customModuleProvider="target">
             <connections>
+                <outlet property="contendLeftDivider" destination="dWX-cw-Vye" id="kiw-vI-6EW"/>
                 <outlet property="contendView" destination="Sx1-Eg-QqT" id="6gg-wx-Pn7"/>
                 <outlet property="infoContendView" destination="5et-6F-yVg" id="ibb-Ic-3DS"/>
                 <outlet property="titleLabel" destination="Rtf-SN-4Bo" id="ddV-ja-Zc8"/>
@@ -23,6 +24,12 @@
                 <customView translatesAutoresizingMaskIntoConstraints="NO" id="Sx1-Eg-QqT">
                     <rect key="frame" x="0.0" y="0.0" width="264" height="600"/>
                     <subviews>
+                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="dWX-cw-Vye" customClass="ComponentDivider" customModule="KMComponentLibrary">
+                            <rect key="frame" x="0.0" y="0.0" width="1" height="600"/>
+                            <constraints>
+                                <constraint firstAttribute="width" constant="1" id="EWP-kn-OB9"/>
+                            </constraints>
+                        </customView>
                         <customView translatesAutoresizingMaskIntoConstraints="NO" id="TcN-JR-Ldb">
                             <rect key="frame" x="0.0" y="560" width="264" height="40"/>
                             <subviews>
@@ -58,9 +65,12 @@
                         <constraint firstItem="TcN-JR-Ldb" firstAttribute="top" secondItem="Sx1-Eg-QqT" secondAttribute="top" id="132-Pn-4jc"/>
                         <constraint firstAttribute="trailing" secondItem="TcN-JR-Ldb" secondAttribute="trailing" id="G1x-eP-gh9"/>
                         <constraint firstItem="5et-6F-yVg" firstAttribute="top" secondItem="TcN-JR-Ldb" secondAttribute="bottom" id="IVU-aY-91O"/>
+                        <constraint firstItem="dWX-cw-Vye" firstAttribute="leading" secondItem="Sx1-Eg-QqT" secondAttribute="leading" id="SW9-wy-hTa"/>
                         <constraint firstAttribute="bottom" secondItem="5et-6F-yVg" secondAttribute="bottom" id="Ymu-ti-PuI"/>
                         <constraint firstItem="5et-6F-yVg" firstAttribute="leading" secondItem="Sx1-Eg-QqT" secondAttribute="leading" id="aSN-4h-8FS"/>
+                        <constraint firstItem="dWX-cw-Vye" firstAttribute="top" secondItem="Sx1-Eg-QqT" secondAttribute="top" id="aZY-xw-ye3"/>
                         <constraint firstAttribute="trailing" secondItem="5et-6F-yVg" secondAttribute="trailing" id="aeX-g5-tMt"/>
+                        <constraint firstAttribute="bottom" secondItem="dWX-cw-Vye" secondAttribute="bottom" id="dbl-wc-vkD"/>
                         <constraint firstItem="TcN-JR-Ldb" firstAttribute="leading" secondItem="Sx1-Eg-QqT" secondAttribute="leading" id="lWM-Lx-e5G"/>
                     </constraints>
                 </customView>

+ 5 - 18
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/EditPDF/Category/KMImageOptimization.swift

@@ -106,20 +106,20 @@ class KMImageOptimization: NSObject {
     
     static func resizeImage(_ image: NSImage, toSize newSize: NSSize) -> Data? {
         let resizedImage = NSImage(size: newSize)
-
+        
         resizedImage.lockFocus()
         NSGraphicsContext.current?.imageInterpolation = .high
-
+        
         image.draw(in: NSRect(x: 0, y: 0, width: newSize.width, height: newSize.height), from: NSRect.zero, operation: .copy, fraction: 1.0)
-
+        
         resizedImage.unlockFocus()
-
+        
         guard let imageData = resizedImage.tiffRepresentation,
               let bitmapImage = NSBitmapImageRep(data: imageData),
               let compressedData = bitmapImage.representation(using: .png, properties: [:]) else {
             return nil
         }
-
+        
         return compressedData
     }
     
@@ -134,29 +134,16 @@ class KMImageOptimization: NSObject {
             FileManager.default.createFile(atPath: string as String, contents: nil)
         }
         
-        // 示例用法
         if let compressedData = KMImageOptimization.compressImageLosslessly(image: image, targetSize: targetSize, maxSizeInBytes: maxSizeInBytes, targetCompression: targetCompression) {
             let saveURL = URL(fileURLWithPath: string as String)//URL(fileURLWithPath: "/path/to/save/compressed_image.png")
             do {
                 try compressedData.write(to: saveURL)
-                // 图像已成功保存在指定路径中
                 KMPrint("保存图像成功:\(string)")
             } catch {
                 KMPrint("保存图像失败:\(error)")
             }
         }
         
-//        // 示例用法
-//        if let compressedData = KMImageOptimization.resizeImage(image, toSize: targetSize) {
-//            let saveURL = URL(fileURLWithPath: string as String)//URL(fileURLWithPath: "/path/to/save/compressed_image.png")
-//            do {
-//                try compressedData.write(to: saveURL)
-//                // 图像已成功保存在指定路径中
-//                print("保存图像成功:\(string)")
-//            } catch {
-//                print("保存图像失败:\(error)")
-//            }
-//        }
         return string as String
     }
 }

PDF Office/PDF Master/Class/PDFTools/EditPDF/Controller/KMAlignmentController.swift → PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/Controller/KMAlignmentController.swift


PDF Office/PDF Master/Class/PDFTools/EditPDF/Controller/KMAlignmentController.xib → PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/Controller/KMAlignmentController.xib


PDF Office/PDF Master/Class/PDFTools/EditPDF/Controller/KMEditPDFPopToolBarController.swift → PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/Controller/KMEditPDFPopToolBarController.swift


PDF Office/PDF Master/Class/PDFTools/EditPDF/Controller/KMEditPDFPopToolBarController.xib → PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/Controller/KMEditPDFPopToolBarController.xib


PDF Office/PDF Master/Class/PDFTools/EditPDF/Controller/KMTextAlignmentController.swift → PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/Controller/KMTextAlignmentController.swift


PDF Office/PDF Master/Class/PDFTools/EditPDF/Controller/KMTextAlignmentController.xib → PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/Controller/KMTextAlignmentController.xib


+ 6 - 62
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/EditPDF/KMEditImagePropertyViewController.swift

@@ -67,7 +67,7 @@ class KMEditImagePropertyViewController: NSViewController {
     @IBOutlet weak var cancelBox: NSBox!
     @IBOutlet weak var replaceBox: NSBox!
     @IBOutlet weak var exportBox: NSBox!
-
+    
     @IBOutlet weak var opacityBoxHeight: NSLayoutConstraint!
     @IBOutlet weak var buttonBoxHeight: NSLayoutConstraint!
     @IBOutlet weak var buttonBox: NSBox!
@@ -118,7 +118,7 @@ class KMEditImagePropertyViewController: NSViewController {
     
     override func viewDidLoad() {
         super.viewDidLoad()
-    
+        
         self.setup()
         self.initData()
         self.updateLanguage()
@@ -137,7 +137,6 @@ class KMEditImagePropertyViewController: NSViewController {
         self.titleLabel.textColor = KMAppearance.Layout.h0Color()
         
         self.opacityTitleLabel.font = NSFont.SFProTextRegularFont(12.0)
-//        self.opacityTitleLabel.textColor = KMAppearance.Layout.h0Color()
         
         self.whTitleLabel.font = NSFont.SFProTextRegularFont(12)
         self.whTitleLabel.stringValue = NSLocalizedString("Size", comment: "")
@@ -158,8 +157,6 @@ class KMEditImagePropertyViewController: NSViewController {
         self.wTextFieldItemView.rightView = wRightView
         var formatter = NumberFormatter()
         formatter.numberStyle = .decimal
-//        formatter.maximum = NSNumber(value: 999)
-//        formatter.minimum = NSNumber(value: 1)
         self.wTextFieldItemView.textFiled.formatter = formatter
         
         self.hTextFieldItemView.backgroundView.wantsLayer = true
@@ -201,7 +198,6 @@ class KMEditImagePropertyViewController: NSViewController {
         whVC?.cornerRadius_hov = 4
         whVC?.cornerRadius_disabled = 4
         self.whVC?.toolTip = NSLocalizedString("Keep Proportions", comment: "")
-//        self.whVC?.state = self._getKeepProportionsButtonState() ? .Act : .Norm
         let whState: KMDesignTokenState = self._getKeepProportionsButtonState() ? .Act : .Norm
         self.whVC?.state = .Norm
         self._setWHButtonState(whState)
@@ -220,7 +216,7 @@ class KMEditImagePropertyViewController: NSViewController {
         self.leftRotateVC?.action = #selector(leftRotationImageAction)
         self.leftRotateVC?.image = NSImage(named: "KMImageNameEditPDFRotationLeft")!
         self.leftRotateVC?.pagination()
-      
+        
         
         self.rightRotateVC = KMDesignButton(withType: .Image)
         self.rightRotateBox.contentView = self.rightRotateVC?.view
@@ -286,14 +282,6 @@ class KMEditImagePropertyViewController: NSViewController {
         cropVC?.action = #selector(cutImageAction)
         cropVC?.button(type: .Sec, size: .m)
         cropVC?.stringValue = NSLocalizedString("Crop", comment: "")
-//        cropVC?.borderColor = KMAppearance.Interactive.s0Color()
-//        cropVC?.background = KMAppearance.Layout.l1Color()
-//        cropVC?.background_hov = KMAppearance.Layout.l1Color()
-//        cropVC?.background_focus = KMAppearance.Layout.l1Color()
-//        cropVC?.textColor = KMAppearance.Layout.h1Color()
-//        cropVC?.textColor_hov = KMAppearance.Layout.h1Color()
-//        cropVC?.textColor_focus = KMAppearance.Layout.h1Color()
-//        cropVC?.updateUI()
         cropVC?.borderColor = KMAppearance.Interactive.s0Color()
         cropVC?.borderColor_hov = KMAppearance.Interactive.s0Color()
         cropVC?.borderColor_disabled = KMAppearance.Interactive.s0Color()
@@ -415,7 +403,6 @@ class KMEditImagePropertyViewController: NSViewController {
             self.alignmentView.alignmentLabel.textColor = NSColor(hex: "#C8C9CC")
             
             whVC?.background_hov = NSColor(red: 71/255, green: 72/255, blue: 75/255, alpha: 1)
-//            whVC?.background_focus = KMAppearance.Layout.l1Color()
             whVC?.background_disabled = KMAppearance.buttonDisabledColor()
             
             leftRotateVC?.borderColor = KMAppearance.Interactive.s0Color()
@@ -427,16 +414,6 @@ class KMEditImagePropertyViewController: NSViewController {
             leftRotateVC?.textColor_focus = KMAppearance.Layout.h1Color()
             leftRotateVC?.borderColor_hov = KMAppearance.Interactive.s0Color()
             leftRotateVC?.background_disabled = NSColor(white: 96/255.0, alpha: 1.0)
-//            cropVC?.borderColor = KMAppearance.Interactive.s0Color()
-//            cropVC?.borderColor_hov = KMAppearance.Interactive.s0Color()
-//            leftRotateVC?.borderColor_disabled = KMAppearance.Interactive.s0Color()
-//            leftRotateVC?.background = KMAppearance.Layout.l1Color()
-//            leftRotateVC?.background_hov = KMAppearance.Layout.l1Color()
-//            leftRotateVC?.background_focus = KMAppearance.Layout.l1Color()
-//            leftRotateVC?.background_disabled = KMAppearance.Layout.l1Color()
-//            cropVC?.textColor = KMAppearance.Layout.h1Color()
-//            cropVC?.textColor_hov = KMAppearance.Layout.h1Color()
-//            cropVC?.textColor_focus = KMAppearance.Layout.h1Color()
             
             leftRotateVC?.updateUI()
             
@@ -481,7 +458,6 @@ class KMEditImagePropertyViewController: NSViewController {
             
             self.rotateTextFieldItemView.fillColor = KMAppearance.Layout.w15Color()
             self.rotateTextFieldItemView.textF?.backgroundView.layer?.backgroundColor = KMAppearance.Layout.w15Color().cgColor
-//            self.rotateTextFieldItemView.updateUI(state: self.rotateTextFieldItemView.state)
             
             if self.rotateTextFieldItemView.state == .Focus {
                 let borderColor = NSColor(hex: "68ACF8")
@@ -518,7 +494,6 @@ class KMEditImagePropertyViewController: NSViewController {
             leftRotateVC?.updateUI()
             
             whVC?.background_hov = KMAppearance.view_bg_dis_color()
-//            whVC?.background_focus = KMAppearance.Layout.l1Color()
             whVC?.background_disabled = KMAppearance.buttonDisabledColor()
             
             reverseXVC?.borderColor = KMAppearance.Interactive.s0Color()
@@ -551,7 +526,6 @@ class KMEditImagePropertyViewController: NSViewController {
             self.leftRotateVC?.initDefaultValue()
             
             self.rotateTextFieldItemView.fillColor = .white
-//            self.rotateTextFieldItemView.updateUI(state: self.rotateTextFieldItemView.state)
             self.rotateTextFieldItemView.textF?.backgroundView.layer?.backgroundColor = .white
             if self.rotateTextFieldItemView.state == .Focus {
                 let borderColor = NSColor(hex: "68ACF8")
@@ -562,11 +536,6 @@ class KMEditImagePropertyViewController: NSViewController {
             }
         }
         
-//        for label in [self.whTitleLabel, self.opacityTitleLabel,
-//                      self.turnOverTitleLabel] {
-//            label?.font = NSFont.SFProTextSemiboldFont(12.0)
-//            label?.textColor = NSColor.km_init(hex: "#616469")
-//        }
     }
     
     func updateLanguage() {
@@ -611,12 +580,11 @@ class KMEditImagePropertyViewController: NSViewController {
                 self.buttonBox.isHidden = false
                 self.buttonBoxHeight.constant = 112+16+8
                 self.alignmentViewTopConstraint.constant = 16
-
+                
                 let opacity: CGFloat = self.listView.opacity(for: imagesAreas.first)
                 self.updateImageAreasOpacity(opacity: opacity, state: .ended, needListView: false)
                 self.turnOverBox.isHidden = false
                 self.opacityTitleLabel.isHidden = false
-//                self.whVC?.state = self._getKeepProportionsButtonState() ? .Act : .Norm
                 let whSta: KMDesignTokenState = self._getKeepProportionsButtonState() ? .Act : .Norm
                 self.whVC?.state = .Norm
                 self._setWHButtonState(whSta)
@@ -699,7 +667,6 @@ class KMEditImagePropertyViewController: NSViewController {
             
             self.wTextFieldItemView.textFiled.isEnabled = true
             self.hTextFieldItemView.textFiled.isEnabled = true
-//            self.whVC?.state = self._getKeepProportionsButtonState() ? .Act : .Norm
             let whSta: KMDesignTokenState = self._getKeepProportionsButtonState() ? .Act : .Norm
             self.whVC?.state = .Norm
             self._setWHButtonState(whSta)
@@ -794,13 +761,10 @@ class KMEditImagePropertyViewController: NSViewController {
                 }
             }
             
-//            self.listView.editingAreas()!.count == 1 &&
             if (self.listView.editingAreas()?.first is CPDFEditImageArea) {
                 self.listView.selectImageAreas = self.listView.editingAreas()!.first as? CPDFEditImageArea
-//                self.editImageView.image = self.listView.selectImageAreas.thumbnailImage
                 self.opacitySlider.objectValue = self.listView.opacity(for: self.listView.selectImageAreas)
                 self.opacityVC?.stringValue = Int(opacity * 100).description + "%"
-//                self.editImageView.alphaValue = opacity
             }
         }
     }
@@ -833,7 +797,6 @@ class KMEditImagePropertyViewController: NSViewController {
         let wEqual = self.handdler?.editAreasBoundsIsEqualForWidth() ?? false
         let hEqual = self.handdler?.editAreasBoundsIsEqualForHeight() ?? false
         if (wEqual && hEqual) {
-//            self.whVC?.state = self._getKeepProportionsButtonState() ? .Act : .Norm
             let state: KMDesignTokenState = self._getKeepProportionsButtonState() ? .Act : .Norm
             self.whVC?.state = .Norm
             self._setWHButtonState(state)
@@ -877,19 +840,16 @@ extension KMEditImagePropertyViewController {
     }
     
     @objc func whAction(_ sender: AnyObject) {
-//        let state = self.whVC?.state ?? .None
         let state = self.whState_
         if state == .Disabled {
             return
         }
         if state == .Act {
-//            self.whVC?.state = .Norm
             self.whVC?.state = .Norm
             self._setWHButtonState(.Norm)
             
             self._setKeepProportionsButtonState(state: false)
         } else {
-//            self.whVC?.state = .Act
             self.whVC?.state = .Norm
             self._setWHButtonState(.Act)
             
@@ -908,7 +868,6 @@ extension KMEditImagePropertyViewController {
             let imageArea = areas!.first as! CPDFEditImageArea
             self.listView.rotate(with: imageArea, rotate: 90)
             self.listView.selectImageAreas = imageArea
-//            self.editImageView.image = self.listView.selectImageAreas.thumbnailImage
         } else if areas!.count > 1 {
             for imagesArea in imagesAreas {
                 self.listView.rotate(with: imagesArea, rotate: 90)
@@ -930,7 +889,6 @@ extension KMEditImagePropertyViewController {
             if self.listView.editingAreas()!.count == 1 && (self.listView.editingAreas()!.first is CPDFEditImageArea) {
                 self.listView.selectImageAreas = self.listView.editingAreas()!.first as? CPDFEditImageArea
             }
-//            self.editImageView.image = self.listView.selectImageAreas.thumbnailImage
         } else {
             for imagesArea in imagesAreas {
                 self.listView.rotate(with: imagesArea, rotate: -90)
@@ -952,7 +910,6 @@ extension KMEditImagePropertyViewController {
                 if item is CPDFEditImageArea {
                     self.listView.horizontalMirror(with: item as? CPDFEditImageArea)
                     if areas?.count == 1 {
-//                        self.editImageView.image = (item as AnyObject).thumbnailImage
                     }
                 } else {
                     for imagesArea in imagesAreas {
@@ -976,7 +933,6 @@ extension KMEditImagePropertyViewController {
             for item in areas! {
                 if item is CPDFEditImageArea {
                     self.listView.verticalMirror(with: item as? CPDFEditImageArea)
-//                    self.editImageView.image = self.listView.selectImageAreas.thumbnailImage
                 } else {
                     for imagesArea in imagesAreas {
                         self.listView.verticalMirror(with: imagesArea)
@@ -1141,7 +1097,6 @@ extension KMEditImagePropertyViewController: KMTextFieldDelegate {
             let areas = self.handdler?.editingImageAreas ?? []
             self.listView.editAreaBoundUpdating = true
             for area in areas {
-//                let state =  self.whVC?.state ?? .None
                 let state = self.whState_
                 var bounds = area.bounds
                 var width = string?.stringToCGFloat() ?? 0
@@ -1157,7 +1112,6 @@ extension KMEditImagePropertyViewController: KMTextFieldDelegate {
                     self.wTextFieldItemView.stringValue = value
                 }
                 let wOffset = width-bounds.size.width
-//                bounds.origin.x = max(0, (pageBounds.size.width-width)*0.5)
                 bounds.origin.x = max(0, bounds.origin.x-wOffset * 0.5)
                 bounds.origin.x = min(bounds.origin.x, pageBounds.size.width-width)
                 
@@ -1174,7 +1128,7 @@ extension KMEditImagePropertyViewController: KMTextFieldDelegate {
                 } else {
                     bounds.size.width = width
                 }
-
+                
                 self.listView.setBoundsEditArea(area, withBounds: bounds)
             }
             
@@ -1186,19 +1140,16 @@ extension KMEditImagePropertyViewController: KMTextFieldDelegate {
             let string = self.hTextFieldItemView.textFiled.formatter?.string(for: number)
             self.hTextFieldItemView.stringValue = string ?? ""
             
-//            let areas = self.listView?.editingAreas() as? [CPDFEditArea] ?? []
             let areas = self.handdler?.editingImageAreas ?? []
             self.listView.editAreaBoundUpdating = true
             for area in areas {
-//            if let area = areas.first as? CPDFEditImageArea {
-//                let state =  self.whVC?.state ?? .None
                 let state = self.whState_
                 var bounds = area.bounds
                 var height = string?.stringToCGFloat() ?? 0
                 if height == 0 {
                     return
                 }
-
+                
                 let pageBounds = area.page?.bounds ?? .zero
                 if height > NSHeight(pageBounds) {
                     height = NSHeight(pageBounds)
@@ -1207,7 +1158,6 @@ extension KMEditImagePropertyViewController: KMTextFieldDelegate {
                     self.hTextFieldItemView.stringValue = value
                 }
                 let hOffset = height-bounds.size.height
-//                bounds.origin.y = max(0, (pageBounds.size.height-height)*0.5)
                 bounds.origin.y = max(0, bounds.origin.y-hOffset * 0.5)
                 bounds.origin.y = min(bounds.origin.y, pageBounds.size.height-height)
                 
@@ -1232,12 +1182,6 @@ extension KMEditImagePropertyViewController: KMTextFieldDelegate {
                 self._updateWHProportionButtonEnableState()
             }
         } else if self.rotateTextFieldItemView.isEqual(to: textField) {
-//            let stringValue = self.rotateTextFieldItemView.stringValue
-//            let number = NSNumber(value: Int(stringValue ?? "") ?? 0)
-//            let formatter = NumberFormatter()
-//            let string = formatter.string(for: number)
-//            let string = self.rotateTextFieldItemView.kFormatter?.string(for: number)
-//            self.rotateTextFieldItemView.stringValue = string
         }
     }
 }

PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/EditPDF/KMEditImagePropertyViewController.xib → PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/KMEditImagePropertyViewController.xib


+ 38 - 176
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/EditPDF/KMEditPDFTextPropertyViewController.swift

@@ -94,16 +94,7 @@ class KMSliderItemView: NSView {
     }
 }
 
-enum CPDFActiveAreasAlignType : Int {
-    case Left
-    case Vertical
-    case Right
-    case Top
-    case Horizontally
-    case Bottom
-    case DisHorizontally
-    case DisVertical
-}
+
 
 class KMEditPDFTextPropertyViewController: NSViewController {
     @IBOutlet weak var contentView: NSClipView!
@@ -164,7 +155,7 @@ class KMEditPDFTextPropertyViewController: NSViewController {
     @IBOutlet weak var fontReduceBox: NSBox!
     var fontAddVC: KMDesignButton?
     var fontReduceVC: KMDesignButton?
-
+    
     @IBOutlet weak var opacityBox: NSBox!
     var opacitVC: KMDesignSelect?
     var sliderItemView: KMSliderItemView?
@@ -188,7 +179,6 @@ class KMEditPDFTextPropertyViewController: NSViewController {
                         self.fontNameVC?.stringValue = fontName
                     }
                 } else {
-//                    self.fontNameVC?.stringValue = "Helvetica"
                     let areas = self.handdler?.editingTextAreas ?? []
                     if areas.count == 1 {
                         let cfont = self.listView.editingSelectionCFont(byRangeEdit: areas.first)
@@ -244,9 +234,7 @@ class KMEditPDFTextPropertyViewController: NSViewController {
         self.addNotification()
         self.setup()
         self.initData()
-//        self.reloadData()
         self.updateLanguage()
-//        self.updatePreviewImage()
         self.updateUI()
         
         self.headerBox.isHidden = true
@@ -256,23 +244,21 @@ class KMEditPDFTextPropertyViewController: NSViewController {
     }
     
     func setup() {
-//        self.backgroundView.backgroundColor(KMAppearance.Layout.bgDrakColor())
         self.propertyTitle.font = NSFont.SFProTextSemiboldFont(14.0)
         self.propertyTitle.textColor = KMAppearance.Layout.h0Color()
-
+        
         self.fontTitleLabel.font = NSFont.SFProTextRegularFont(12.0)
         self.fontTitleLabel.textColor = KMAppearance.Layout.h0Color()
-
+        
         self.headerBox.borderWidth = 1
         self.headerBox.borderColor = KMAppearance.Interactive.s0Color()
         self.headerBox.cornerRadius = 4
         self.headerBox.fillColor = KMAppearance.Layout.l1Color()
         
-        //
         self.fontColorButton.border(NSColor.clear, 0, 10)
         self.fontColorButton.target = self
         self.fontColorButton.action = #selector(fontColorAction)
-        //alignment
+        
         leftAlignmentVC = KMDesignPropertySelector.init(withType: .Icon_Btn)
         leftAlignmentBox.contentView = leftAlignmentVC?.view
         leftAlignmentBox.fillColor = NSColor.clear
@@ -310,7 +296,6 @@ class KMEditPDFTextPropertyViewController: NSViewController {
         
         let familyNames = CPDFFont.familyNames
         fontNameVC = KMDesignSelect.init(withType: .PopButton)
-//        fontNameVC?.isScrollPop = true
         fontNameBox.contentView = fontNameVC?.view
         fontNameBox.fillColor = NSColor.clear
         fontNameVC?.addItems(withObjectValues: familyNames)
@@ -444,7 +429,7 @@ class KMEditPDFTextPropertyViewController: NSViewController {
         textPresuppositionResetVC?.borderWidth_disabled = 1
         textPresuppositionResetVC?.borderColor_disabled = KMAppearance.view_border_dis_color()
         textPresuppositionResetVC?.updateUI()
-         
+        
         self.colorBox.borderColor = KMAppearance.Interactive.s0Color()
         
         let sliderItemView = KMSliderItemView()
@@ -457,7 +442,7 @@ class KMEditPDFTextPropertyViewController: NSViewController {
         sliderItemView.maxValue = 1
         sliderItemView.valueChange = { [weak self] value in
             self?.opacitVC?.stringValue = String(format: "%0.f%%", value*100)
-             
+            
             if let data = self?.opacitVC {
                 self?.km_comboBoxSelectionDidChange(data)
             }
@@ -482,13 +467,6 @@ class KMEditPDFTextPropertyViewController: NSViewController {
         
         self.alignmentView.didChange = { [unowned self] view, areasArray, boundsArray in
             self.changeAreasAlign(areas: areasArray, newBounds: boundsArray)
-            
-            self._trackEvent()
-            let textAreas = self.handdler?.editingTextAreas ?? []
-            let imageAreas = self.handdler?.editingImageAreas ?? []
-            if textAreas.count > 0 && imageAreas.count > 0 {
-                self._trackAlignEvent()
-            }
         }
         
         self.changeEffectiveAppearance()
@@ -576,24 +554,19 @@ class KMEditPDFTextPropertyViewController: NSViewController {
             self.fontReduceVC?.background_act = KMAppearance.Interactive.m1Color()
             self.fontReduceVC?.background_hov = NSColor(red: 71/255, green: 72/255, blue: 75/255, alpha: 1)
             self.fontReduceVC?.borderColor_hov = KMAppearance.Interactive.a0Color()
-//            self.fontAddVC?.background_act = KMAppearance.Interactive.m1Color()
-//            self.fontAddVC?.background_hov = NSColor(red: 71/255, green: 72/255, blue: 75/255, alpha: 1)
-//            self.fontAddVC?.borderColor_hov = KMAppearance.Interactive.a0Color()
             self.fontReduceVC?.image_disabled = NSImage(named: "KMImageNameEditPDFFontReduceDisabled")!
             self.fontReduceVC?.background_disabled = NSColor(white: 96/255.0, alpha: 1.0)
             
             self.leftAlignmentVC?.background_sel = KMAppearance.Interactive.m1Color()
             self.centerAlignmentVC?.background_sel = KMAppearance.Interactive.m1Color()
             self.rightAlignmentVC?.background_sel = KMAppearance.Interactive.m1Color()
- 
+            
             let color = NSColor(hex: "#0E1114")
-//            fontNameVC?.popViewControllerBackground = KMAppearance.Layout.bgColor()
             fontNameVC?.popViewControllerBackground = color
         } else {
             self.backgroundView.backgroundColor(NSColor.km_init(hex: "#FAFAFA"))
-
+            
             self.propertyTitle.textColor = KMAppearance.Layout.h0Color()
-//            self.fontTitleLabel.textColor = KMAppearance.Layout.h0Color()
             self.fontTitleLabel.textColor = NSColor(hex: "#616469")
             self.sliderItemView?.titleLabel.textColor = NSColor(hex: "#616469")
             self.alignmentView.alignmentLabel.textColor = NSColor(hex: "#616469")
@@ -684,19 +657,14 @@ class KMEditPDFTextPropertyViewController: NSViewController {
             
             self.fontItalicVC?.initDefaultValue()
             
-//            self.fontAddVC?.pagination()
             self.fontAddVC?.ignoreDisabledImage = true
             self.fontAddVC?.initDefaultValue()
             self.fontAddVC?.image = NSImage(named: "KMImageNameEditPDFFontAdd")!
-//            self.fontAddVC?.image_disabled = NSImage(named: "KMImageNameEditPDFFontAddDisabled")!
-//            self.fontAddVC?.background_disabled = NSColor.red
             self.fontAddVC?.background_disabled = KMAppearance.buttonDisabledColor()
             
             self.fontReduceVC?.ignoreDisabledImage = true
             self.fontReduceVC?.initDefaultValue()
             self.fontReduceVC?.image = NSImage(named: "KMImageNameEditPDFFontReduce")!
-//            self.fontAddVC?.image_disabled = NSImage(named: "KMImageNameEditPDFFontAddDisabled")!
-//            self.fontAddVC?.background_disabled = NSColor.red
             self.fontReduceVC?.background_disabled = KMAppearance.buttonDisabledColor()
         }
     }
@@ -754,7 +722,6 @@ class KMEditPDFTextPropertyViewController: NSViewController {
             if areas is CPDFEditTextArea  {
                 let area = areas as! CPDFEditTextArea
                 let cFont = self.listView.editingSelectionCFont(byRangeEdit: area)
-//                let cFont = self.listView.editingSelectionCFont(with: area)
                 var sizeString = "\(self.listView.editingSelectionFontSize(byRangeEdit: area))"
                 var fontName: String = cFont?.familyName ?? "Helvetica"
                 if fontName.count == 0 {
@@ -766,15 +733,9 @@ class KMEditPDFTextPropertyViewController: NSViewController {
                 }
                 let alignment = self.listView.currentSelectionAlignment(byRangeEdit: area)
                 let color = self.listView.editingSelectionFontColor(byRangeEdit: area) ?? NSColor.black
-//                fontName = KMEditPDFTextManager.manager.transformAreaTextFontName(fontName: fontName, fontNames: self.fontNameVC?.items ?? [])
                 
                 self.fontNameVC?.stringValue = cFont?.familyName == nil ? "--" : fontName
-//                if let data = self.listView?.isBoldCurrentSelection(byRangeEdit: area), data {
-//                    fontName += "-Bold"
-//                }
-//                if let data = self.listView?.isItalicCurrentSelection(byRangeEdit: area), data {
-//                    fontName += "-Italic"
-//                }
+                
                 //获取默认数据
                 if needDefaultData {
                     let model = KMEditPDFTextManager.manager.fetchUserDefaultData(type: .commonly)
@@ -784,21 +745,12 @@ class KMEditPDFTextPropertyViewController: NSViewController {
                 }
                 
                 self.updateTextTextPresuppositionState()
-//                var fontN = fontName
-//                if let data = cFont {
-//                    fontN = CPDFFont.convertAppleFont(data) ?? fontName
-//                }
                 self.updateTextPresupposition(fontName: fontName, style: fontStyle, size: CGFloat(Float(sizeString)!), needChangeListView: false)
                 self.currentColor = color
-//                DispatchQueue.main.async {
-//                    NSColorPanel.shared.color = color
-//                }
                 self.fontColorButton.image = self.swatchWithColor(color: color, size: NSSize(width: 20, height: 20))
                 self.alignment = alignment
                 self.selectAlignment(alignment: alignment)
                 
-//                self.updatePreviewImage()
-                
                 let opacity = self.listView.opacity(for: areas as? CPDFEditArea)
                 let sliderView = self.opacityBox.contentView as? KMSliderItemView
                 sliderView?.doubleValue = Double(opacity)
@@ -816,7 +768,6 @@ class KMEditPDFTextPropertyViewController: NSViewController {
             if let data = self.handdler?.editAreasFontNameIsEqual(), data {
                 if let area = self.handdler?.editingTextAreas.first {
                     let font = self.listView.editingSelectionCFont(byRangeEdit: area)
-//                    let font = self.listView.editingSelectionCFont(with: area)
                     self.fontNameVC?.stringValue = font?.familyName ?? ""
                 }
             } else {
@@ -825,7 +776,6 @@ class KMEditPDFTextPropertyViewController: NSViewController {
             
             if let data = self.handdler?.editAreasFontStyleIsEqual(), data {
                 if let area = self.handdler?.editingTextAreas.first {
-//                    if let styleName = self.listView.editingSelectionCFont(with: area)?.styleName, styleName.isEmpty == false {
                     if let styleName = self.listView.editingSelectionCFont(byRangeEdit: area)?.styleName, styleName.isEmpty == false {
                         self.fontStyleVC?.stringValue = styleName
                     } else {
@@ -930,8 +880,7 @@ class KMEditPDFTextPropertyViewController: NSViewController {
 //MARK: - Action
 extension KMEditPDFTextPropertyViewController {
     @IBAction func fontColorAction(_ sender: Any) {
-        self._trackEvent()
-        
+     
         let color = self.listView.editingSelectionFontColor(with: self.selectAreas.first as? CPDFEditTextArea)
         let panel = NSColorPanel.shared
         panel.setTarget(self)
@@ -944,7 +893,7 @@ extension KMEditPDFTextPropertyViewController {
             }
         }
     }
-
+    
     @objc func fontColorChangeAction() {
         let color = NSColorPanel.shared.color
         self.currentColor = color
@@ -959,7 +908,6 @@ extension KMEditPDFTextPropertyViewController {
         } else {
             KMEditPDFTextManager.manager.setCommonlyFontColor(color: self.currentColor)
         }
-//        self.updatePreviewImage()
     }
     
     @objc func fontBoldAction(_ sender: AnyObject) {
@@ -976,7 +924,7 @@ extension KMEditPDFTextPropertyViewController {
             self.fontBoldVC?.state = .Act
             boldV = true
         }
-
+        
         let index = self.textPresuppositionVC?.indexOfSelectedItem ?? 0
         let type = KMEditPDFTextFontType.typeOfRawValue(value: KMEditPDFTextFontType.allValues()[index])
         let model = KMEditPDFTextManager.manager.fetchUserDefaultData(type: type)
@@ -986,8 +934,7 @@ extension KMEditPDFTextPropertyViewController {
         KMEditPDFTextManager.manager.changeTextPresupposition(fontName: model_com.fontName, fontStyle: model_com.fontStyle, fontSize: model_com.fontSize, type: .commonly, bold: boldV, italic: nil)
         
         self.handdler?.fontBoldAction()
-        
-        self._trackEvent()
+       
     }
     
     @objc func fontItalicAction(_ sender: AnyObject) {
@@ -1013,8 +960,7 @@ extension KMEditPDFTextPropertyViewController {
         KMEditPDFTextManager.manager.changeTextPresupposition(fontName: model_com.fontName, fontStyle: model_com.fontStyle, fontSize: model_com.fontSize, type: .commonly, bold: nil, italic: italicV)
         
         self.handdler?.fontItalicAction()
-        
-        self._trackEvent()
+         
     }
     
     @objc func fontAddAction(_ sender: AnyObject) {
@@ -1026,8 +972,7 @@ extension KMEditPDFTextPropertyViewController {
         let size = Float(self.fontSizeVC?.stringValue.replacingOccurrences(of: "pt", with: "") ?? "12") ?? 1
         self.fontSizeVC?.stringValue = String(format: "%.0fpt", size+1)
         self.km_comboBoxSelectionDidChange(self.fontSizeVC!)
-        
-        self._trackEvent()
+         
     }
     
     @objc func fontReduceAction(_ sender: AnyObject) {
@@ -1042,8 +987,7 @@ extension KMEditPDFTextPropertyViewController {
         }
         self.fontSizeVC?.stringValue = String(format: "%.0fpt", size-1)
         self.km_comboBoxSelectionDidChange(self.fontSizeVC!)
-        
-        self._trackEvent()
+         
     }
     
     @objc func leftAlignmentAction(sender: NSButton?) {
@@ -1053,7 +997,7 @@ extension KMEditPDFTextPropertyViewController {
         self.updateAlignment(alignment: .left)
         if let _ = sender {
             KMEditPDFPopToolBarWindow.shared.updateTextAlign(align: .left)
-            self._trackEvent()
+ 
         }
     }
     
@@ -1066,8 +1010,7 @@ extension KMEditPDFTextPropertyViewController {
         if let _ = sender {
             KMEditPDFPopToolBarWindow.shared.updateTextAlign(align: .center)
         }
-        
-        self._trackEvent()
+         
     }
     
     @objc func rightAlignmentAction(sender: NSButton?) {
@@ -1079,8 +1022,6 @@ extension KMEditPDFTextPropertyViewController {
         if let _ = sender {
             KMEditPDFPopToolBarWindow.shared.updateTextAlign(align: .right)
         }
-        
-        self._trackEvent()
     }
     
     func selectAlignment(alignment: NSTextAlignment) {
@@ -1134,8 +1075,7 @@ extension KMEditPDFTextPropertyViewController {
         createFilePopover.behavior = .semitransient
         createFilePopover.setValue(true, forKey: "shouldHideAnchor")
         createFilePopover.show(relativeTo: CGRect(x: sender.bounds.origin.x, y: -10, width: sender.bounds.size.width, height: sender.bounds.size.height), of: sender, preferredEdge: .maxY)
-        
-//        vc.customBoxWidthLayoutConstraint.constant = self.popWidth ?? sender.frame.width
+         
         vc.downCallback = { [unowned self](downEntered: Bool, count: String) -> Void in
             if downEntered {
                 if count == NSLocalizedString("Reset", comment: "") {
@@ -1153,29 +1093,20 @@ extension KMEditPDFTextPropertyViewController {
         if areas is CPDFEditTextArea  {
             var size: CGFloat = (abs(self.listView.editingSelectionFontSize(byRangeEdit: areas as? CPDFEditTextArea)))
             let cfont = self.listView.editingSelectionCFont(byRangeEdit: areas as? CPDFEditTextArea)
-//            let cfont = self.listView.editingSelectionCFont(with: areas as? CPDFEditTextArea)
             var fontName = cfont?.familyName ?? "Helvetica"
-//            fontName = KMEditPDFTextManager.manager.transformAreaTextFontName(fontName: fontName, fontNames: self.fontNameVC?.items ?? [])
             
             var isBold = false
             if let data = self.listView?.isBoldCurrentSelection(byRangeEdit: areas as? CPDFEditTextArea) {
-//                fontName += "-Bold"
                 isBold = data
             }
             var isItalic = false
             if let data = self.listView?.isItalicCurrentSelection(byRangeEdit: areas as? CPDFEditTextArea) {
-//                fontName += "-Italic"
                 isItalic = data
             }
-//            var fontN = fontName
-//            if let data = cfont {
-//                fontN = CPDFFont.convertAppleFont(data) ?? fontName
-//            }
             
             let models = KMEditPDFTextManager.manager.fetchAllUserDefaultData()
             var index = 0
-            //  && model.bold == isBold && model.italic == isItalic
-            for i in 0...models.count - 1 {
+             for i in 0...models.count - 1 {
                 let model = models[i]
                 if model.fontName == fontName && model.fontStyle == cfont?.styleName && size == model.fontSize {
                     index = i
@@ -1203,7 +1134,6 @@ extension KMEditPDFTextPropertyViewController {
                 KMEditPDFTextManager.manager.setFontAlignment(alignment: alignment)
             }
             self.alignment = alignment
-//            self.updatePreviewImage()
         }
     }
     
@@ -1244,7 +1174,6 @@ extension KMEditPDFTextPropertyViewController: KMSelectPopButtonDelegate {
             self.updateTextPresupposition(type: type)
         } else if obj == fontNameVC {
             self.updateFontNameAndStyle(name: obj.stringValue, style: fontStyle)
-//            self.updatePreviewImage()
             let win = KMEditPDFPopToolBarWindow.shared
             if win.isVisible {
                 (win.contentViewController as? KMEditPDFPopToolBarController)?.toolbarView?.reloadData()
@@ -1252,12 +1181,10 @@ extension KMEditPDFTextPropertyViewController: KMSelectPopButtonDelegate {
         } else if obj == fontSizeVC {
             let size = CGFloat(Float((obj.stringValue.replacingOccurrences(of: "pt", with: "")))!)
             self.updateFontSize(size: size)
-//            self.updatePreviewImage()
             
             KMEditPDFPopToolBarWindow.shared.updateFontSizeButtons(enable: true)
         } else if obj == fontStyleVC {
             self.updateFontNameAndStyle(name: fontName, style: obj.stringValue)
-//            self.updatePreviewImage()
         } else if obj == self.opacitVC {
             let stringValue = self.opacitVC?.stringValue ?? ""
             let value = (stringValue.components(separatedBy: "%").first?.stringToCGFloat() ?? 0) / 100
@@ -1298,7 +1225,6 @@ extension KMEditPDFTextPropertyViewController: KMSelectPopButtonDelegate {
             return
         }
         if let label = cellView.contentView?.subviews.first as? NSTextField {
-            /* 14.0 "SFProText-Regular" */
             
             let allValues = KMEditPDFTextFontType.allValues()
             let idx = allValues.count-index-1
@@ -1326,10 +1252,9 @@ extension KMEditPDFTextPropertyViewController: KMSelectPopButtonDelegate {
             }
             let model = KMEditPDFTextManager.manager.fetchUserDefaultData(type: type)
             let fontName: String = model.fontName
-//            let size: CGFloat = model.fontSize
             var fontN: String = fontName
             if let cfont = CPDFFont.mappingFont(withFontString: fontName) {
-                 fontN = CPDFFont.convertAppleFont(cfont) ?? fontName
+                fontN = CPDFFont.convertAppleFont(cfont) ?? fontName
             }
             var bold = fontName.contains("Bold")
             var italic = fontName.contains("Oblique") || fontName.contains("Italic")
@@ -1340,33 +1265,22 @@ extension KMEditPDFTextPropertyViewController: KMSelectPopButtonDelegate {
                 italic = model.italic
             }
             
-//            if let data = NSFont(name: fontN, size: fontSidze) {
-//                let attri = NSMutableAttributedString(attributedString: label.attributedStringValue)
-//                attri.addAttribute(.font, value: data, range: NSMakeRange(0, attri.string.count))
-//                label.attributedStringValue = attri
-//            } else {
-                let attri = NSMutableAttributedString(attributedString: label.attributedStringValue)
-                if bold {
-                    attri.addAttribute(.font, value: NSFont.boldSystemFont(ofSize: fontSize), range: NSMakeRange(0, attri.string.count))
-                } else {
-                    attri.addAttribute(.font, value: NSFont.systemFont(ofSize: fontSize), range: NSMakeRange(0, attri.string.count))
-                }
-                if italic {
-                    attri.addAttribute(.obliqueness, value: 0.3, range: NSMakeRange(0, attri.string.count))
-                }
-                label.attributedStringValue = attri
-//            }
+            let attri = NSMutableAttributedString(attributedString: label.attributedStringValue)
+            if bold {
+                attri.addAttribute(.font, value: NSFont.boldSystemFont(ofSize: fontSize), range: NSMakeRange(0, attri.string.count))
+            } else {
+                attri.addAttribute(.font, value: NSFont.systemFont(ofSize: fontSize), range: NSMakeRange(0, attri.string.count))
+            }
+            if italic {
+                attri.addAttribute(.obliqueness, value: 0.3, range: NSMakeRange(0, attri.string.count))
+            }
+            label.attributedStringValue = attri
+            
         }
     }
     
     func km_SelectPopoverWillShow(_ obj: KMDesignSelect) {
-        if obj.isEqual(to: self.fontNameVC) {
-            self._trackEvent()
-        } else if obj.isEqual(to: self.fontStyleVC) {
-            self._trackEvent()
-        } else if obj.isEqual(to: self.fontSizeVC) {
-            self._trackEvent()
-        }
+        
     }
 }
 
@@ -1374,28 +1288,10 @@ extension KMEditPDFTextPropertyViewController: KMSelectPopButtonDelegate {
 extension KMEditPDFTextPropertyViewController {
     //MARK: 基本属性调整
     func updateTextPresupposition(fontName: String, style: String, size: CGFloat, needChangeListView: Bool = true) {
-//        let fontNameArray = fontName.components(separatedBy: "-")
-//        var name = ""
-//        var style = ""
-//        if fontNameArray.count > 0 {
-//            name = fontNameArray.first!
-//        } else {
-//            name = "Helvetica"
-//        }
-//
-//        if fontNameArray.count == 4 {
-//            style = "\(fontNameArray[2]) \(fontNameArray[3])"
-//        } else if fontNameArray.count == 3 {
-//            style = "\(fontNameArray[1]) \(fontNameArray[2])"
-//        } else if fontNameArray.count == 2 {
-//            style = fontNameArray.last!
-//        } else {
-//            style = "Regular"
-//        }
+        
         
         self.updateFontNameAndStyle(name: fontName, style: style, needChangeListView: needChangeListView, needSave: false)
         self.updateFontSize(size: size, needChangeListView: needChangeListView, needSave: false)
-//        self.updatePreviewImage()
     }
     
     func resetTextPresuppositionData() {
@@ -1422,27 +1318,21 @@ extension KMEditPDFTextPropertyViewController {
 }
 
 //MARK: - Private
-// 更新字体名称+字重
 
 extension KMEditPDFTextPropertyViewController {
-    // 更新字体名称 和 字重
     
     func updateFontNameAndStyle(name: String, style: String, needChangeListView: Bool = true, needSave: Bool = true) {
-        //        if fontName != name || fontStyle != style {
-//        let styleArray = defaultFontStyles //KMEditPDFTextManager.manager.fetchFontStyleWithFontName(fontName: name)
-//        var styleString = KMEditPDFTextManager.manager.checkFontStyle(style: style)
+        
         var styleString = style
         let fontStyleNames = CPDFFont.fontNames(forFamilyName: name)
         if !fontStyleNames.contains(style) {
             if fontStyleNames.isEmpty {
                 self.fontStyleVC?.addItems(withObjectValues: [style])
                 self.fontStyleVC?.selectItem(at: 0)
-    //            styleString = KMEditPDFTextManager.manager.checkFontStyle(style: self.fontStyleVC!.stringValue)
                 styleString = style
             } else {
                 self.fontStyleVC?.addItems(withObjectValues: fontStyleNames)
                 self.fontStyleVC?.selectItem(at: 0)
-    //            styleString = KMEditPDFTextManager.manager.checkFontStyle(style: self.fontStyleVC!.stringValue)
                 styleString = fontStyleNames.first ?? ""
             }
         } else {
@@ -1450,30 +1340,14 @@ extension KMEditPDFTextPropertyViewController {
             self.fontStyleVC?.selectItem(at: fontStyleNames.firstIndex(of: style) ?? 0)
         }
         
-//        var fontName = "\(name)-\(styleString)"
-//        if styleString.count == 0 {
-//            fontName = name
-//        }
-        
         //数据保存返回
         if self.selectAreas.count > 0 {
             if needChangeListView {
                 let areas = self.handdler?.editingTextAreas ?? []
                 for area in areas {
-//                    self.listView.setEditingSelectionFontName(name, with: area)
                     let font = CPDFFont(familyName: name, fontStyle: styleString)
                     self.listView.setEditSelectionCFont(font, with: area)
-//                    if styleString.contains("Bold") {
-//                        self.listView.setCurrentSelectionIsBold(true, with: area)
-//                    } else {
-//                        self.listView.setCurrentSelectionIsBold(false, with: area)
-//                    }
-//
-//                    if styleString.contains("Oblique") || styleString.contains("Italic") {
-//                        self.listView.setCurrentSelectionIsItalic(true, with: area)
-//                    } else {
-//                        self.listView.setCurrentSelectionIsItalic(false, with: area)
-//                    }
+                    
                 }
             }
         } else {
@@ -1484,7 +1358,6 @@ extension KMEditPDFTextPropertyViewController {
         }
         
         self.fontName = name
-//        self.fontStyle = self.fontStyleVC?.stringValue ?? "Regular"
         self.fontStyle = styleString
         
         if needSave {
@@ -1498,13 +1371,11 @@ extension KMEditPDFTextPropertyViewController {
         //刷新样式
         textPresuppositionVC?.addItems(withObjectValues: KMEditPDFTextManager.manager.updateTextPresuppositionFontNameArray())
         textPresuppositionVC?.selectItem(at: textPresuppositionVC!.indexOfSelectedItem)
-        //        }
         
         self._boldButtonStateUpdate(fontStyle: styleString)
     }
     
     func updateFontSize(size: CGFloat, needChangeListView: Bool = true, needSave: Bool = true) {
-        //        var fontSize = Float((self.fontSizeVC?.stringValue.replacingOccurrences(of: "pt", with: ""))!) ?? 8.0
         if fontSize != size {
             let areas = self.handdler?.editingTextAreas ?? []
             if areas.count > 0 {
@@ -1590,13 +1461,11 @@ extension KMEditPDFTextPropertyViewController {
         
         let editringareas = self.selectAreas
         let count = editringareas.count
-//        let editingSelectionString = self.listView.editingSelectionString()
         let editingSelectionAlignment = self.listView.editingSelectionAlignment(with: editringareas.first as? CPDFEditTextArea)
         
         if count == 1 {
             let areas = editringareas.first
             if areas is CPDFEditTextArea {
-//                string = editingSelectionString ?? NSLocalizedString("Sample", comment: "")
                 alignment = editingSelectionAlignment
             }
         }
@@ -1612,13 +1481,6 @@ extension KMEditPDFTextPropertyViewController {
     func supportFontSize() -> [String] {
         return ["8pt", "9pt", "10pt", "11pt", "12pt", "14pt", "16pt", "18pt", "20pt", "22pt", "24pt", "26pt", "28pt", "36pt", "48pt", "72pt"]
     }
-    
-    private func _trackEvent() {
-        kTrackEventManager.trackEvent(event: "SubTbr_EditPDF", withProperties: ["SubTbr_EditText":"SubTbr_EditText_PropertiesPanel_All"])
-    }
-    
-    private func _trackAlignEvent() {
-        kTrackEventManager.trackEvent(event: "SubTbr_EditPDF", withProperties: ["SubTbr_EditText":"SubTbr_EditContent_AlignContent"])
-    }
+     
 }
 

PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/EditPDF/KMEditPDFTextPropertyViewController.xib → PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/KMEditPDFTextPropertyViewController.xib


+ 1 - 7
PDF Office/PDF Master/Class/PDFTools/EditPDF/Model/KMEditPDFModel.swift

@@ -7,9 +7,7 @@
 
 import Cocoa
 
-class KMEditPDFModel: NSObject {
-//
-//    var cFont: CPDFFont?
+class KMEditPDFModel: NSObject { 
     var editingAreas: [CPDFEditArea]?
     
     var textAreas: [CPDFEditTextArea]? {
@@ -219,10 +217,6 @@ class KMEditPDFModel: NSObject {
         if datas.isEmpty {
             return false
         }
-//        if self.editAreasHavTextArea() {
-//            return false
-//        }
-//        let datas = self._editAreasRotates()
         if datas.count == 1 {
             return true
         }

+ 17 - 22
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/EditPDF/Manager/KMEditPDFTextManager.swift

@@ -38,6 +38,17 @@ let ALIGNMENT_KEY = "FontAlignment"
 let Bold_KEY = "bold"
 let Italic_KEY = "italic"
 
+enum CPDFActiveAreasAlignType : Int {
+    case Left
+    case Vertical
+    case Right
+    case Top
+    case Horizontally
+    case Bottom
+    case DisHorizontally
+    case DisVertical
+}
+
 //字体样式类型
 enum KMEditPDFTextFontType: String, CaseIterable {
     case commonly = "Commonly"
@@ -141,11 +152,7 @@ extension KMEditPDFTextManager {
                 fontNameArray.append(fontName as! String)
             }
             textFontNames = fontNameArray
-            
-//            if listView != nil {
-//                textFontNames = listView!.getEditFontList() as? [String] ?? []
-//                textFontNames.sort()
-//            }
+             
         }
         return textFontNames
     }
@@ -335,9 +342,7 @@ extension KMEditPDFTextManager {
     }
     
     func setCommonlyFontColor(color: NSColor) {
-//        UserDefaults.standard.setPDFListViewColor(color, forKey: FontColor_USERDEFAULTS)
-//        UserDefaults.standard.synchronize()
-        
+ 
         let userDefaults = UserDefaults.standard
         let model = self.fetchUserDefaultData(type: .commonly)
         let colorString: String = color.toHex(alpha: true) ?? ""
@@ -365,7 +370,7 @@ extension KMEditPDFTextManager {
         }
         
         if style.contains("BoldOblique") || style.contains("BoldItalic") {
-//            result = "Bold Oblique"
+ 
         }
         return result
     }
@@ -445,8 +450,7 @@ extension KMEditPDFTextManager {
 extension KMEditPDFTextManager {
     //设置相应的字体样式
     private func setTextPresupposition(fontName: String, fontStyle: String, fontSize: CGFloat, redefine: Bool = false, change: Bool = false, type: KMEditPDFTextFontType, bold: Bool?, italic: Bool?) {
-//        let tempFontName = self.checkFontName(fontName: fontName)
-        let model = self.fetchUserDefaultData(type: type)
+         let model = self.fetchUserDefaultData(type: type)
         let colorString: String = model.color.toHex(alpha: true) ?? ""
         var boldV = model.bold
         if let data = bold {
@@ -524,14 +528,7 @@ extension KMEditPDFTextManager {
         let change = data[CHANGE_KEY] as? Bool ?? CHANGE_DEFAULT
         let colorString = data[COLOR_KEY] as? String ?? COLOR_DEFAULT
         let alignment = NSTextAlignment(rawValue: data[ALIGNMENT_KEY] as? Int ?? 0) ?? NSTextAlignment.left
-        //特殊情况处理
-//        if fontName.contains("BoldOblique") {
-//            let fontNameArray = fontName.components(separatedBy: "-")
-//            if fontNameArray.count > 0 {
-//                fontName = fontNameArray.first! + "-" + "Bold Oblique"
-//            }
-//        }
-        
+ 
         let fontStyle = data[FONTStyle_KEY] as? String ?? FONTStyle_DEFAULT
         let bold = data[Bold_KEY] as? Bool ?? false
         let italic = data[Italic_KEY] as? Bool ?? false
@@ -548,9 +545,7 @@ extension KMEditPDFTextManager {
         resultModel.fontStyle = fontStyle
         resultModel.bold = bold
         resultModel.italic = italic
-//        if type == .customize {
-//            resultModel.color = UserDefaults.standard.pdfListViewColor(forKey: FontColor_USERDEFAULTS) ?? NSColor.black
-//        }
+ 
         return resultModel
     }
 }

+ 48 - 248
PDF Office/PDF Master/Class/PDFTools/EditPDF/Tools/KMEditPDfHanddler.swift

@@ -13,45 +13,6 @@ import Cocoa
     case close = 2
 }
 
-@objc enum KMSubscribeWaterMarkType: Int {
-    case none       = 0
-    case stamp      = 1
-    case link
-    case sign
-    case editText
-    case editImage
-    case insert
-    case extract
-    case replace
-    case split
-    case delete
-    case rotate
-    case copy
-    case toWord
-    case toExcel
-    case toPPT
-    case toRTF
-    case toCSV
-    case toHTML
-    case toText
-    case toImage
-    case compress
-    case merge
-    case setPassword
-    case removePassword
-    case crop
-    case aiTranslate
-    case aiRewrite
-    case aiCorrect
-    case save
-    
-    func isConvertType() -> Bool {
-        if (self == .toWord || self == .toExcel || self == .toPPT || self == .toRTF || self == .toCSV || self == .toHTML || self == .toText || self == .toImage) {
-            return true
-        }
-        return false
-    }
-}
 
 // EditPDF处理对象
 class KMEditPDfHanddler: NSObject {
@@ -75,25 +36,13 @@ class KMEditPDfHanddler: NSObject {
             return self.listView?.annotationType ?? .unkown
         }
     }
-    
-    weak var rightViewC: KMRightSideViewController? {
-        get {
-            return self.viewC?.rightSideViewController
-        }
-    }
-    
+  
     var subViewType: RightSubViewType {
         get {
-            return self.rightViewC?.subViewType ?? .None
+            return .None
         }
     }
-    
-//    var toolMode: CToolMode {
-//        get {
-//            return
-//        }
-//    }
-    
+     
     var isEditImage: Bool {
         get {
             return self.listView?.isEditImage ?? false
@@ -154,6 +103,7 @@ 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 {
@@ -192,35 +142,23 @@ class KMEditPDfHanddler: NSObject {
         
         // 设置边框颜色
         self.editingConfig?.editingBorderColor = .clear
-        // 设置边框宽度
-//        self.editingConfig?.editingBorderWidth = 10
-        // 内容与边框的间距
-//        self.editingConfig?.editAreaMargin = .init(floatLiteral: 5)
-        // 设置选中块边框颜色
-//        self.editingConfig?.editingSelectionBorderColor = .red
-        // 显示hover边框
+ 
         self.editingConfig?.isShowMouseAreaHover = true
-        
-        // hover
-        // 边框宽度
-//        self.editingConfig?.mouseHoverBorderWidth = 1
+      
         // 边框颜色
         self.editingConfig?.mouseHoverBorderColor = NSColor(hex: "#999999")
         // 边框虚线设置
         self.editingConfig?.mouseHoverBorderDashPattern = [3,3,3]
         // 块填充颜色(拖拽中)
-//        self.editingConfig?.editAreaMoveFillColor = .cyan
-        // 是否显示位置辅助线
+         // 是否显示位置辅助线
         self.editingConfig?.isShowEditingAreaHover = true
         // 辅助线颜色
-//        self.editingConfig?.editingHoverBorderColor = .brown
-        // 支持多选
+         // 支持多选
         self.editingConfig?.isSupportMultipleSelectEditingArea = true
         // 图片是否显示8个操作点
         self.editingConfig?.isDrawRectWithDot = true
         
-//        self.editingConfig?.editingMouseSelectionBorderColor
-        self.editingConfig?.editingMouseSelectionBorderWidth = 1
+         self.editingConfig?.editingMouseSelectionBorderWidth = 1
         self.editingConfig?.editingMouseSelectionBorderDashPattern = [3, 3, 3]
     }
     
@@ -244,7 +182,6 @@ class KMEditPDfHanddler: NSObject {
     }
     
     func closeRightPane() {
-        self.rightViewC?.isHidden = true
         self.viewC?.closeRightPane()
     }
     
@@ -300,8 +237,7 @@ class KMEditPDfHanddler: NSObject {
         var maxX = NSMaxX(areaBounds)
         var maxY = NSMaxY(areaBounds)
         for area in self.editingAreas {
-//            let bounds = area.bounds
-            let bounds = (self.listView?.convert(area.bounds, from: area.page) as? NSRect) ?? .zero
+             let bounds = (self.listView?.convert(area.bounds, from: area.page) as? NSRect) ?? .zero
             areaBounds.origin.x = min(areaBounds.origin.x, bounds.origin.x)
             areaBounds.origin.y = min(areaBounds.origin.y, bounds.origin.y)
             
@@ -371,12 +307,6 @@ class KMEditPDfHanddler: NSObject {
             }
         }
         
-        // 显示新手引导
-        if let toolbarView = (win.contentViewController as? KMEditPDFPopToolBarController)?.toolbarView {
-            if showGuide {
-                self.showGuideView(toolbarView)
-            }
-        }
     }
     
     func hiddenPopWindow() {
@@ -433,76 +363,6 @@ class KMEditPDfHanddler: NSObject {
         self._kRemoveChildWindow(winC.window)
     }
     
-    func showGuideView(_ view: NSView) {
-        DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
-            if KMGuideInfoWindowController.availableShow(.editPDFPopWindow) {
-                var winFrame = self.viewC?.view.window?.frame ?? .zero
-                winFrame.size.height -= 20
-                
-                guard let area = (self.listView?.editingAreas().first as? CPDFEditArea) else {
-                    return
-                }
-                
-                var areaBounds = (self.listView?.convert(area.bounds, from: area.page) as? NSRect) ?? .zero
-                var maxX = NSMaxX(areaBounds)
-                var maxY = NSMaxY(areaBounds)
-                for area in self.editingAreas {
-    //            let bounds = area.bounds
-                    let bounds = (self.listView?.convert(area.bounds, from: area.page) as? NSRect) ?? .zero
-                    areaBounds.origin.x = min(areaBounds.origin.x, bounds.origin.x)
-                    areaBounds.origin.y = min(areaBounds.origin.y, bounds.origin.y)
-                
-                    maxX = max(maxX, NSMaxX(bounds))
-                    areaBounds.size.width = maxX-areaBounds.origin.x
-                
-                    maxY = max(maxY, NSMaxY(bounds))
-                    areaBounds.size.height = maxY-areaBounds.origin.y
-                }
-                
-                let guideWC = KMGuideInfoWindowController.currentWC()
-                guideWC.type = .editPDFPopWindow
-                var viewFrame = areaBounds
-                let tmpY = areaBounds.origin.y+(areaBounds.size.height-KMEditPDFPopGuideView.kHeight+80)
-                if tmpY < 50 {
-                    guideWC.editPDFPopWindowFlag = true
-                    viewFrame.origin.y += (areaBounds.size.height)
-                    viewFrame.origin.x += (areaBounds.size.width*0.5+KMEditPDFPopGuideView.kWidth*0.5)
-                    
-                    viewFrame.origin.y += 20
-                } else {
-                    guideWC.editPDFPopWindowFlag = false
-                    viewFrame.origin.y += (areaBounds.size.height-KMEditPDFPopGuideView.kHeight+80)
-                    viewFrame.origin.x += (areaBounds.size.width*0.5+KMEditPDFPopGuideView.kWidth*0.5)
-                    
-                    viewFrame.size.height = KMEditPDFPopGuideView.kHeight+80
-                    
-                    let offsetY = NSMaxY(winFrame)-NSMaxY(viewFrame)-NSMinY(winFrame)
-                    if offsetY <= 0 {
-                        viewFrame.origin.y += offsetY
-                    }
-                }
-                
-                guideWC.digitalBoxRect = viewFrame
-                var beh = view.window?.collectionBehavior ?? []
-                beh.insert(.canJoinAllSpaces)
-                guideWC.window?.collectionBehavior = beh
-                
-                guideWC.window?.setFrame(winFrame, display: false)
-                guideWC.window?.minSize = winFrame.size
-                guideWC.window?.maxSize = winFrame.size
-                self._kAddchildwindow(guideWC.window!)
-                guideWC.show()
-                DispatchQueue.main.async {
-                    guideWC.interfaceThemeDidChanged(NSApp.appearance?.name ?? .aqua)
-                }
-                
-                guideWC.settingCallback = {
-                    KMPreferenceController.shared.showWindow(nil)
-                }
-            }
-        }
-    }
-    
     func clearData() {
         self.hiddenWindows()
         self._removeNotification()
@@ -547,9 +407,7 @@ extension KMEditPDfHanddler {
     @objc private func _scrollViewDidScroll(_ noti: Notification) {
         if let data = self.listView?.documentView().isEqual(to: noti.object), data {
             let win = KMEditPDFPopToolBarWindow.shared
-            if win.isVisible == false {
-//                return
-            }
+           
             guard let area = (self.listView?.editingAreas()?.first as? CPDFEditArea) else {
                 self.hiddenPopWindow()
                 self.hiddenCropComfirmWindow()
@@ -571,10 +429,7 @@ extension KMEditPDfHanddler {
                 position.y += 26
                 
                 var x = position.x + (NSWidth(areaBounds)-84) * 0.5
-//                let frame = NSMakeRect(x, position.y, 84, 44)
-                
-//                position.x += (areaBounds.size.width*0.5-win.frame.size.width*0.5)
-                x = max(0, x)
+                 x = max(0, x)
                 var y = max(0, position.y)
                 
                 let screenFrame = NSScreen.main?.frame ?? .zero
@@ -598,8 +453,7 @@ extension KMEditPDfHanddler {
             var maxX = NSMaxX(areaBounds)
             var maxY = NSMaxY(areaBounds)
             for area in self.editingAreas {
-    //            let bounds = area.bounds
-                let bounds = (self.listView?.convert(area.bounds, from: area.page) as? NSRect) ?? .zero
+                 let bounds = (self.listView?.convert(area.bounds, from: area.page) as? NSRect) ?? .zero
                 areaBounds.origin.x = min(areaBounds.origin.x, bounds.origin.x)
                 areaBounds.origin.y = min(areaBounds.origin.y, bounds.origin.y)
                 
@@ -623,21 +477,16 @@ extension KMEditPDfHanddler {
             position.y += 26
             
             position.x += (areaBounds.size.width*0.5-win.frame.size.width*0.5)
-//            var x = max(0, position.x)
-            var x = max(winFrame.origin.x, position.x)
+             var x = max(winFrame.origin.x, position.x)
             let width = win.frame.size.width
             let offsetX = x + width - NSMaxX(winFrame)
             if offsetX > 0 { // 超出右编辑
                 x -= offsetX
             }
             var y = max(0, position.y)
-            
-//            let screenFrame = NSScreen.main?.frame ?? .zero
-//            let winMaxY = NSMaxY(winFrame)
+             
             let height = NSHeight(winFrame)
             if y + 44 + 40-20 >= height {
-//            if y + 44 + 40 + 40 >= screenFrame.size.height {
-//                y = screenFrame.size.height - 44 - 40 - 40
                 y = height - 44 - 40 + 20
             }
             
@@ -651,13 +500,11 @@ extension KMEditPDfHanddler {
     }
     
     private func _reloadData_right_text() {
-        self.rightViewC?.eidtPDFTextProperty.handdler = self
-        self.rightViewC?.eidtPDFTextProperty.reloadData()
+      
     }
     
     private func _reloadData_right_image() {
-        self.rightViewC?.eidtPDFImageProperty.handdler = self
-        self.rightViewC?.eidtPDFImageProperty.reloadData()
+    
     }
 }
 
@@ -831,8 +678,7 @@ extension KMEditPDfHanddler {
             }
             
             if abs(width-rect.size.width) > 0.01 {
-//            if width != rect.size.width {
-                return false
+                 return false
             }
         }
         return true
@@ -851,8 +697,7 @@ extension KMEditPDfHanddler {
             if i == 0 {
                 continue
             }
-//            if height != rect.size.height {
-            if abs(height-rect.size.height) > 0.01 {
+             if abs(height-rect.size.height) > 0.01 {
                 return false
             }
         }
@@ -906,8 +751,7 @@ extension KMEditPDfHanddler {
         var datas: [NSColor] = []
         for area in self.editingTextAreas {
             if let data = self.listView?.editingSelectionFontColor(with: area) {
-//            if let data = self.listView?.editingSelectionFontColor(byRangeEdit: area) {
-                datas.append(data)
+                 datas.append(data)
             }
         }
         return datas
@@ -917,8 +761,7 @@ extension KMEditPDfHanddler {
         var datas: [String] = []
         for area in self.editingTextAreas {
             if let data = self.listView?.editingSelectionCFont(byRangeEdit: area)?.styleName {
-//            if let data = self.listView?.editingSelectionCFont(with: area)?.familyName {
-                datas.append(data)
+                 datas.append(data)
             }
         }
         return datas
@@ -928,8 +771,7 @@ extension KMEditPDfHanddler {
         var datas: [String] = []
         for area in self.editingTextAreas {
             if let data = self.listView?.editingSelectionCFont(byRangeEdit: area)?.familyName {
-//            if let data = self.listView?.editingSelectionCFont(with: area)?.familyName {
-                datas.append(data)
+                 datas.append(data)
             }
         }
         return datas
@@ -1143,9 +985,7 @@ extension KMEditPDfHanddler {
         Task { @MainActor in
             self.showCropComfirmWindow()
         }
-        self.rightViewC?.eidtPDFImageProperty.handdler = self
-        self.rightViewC?.eidtPDFImageProperty.updateButtonState(hidden: false)
-        
+       
         self.viewC?.view.window?.makeFirstResponder(self.listView)
     }
     
@@ -1163,10 +1003,7 @@ extension KMEditPDfHanddler {
         
         self.listView?.cropAreas = nil
         self.listView?.isEditImage = false
-        
-        self.rightViewC?.eidtPDFImageProperty.handdler = self
-        self.rightViewC?.eidtPDFImageProperty.updateButtonState(hidden: true)
-        
+       
         Task { @MainActor [weak self] in
             if let data = self?.listView?.selectImageAreas {
                 self?.showPopWindow(positionRect:data.bounds, showGuide: false)
@@ -1203,8 +1040,7 @@ extension KMEditPDfHanddler {
     }
     
     func showExportMenu(_ sender: NSView) {
-//        let menuI = NSMenuItem()
-        let submenu = NSMenu(title: "")
+         let submenu = NSMenu(title: "")
         let jpgMI = submenu.addItem(withTitle: "jpg", action: #selector(exportMenuItemAction), keyEquivalent: "")
         jpgMI.target = self
         jpgMI.tag = 1
@@ -1535,28 +1371,19 @@ extension KMEditPDfHanddler: CPDFViewDelegate {
                     if self.isEditImage {
                         self.viewC?.menuItemEditingClick_CropImage(sender: NSMenuItem())
                     } else {
-//                        if self.listView.annotationType == .addImage {
-//                            self.closeRightPane()
-//                        }
                         if annotationType == .addImage {
-                            if self.rightViewC?.eidtPDFImageProperty != nil {
-                                self.rightViewC?.eidtPDFImageProperty.handdler = self
-                                self.rightViewC?.eidtPDFImageProperty.reloadData()
-                            }
+                           
                         }
-//                        self.openRightPane()
-                    }
+                     }
                 } else {
-//                    self.viewC?.closeRightPane()
-                    self.rightViewC?.isHidden = true
+                   
                 }
                 self.listView?.isEditImage = false
             } else {
-                self.rightViewC?.isHidden = true
+               
                 self.viewC?.closeRightPane()
                 if self.subViewType == .EditPDFAddText && annotationType == .addText {
-                    self.rightViewC?.eidtPDFTextProperty.handdler = self
-                    self.rightViewC?.eidtPDFTextProperty.initData()
+                  
                 }
             }
             return
@@ -1564,8 +1391,7 @@ extension KMEditPDfHanddler: CPDFViewDelegate {
         
         self.hiddenCropComfirmWindow()
         self.viewC?.model.isPDFTextImageEdited = true
-        let subViewType = self.rightViewC?.subViewType ?? .None
-        if self.annotationType == .addImage {
+         if self.annotationType == .addImage {
             var isImageArea = false
             for i in 0 ..< areas.count {
                 if areas[i] is CPDFEditImageArea {
@@ -1573,26 +1399,19 @@ extension KMEditPDfHanddler: CPDFViewDelegate {
                 }
             }
             if isImageArea {
-                self.rightViewC?.isHidden = false
+                
                 if self.subViewType == .EditPDFAddImage {
-                    self.rightViewC?.subViewType = .EditPDFAddImage
-                    self.rightViewC?.eidtPDFImageProperty.handdler = self
-                    self.rightViewC?.eidtPDFImageProperty.reloadData()
+                   
                 }
                 self.openRightPane()
             } else {
-                self.rightViewC?.isHidden = true
-//                self.viewC?.closeRightPane()
-            }
+             
+             }
         } else if self.subViewType == .EditPDFAddText && annotationType == .addText {
-            self.rightViewC?.isHidden = false
+         
             let count = self.listView?.editingSelectionString()?.count ?? 0
-            self.rightViewC?.eidtPDFTextProperty.handdler = self
-            if count != 0 {
-                self.rightViewC?.eidtPDFTextProperty.reloadData()
-            } else {
-                self.rightViewC?.eidtPDFTextProperty.refreshSelectAreaProperty(needDefaultData: true)
-            }
+ 
+        
             self.openRightPane()
         } else {
             var textsAreas : [CPDFEditTextArea] = []
@@ -1610,16 +1429,10 @@ extension KMEditPDfHanddler: CPDFViewDelegate {
                 }
             }
             if textsAreas.count > 0 && textsAreas.count == areas.count {
-                self.rightViewC?.isHidden = false
-                self.rightViewC?.subViewType = .EditPDFAddText
-                self.rightViewC?.eidtPDFTextProperty.handdler = self
-                self.rightViewC?.eidtPDFTextProperty?.reloadData()
+            
                 self.openRightPane()
             } else if imagesAreas.count > 0 {
-                self.rightViewC?.isHidden = false
-                self.rightViewC?.subViewType = .EditPDFAddImage
-                self.rightViewC?.eidtPDFImageProperty.handdler = self
-                self.rightViewC?.eidtPDFImageProperty?.reloadData()
+ 
                 self.openRightPane()
             }
         }
@@ -1774,15 +1587,12 @@ extension KMEditPDfHanddler: CPDFViewDelegate {
         }
         
         let model = KMEditPDFTextManager.manager.fetchUserDefaultData(type: .commonly)
-//        let fontName = KMEditPDFTextManager.manager.fetchFontName(fontName: model.fontName)
-        let fontSize = model.fontSize
+         let fontSize = model.fontSize
         let fontColor = model.color
         let fontAlign = model.alignment
-//        let fontStyle = KMEditPDFTextManager.manager.fetchFontStyle(fontName: model.fontName)
-        NSColorPanel.shared.color = fontColor
+         NSColorPanel.shared.color = fontColor
 
-//        let font = KMEditPDFTextManager.manager.fetchFont(fontName: fontName, style: fontStyle, size: fontSize)
-        
+ 
         let cfont = CPDFFont(familyName: model.fontName, fontStyle: model.fontStyle)
         let fontNameZ = CPDFFont.convertAppleFont(cfont)
         let font = NSFont(name: fontNameZ ?? "Helvetica", size: fontSize)
@@ -1796,23 +1606,17 @@ extension KMEditPDfHanddler: CPDFViewDelegate {
         self.addTextAreaing = true
         self.listView?.createStringBounds(newRect, with: attri, page: page)
         self.addTextAreaing = false
-        
-        // self.rightViewC != nil &&
+         
         if self.subViewType == .EditPDFAddText && self.annotationType == .addText {
-            self.rightViewC?.eidtPDFTextProperty.handdler = self
-            self.rightViewC?.eidtPDFTextProperty.refreshSelectAreaProperty(needDefaultData: true)
+          
         }
         self.showPopWindow(positionRect: newRect, showGuide: true)
     }
     
     // 文本区块 选中文本已经变化
     func pdfViewEditingSelectionDidChanged(_ pdfView: CPDFView!) {
-        // self.viewC?.rightSideViewController != nil &&
         if self.subViewType == .EditPDFAddText {
-            self.rightViewC?.eidtPDFTextProperty.handdler = self
-            self.rightViewC?.eidtPDFTextProperty.reloadData()
-            self.rightViewC?.eidtPDFTextProperty.updateTextTextPresuppositionState()
-            
+           
             self.showPopWindow(positionRect: .zero, showGuide: false)
         }
     }
@@ -1825,9 +1629,7 @@ extension KMEditPDfHanddler: CPDFViewDelegate {
                 if updating {
                     self.listView?.editAreaBoundUpdating = false
                 } else {
-                    self.rightViewC?.eidtPDFImageProperty.handdler = self
-                    self.rightViewC?.eidtPDFImageProperty.reloadData()
-                }
+                 }
             }
         }
     }
@@ -1855,9 +1657,7 @@ extension KMEditPDfHanddler: CPDFViewDelegate {
         }
         
         if self.subViewType == .EditPDFAddText {
-//            self.rightViewC?.eidtPDFTextProperty.reloadData()
-//            self.rightViewC?.eidtPDFTextProperty.updateTextTextPresuppositionState()
-            
+ 
             if self.addTextAreaing == false && self.fontSizeChanging == false && self.textAlignChanging == false {
                 self.showPopWindow(positionRect: .zero, showGuide: false)
                 self._reloadData_right_text()

PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/EditPDF/Source/KMEditPDFAssets.xcassets/Contents.json → PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/Source/KMEditPDFAssets.xcassets/Contents.json


PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/EditPDF/Source/KMEditPDFAssets.xcassets/No_addimage.imageset/Contents.json → PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/Source/KMEditPDFAssets.xcassets/No_addimage.imageset/Contents.json


PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/EditPDF/Source/KMEditPDFAssets.xcassets/No_addimage.imageset/addimage.pdf → PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/Source/KMEditPDFAssets.xcassets/No_addimage.imageset/addimage.pdf


PDF Office/PDF Master/Class/PDFTools/EditPDF/Toolbar/KMEditPDFToolbarItemView.swift → PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/Toolbar/KMEditPDFToolbarItemView.swift


PDF Office/PDF Master/Class/PDFTools/EditPDF/Toolbar/KMEditPDFToolbarView.swift → PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/Toolbar/KMEditPDFToolbarView.swift


PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/EditPDF/View/AlignmentView/KMEditPropertyAlignmentView.swift → PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/View/AlignmentView/KMEditPropertyAlignmentView.swift


PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/EditPDF/View/AlignmentView/KMEditPropertyAlignmentView.xib → PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/View/AlignmentView/KMEditPropertyAlignmentView.xib


PDF Office/PDF Master/Class/PDFTools/EditPDF/View/KMEditPDFColorView.swift → PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/View/KMEditPDFColorView.swift


PDF Office/PDF Master/Class/PDFTools/EditPDF/View/KMEditPDFPopGuideView.swift → PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/View/KMEditPDFPopGuideView.swift


PDF Office/PDF Master/Class/PDFTools/EditPDF/View/KMGuideTargetView.swift → PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/View/KMGuideTargetView.swift


PDF Office/PDF Master/Class/PDFTools/EditPDF/Window/KMEditPDFCropComfirmWindowController.swift → PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/Window/KMEditPDFCropComfirmWindowController.swift


PDF Office/PDF Master/Class/PDFTools/EditPDF/Window/KMEditPDFCropComfirmWindowController.xib → PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/Window/KMEditPDFCropComfirmWindowController.xib


PDF Office/PDF Master/Class/PDFTools/EditPDF/Window/KMEditPDFPopToolBarWindow.swift → PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/Window/KMEditPDFPopToolBarWindow.swift


+ 30 - 0
PDF Office/PDF Master/KMClass/KMPDFViewController/Toolbar/KMPDFToolbarController.swift

@@ -415,6 +415,31 @@ class KMPDFToolbarController: NSViewController {
         
     }
     
+    func reloadRightToolsView() {
+        let subviews = rightToolsView.subviews
+        for view in subviews {
+            if view is ComponentButton {
+                let button = view as! ComponentButton
+                if button.properties.identifier == KMPDFToolbar_rightView_Identifier {
+                    if viewManager?.showRightSide == true {
+                        if button.properties.state != .pressed {
+                            button.properties.state = .pressed
+                            button.reloadData()
+                        }
+                    } else {
+                        if button.properties.state != .normal {
+                            button.properties.state = .normal
+                            button.reloadData()
+                        }
+                    }
+                }
+            } else if view is ComponentDropdownTool {
+                
+            }
+        }
+        
+    }
+    
     //MARK: - 二级工具栏
     func setupSecondToolbar() {
         secondToolBar.view.frame = secondContendView.bounds
@@ -473,6 +498,8 @@ class KMPDFToolbarController: NSViewController {
         
         reloadToolbarTabsView()
         
+        reloadRightToolsView()
+        
         reloadSecondToolbar()
         
         updateRightMenuItemSelectedState()
@@ -521,6 +548,9 @@ class KMPDFToolbarController: NSViewController {
             sender.reloadData()
             
             viewManager.toolMode = .None
+        } else if sender.properties == toolbarManager.rightViewProperty {
+            viewManager.showRightSide = !viewManager.showRightSide
+            
         }
         
         delegate?.kmPDFToolbarControllerDidToolbarItemClicked?(self, sender.properties.identifier)

+ 9 - 90
PDF Office/PDF Reader Pro.xcodeproj/project.pbxproj

@@ -1204,12 +1204,6 @@
 		9FD0D2B32AD5265A00DA3FF8 /* CPDFListAnnotationNoteWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FD0D2B22AD5265A00DA3FF8 /* CPDFListAnnotationNoteWindowController.swift */; };
 		9FD0D2B42AD5265A00DA3FF8 /* CPDFListAnnotationNoteWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FD0D2B22AD5265A00DA3FF8 /* CPDFListAnnotationNoteWindowController.swift */; };
 		9FD0D2B52AD5265A00DA3FF8 /* CPDFListAnnotationNoteWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FD0D2B22AD5265A00DA3FF8 /* CPDFListAnnotationNoteWindowController.swift */; };
-		9FD0FA2929CD3ED400F2AB0D /* KMRightSideEmptyVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FD0FA2729CD3ED400F2AB0D /* KMRightSideEmptyVC.swift */; };
-		9FD0FA2A29CD3ED400F2AB0D /* KMRightSideEmptyVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FD0FA2729CD3ED400F2AB0D /* KMRightSideEmptyVC.swift */; };
-		9FD0FA2B29CD3ED400F2AB0D /* KMRightSideEmptyVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FD0FA2729CD3ED400F2AB0D /* KMRightSideEmptyVC.swift */; };
-		9FD0FA2C29CD3ED400F2AB0D /* KMRightSideEmptyVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9FD0FA2829CD3ED400F2AB0D /* KMRightSideEmptyVC.xib */; };
-		9FD0FA2D29CD3ED400F2AB0D /* KMRightSideEmptyVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9FD0FA2829CD3ED400F2AB0D /* KMRightSideEmptyVC.xib */; };
-		9FD0FA2E29CD3ED400F2AB0D /* KMRightSideEmptyVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9FD0FA2829CD3ED400F2AB0D /* KMRightSideEmptyVC.xib */; };
 		9FD0FA3129CD947000F2AB0D /* KMOpacityPanel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FD0FA2F29CD947000F2AB0D /* KMOpacityPanel.swift */; };
 		9FD0FA3229CD947000F2AB0D /* KMOpacityPanel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FD0FA2F29CD947000F2AB0D /* KMOpacityPanel.swift */; };
 		9FD0FA3329CD947000F2AB0D /* KMOpacityPanel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FD0FA2F29CD947000F2AB0D /* KMOpacityPanel.swift */; };
@@ -3465,12 +3459,6 @@
 		BB4A94A42B04DA0C00940F8B /* KMGOCRManagerNew.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB4A94A32B04DA0C00940F8B /* KMGOCRManagerNew.swift */; };
 		BB4A94A52B04DA0C00940F8B /* KMGOCRManagerNew.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB4A94A32B04DA0C00940F8B /* KMGOCRManagerNew.swift */; };
 		BB4A94A62B04DA0C00940F8B /* KMGOCRManagerNew.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB4A94A32B04DA0C00940F8B /* KMGOCRManagerNew.swift */; };
-		BB4BD9CC2909026500A66A65 /* KMRightSideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB4BD9CA2909026500A66A65 /* KMRightSideViewController.swift */; };
-		BB4BD9CD2909026500A66A65 /* KMRightSideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB4BD9CA2909026500A66A65 /* KMRightSideViewController.swift */; };
-		BB4BD9CE2909026500A66A65 /* KMRightSideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB4BD9CA2909026500A66A65 /* KMRightSideViewController.swift */; };
-		BB4BD9CF2909026500A66A65 /* KMRightSideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = BB4BD9CB2909026500A66A65 /* KMRightSideViewController.xib */; };
-		BB4BD9D02909026500A66A65 /* KMRightSideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = BB4BD9CB2909026500A66A65 /* KMRightSideViewController.xib */; };
-		BB4BD9D12909026500A66A65 /* KMRightSideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = BB4BD9CB2909026500A66A65 /* KMRightSideViewController.xib */; };
 		BB4D02A92C22D17B0001474A /* KMEditPDFPopGuideView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB4D02A82C22D17B0001474A /* KMEditPDFPopGuideView.swift */; };
 		BB4D02AA2C22D17B0001474A /* KMEditPDFPopGuideView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB4D02A82C22D17B0001474A /* KMEditPDFPopGuideView.swift */; };
 		BB4D02AB2C22D17B0001474A /* KMEditPDFPopGuideView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB4D02A82C22D17B0001474A /* KMEditPDFPopGuideView.swift */; };
@@ -4555,9 +4543,6 @@
 		BBB3FF9C2B56852700145C4A /* NSDocument+KMExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBB3FF9B2B56852700145C4A /* NSDocument+KMExtensions.swift */; };
 		BBB3FF9D2B56852700145C4A /* NSDocument+KMExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBB3FF9B2B56852700145C4A /* NSDocument+KMExtensions.swift */; };
 		BBB3FF9E2B56852700145C4A /* NSDocument+KMExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBB3FF9B2B56852700145C4A /* NSDocument+KMExtensions.swift */; };
-		BBB5C80729F4CEE40054F261 /* KMLinkAnnotationPropertyEmptyController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBB5C80629F4CEE40054F261 /* KMLinkAnnotationPropertyEmptyController.swift */; };
-		BBB5C80829F4CEE40054F261 /* KMLinkAnnotationPropertyEmptyController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBB5C80629F4CEE40054F261 /* KMLinkAnnotationPropertyEmptyController.swift */; };
-		BBB5C80929F4CEE40054F261 /* KMLinkAnnotationPropertyEmptyController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBB5C80629F4CEE40054F261 /* KMLinkAnnotationPropertyEmptyController.swift */; };
 		BBB612AD2AF4B9E4000F3724 /* KMWatermarkCollectionViewItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBB612AC2AF4B9E4000F3724 /* KMWatermarkCollectionViewItem.swift */; };
 		BBB612AE2AF4B9E4000F3724 /* KMWatermarkCollectionViewItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBB612AC2AF4B9E4000F3724 /* KMWatermarkCollectionViewItem.swift */; };
 		BBB612AF2AF4B9E4000F3724 /* KMWatermarkCollectionViewItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBB612AC2AF4B9E4000F3724 /* KMWatermarkCollectionViewItem.swift */; };
@@ -6246,8 +6231,6 @@
 		9FD0D2AA2AD5143D00DA3FF8 /* KMTableRowView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMTableRowView.swift; sourceTree = "<group>"; };
 		9FD0D2AE2AD51BCC00DA3FF8 /* CPDFListEditAnnotationViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CPDFListEditAnnotationViewController.swift; sourceTree = "<group>"; };
 		9FD0D2B22AD5265A00DA3FF8 /* CPDFListAnnotationNoteWindowController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CPDFListAnnotationNoteWindowController.swift; sourceTree = "<group>"; };
-		9FD0FA2729CD3ED400F2AB0D /* KMRightSideEmptyVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMRightSideEmptyVC.swift; sourceTree = "<group>"; };
-		9FD0FA2829CD3ED400F2AB0D /* KMRightSideEmptyVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KMRightSideEmptyVC.xib; sourceTree = "<group>"; };
 		9FD0FA2F29CD947000F2AB0D /* KMOpacityPanel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMOpacityPanel.swift; sourceTree = "<group>"; };
 		9FD0FA3029CD947000F2AB0D /* KMOpacityPanel.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KMOpacityPanel.xib; sourceTree = "<group>"; };
 		9FD0FA4929D43D6800F2AB0D /* KMDeviceBrowserWindowController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMDeviceBrowserWindowController.swift; sourceTree = "<group>"; };
@@ -7139,8 +7122,6 @@
 		BB4A949E2B04D8EA00940F8B /* KMGOCRManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KMGOCRManager.h; sourceTree = "<group>"; };
 		BB4A949F2B04D8EC00940F8B /* KMGOCRManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KMGOCRManager.m; sourceTree = "<group>"; };
 		BB4A94A32B04DA0C00940F8B /* KMGOCRManagerNew.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KMGOCRManagerNew.swift; sourceTree = "<group>"; };
-		BB4BD9CA2909026500A66A65 /* KMRightSideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMRightSideViewController.swift; sourceTree = "<group>"; };
-		BB4BD9CB2909026500A66A65 /* KMRightSideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KMRightSideViewController.xib; sourceTree = "<group>"; };
 		BB4D02A82C22D17B0001474A /* KMEditPDFPopGuideView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMEditPDFPopGuideView.swift; sourceTree = "<group>"; };
 		BB4EEF2B29763EE7003A3537 /* KMRedactBaseWindowController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMRedactBaseWindowController.swift; sourceTree = "<group>"; };
 		BB4EEF2C29763EE7003A3537 /* KMRedactBaseWindowController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KMRedactBaseWindowController.xib; sourceTree = "<group>"; };
@@ -7586,7 +7567,6 @@
 		BBB3769A2B10A7FD009539CC /* a_3a.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = a_3a.png; sourceTree = "<group>"; };
 		BBB3FF972B567D0300145C4A /* KMApplication.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMApplication.swift; sourceTree = "<group>"; };
 		BBB3FF9B2B56852700145C4A /* NSDocument+KMExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NSDocument+KMExtensions.swift"; sourceTree = "<group>"; };
-		BBB5C80629F4CEE40054F261 /* KMLinkAnnotationPropertyEmptyController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMLinkAnnotationPropertyEmptyController.swift; sourceTree = "<group>"; };
 		BBB612AC2AF4B9E4000F3724 /* KMWatermarkCollectionViewItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMWatermarkCollectionViewItem.swift; sourceTree = "<group>"; };
 		BBB612B02AF4C388000F3724 /* KMBatchOperateAddWatermarkViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMBatchOperateAddWatermarkViewController.swift; sourceTree = "<group>"; };
 		BBB789602BE8BF2300F7E09C /* AINewConfigWindowController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = AINewConfigWindowController.xib; sourceTree = "<group>"; };
@@ -8662,6 +8642,9 @@
 			isa = PBXGroup;
 			children = (
 				AD6260712A9D9695006C6413 /* Source */,
+				BB6AAF4C2C21721B009C4CB1 /* Controller */,
+				BB6AAF592C217F94009C4CB1 /* Window */,
+				BB71853B2C2B0A6900C1156B /* Toolbar */,
 				AD58C0FB2A1F2D3C00F911A0 /* Category */,
 				AD3C6DFA2A1C48600010B1A7 /* Manager */,
 				ADC31FA92A0E0C1E00ED44A2 /* View */,
@@ -9013,7 +8996,6 @@
 			isa = PBXGroup;
 			children = (
 				9FF371AB2C69A67B005F9CC5 /* Measure */,
-				BB6AAF4A2C21721B009C4CB1 /* EditPDF */,
 				AD055E1A2B70B2460035F824 /* KMBookmark */,
 				ADFA8F072B57861A002595A4 /* FindSearch */,
 				AD2BF23B2B5647C80029F03F /* AutoFlow */,
@@ -10073,6 +10055,8 @@
 		AD3C6DFA2A1C48600010B1A7 /* Manager */ = {
 			isa = PBXGroup;
 			children = (
+				BB7185492C2B0DC500C1156B /* KMEditPDFModel.swift */,
+				BB6AAF4D2C217248009C4CB1 /* KMEditPDfHanddler.swift */,
 				ADA910292A272CE2003352F0 /* KMEditPDFTextManager.swift */,
 			);
 			path = Manager;
@@ -10185,13 +10169,6 @@
 			path = KMResourceDownload;
 			sourceTree = "<group>";
 		};
-		AD68781F29A5FADC005B5210 /* Cache */ = {
-			isa = PBXGroup;
-			children = (
-			);
-			path = Cache;
-			sourceTree = "<group>";
-		};
 		AD68782829A60130005B5210 /* Login&Register */ = {
 			isa = PBXGroup;
 			children = (
@@ -10674,6 +10651,9 @@
 		ADC31FA92A0E0C1E00ED44A2 /* View */ = {
 			isa = PBXGroup;
 			children = (
+				BB4D02A82C22D17B0001474A /* KMEditPDFPopGuideView.swift */,
+				BB6985582C2A94BD007D307D /* KMGuideTargetView.swift */,
+				BB7185442C2B0AFC00C1156B /* KMEditPDFColorView.swift */,
 				ADC31FAA2A0E0C2500ED44A2 /* AlignmentView */,
 			);
 			path = View;
@@ -10962,7 +10942,6 @@
 				AD53B70129ACC63D00D61E81 /* Tools */,
 				AD015FB529AB483200A57062 /* Config */,
 				ADF1569A29A63CAB001D1018 /* Source */,
-				AD68781F29A5FADC005B5210 /* Cache */,
 				ADE3C1E129A5AB8B00793B13 /* Controller */,
 				ADE3C1D729A5A9AB00793B13 /* KMRequestServer */,
 				ADE3C1D029A5A8B200793B13 /* Manager */,
@@ -12629,16 +12608,6 @@
 			path = OCR;
 			sourceTree = "<group>";
 		};
-		BB4D02A72C22D1510001474A /* View */ = {
-			isa = PBXGroup;
-			children = (
-				BB4D02A82C22D17B0001474A /* KMEditPDFPopGuideView.swift */,
-				BB6985582C2A94BD007D307D /* KMGuideTargetView.swift */,
-				BB7185442C2B0AFC00C1156B /* KMEditPDFColorView.swift */,
-			);
-			path = View;
-			sourceTree = "<group>";
-		};
 		BB4EEF2929763EC7003A3537 /* Window */ = {
 			isa = PBXGroup;
 			children = (
@@ -13024,27 +12993,6 @@
 			path = Resource;
 			sourceTree = "<group>";
 		};
-		BB6AAF4A2C21721B009C4CB1 /* EditPDF */ = {
-			isa = PBXGroup;
-			children = (
-				BB7185482C2B0DA600C1156B /* Model */,
-				BB71853B2C2B0A6900C1156B /* Toolbar */,
-				BB4D02A72C22D1510001474A /* View */,
-				BB6AAF592C217F94009C4CB1 /* Window */,
-				BB6AAF4B2C21721B009C4CB1 /* Tools */,
-				BB6AAF4C2C21721B009C4CB1 /* Controller */,
-			);
-			path = EditPDF;
-			sourceTree = "<group>";
-		};
-		BB6AAF4B2C21721B009C4CB1 /* Tools */ = {
-			isa = PBXGroup;
-			children = (
-				BB6AAF4D2C217248009C4CB1 /* KMEditPDfHanddler.swift */,
-			);
-			path = Tools;
-			sourceTree = "<group>";
-		};
 		BB6AAF4C2C21721B009C4CB1 /* Controller */ = {
 			isa = PBXGroup;
 			children = (
@@ -13170,14 +13118,6 @@
 			path = Toolbar;
 			sourceTree = "<group>";
 		};
-		BB7185482C2B0DA600C1156B /* Model */ = {
-			isa = PBXGroup;
-			children = (
-				BB7185492C2B0DC500C1156B /* KMEditPDFModel.swift */,
-			);
-			path = Model;
-			sourceTree = "<group>";
-		};
 		BB7289DE2B8838BC004B53B5 /* DataManager */ = {
 			isa = PBXGroup;
 			children = (
@@ -13579,12 +13519,6 @@
 				652E953A2C66707E0061FA40 /* Freehand */,
 				89E4E6D72963C6AA002DBA6F /* AnnotationProperty */,
 				BB8B17302907B48E001C5EA5 /* CipherTextView */,
-				8996CFE4295BE15800D32783 /* EditPDF */,
-				BBB5C80629F4CEE40054F261 /* KMLinkAnnotationPropertyEmptyController.swift */,
-				9FD0FA2729CD3ED400F2AB0D /* KMRightSideEmptyVC.swift */,
-				9FD0FA2829CD3ED400F2AB0D /* KMRightSideEmptyVC.xib */,
-				BB4BD9CA2909026500A66A65 /* KMRightSideViewController.swift */,
-				BB4BD9CB2909026500A66A65 /* KMRightSideViewController.xib */,
 				8931681E296D73C10073EA59 /* Signature */,
 				89E4E75D29656A88002DBA6F /* StampList */,
 			);
@@ -14363,6 +14297,7 @@
 		BBEB0DE62CE36B54004C67BF /* Views */ = {
 			isa = PBXGroup;
 			children = (
+				8996CFE4295BE15800D32783 /* EditPDF */,
 			);
 			path = Views;
 			sourceTree = "<group>";
@@ -15542,7 +15477,6 @@
 				BBB789B42BE8BF2400F7E09C /* AIChatStringUploadItem.xib in Resources */,
 				BB10FAE92AFE03CD00F18D65 /* KMPDFEditPageRangeWindowController.xib in Resources */,
 				BBB7898D2BE8BF2300F7E09C /* AIHeaderView.xib in Resources */,
-				BB4BD9CF2909026500A66A65 /* KMRightSideViewController.xib in Resources */,
 				BB716D6B2CDDB727009787ED /* KMHeaderPropertyController.xib in Resources */,
 				AD055E902B88304E0035F824 /* BookmarksWindow.xib in Resources */,
 				BB99ACC5292DE22E0048AFD9 /* KMMergeViewController.xib in Resources */,
@@ -15840,7 +15774,6 @@
 				651675EC2CE3313500019A20 /* KMOutlineEditViewController.xib in Resources */,
 				BB5A9D5E2CB6521400F64C1F /* SettingsGeneralView.xib in Resources */,
 				AD85D1B02AF09C79000F4D28 /* KMHomeQuickToolsWindowCollectionViewItem.xib in Resources */,
-				9FD0FA2C29CD3ED400F2AB0D /* KMRightSideEmptyVC.xib in Resources */,
 				9F8539F92947137500DF644E /* newtab_p.pdf in Resources */,
 				ADE3C1C429A4C13700793B13 /* KMPrintAccessoryController_OC.xib in Resources */,
 				9F080B17298CFDB300FC27DA /* KMTextImageButtonVC.xib in Resources */,
@@ -15872,7 +15805,6 @@
 				BBA922292B4E96450061057A /* KMPurchaseCompareWindowController.xib in Resources */,
 				89E9B40A295D268E00AEFA61 /* KMEditImagePropertyViewController.xib in Resources */,
 				BB89724A294C19980045787C /* KMWatermarkAdjectiveListController.xib in Resources */,
-				9FD0FA2D29CD3ED400F2AB0D /* KMRightSideEmptyVC.xib in Resources */,
 				F337CC202CC6456D00D46AF4 /* KMNThumbnailBaseViewController.xib in Resources */,
 				BBA8B7A72935CD740097D183 /* KMRemovePasswordAlertWindowController.xib in Resources */,
 				ADAFDA4D2AEA7F2700F084BC /* KMAdvertisementShowView.xib in Resources */,
@@ -16061,7 +15993,6 @@
 				BBE0688E2CDDF116000512BC /* KMBatesController.xib in Resources */,
 				ADE86AEA2B0AF50B00414DFA /* KMCompareCoveringSettingWindowController.xib in Resources */,
 				9F0ACC082C883464009574D5 /* KMEmbeddedPaymentPopWC.xib in Resources */,
-				BB4BD9D02909026500A66A65 /* KMRightSideViewController.xib in Resources */,
 				AD7D5C962B8F20FE006562CD /* synctex_parser_version.txt in Resources */,
 				ADB2D6F3294741720029D2B3 /* KMPrintPaperSetView.xib in Resources */,
 				BB7256C12CDC5B5300B6CE64 /* KMBackgroundController.xib in Resources */,
@@ -16480,7 +16411,6 @@
 				9FDD0F982952FF4D000C4DAD /* $metadata.json in Resources */,
 				ADE3C1C629A4C13700793B13 /* KMPrintAccessoryController_OC.xib in Resources */,
 				ADEC7A83299397F8009A8256 /* SF-Pro-Text-Regular.otf in Resources */,
-				9FD0FA2E29CD3ED400F2AB0D /* KMRightSideEmptyVC.xib in Resources */,
 				BB6EA2962B70AF48000D4490 /* KMConvertCompareViewController.xib in Resources */,
 				9F8810922B56614600F69815 /* KMAnnotationChoiceWidgetAppearanceViewController.xib in Resources */,
 				BBE068A72CDDF149000512BC /* KMBatesTemplateItem.xib in Resources */,
@@ -16775,7 +16705,6 @@
 				BBB789832BE8BF2300F7E09C /* AINewConfigWindowController.xib in Resources */,
 				BB7F7C0529AA586900A3E4E7 /* signAddBack.png in Resources */,
 				BB031B5C2C47BB080099F7AD /* KMUserFbHelpPopController.xib in Resources */,
-				BB4BD9D12909026500A66A65 /* KMRightSideViewController.xib in Resources */,
 				9F0CB49429683DEE00007028 /* KMPropertiesPanelLineSubVC.xib in Resources */,
 				BBC348072955403D008D2CD1 /* KMWatermarkFilePropertyInfoController.xib in Resources */,
 				F3A9DC83294309D80074E5D2 /* CPDFListEditAnnotationViewController.xib in Resources */,
@@ -17169,7 +17098,6 @@
 				BBDA8A692A31B50C006A2C4E /* KMCustomStepperView.swift in Sources */,
 				BBBAED142B57E97000266BD3 /* SKTypeSelectHelper.swift in Sources */,
 				BB162E9B295073B40088E9D1 /* KMWatermarkManager.swift in Sources */,
-				BB4BD9CC2909026500A66A65 /* KMRightSideViewController.swift in Sources */,
 				BB986AEB2AD53AE800ADF172 /* KMInfoWindowController.swift in Sources */,
 				9F080B23298FCB0D00FC27DA /* KMDesignToken+Action.swift in Sources */,
 				9F1FE4B429406E4700E952CA /* CTBrowser.m in Sources */,
@@ -17375,7 +17303,6 @@
 				BB955EBC2CD8E4600042FDE1 /* KMNWatermarkTemplateController.swift in Sources */,
 				AD055E6C2B8732680035F824 /* SKTextWithIconCell.m in Sources */,
 				9F53D5572AD6908600CCF9D8 /* KMAnnotationLinkViewController.swift in Sources */,
-				BBB5C80729F4CEE40054F261 /* KMLinkAnnotationPropertyEmptyController.swift in Sources */,
 				8997010628F4082C009AF911 /* KMFromViewController.swift in Sources */,
 				BBD1F78B296FACA300343885 /* KMPageEditExtractSettingView.swift in Sources */,
 				AD7D5CD32B957442006562CD /* KMBookmarkOutlineFileCellView.swift in Sources */,
@@ -18156,7 +18083,6 @@
 				BB183DDD2B4EBE1B00F99C7E /* KMTrialSuccessController.swift in Sources */,
 				ADDF83862B391A5D00A81A4E /* DSignatureCreateInfoViewController.swift in Sources */,
 				BB3A66AB2B078FB200575343 /* KMNoteTableViewCell.swift in Sources */,
-				9FD0FA2929CD3ED400F2AB0D /* KMRightSideEmptyVC.swift in Sources */,
 				BBF729BB2B19717200576AC5 /* KMBatchRemoveBackgroundOperation.swift in Sources */,
 				BB716D702CDDB73B009787ED /* KMHeaderFooterController.swift in Sources */,
 				ADE86AAE2B03438400414DFA /* KMWatermarkWindowController.swift in Sources */,
@@ -18453,7 +18379,6 @@
 				BBA762D329D2D98D00844513 /* KMCommonDefine.swift in Sources */,
 				BB146FDC299DC0D100784A6A /* GTLRDriveService.m in Sources */,
 				ADE86AA52B031FF000414DFA /* KMCompareView.swift in Sources */,
-				BB4BD9CD2909026500A66A65 /* KMRightSideViewController.swift in Sources */,
 				BB1A916B2AFB7868005E5FD8 /* KMConvertWindowController.swift in Sources */,
 				BB276A532B03776000AB5578 /* KMConvertOperationQueue.swift in Sources */,
 				BB8810652B4F74DD00AFA63E /* KMRepeatTrialAlertController.m in Sources */,
@@ -18687,7 +18612,6 @@
 				AD9527BF295294E20039D2BC /* KMPrintPageModel.swift in Sources */,
 				BB8F457B295AFB330037EA22 /* KMHeaderFooterFontInfoView.swift in Sources */,
 				6515591D2CCA6E3100C0F0D9 /* KMConvertImageWindowController.swift in Sources */,
-				BBB5C80829F4CEE40054F261 /* KMLinkAnnotationPropertyEmptyController.swift in Sources */,
 				BB52F5872CC24599007418DB /* KMLinkPopupPageView.swift in Sources */,
 				ADAC0DE22AC273D600FD4F52 /* KMOCToolClass.swift in Sources */,
 				BBF62C692B033B34007B7E86 /* KMPDFEditExtractWindow.swift in Sources */,
@@ -19477,7 +19401,6 @@
 				BB1E7F312B511079002D9785 /* SKInspectPublicTool.swift in Sources */,
 				BB2EDF71296ECE17003BCF58 /* KMPageEditThumbnailView.swift in Sources */,
 				BB3A668D2B06FD0100575343 /* KMBotaEnum.swift in Sources */,
-				9FD0FA2A29CD3ED400F2AB0D /* KMRightSideEmptyVC.swift in Sources */,
 				BB65A0792AF8E2F2003A27A0 /* KMSyncPreferences.swift in Sources */,
 				BBE788F42CBD2464008086E2 /* TreeVC.swift in Sources */,
 				ADE3C1EE29A5AFB100793B13 /* KMRequestServerManager.swift in Sources */,
@@ -19712,7 +19635,6 @@
 				BBD14F612CDA16080077D52E /* KMWatermarkSaveWindow.swift in Sources */,
 				9FF371E52C69D2F8005F9CC5 /* CPDFPolygonAnnotation+PDFListView.swift in Sources */,
 				9F0CB49929683E1000007028 /* KMPropertiesPanelTextSubVC.swift in Sources */,
-				BB4BD9CE2909026500A66A65 /* KMRightSideViewController.swift in Sources */,
 				BBF7299D2B1961E800576AC5 /* KMAddWatermarkOprationQueue.swift in Sources */,
 				9F0CB50B2986563300007028 /* KMDesignToken+BorderBottom.swift in Sources */,
 				653647722CDC8C3700CDB13E /* KMNTableHeaderCellView.swift in Sources */,
@@ -19920,7 +19842,6 @@
 				F3A65ECF2CDF19C300F00102 /* KMNThumDecorationView.swift in Sources */,
 				ADD56F592BB3F48300E87ED9 /* KMFreeTextStylesViewController.m in Sources */,
 				BBFE6E772930E53000142C01 /* KMMergePopoverViewController.swift in Sources */,
-				ADF6B8782A48155E0090CB78 /* KMComparativeViewCollectionItem.swift in Sources */,
 				65202DF92CE4803500A204B5 /* KMNBotaHeaderSearchView.swift in Sources */,
 				BB65A07A2AF8E2F2003A27A0 /* KMSyncPreferences.swift in Sources */,
 				BB32BF252A5EA05900D11348 /* KMAnalytics.swift in Sources */,
@@ -20455,7 +20376,6 @@
 				ADD1B7042946C8AD00C3FFF7 /* KMBaseTextField.swift in Sources */,
 				BB1B0AD92B4FC6E900889528 /* KMOpenFileGuideProperty.swift in Sources */,
 				BB0FE0452B734DD1001E0F88 /* AITypeChooseView.swift in Sources */,
-				9FD0FA2B29CD3ED400F2AB0D /* KMRightSideEmptyVC.swift in Sources */,
 				656C1E602CD0DFE900295F82 /* KMConvertJsonSettingView.swift in Sources */,
 				BB3A66A92B078CA400575343 /* KMNoteOutlineView.swift in Sources */,
 				BB6B43682A04919200E02B54 /* KMBaseViewController.swift in Sources */,
@@ -20618,7 +20538,6 @@
 				BB1A34AA295EA30100B80B3E /* NSBitmapImageRep_SKExtensions.m in Sources */,
 				BB31DA602AFA1B03006D63CB /* KMFontWell.swift in Sources */,
 				9F0CB4A9296CF19600007028 /* KMPropertiesPanelListMenuSubVC.swift in Sources */,
-				BBB5C80929F4CEE40054F261 /* KMLinkAnnotationPropertyEmptyController.swift in Sources */,
 				F3EF179E2CD5FF8D0007D364 /* KMNThumnailHeaderViewController.swift in Sources */,
 				BB3AAB9B2987BEA900992A5A /* KMWatermarkPDFView_OC.m in Sources */,
 				BBEFD02A2AFA285A003FABD8 /* KMHeaderFooterTableCellView.swift in Sources */,