瀏覽代碼

【2025】【综合】代码整理

niehaoyu 2 月之前
父節點
當前提交
81c1b8df1e

+ 2 - 2
PDF Office/PDF Master/Class/PDFTools/PageEdit/Controller/KMPDFEditViewController.xib

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

+ 0 - 149
PDF Office/PDF Master/Class/PDFWindowController/Form/AlertView/KMFormAlertView.swift

@@ -1,149 +0,0 @@
-//
-//  KMFormAlertView.swift
-//  PDF Reader Pro
-//
-//  Created by lizhe on 2024/2/24.
-//
-
-import Cocoa
-
-enum KMPromptType: UInt {
-    case none = 0
-    case highlightForm
-    case ocr
-}
-
-class KMFormAlertView: BaseXibView {
-    
-    @IBOutlet weak var textLabel: NSTextField!
-    @IBOutlet weak var button: NSButton!
-    @IBOutlet weak var box: NSBox!
-    
-    var pdfView: CPDFView?
-    var isClosePromptView = false
-    var isCloseSecureView = false
-    var type: KMPromptType = .none
-    
-    override func setup() {
-        self.wantsLayer = true
-        self.layer?.backgroundColor = KMAppearance.Else.tipbarColor().cgColor
-        
-        self.textLabel.stringValue = NSLocalizedString("This document contains interactive form fields.", comment: "")
-        self.textLabel.textColor = KMAppearance.Layout.w0Color()
-        self.box.borderWidth = 1.0
-        self.box.borderColor = KMAppearance.Layout.w70Color()
-        
-//        if #available(macOS 10.12, *) {
-//            self.button.bezelColor = KMAppearance.Interactive.m0Color()
-//        }
-    }
-    
-    func isBlankString(_ str: String?) -> Bool {
-        guard let string = str else { return true }
-        return string.trimmingCharacters(in: .whitespaces).isEmpty
-    }
-    
-    func refreshView(_ isHidden: Bool) {
-        if self.isClosePromptView {
-            self.removeFromSuperview()
-            return
-        }
-        
-        self.frame = NSRect(x: 0, y: pdfView?.frame.size.height ?? 0 - 40, width: pdfView?.frame.size.width ?? 0, height: 40)
-    }
-    
-    func showInView(_ pdfView: CPDFView) {
-        self.pdfView = pdfView
-        if self.isClosePromptView {
-            self.removeFromSuperview()
-            return
-        }
-        
-        // Code for showing the prompt view...
-        var isContainsForm = false
-        do {
-            for i in 0..<pdfView.document.pageCount {
-                guard i < pdfView.document.pageCount else { continue }
-                let page = pdfView.document.page(at: i)
-                if let annotations = page?.annotations, !annotations.isEmpty {
-                    for annotation in annotations {
-//                        if #available(macOS 10.13, *) {
-//                            let widgetAnnotation = annotation as? PDFAnnotationWidget
-//                            if widgetAnnotation.widgetFieldType == PDFAnnotationWidgetSubtype.signature.rawValue {
-//                                isContainsForm = true
-//                                break
-//                            }
-//                        }
-                        if annotation is CPDFWidgetAnnotation {
-                            isContainsForm = true
-                            break
-                        }
-//                        if annotation is PDFAnnotationTextWidget ||
-//                            annotation is PDFAnnotationButtonWidget ||
-//                            annotation is PDFAnnotationChoiceWidget {
-//                            isContainsForm = true
-//                            break
-//                        }
-                    }
-                }
-                if isContainsForm {
-                    break
-                }
-            }
-            
-            if isContainsForm {
-                self.type = .highlightForm
-                DispatchQueue.main.async {
-                    var top = 40.0
-                    let isEncrypted = self.pdfView?.document.isEncrypted ?? false
-                    if isEncrypted && !self.isCloseSecureView {
-                        top = 80.5
-                    }
-                    self.frame = NSMakeRect(0, pdfView.frame.size.height - CGFloat(top), pdfView.frame.size.width, 40)
-                    self.autoresizingMask = [.width, .minYMargin]
-                    pdfView.addSubview(self)
-                    self.textLabel.stringValue = NSLocalizedString("This document contains interactive form fields.", comment: "")
-                    let highlightFormFiled = UserDefaults.standard.bool(forKey: "kPDFViewHighlightFormFiledKey")
-                    if highlightFormFiled {
-                        self.button.title = " \(NSLocalizedString("Disable Highlight Effect", comment: ""))  "
-                    } else {
-                        self.button.title = " \(NSLocalizedString("Highlight Form Fields", comment: ""))  "
-                    }
-                    self.button.setTitleColor(KMAppearance.Layout.w0Color())
-                }
-            } else {
-                DispatchQueue.main.async {
-                    if self.superview != nil {
-                        self.removeFromSuperview()
-                    }
-                }
-            }
-        } catch {
-            
-        }
-    }
-    
-    @IBAction func disappear(_ sender: Any?) {
-        self.isClosePromptView = true
-        self.removeFromSuperview()
-    }
-    
-    @IBAction func buttonAction(_ sender: Any) {
-        if self.type == .highlightForm {
-            let highlightFormFiled = UserDefaults.standard.bool(forKey: "kPDFViewHighlightFormFiledKey")
-            UserDefaults.standard.set(!highlightFormFiled, forKey: "kPDFViewHighlightFormFiledKey")
-            UserDefaults.standard.synchronize()
-            
-            if !highlightFormFiled {
-                self.button.title = " \(NSLocalizedString("Disable Highlight Effect", comment: ""))  "
-            } else {
-                self.button.title = " \(NSLocalizedString("Highlight Form Fields", comment: ""))  "
-            }
-//            self.button.setTitleColor(KMAppearance.KM_FFFFFF_ColorDarkChanged06())
-            self.button.setTitleColor(KMAppearance.Layout.w0Color())
-            CPDFKitConfig.sharedInstance().setEnableFormFieldHighlight(!highlightFormFiled)
-            self.pdfView?.setNeedsDisplayForVisiblePages()
-//            self.pdfView?.setNeedsDisplay(true)
-        }
-    }
-}

+ 0 - 242
PDF Office/PDF Master/Class/PDFWindowController/Form/AlertView/KMFormAlertView.xib

@@ -1,242 +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="KMFormAlertView" customModule="PDF_Reader_Pro" customModuleProvider="target">
-            <connections>
-                <outlet property="box" destination="QoO-Ah-aKz" id="U3l-UG-cz0"/>
-                <outlet property="button" destination="cXy-YU-r8Z" id="uVc-gd-LET"/>
-                <outlet property="textLabel" destination="dPD-fe-1fo" id="4Ms-89-RUS"/>
-            </connections>
-        </customObject>
-        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
-        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
-        <customView id="c22-O7-iKe">
-            <rect key="frame" x="0.0" y="0.0" width="810" height="43"/>
-            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
-            <subviews>
-                <customView translatesAutoresizingMaskIntoConstraints="NO" id="EkX-UE-OP1">
-                    <rect key="frame" x="0.0" y="0.0" width="810" height="43"/>
-                    <subviews>
-                        <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="v3v-wj-yoL">
-                            <rect key="frame" x="8" y="13" width="18" height="18"/>
-                            <buttonCell key="cell" type="bevel" bezelStyle="rounded" image="KMImageNameFormIcon" imagePosition="only" alignment="center" inset="2" id="JzG-EC-qOj">
-                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                <font key="font" metaFont="system"/>
-                            </buttonCell>
-                            <constraints>
-                                <constraint firstAttribute="height" constant="18" id="e8s-cH-1f8"/>
-                                <constraint firstAttribute="width" constant="18" id="iIm-FT-eFR"/>
-                            </constraints>
-                        </button>
-                        <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="dPD-fe-1fo">
-                            <rect key="frame" x="32" y="14" width="289" height="16"/>
-                            <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="This document contains interactive form fields." id="0mg-kL-lwP">
-                                <font key="font" metaFont="system"/>
-                                <color key="textColor" red="0.1529411765" green="0.23529411759999999" blue="0.38431372549999998" alpha="1" colorSpace="calibratedRGB"/>
-                                <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
-                            </textFieldCell>
-                        </textField>
-                        <box boxType="custom" cornerRadius="1" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="QoO-Ah-aKz">
-                            <rect key="frame" x="622" y="8" width="156" height="27"/>
-                            <view key="contentView" id="7el-hN-iTo">
-                                <rect key="frame" x="1" y="1" width="154" height="25"/>
-                                <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                                <subviews>
-                                    <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="cXy-YU-r8Z">
-                                        <rect key="frame" x="8" y="1" width="138" height="24"/>
-                                        <buttonCell key="cell" type="square" title="Disable Highlight Effect" bezelStyle="shadowlessSquare" image="buttonCell:pJW-is-rPJ:image" imagePosition="overlaps" alignment="center" imageScaling="proportionallyDown" inset="2" id="pJW-is-rPJ">
-                                            <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                            <font key="font" metaFont="cellTitle"/>
-                                        </buttonCell>
-                                        <constraints>
-                                            <constraint firstAttribute="height" constant="24" id="38h-2i-mpw"/>
-                                        </constraints>
-                                        <connections>
-                                            <action selector="buttonAction:" target="-2" id="Ih5-7t-dVD"/>
-                                        </connections>
-                                    </button>
-                                </subviews>
-                                <constraints>
-                                    <constraint firstItem="cXy-YU-r8Z" firstAttribute="centerY" secondItem="7el-hN-iTo" secondAttribute="centerY" id="ITy-cO-H67"/>
-                                    <constraint firstItem="cXy-YU-r8Z" firstAttribute="leading" secondItem="7el-hN-iTo" secondAttribute="leading" constant="8" id="NWd-em-Swh"/>
-                                    <constraint firstAttribute="trailing" secondItem="cXy-YU-r8Z" secondAttribute="trailing" constant="8" id="VWw-sZ-G4p"/>
-                                </constraints>
-                            </view>
-                        </box>
-                        <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="JHa-sL-gZy">
-                            <rect key="frame" x="786" y="14" width="16" height="16"/>
-                            <buttonCell key="cell" type="bevel" bezelStyle="rounded" image="KMImageNameCloseBtn" imagePosition="only" alignment="center" inset="2" id="601-0H-2DT">
-                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                <font key="font" metaFont="system"/>
-                            </buttonCell>
-                            <constraints>
-                                <constraint firstAttribute="height" constant="16" id="Z98-pR-ohR"/>
-                                <constraint firstAttribute="width" constant="16" id="ZE4-p0-Cci"/>
-                            </constraints>
-                            <connections>
-                                <action selector="disappear:" target="-2" id="Bu8-gx-TlS"/>
-                            </connections>
-                        </button>
-                    </subviews>
-                    <constraints>
-                        <constraint firstItem="dPD-fe-1fo" firstAttribute="centerY" secondItem="EkX-UE-OP1" secondAttribute="centerY" id="Ouk-m2-rE7"/>
-                        <constraint firstItem="JHa-sL-gZy" firstAttribute="leading" secondItem="QoO-Ah-aKz" secondAttribute="trailing" constant="8" id="S4U-Bh-835"/>
-                        <constraint firstAttribute="trailing" secondItem="JHa-sL-gZy" secondAttribute="trailing" constant="8" id="Sfd-n6-oDa"/>
-                        <constraint firstItem="JHa-sL-gZy" firstAttribute="centerY" secondItem="EkX-UE-OP1" secondAttribute="centerY" id="WrR-JW-1oe"/>
-                        <constraint firstItem="QoO-Ah-aKz" firstAttribute="top" secondItem="EkX-UE-OP1" secondAttribute="top" constant="8" id="aiU-zc-Vrx"/>
-                        <constraint firstItem="v3v-wj-yoL" firstAttribute="centerY" secondItem="EkX-UE-OP1" secondAttribute="centerY" id="eKG-34-Lbq"/>
-                        <constraint firstAttribute="bottom" secondItem="QoO-Ah-aKz" secondAttribute="bottom" constant="8" id="sMW-LL-D2R"/>
-                        <constraint firstItem="v3v-wj-yoL" firstAttribute="leading" secondItem="EkX-UE-OP1" secondAttribute="leading" constant="8" id="x3i-F0-PwI"/>
-                        <constraint firstItem="dPD-fe-1fo" firstAttribute="leading" secondItem="v3v-wj-yoL" secondAttribute="trailing" constant="8" id="y7O-vb-bb2"/>
-                    </constraints>
-                </customView>
-            </subviews>
-            <constraints>
-                <constraint firstItem="EkX-UE-OP1" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" id="9t7-g4-20v"/>
-                <constraint firstItem="EkX-UE-OP1" firstAttribute="top" secondItem="c22-O7-iKe" secondAttribute="top" id="M6e-wT-jWG"/>
-                <constraint firstAttribute="trailing" secondItem="EkX-UE-OP1" secondAttribute="trailing" id="Xp2-na-1vv"/>
-                <constraint firstAttribute="bottom" secondItem="EkX-UE-OP1" secondAttribute="bottom" id="ycq-rw-GEc"/>
-            </constraints>
-            <point key="canvasLocation" x="246" y="235.5"/>
-        </customView>
-    </objects>
-    <resources>
-        <image name="KMImageNameCloseBtn" width="16" height="16"/>
-        <image name="KMImageNameFormIcon" width="16" height="16"/>
-        <image name="buttonCell:pJW-is-rPJ:image" width="1" height="1">
-            <mutableData key="keyedArchiveRepresentation">
-YnBsaXN0MDDUAQIDBAUGBwpYJHZlcnNpb25ZJGFyY2hpdmVyVCR0b3BYJG9iamVjdHMSAAGGoF8QD05T
-S2V5ZWRBcmNoaXZlctEICVRyb290gAGvEBELDBkaHxQkKSoxNDdBSUpOUVUkbnVsbNYNDg8QERITFBUW
-FxhWTlNTaXplXk5TUmVzaXppbmdNb2RlViRjbGFzc1xOU0ltYWdlRmxhZ3NWTlNSZXBzV05TQ29sb3KA
-AhAAgBASIMMAAIADgAtWezEsIDF90hsPHB5aTlMub2JqZWN0c6EdgASACtIbDyAjoiEigAWABoAJ0w8l
-JicoFF8QFE5TVElGRlJlcHJlc2VudGF0aW9uXxAZTlNJbnRlcm5hbExheW91dERpcmVjdGlvboAIgAdP
-EQjETU0AKgAAAAoAAAAQAQAAAwAAAAEAAQAAAQEAAwAAAAEAAQAAAQIAA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Nwo8CkQKRwpMClsKXwpqCnIKfwqMCqEKpgqqCqwKrgqwCrkKvgrECswKzgrQCtIK1Bx0
-HHkchhyJHJYcmxyjHKYcqxyzAAAAAAAAAgEAAAAAAAAAVAAAAAAAAAAAAAAAAAAAHLY
-</mutableData>
-        </image>
-    </resources>
-</document>

+ 0 - 96
PDF Office/PDF Master/Class/PDFWindowController/Form/KMPDFAnnotationButtonWidgetSub.swift

@@ -1,96 +0,0 @@
-//
-//  KMPDFAnnotationButtonWidgetSub.swift
-//  PDF Reader Pro
-//
-//  Created by wanjun on 2024/1/31.
-//
-
-import Cocoa
-
-class KMPDFAnnotationButtonWidgetSub: CPDFButtonWidgetAnnotation {
-    var formType: CAnnotationType = .unkown
-    
-    override func draw(with box: CPDFDisplayBox, in context: CGContext!) {
-        guard shouldDisplay() else {
-            return
-        }
-        
-        if controlType() == .checkBoxControl {
-            if hasAppearanceStream() {
-                super.draw(with: box, in: context)
-            } else {
-                super.draw(with: box, in: context)
-
-                NSGraphicsContext.saveGraphicsState()
-                transformContext(for: page, displayBox: box)
-                
-                context.setStrokeColor(red: 0, green: 0, blue: 0, alpha: 1.0)
-                context.setLineWidth(1.0)
-                context.addRect(CGRect(x: bounds.origin.x, y: bounds.origin.y, width: bounds.size.width, height: bounds.size.height))
-                context.strokePath()
-
-                NSGraphicsContext.restoreGraphicsState()
-            }
-        } else if controlType() == .pushButtonControl {
-            if hasAppearanceStream() {
-                super.draw(with: box, in: context)
-            } else {
-                NSGraphicsContext.saveGraphicsState()
-                let stabilizeHeight: CGFloat = 25
-                let actualRect = NSRect(x: bounds.origin.x, y: bounds.minY + (bounds.height - stabilizeHeight) / 2, width: bounds.size.width, height: stabilizeHeight)
-                let bezierPath = NSBezierPath(roundedRect: actualRect, xRadius: 2, yRadius: 2)
-                NSColor(red: 37/255.0, green: 139/255.0, blue: 251/255.0, alpha: 1).set()
-                bezierPath.fill()
-                
-                var attributes = [NSAttributedString.Key: Any]()
-                if let font = self.font {
-                    attributes[.font] = font
-                }
-                if let fontColor = self.fontColor {
-                    attributes[.foregroundColor] = fontColor
-                }
-                
-                let stringRect = caption()!.boundingRect(with: CGSize(width: actualRect.size.width, height: actualRect.size.height), options: .usesLineFragmentOrigin, attributes: attributes)
-                
-                caption().draw(in: CGRect(x: (actualRect.size.width - stringRect.size.width)/2 + actualRect.origin.x,
-                                        y: (actualRect.size.height - stringRect.size.height)/2 + actualRect.origin.y,
-                                        width: stringRect.size.width, height: stringRect.size.height), withAttributes: attributes)
-                
-                NSGraphicsContext.restoreGraphicsState()
-            }
-        } else {
-            super.draw(with: box, in: context)
-        }
-    }
-    
-    func transformContext(for page: CPDFPage, displayBox box: CPDFDisplayBox) {
-        var transform = NSAffineTransform()
-        let boxRect = page.bounds(for: box)
-        let rotation = page.rotation
-        
-        // Handle rotation.
-        switch rotation {
-        case 90:
-            transform.rotate(byDegrees: -90)
-            transform.translateX(by: -boxRect.size.width, yBy: 0.0)
-        case 180:
-            transform.rotate(byDegrees: 180)
-            transform.translateX(by: -boxRect.size.width, yBy: -boxRect.size.height)
-        case 270:
-            transform.rotate(byDegrees: 90)
-            transform.translateX(by: 0.0, yBy: -boxRect.size.height)
-        default:
-            break
-        }
-        
-        // Origin.
-        transform.translateX(by: -boxRect.origin.x, yBy: -boxRect.origin.y)
-        
-        // Concatenate.
-        transform.concat()
-    }
-
-    func keysForValuesToObserveForUndo() -> Set<String> {
-        return []
-    }
-}

+ 0 - 138
PDF Office/PDF Master/Class/PDFWindowController/Form/KMPDFAnnotationChoiceWidgetSub.swift

@@ -1,138 +0,0 @@
-//
-//  KMPDFAnnotationChoiceWidgetSub.swift
-//  PDF Reader Pro
-//
-//  Created by wanjun on 2024/1/31.
-//
-
-import Cocoa
-
-class KMPDFAnnotationChoiceWidgetSub: CPDFChoiceWidgetAnnotation {
-    var formType: CAnnotationType = .unkown
-    
-    override func draw(with box: CPDFDisplayBox, in context: CGContext!) {
-        let listChoice: Bool = isListChoice
-        if listChoice {
-            if hasAppearanceStream() {
-                super.draw(with: box, in: context)
-            } else {
-                super.draw(with: box, in: context)
-                transformContext(for: page, displayBox: box)
-                
-                context.setStrokeColor(red: 0, green: 0, blue: 0, alpha: 1.0)
-                context.setLineWidth(1.0)
-                context.addRect(CGRect(x: bounds.origin.x, y: bounds.origin.y, width: bounds.size.width, height: bounds.size.height))
-                context.strokePath()
-            }
-        } else {
-            if hasAppearanceStream() {
-                super.draw(with: box, in: context)
-            } else {
-                var stabilizeHeight = bounds.size.height
-                if stabilizeHeight > 25.0 {
-                    stabilizeHeight = 25.0
-                }
-                var actualRect = CGRect.zero
-                actualRect = CGRect(x: bounds.origin.x, y: bounds.minY + (bounds.height - stabilizeHeight) / 2, width: bounds.size.width, height: stabilizeHeight)
-                
-                let borderWidth: CGFloat = 0.5
-                var rightPartWidthChangePointValue = bounds.size.width / 2
-                if rightPartWidthChangePointValue > 30 {
-                    rightPartWidthChangePointValue = 30
-                }
-                let radius: CGFloat = 2.0
-                
-                // 画外框
-                context.saveGState()
-                context.move(to: CGPoint(x: actualRect.maxX - rightPartWidthChangePointValue, y: actualRect.minY + borderWidth))
-                context.addLine(to: CGPoint(x: actualRect.minX + borderWidth, y: actualRect.minY + borderWidth))
-                context.addLine(to: CGPoint(x: actualRect.minX + borderWidth, y: actualRect.maxY - borderWidth))
-                context.addLine(to: CGPoint(x: actualRect.maxX - rightPartWidthChangePointValue + 2 * borderWidth, y: actualRect.maxY - borderWidth))
-                context.addLine(to: CGPoint(x: actualRect.maxX - rightPartWidthChangePointValue + 2 * borderWidth, y: actualRect.minY + borderWidth))
-                context.setStrokeColor(NSColor.lightGray.cgColor)
-                context.setLineWidth(borderWidth)
-                context.setFillColor(self.backgroundColor.cgColor)
-                context.drawPath(using: .fillStroke)
-                context.restoreGState()
-                
-                context.saveGState()
-                context.move(to: CGPoint(x: actualRect.maxX - rightPartWidthChangePointValue, y: actualRect.maxY))
-                context.addLine(to: CGPoint(x: actualRect.maxX - rightPartWidthChangePointValue, y: actualRect.minY))
-                context.addLine(to: CGPoint(x: actualRect.maxX - radius, y: actualRect.minY))
-                context.addArc(center: CGPoint(x: actualRect.maxX - radius, y: actualRect.minY + radius), radius: radius, startAngle: CGFloat(3 * Double.pi / 2), endAngle: CGFloat(2 * Double.pi), clockwise: false)
-                context.addLine(to: CGPoint(x: actualRect.maxX, y: actualRect.maxY - radius))
-                context.addArc(center: CGPoint(x: actualRect.maxX - radius, y: actualRect.maxY - radius), radius: radius, startAngle: CGFloat(2 * Double.pi), endAngle: CGFloat(Double.pi / 2), clockwise: false)
-                context.addLine(to: CGPoint(x: actualRect.maxX - rightPartWidthChangePointValue, y: actualRect.maxY))
-                context.setFillColor(NSColor(red: 37/255.0, green: 139/255.0, blue: 251/255.0, alpha: 1.0).cgColor)
-                context.drawPath(using: .fill)
-                context.restoreGState()
-                
-                // 画等边三角形
-                let triangleWidth = min(rightPartWidthChangePointValue, actualRect.height) / 2.0
-                let triangleHeight = triangleWidth * sqrt(3.0) / 2
-                let centerPointUpGap = triangleHeight / 3.0
-                
-                context.saveGState()
-                let startPointX = actualRect.maxX - rightPartWidthChangePointValue + (rightPartWidthChangePointValue - triangleWidth) / 2
-                let startPointY = actualRect.midY + centerPointUpGap
-                context.move(to: CGPoint(x: startPointX, y: startPointY))
-                context.addLine(to: CGPoint(x: startPointX + triangleWidth, y: startPointY))
-                context.addLine(to: CGPoint(x: startPointX + triangleWidth / 2.0, y: actualRect.midY - 2 * centerPointUpGap))
-                context.closePath()
-                context.setFillColor(NSColor.white.cgColor)
-                context.drawPath(using: .fill)
-                context.restoreGState()
-                
-                context.saveGState()
-                // 画文字
-                var attributes = [NSAttributedString.Key: Any]()
-                if let font = self.font {
-                    attributes[.font] = font
-                }
-                if let fontColor = self.fontColor {
-                    attributes[.foregroundColor] = fontColor
-                }
-                let stringRect = self.string().boundingRect(with: CGSize(width: actualRect.size.width - rightPartWidthChangePointValue, height: actualRect.size.height), options: .usesLineFragmentOrigin, attributes: attributes)
-                
-                self.string().draw(in: CGRect(x: actualRect.origin.x, y: (actualRect.size.height - stringRect.size.height) / 2 + actualRect.origin.y, width: stringRect.size.width, height: stringRect.size.height), withAttributes: attributes)
-//                context.restoreGState()
-            }
-        }
-    }
-    
-    func transformContext(for page: CPDFPage, displayBox box: CPDFDisplayBox) {
-        var transform = NSAffineTransform()
-
-        // Identity.
-        transform = NSAffineTransform()
-
-        // Bounds for page.
-        let boxRect = page.bounds(for: box)
-
-        // Handle rotation.
-        let rotation = page.rotation
-        switch rotation {
-        case 90:
-            transform.rotate(byDegrees: -90)
-            transform.translateX(by: -boxRect.size.width, yBy: 0.0)
-        case 180:
-            transform.rotate(byDegrees: 180)
-            transform.translateX(by: -boxRect.size.width, yBy: -boxRect.size.height)
-        case 270:
-            transform.rotate(byDegrees: 90)
-            transform.translateX(by: 0.0, yBy: -boxRect.size.height)
-        default:
-            break
-        }
-
-        // Origin.
-        transform.translateX(by: -boxRect.origin.x, yBy: -boxRect.origin.y)
-
-        // Concatenate.
-        transform.concat()
-    }
-
-    func keysForValuesToObserveForUndo() -> Set<String> {
-        return []
-    }
-}

+ 0 - 46
PDF Office/PDF Master/Class/PDFWindowController/Form/KMPDFAnnotationTextWidgetSub.swift

@@ -1,46 +0,0 @@
-//
-//  KMPDFAnnotationTextWidgetSub.swift
-//  PDF Reader Pro
-//
-//  Created by wanjun on 2024/1/31.
-//
-
-import Cocoa
-
-class KMPDFAnnotationTextWidgetSub: CPDFTextWidgetAnnotation {
-    func transformContext(for page: PDFPage, displayBox box: PDFDisplayBox) {
-        var transform = NSAffineTransform()
-
-        // Identity.
-        transform = NSAffineTransform()
-
-        // Bounds for page.
-        let boxRect = page.bounds(for: box)
-
-        // Handle rotation.
-        let rotation = page.rotation
-        switch rotation {
-        case 90:
-            transform.rotate(byDegrees: -90)
-            transform.translateX(by: -boxRect.size.width, yBy: 0.0)
-        case 180:
-            transform.rotate(byDegrees: 180)
-            transform.translateX(by: -boxRect.size.width, yBy: -boxRect.size.height)
-        case 270:
-            transform.rotate(byDegrees: 90)
-            transform.translateX(by: 0.0, yBy: -boxRect.size.height)
-        default:
-            break
-        }
-
-        // Origin.
-        transform.translateX(by: -boxRect.origin.x, yBy: -boxRect.origin.y)
-
-        // Concatenate.
-        transform.concat()
-    }
-
-    func keysForValuesToObserveForUndo() -> Set<String> {
-        return []
-    }
-}

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

@@ -159,59 +159,7 @@ extension KMMainViewController {
     }
     
     //MARK: menu菜单
-    
-    func fontColorMenuItem()->NSMenuItem {
-        let fontColorItem = NSMenuItem(title: NSLocalizedString("Text Color", comment: ""), action: #selector(menuItemEditingClick_FontColor), keyEquivalent: "")
-        
-        return fontColorItem;
-    }
-    
-    func fontSizeMenuItem()->NSMenuItem {
-        let currentFontSize = self.listView.editingTextFontSize()
-        let fontSizes = self.fontSizes()
-        let submenu = NSMenu(title: "")
-        for i in 0 ... fontSizes.count - 1 {
-            let fontSize : String = fontSizes.object(at: i) as! String
-            let item = NSMenuItem(title:fontSize , action: #selector(menuItemEditingClick_FontSize), keyEquivalent: "")
-            item.target = self
-            item.tag = i
-            submenu.addItem(item)
-            if (Int(currentFontSize) == Int(fontSize)) {
-                item.state = .on
-            }
-        }
-        
-        let fontSizeItem = NSMenuItem(title: NSLocalizedString("Font Size", comment: ""), action:nil, keyEquivalent: "")
-        
-        fontSizeItem.submenu = submenu
-        return fontSizeItem;
-    }
-    
-    func corpImageMenuItem()->NSMenuItem {
-        let corpImageItem = NSMenuItem(title: NSLocalizedString("Confirm crop", comment: ""), action: #selector(menuItemEditingClick_CropImage), target: self)
-        return corpImageItem
-    }
-    
-    func cancelCorpImageMenuItem()->NSMenuItem {
-        let cancelCorpImageItem = NSMenuItem(title: NSLocalizedString("Cancel crop", comment: ""), action: #selector(menuItemEditingClick_CancelCrop), target: self)
-        return cancelCorpImageItem
-    }
-    
-    func restoreCorpImageMenuItem()->NSMenuItem {
-        let cancelCorpImageItem = NSMenuItem(title: NSLocalizedString("Restore crop", comment: ""), action: #selector(menuItemEditingClick_RestoreCrop), target: self)
-        return cancelCorpImageItem
-    }
-    
-    func cutImageArea()->NSMenuItem {
-        let deleteItem = NSMenuItem(title: NSLocalizedString("Crop", comment: ""), action: #selector(menuItemEditingClick_CutImage), target: self)
-        return deleteItem
-    }
-    
-    func editAddBlanMenu(menu:NSMenu){
-        _ = menu.insertItem(withTitle: NSLocalizedString("Add Text", comment: ""), action: #selector(addImageText), target: self, at: 0)
-        _ = menu.insertItem(withTitle: NSLocalizedString("Add Image", comment: ""), action: #selector(addImageText), target: self, at: 1)
-    }
-    
+      
     func addText() -> NSMenuItem {
         let addTextItem = NSMenuItem(title: NSLocalizedString("Add Text", comment: ""), action: #selector(addImageText), target: self, tag: 0)
         return addTextItem
@@ -264,12 +212,7 @@ extension KMMainViewController {
         let item = NSMenuItem(title: NSLocalizedString("Zoom To Selection", comment: ""), action: #selector(doZoomToAutoSelection), target: self)
         return item
     }
-    
-    func setDefaultAnnotationPorpert(type:CAnnotationType) -> NSMenuItem {
-        let item = NSMenuItem(title: NSLocalizedString("Set as Default", comment: ""), action: #selector(defaultAnnotationPorpert), target: self, tag: type.rawValue)
-        return item
-    }
-    
+     
     func enterAnnotationStype() -> NSMenuItem {
         let stypItem = NSMenuItem(title: NSLocalizedString("Annotate", comment: ""), action: nil, target: self)
         let stypeMenu = NSMenu()
@@ -1246,21 +1189,7 @@ extension KMMainViewController {
         winC.delegate = self
         winC.startModal("")
     }
-    
-    func splitView(withTag tag: Int) {
-        if tag == 0 {
-            self.listView.viewSplitMode = KMPDFViewSplitMode.horizontal
-            self.singlePageScreen(isSinglePage: false, doublePagesScreen: false)
-        } else if tag == 1 {
-            self.listView.viewSplitMode = KMPDFViewSplitMode.vertical
-            self.singlePageScreen(isSinglePage: false, doublePagesScreen: true)
-        } else if tag == 2 {
-            self.listView.viewSplitMode = KMPDFViewSplitMode.disable
-            self.singlePageScreen(isSinglePage: true, doublePagesScreen: false)
-        }
-        self.listView.needsDisplay = true
-    }
-    
+     
     // MARK: - 幻灯片
     
     func fadeInFullScreenWindow(with backgroundColor: NSColor, level: Int) {
@@ -1585,95 +1514,7 @@ extension KMMainViewController {
     private func cropPagesToRects(rects:NSPointerArray) {
         
     }
-    
-    @IBAction func defaultAnnotationPorpert(sender:NSMenuItem) {
-        let model : CPDFAnnotationModel = CPDFAnnotationModel(annotationType: CAnnotationType(rawValue: sender.tag)!)!
-        switch sender.tag {
-        case CAnnotationType.highlight.rawValue,CAnnotationType.underline.rawValue,CAnnotationType.strikeOut.rawValue:
-            model.setColor((listView.activeAnnotation as! CPDFMarkupAnnotation).color)
-            model.setOpacity((listView.activeAnnotation as! CPDFMarkupAnnotation).opacity)
-            
-            var red: CGFloat = 0.0
-            var green: CGFloat = 0.0
-            var blue: CGFloat = 0.0
-            var alpha: CGFloat = 0.0
-            (listView.activeAnnotation as! CPDFMarkupAnnotation).color.usingColorSpaceName(.calibratedRGB)?.getRed(&red, green: &green, blue: &blue, alpha: &alpha)
-            
-        case CAnnotationType.ink.rawValue:
-            model.setColor((listView.activeAnnotation as! CPDFInkAnnotation).color)
-            model.setOpacity((listView.activeAnnotation as! CPDFInkAnnotation).opacity)
-            model.setLineWidth((listView.activeAnnotation as! CPDFInkAnnotation).lineWidth())
-            model.setStyle((listView.activeAnnotation as! CPDFInkAnnotation).borderStyle())
-            
-            var red: CGFloat = 0.0
-            var green: CGFloat = 0.0
-            var blue: CGFloat = 0.0
-            var alpha: CGFloat = 0.0
-            (listView.activeAnnotation as! CPDFInkAnnotation).color.usingColorSpaceName(.calibratedRGB)?.getRed(&red, green: &green, blue: &blue, alpha: &alpha)
-            
-        case CAnnotationType.freeText.rawValue:
-            model.setColor((listView.activeAnnotation as! CPDFFreeTextAnnotation).color)
-            model.setOpacity((listView.activeAnnotation as! CPDFFreeTextAnnotation).opacity)
-            model.setFontColor((listView.activeAnnotation as! CPDFFreeTextAnnotation).fontColor)
-            model.setFontName((listView.activeAnnotation as! CPDFFreeTextAnnotation).font.fontName)
-            model.setFontSize((listView.activeAnnotation as! CPDFFreeTextAnnotation).font.pointSize)
-            model.setAlignment((listView.activeAnnotation as! CPDFFreeTextAnnotation).alignment)
-            
-            var red: CGFloat = 0.0
-            var green: CGFloat = 0.0
-            var blue: CGFloat = 0.0
-            var alpha: CGFloat = 0.0
-            (listView.activeAnnotation as! CPDFFreeTextAnnotation).fontColor.usingColorSpaceName(.calibratedRGB)?.getRed(&red, green: &green, blue: &blue, alpha: &alpha)
-           
-            if (KMPreferenceManager.supportFonts.contains((listView.activeAnnotation as! CPDFFreeTextAnnotation).font.fontName)) {
-                
-            }
-            let alignment = (listView.activeAnnotation as! CPDFFreeTextAnnotation).alignment
-            if (alignment == .left || alignment == .center || alignment == .right) {
-                
-            }
-        case CAnnotationType.anchored.rawValue:
-            model.setColor((listView.activeAnnotation as! CPDFTextAnnotation).color)
-            model.setAnchoredIconType((listView.activeAnnotation as! CPDFTextAnnotation).iconType())
-            
-            var red: CGFloat = 0.0
-            var green: CGFloat = 0.0
-            var blue: CGFloat = 0.0
-            var alpha: CGFloat = 0.0
-            (listView.activeAnnotation as! CPDFTextAnnotation).color.usingColorSpaceName(.calibratedRGB)?.getRed(&red, green: &green, blue: &blue, alpha: &alpha)
-         case CAnnotationType.square.rawValue:
-            model.setInteriorColor((listView.activeAnnotation as! CPDFSquareAnnotation).interiorColor)
-            model.setColor((listView.activeAnnotation as! CPDFSquareAnnotation).color)
-            model.setOpacity((listView.activeAnnotation as! CPDFSquareAnnotation).opacity)
-            model.setLineWidth((listView.activeAnnotation as! CPDFSquareAnnotation).lineWidth())
-            
-            var red: CGFloat = 0.0
-            var green: CGFloat = 0.0
-            var blue: CGFloat = 0.0
-            var alpha: CGFloat = 0.0
-            (listView.activeAnnotation as! CPDFSquareAnnotation).interiorColor.usingColorSpaceName(.calibratedRGB)?.getRed(&red, green: &green, blue: &blue, alpha: &alpha)
-             (listView.activeAnnotation as! CPDFSquareAnnotation).color.usingColorSpaceName(.calibratedRGB)?.getRed(&red, green: &green, blue: &blue, alpha: &alpha)
-         case CAnnotationType.circle.rawValue:
-            model.setInteriorColor((listView.activeAnnotation as! CPDFCircleAnnotation).interiorColor)
-            model.setColor((listView.activeAnnotation as! CPDFCircleAnnotation).color)
-            model.setOpacity((listView.activeAnnotation as! CPDFCircleAnnotation).opacity)
-            model.setLineWidth((listView.activeAnnotation as! CPDFCircleAnnotation).lineWidth())
-            
-            var red: CGFloat = 0.0
-            var green: CGFloat = 0.0
-            var blue: CGFloat = 0.0
-            var alpha: CGFloat = 0.0
-            (listView.activeAnnotation as! CPDFCircleAnnotation).interiorColor.usingColorSpaceName(.calibratedRGB)?.getRed(&red, green: &green, blue: &blue, alpha: &alpha)
-             (listView.activeAnnotation as! CPDFCircleAnnotation).color.usingColorSpaceName(.calibratedRGB)?.getRed(&red, green: &green, blue: &blue, alpha: &alpha)
-         default:
-            break
-        }
-    }
-    
-    @objc internal func menuItemClick_HidenorShowNote(sender: NSMenuItem?) {
-        self.showOrHideNotes()
-    }
-    
+ 
     //MARK: - action
     
     
@@ -1818,96 +1659,10 @@ extension KMMainViewController {
     }
     
     @IBAction func toggleSplitPDF(_ sender: Any) {
-        if let menuItem = sender as? NSMenuItem {
-            splitView(withTag: menuItem.tag)
-        }
-    }
-     
-    
-    func changeLineAttribute(_ sender: Any?) {
-        var inspector = sender as? KMLineInspector
-        if inspector == nil {
-            inspector = KMLineInspector.shared
-        }
-        let action = inspector?.currentLineChangeAction ?? .no
-        
-        for annotation in self.listView.activeAnnotations {
-            guard let anno = annotation as? CPDFAnnotation else {
-                continue
-            }
-            
-            if anno.hasBorder() {
-                switch (action) {
-                case .lineWidth:
-                    anno.setLineWidth(inspector?.lineWidth ?? 0)
-                    break
-                case .style:
-                    anno.setBorderStyle(CPDFBorderStyle(rawValue: inspector?.style ?? 0) ?? .solid)
-                    break
-                case .dashPattern:
-                    anno.setDashPattern(inspector?.dashPattern ?? [])
-                    break
-                case .startLineStyle:
-                    if anno.isLine() {
-                        (anno as? CPDFLineAnnotation)?.startLineStyle = CPDFLineStyle(rawValue: inspector?.startLineStyle ?? 0) ?? .none
-                    }
-                    break
-                case .endLineStyle:
-                    if anno.isLine() {
-                        (anno as? CPDFLineAnnotation)?.endLineStyle = CPDFLineStyle(rawValue: inspector?.endLineStyle ?? 0) ?? .none
-                    }
-                    break
-                case .no:
-                    break
-                }
-            }
-        }
         
     }
+     
     
-    // MARK: -
-    // MARK: 显示窗口
-    
-//    internal func showCompressWindow(url: URL? = nil) {
-//        
-//        self.compressWIndowControllerNew = KMCompressWindowController(windowNibName: "KMCompressWindowController")
-//        self.view.window?.beginSheet(self.compressWIndowControllerNew!.window!)
-//        self.compressWIndowControllerNew?.password = self.listView.document?.password ?? ""
-//        
-//        self.compressWIndowControllerNew?.documentURL = self.listView.document.documentURL
-//        
-//        
-//        self.compressWIndowControllerNew?.itemClick = { [unowned self] in
-//            self.view.window?.endSheet((self.compressWIndowControllerNew?.window)!)
-//             
-//        }
-//        
-//        self.compressWIndowControllerNew?.batchAction = { [unowned self] view, filePaths in
-//            self.view.window?.endSheet((self.compressWIndowControllerNew?.window)!)
-//            
-// 
-//            let batchWindowController = KMBatchOperateWindowController.sharedWindowController
-//            let batchOperateFile = KMBatchOperateFile(filePath: filePaths.first!.path, type: .Compress)
-//            batchWindowController.switchToOperateType(KMBatchOperationType.Compress, files: [batchOperateFile])
-//            batchWindowController.window?.makeKeyAndOrderFront("")
-//        }
-//        
-//        self.compressWIndowControllerNew?.resultCallback = { [unowned self] result, openDocument, fileURL, error in
-//            self.view.window?.endSheet((self.compressWIndowControllerNew?.window)!)
-//            if (result) {
-// 
-//                if (openDocument) {
-//                    NSDocumentController.shared.openDocument(withContentsOf: fileURL, display: true) { document, result, error in }
-//                } else {
-//                    NSWorkspace.shared.activateFileViewerSelecting([fileURL])
-//                }
-//            } else {
-//                let alert = NSAlert()
-//                alert.messageText = NSLocalizedString("Compress Faild", comment: "")
-//                alert.runModal()
-//            }
-//        }
-//    }
     
     internal func showConvertWindow(type: KMToolbarType, documentUrl: URL? = nil, identifier: String?) {
         if let wc = self.currentWindowController as? KMConvertBaseWindowController, let _ = wc.window?.isSheet {
@@ -1954,7 +1709,7 @@ extension KMMainViewController {
     }
     //MARK: 转档 -
     func showAllConvertWindow(convertT: KMConvertType) {
-        self.ConvertTrackEvent(type: convertT)
+        
         let convertWC = KMConvertWindowController(documemtV: self.document!, currentPage: self.listView.currentPage(), convertT: convertT) {
             DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 0.25) { [self] in
                 var type: KMConvertWithPDFType = .WordAdvance
@@ -2036,48 +1791,7 @@ extension KMMainViewController {
         }
         self.km_beginSheet(windowC: convertWC)
     }
-    func ConvertTrackEvent(type: KMConvertType) {
-        var eventStr: String = "Btn_SubTbr_Converter_ToWord"
-        switch type {
-        case .Word:
-            eventStr = "Btn_SubTbr_Converter_ToWord"
-            break
-        case .Excel:
-            eventStr = "Btn_SubTbr_Converter_ToExcel"
-        case .PPT:
-            eventStr = "Btn_SubTbr_Converter_ToPPT"
-        case .RTF:
-            eventStr = "Btn_SubTbr_Converter_ToRTF"
-        case .CSV:
-            eventStr = "Btn_SubTbr_Converter_ToCSV"
-        case .HTML:
-            eventStr = "Btn_SubTbr_Converter_ToHTML"
-        case .Text:
-            eventStr = "Btn_SubTbr_Converter_ToText"
-        case .JPEG:
-            eventStr = "Btn_SubTbr_Converter_ToImage"
-        case .PNG:
-            eventStr = "Btn_SubTbr_Converter_ToImage"
-        case .GIF:
-            eventStr = "Btn_SubTbr_Converter_ToImage"
-        case .JPG:
-            eventStr = "Btn_SubTbr_Converter_ToImage"
-        case .TIFF:
-            eventStr = "Btn_SubTbr_Converter_ToImage"
-        case .TGA:
-            eventStr = "Btn_SubTbr_Converter_ToImage"
-        case .BMP:
-            eventStr = "Btn_SubTbr_Converter_ToImage"
-        case .JP2:
-            eventStr = "Btn_SubTbr_Converter_ToImage"
-        case .AdvancedWord:
-            eventStr = "Btn_SubTbr_Converter_ToWord"
-            break
-        default:
-            break
-        }
-        FMTrackEventManager.defaultManager.trackEvent(event: "SubTbr_Converter", withProperties: ["SubTbr_Btn": eventStr])
-    }
+     
     
     //MARK: 转档 - OCR
     func showOCRWindow() {
@@ -2207,17 +1921,7 @@ extension KMMainViewController {
         return "\(dateFormatter.string(from: Date()))\(Int.random(in: 0..<10000))"
     }
     
-    // MARK: - Split View
-    
-    @IBAction func secondaryViewOpenFile(_ sender: NSButton) -> Void {
-        
-    }
-     
-    
-    func singlePageScreen(isSinglePage: Bool, doublePagesScreen isHorizontal: Bool) -> Void {
-      
-    }
-     
+  
      
     
     
@@ -3532,37 +3236,7 @@ extension KMMainViewController {
         
         return setup
     }
-    
-    // MARK: - Recommond活动
-    
-    func loadRecommondPopWindow() {
-        if IAPProductsManager.default().isAvailableAllFunction() {
-            return
-        }
-        
-        if let info = KMAdvertisementManager.manager.info.popWindowContent?.content?.first {
-            if recommondPopWindowVC == nil {
-                recommondPopWindowVC = KMRecommondPopWindow.default()
-            }
-            recommondPopWindowVC?.recommondInfo = info
-            
-            guard let windowFrame = self.view.window?.frame, let popWindowFrame = recommondPopWindowVC?.window?.frame else {
-                return
-            }
-            
-            let x = windowFrame.minX + (windowFrame.size.width - popWindowFrame.size.width) / 2.0
-            let y = windowFrame.minY + (windowFrame.size.height - popWindowFrame.size.height) / 2.0
-            recommondPopWindowVC?.window?.setFrame(NSRect(x: x, y: y, width: popWindowFrame.size.width, height: popWindowFrame.size.height), display: true)
-            
-            recommondPopWindowVC?.window?.orderFront((Any).self)
-            recommondPopWindowVC?.window?.becomeMain()
-            
-            UserDefaults.standard.set("Show", forKey: info.version ?? "")
-            UserDefaults.standard.synchronize()
-        }
-    }
-    
-    
+     
     
     @objc func didAddContentViewNotification(_ sender: Notification) {
         guard let win = sender.object as? NSWindow, win.isEqual(to: self.view.window) else {
@@ -3573,11 +3247,6 @@ extension KMMainViewController {
         }
     }
     
-    @objc func purchaseStateUpdateNoti() {
-        if IAPProductsManager.default().isAvailableAllFunction() {
-         }
-    }
-    
     //!!!: - CPDFFreeTextAnnotation 空注释时会删除,删除时sdk内部删除的,只能接受通知来刷选UI【正常的注释删除会走两遍】
     @objc func didRemoveAnnotationNotification(_ sender: Notification) {
         guard let anno = sender.object as? CPDFAnnotation else {

+ 1 - 1
PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController+MenuAction.swift

@@ -339,7 +339,7 @@ extension KMMainViewController {
             KMPurchaseCompareWindowController.sharedInstance().showWindow(nil)
             return
         }
-        self.splitView(withTag: item.tag)
+        
     }
     
     @IBAction func themesColor(_ sender: Any?) {

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

@@ -6,13 +6,7 @@
 //
 
 import Foundation
-
-extension KMMainViewController {
-    // MARK: - 退出全屏
-    
-    
-}
-
+ 
 extension KMMainViewController {
     //通知
     func preferenceDidChangeNotification(notification:Notification) {
@@ -62,29 +56,7 @@ extension KMMainViewController {
              
         }
     }
-     
-    func showConvertNotesProgress() {
-        guard let pdfDocument = self.document else {
-            return
-        }
-        guard let _ = self.listView.document else {
-            return
-        }
-        guard let _ = self.view.window else {
-            return
-        }
-        
-        let isNewCreated = (self.myDocument as? KMMainDocument)?.isNewCreated ?? false
-        if isNewCreated {
-            return
-        }
-        
-        self.model.needConvertNotes = false
-        Task { @MainActor in
-            self.convertNotesUsingPDFDocument(pdfDocument)
-        }
-    }
-    
+      
     func convertNotesUsingPDFDocument(_ pdfDocument: CPDFDocument, callback: (()->Void)? = nil) {
         guard let doc = self.listView.document else {
             return
@@ -160,145 +132,6 @@ extension KMMainViewController {
          
     }
 }
- 
-extension KMMainViewController {
-  
-    func changeAnnotationModeAction(item: KMToolbarClickButton) {
-        if self.listView.toolMode == CToolMode.CFormToolMode {
-            if !IAPProductsManager.default().isAvailableAllFunction(){
-                let winC = KMPurchaseCompareWindowController.sharedInstance()
-                if let type = CAnnotationType(rawValue: item.tag) {
-                    if type == .textField {
-                        winC?.kEventName = "Reading_TextField_BuyNow"
-                    } else if type == .checkBox {
-                        winC?.kEventName = "Reading_CheckBox_BuyNow"
-                    } else if type == .radioButton {
-                        winC?.kEventName = "Reading_RadioButton_BuyNow"
-                    } else if type == .listMenu {
-                        winC?.kEventName = "Reading_ListBox_BuyNow"
-                    } else if type == .comboBox {
-                        winC?.kEventName = "Reading_ComboBox_BuyNow"
-                    } else if type == .actionButton {
-                        winC?.kEventName = "Reading_Button_BuyNow"
-                    }
-                }
-                winC?.showWindow(nil)
-                return
-            }
-        } else {
-            let type = CAnnotationType(rawValue: item.tag) ?? CAnnotationType.unkown
-            if type == .signature {
-                if !IAPProductsManager.default().isAvailableAllFunction(){
-                    let winC = KMPurchaseCompareWindowController.sharedInstance()
-                    winC?.kEventName = "Reading_ElectronicSign_BuyNow"
-                    winC?.showWindow(nil)
-                    return
-                }
-            }
-        }
-        
-        if (self.model.rightMouseEventing) {
-            self.model.rightMouseEventing = false
-        }
-         
-        var currentType = self.listView.annotationType
- 
-        let isSelected = (currentType == CAnnotationType(rawValue: item.tag) ?? CAnnotationType.unkown) && ((self.listView.toolMode == .CNoteToolMode) || (self.listView.toolMode == .CFormToolMode))
-        var editSelectd = false
-        if self.listView.annotationType == CAnnotationType(rawValue: item.tag) ?? CAnnotationType.unkown && self.listView.toolMode == .CEditPDFToolMode {
-            editSelectd = true
-        }
-        
-        if isSelected {
-            if self.listView.toolMode == .CFormToolMode {
-                
-            } else {
-                self.listView.toolMode = .CTextToolMode
-            }
-            let type = CAnnotationType(rawValue: item.tag) ?? CAnnotationType.unkown
-            if type == .signature {
-                 
-                if self.listView.toolMode == .CFormToolMode {
-                    self.listView.toolMode = .CNoteToolMode
-                }
-            }
-            self.listView.annotationType = .unkown
-            toggleCloseRightSide()
-        } else {
-            let type = CAnnotationType(rawValue: item.tag) ?? CAnnotationType.unkown
-            self.trackEvent(annotationType: type)
-
-            if type == .signature {
-                if self.listView.toolMode != .CFormToolMode {
-                    self.listView.toolMode = .CFormToolMode
-                    
-                 }
-            }
-            self.listView.annotationType = type
-            
-            if self.listView.currentSelection != nil {
-              let annotation = self.listView.addAnnotation(with: CAnnotationType(rawValue: item.tag) ?? CAnnotationType.unkown, selection: self.listView.currentSelection, page: self.listView.currentSelection.page, bounds: self.listView.currentSelection.bounds)
-                if((annotation != nil) &&
-                   !self.listView.activeAnnotations.contains(annotation ?? self.listView.activeAnnotation)) {
-                    var newAnnonations : [CPDFAnnotation] = []
-                    newAnnonations.append(annotation!)
-                    self.listView.updateActiveAnnotations(newAnnonations)
-                    self.listView.setNeedsDisplayAnnotationViewFor(annotation?.page)
-                }
-
-            }
-            
-            if self.listView.toolMode == .CFormToolMode {
-                
-            } else {
-                self.refreshListViewToolMode()
-            }
-        }
-        
-        if self.listView.toolMode != .CEditPDFToolMode && self.listView.annotationType != .unkown {
-          
-            let toolMode = self.listView.toolMode ?? .none
-           
-            if !viewManager.isPDFReadMode {
-                toggleOpenRightSide()
-            }
-        } else if self.listView.toolMode == .CEditPDFToolMode {
-            if editSelectd {
-                self.listView.setShouAddEdit([])
-                self.listView.change([.text, .image])
-                toggleCloseRightSide()
-            } else if self.listView.shouAddEditAreaType() == .text {
-                if !viewManager.isPDFReadMode {
-                    toggleOpenRightSide()
-                }
-                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.shouAddEditAreaType() == .image {
-                if !viewManager.isPDFReadMode {
-                    toggleOpenRightSide()
-                }
-                FMTrackEventManager.defaultManager.trackEvent(event: "SubTbr_EditPDF", withProperties: ["SubTbr_Btn" : "Btn_SubTbr_EditPDF_AddImage"])
- 
-                self.listView.setShouAddEdit(.image)
-                self.listView.change(.image)
-
-            }
-        } else {
-            toggleCloseRightSide()
-        }
-    }
-    
-    func refreshListViewToolMode () {
-         
-    }
-    
-    func showPDFLayoutModeAction(show: Bool) {
-        self.listView.annotationType = .unkown
-        self.showOrHideNotes()
-    }
-}
- 
 
 // MARK: - KMLeftSideViewControllerDelegate
 
@@ -516,6 +349,4 @@ extension KMMainViewController: CPDFDocumentDelegate {
         self.leftSideViewController.documentDidEndFind()
      }
 }
-
-// MAKR: - CPDFViewDelegate,CPDFListViewDelegate
-
+ 

+ 8 - 382
PDF Office/PDF Master/KMClass/KMPDFViewController/KMMainViewController.swift

@@ -109,8 +109,6 @@ struct KMNMWCFlags {
     //Search
     var searchIndex: Int = 0
     
-    //Form
-    var formAlertView: KMFormAlertView?
     //Secure
     var secureAlertView: KMSecureAlertView?
     
@@ -4307,275 +4305,13 @@ extension KMMainViewController: KMNLeftSideViewControllerDelegate {
 //MARK: - 旧代码,需要用到的内容需要拖出来,写好注释
 
 extension KMMainViewController {
-    
-    func awakeFromNibFunction() {
-        self.addBackgroundMaskView()
-        
-        
-        listView.delegate = self
-        listView.pdfListViewDelegate = self
-        if (document != nil) {
-            self.listView.document = self.document
-            self.listView.document?.delegate = self
-            
-            let autoScale = listView.autoScales
-            if !autoScale {
-                listView.scaleFactor = 1.0
-            }
-        }
-        
-        
-        self.initPDFLeftViewVC()
-        self.leftSideViewController.mainViewController = self
-        
-    }
-    
-    func viewDidAppearFunction() {
-        //春季活动
-        if ((KMAdvertisementManager.manager.info.popWindowContent) != nil) {
-            if KMAdvertisementManager.manager.info.popWindowContent!.content!.count > 0 {
-                let info = KMAdvertisementManager.manager.info.popWindowContent!.content?.first
-                if KMAdvertisementManager.checkAdvertisementValid(info!) {
-                    self.loadRecommondPopWindow()
-                }
-            }
-        }
-        
-        self.addEventMonitor()
-        
-        self.view.window?.makeFirstResponder(self.listView)
-        // 更新属性页面的信息
-        NotificationCenter.default.post(name: KMInfoWindowC.windowDidBecomeMainNotification, object: self.myDocument)
-        self.interfaceThemeDidChanged(self.view.window?.appearance?.name ?? (NSApp.appearance?.name ?? .aqua))
-        
-        if (self.document == nil) {
-            return
-        }
-        
-        if (self.document == nil || self.document!.isLocked == false) {
-            self.loadFunctionGuide()
-        }
-        
-        if (self.document?.isLocked == false) {
-            if self.model.needConvertNotes && self.tabViewIsDragging() == false {
-                self.showConvertNotesProgress()
-            }
-            return
-        }
-        if (self.view.window == nil) {
-            return
-        }
-        if (self.model.password != nil) {
-            if let data = self.listView.document?.unlock(withPassword: self.model.password), data {
-                self.model.isSaveKeyChain = false
-                if self.model.needConvertNotes && self.tabViewIsDragging() == false {
-                    self.showConvertNotesProgress()
-                }
-                return
-            }
-        }
-        
-        DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 0.3) {
-            if self.view.window != nil && self.tabViewIsDragging() == false {
-                self.passwordWindow = KMPasswordInputWindow.openWindow(window: self.view.window!, url: self.document!.documentURL) { [weak self] result , password in
-                    if (result == .cancel) {
-                        (self?.myDocument as? KMMainDocument)?.browser?.closeTab()
-                        return
-                    }
-                    self?.model.isSaveKeyChain = true
-                    self?.listView.document = self?.document
-                    self?.document?.unlock(withPassword: password)
-                }
-            } else {
-                if self.model.needConvertNotes && self.tabViewIsDragging() == false {
-                    self.showConvertNotesProgress()
-                }
-            }
-        }
-    }
-    
-    func viewWillDisappearFunction() {
-        if self.interactionMode != .presentation {
-            self.removeEventMonitor()
-        }
-        
-    }
-    
-    func viewWillLayoutFunction() {
-        if (KMTools.isFullScreen(self.view.window ?? NSWindow())) { // 全屏
-            self.listView.backgroundColor = KMPreferenceManager.shared.displayBackgroundFullScreenColor
-        } else {
-            self.listView.backgroundColor = KMPreferenceManager.shared.displayBackgroundNormalColor
-        }
-        if let guideWC = self.guideInfoWindowController{
-            var rect = self.view.window!.frame
-            rect.size.height -= 20
-            guideWC.window?.setFrame(rect, display: false)
-            guideWC.window?.minSize = rect.size
-            guideWC.window?.maxSize = rect.size
-            guideWC.show()
-        }
-    }
-    
-    func viewDidLoadOld() {
-        mwcFlags.settingUpWindow = 1
-        
-        self.initToolbar()
-        
-        if (UserDefaults.standard.object(forKey: CPDFOfficeLeftSidePaneWidthKey) != nil) {
-            UserDefaults.standard.set(256, forKey: CPDFOfficeLeftSidePaneWidthKey)
-            UserDefaults.standard.synchronize()
-        }
-        if (UserDefaults.standard.object(forKey: CPDFOfficeRightSidePaneWidthKey) != nil) {
-            UserDefaults.standard.set(256, forKey: CPDFOfficeRightSidePaneWidthKey)
-            UserDefaults.standard.synchronize()
-        }
-        
-        if (KMPreferenceManager.shared.openLastUnlockedDocumentWhenAppStart) {
-            if (self.listView.document != nil) {
-                let pageNumber = KMPreferenceManager.shared.getPageNumber(forKey: self.listView.document?.documentURL.path ?? "")
-                let pageScale = KMPreferenceManager.shared.getPageScale(forKey: self.listView.document?.documentURL.path ?? "")
-                if (pageNumber != nil && pageNumber! >= 0 && pageNumber! < (self.listView.document?.pageCount ?? 0)) {
-                    DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
-                        if (pageScale != nil) {
-                            self.listView.scaleFactor = CGFloat(pageScale!)
-                        }
-                        self.listView.go(toPageIndex: pageNumber!, animated: false)
-                    }
-                } else {
-                    self._goToFirstPageForFristAppear()
-                }
-            }
-        } else {
-            self._goToFirstPageForFristAppear()
-        }
-        
-        
-        
-        
-        NotificationCenter.default.addObserver(self, selector: #selector(rename(_:)), name: NSNotification.Name.init(rawValue: "KMTabControllerRename"), object: nil)
-        NotificationCenter.default.addObserver(self, selector: #selector(closeTab(_:)), name: NSNotification.Name.init(rawValue: "KMTabControllerCloseTabs"), object: nil)
-        NotificationCenter.default.addObserver(self, selector: #selector(showInFinder(_:)), name: NSNotification.Name.init(rawValue: "KMTabControllerShowInFinder"), object: nil)
-        NotificationCenter.default.addObserver(self, selector: #selector(preferenceDidChangeNotification), name: KMPreferenceManager.didChangeNotification, object: nil)
-        NotificationCenter.default.addObserver(self, selector: #selector(documentDidUnlockNotification), name: Notification.Name("CPDFDocumentDidUnlockNotification"), object: nil)
-        NotificationCenter.default.addObserver(self, selector: #selector(annotationsAttributeHasChange), name: NSNotification.Name.CPDFListViewAnnotationsAttributeHasChange, object:nil)
-        NotificationCenter.default.addObserver(self, selector: #selector(applicationWillTerminateNotification), name: NSApplication.willTerminateNotification, object: nil)
-        
-        NotificationCenter.default.addObserver(self, selector: #selector(CEditPDFToolModeChangeStateUnkownNotification), name: Notification.Name.init("CEditPDFToolModeChangeStateUnkown"), object: nil)
-        
-        NotificationCenter.default.addObserver(self, selector: #selector(handlePageChangedNotification), name: NSNotification.Name.CPDFViewPageChanged, object: self.listView)
-        NotificationCenter.default.addObserver(self, selector: #selector(handleDisplayBoxChangedNotification), name: NSNotification.Name.CPDFViewDisplayBoxChanged, object: self.listView)
-        
-        
-        NotificationCenter.default.addObserver(self, selector: #selector(didAddContentViewNotification), name: NSWindow.didAddContentViewNotification, object: nil)
-        NotificationCenter.default.addObserver(self, selector: #selector(addAutoSaveEvent), name: AutoSaveManager.kTimeValueChangedNotificationName, object: nil)
-        NotificationCenter.default.addObserver(self, selector: #selector(didRemoveAnnotationNotification), name: NSNotification.Name.CPDFPageDidRemoveAnnotation, object: nil)
-        
-        Task {
-            self.addAutoSaveEvent()
-        }
-        
-        self.toggleCloseRightSide()
-        
-        self.addKeyEventMonitor()
-        
-        self.addAdsBannerView()
-        
-        var snapshotSetups: NSArray?
-        if KMPreferenceManager.shared.rememberSnapshot {
-            if let fileUrl = (self.myDocument as? KMMainDocument)?.fileURL {
-                snapshotSetups = SKBookmarkController.shared().snapshotsForRecentDocument(at: fileUrl) as NSArray?
-            }
-        }
-        if let cnt = snapshotSetups?.count, cnt > 0 {
-            if let data = self.listView.document?.isLocked, data {
-                self.savedNormalSetup.setObject(snapshotSetups as Any, forKey: "snapshots" as NSCopying)
-            } else {
-                self.showSnapshots(setups: snapshotSetups)
-            }
-        }
-        
-        let readModel = UserDefaults.standard.bool(forKey: "kKMPDFViewIsReadMode")
-        if readModel == true {
-            self.openPDFReadMode()
-        }
-        
-        let hasWindowSetup = savedNormalSetup.count > 0
-        if UserDefaults.standard.dictionary(forKey: KMDefaultPDFDisplaySettingsKey) != nil {
-            let pdfSettings: NSDictionary = hasWindowSetup ? savedNormalSetup : UserDefaults.standard.dictionary(forKey: KMDefaultPDFDisplaySettingsKey)! as NSDictionary
-            self.applyPDFSettings(pdfSettings)
-        } else {
-            self.applyPDFSettings(savedNormalSetup)
-        }
-        
-        //文字
-        let fontManager = NSFontManager.shared
-        fontManager.target = self
-        fontManager.action = #selector(changeFont(_:))
-        
-    }
-    
-    
-    //MARK: - PDFListView
-    
-    func initPDFLeftViewVC() {
-        var frame = self.leftView.frame
-        frame.size.width += 44
-        self.leftView.frame = frame
-        leftSideViewController.isFirst = true
-        leftSideViewController.listView = self.listView
-        leftSideViewController.view.frame = CGRect(x: 0, y:0 , width: self.leftView.frame.size.width, height: self.leftView.frame.size.height)
-        leftSideViewController.view.autoresizingMask = [.height,.width]
-        leftSideViewController.delegate = self
-        self.leftView.addSubview(leftSideViewController.view)
-    }
-    
-    func addAdsBannerView() {
-#if VERSION_FREE
-        if !IAPProductsManager.default().isAvailableAllFunction(){
-            guard let document = self.listView.document else {
-                return
-            }
-            if !document.isLocked {
-            }
-            NotificationCenter.default.addObserver(self, selector: #selector(purchaseStateUpdateNoti), name: NSNotification.Name(rawValue: "KMIAPProductPurchasedNotification"), object: nil)
-            NotificationCenter.default.addObserver(self, selector: #selector(purchaseStateUpdateNoti), name: NSNotification.Name(rawValue: "kDeviceActivateNotification"), object: nil)
-            
-        }
-        
-#endif
-        
-    }
-    
-    // MARK: Private Methods
-    
-    private func _isArabicLanguage() -> Bool {
-        return NSLocalizedString("Right click a color and select “Change Color...“.", comment: "") == "انقر بزر الماوس الأيمن فوق اللون وحدد \"تغيير اللون...\"."
-    }
-    
+     
     internal func removeNotifications() {
         NotificationCenter.default.removeObserver(self)
         self.leftSideViewController.clearAnnotationFilterData()
         self.leftSideViewController.clearNotification()
     }
-    
-    func checkShouldAutoOpenLeftVC() {
-        if KMPreference.shared.showLeftSideBar == false {
-            return
-        }
-        if self.model.leftPanelOpen {
-            return
-        }
-        let readModel = UserDefaults.standard.bool(forKey: "kKMPDFViewIsReadMode")
-        if readModel == true {
-            return
-        }
-        
-        DispatchQueue.main.async {
-            self.leftSideViewController.showThumbnail()
-        }
-    }
-    
+     
     func removeAllAnnotations() {
         let alert = NSAlert()
         alert.messageText = NSLocalizedString("This will permanently remove all annotations. Are you sure to continue?", comment: "")
@@ -5150,30 +4886,7 @@ extension KMMainViewController {
         }
         
     }
-    
-    // MARK: - Toolbar
-    
-    func toolbarItemClickForExitMode(_ toolbarItem: KMToolbarItemView) {
-        if(toolbarItem.itemIdentifier != KMDocumentPageToolbarItemIdentifier) {
-            if (hasEnterPageEdit()) {
-                self.exitPageEdit()
-            }
-        }
-        if toolbarItem.itemIdentifier != KMDocumentRedactToolbarItemIdentifier {
-            if self.hasEnterRedact() {
-                self.exitRedact()
-            }
-        }
-        if toolbarItem.itemIdentifier != KMDocumentDigitalSignToolbarItemIdentifier {
-            if self.hasShowDigitalSign() {
-                self.exitDigitalSign()
-            }
-        }
-        if toolbarItem.itemIdentifier != KMDocumentEditToolbarItemIdentifier && toolbarItem.itemIdentifier != KMRightControlToolbarItemIdentifier && toolbarItem.itemIdentifier != KMLeftControlToolbarItemIdentifier {
-            
-        }
-    }
-    
+     
     // MARK: - Private Methods
     
     private func getPDFEditController() -> KMPDFEditViewController? {
@@ -5199,8 +4912,7 @@ extension KMMainViewController {
     }
     
     private func addBackgroundMaskView() {
-        self.removeBackgroundMaskView()
-        
+       
         
     }
     
@@ -5294,52 +5006,13 @@ extension KMMainViewController {
     }
     
     // MARK: - Secure 【安全】
-    
-    public func showSecureLimitTip() {
-        self.hiddenSecureLimitTip()
-        
-        if self.secureAlertView == nil {
-            self.secureAlertView = KMSecureAlertView()
-            self.secureAlertView?.show(in: self.listView)
-            self.secureAlertView?.closeAction = { [unowned self] view in
-                self.hiddenSecureLimitTip()
-                
-                self.removeFromAlertView()
-                self.showFormAlertView()
-            }
-            
-            self.secureAlertView?.passwordAction = { [unowned self] view in
-                self.removeOwnerPassword()
-                
-                self.removeFromAlertView()
-                self.showFormAlertView()
-            }
-        }
-    }
-    
+     
     
     public func hiddenSecureLimitTip() {
         self.secureAlertView?.removeFromSuperview()
         self.secureAlertView = nil
     }
-    
-    //MARK: - Form
-    
-    func showFormAlertView() {
-        if (formAlertView == nil) {
-            formAlertView = KMFormAlertView()
-            formAlertView?.isCloseSecureView = self.secureAlertView != nil ? false : true
-            formAlertView?.showInView(self.listView)
-        } else {
-            self.removeFromAlertView()
-        }
-    }
-    
-    func removeFromAlertView() {
-        formAlertView?.removeFromSuperview()
-        formAlertView = nil
-    }
-    
+     
     override func mouseMoved(with event: NSEvent) {
         self.view.window?.mouseMoved(with: event)
     }
@@ -5827,24 +5500,11 @@ extension KMMainViewController {
         self._secureOptions = nil
         self.documentAttribute = nil
     }
-    
-    public func recordRemoveSecureFlag() {
-        self._removeSecureFlag = true
-        self.clearSecureOptions()
-        self.recordIsPDFDocumentEdited(type: .removePassword)
-        self._needSave = true
-    }
-    
+     
     public func clearRemoveSecureFlag() {
         self._removeSecureFlag = false
     }
     
-    public func clearSaveWatermarkFlag() {
-        km_synchronized(self) {
-            self._saveWatermarkFlag = false
-        }
-    }
-    
     public func recordIsPDFDocumentEdited(type: KMSubscribeWaterMarkType = .none) {
         km_synchronized(self) {
             self.model.isPDFDocumentEdited = true
@@ -5876,41 +5536,7 @@ extension KMMainViewController {
             }
         }
     }
-    
-    func dealDocumentDidLoaded() {
-        self.removeBackgroundMaskView()
-        if (!self.listView.document!.allowsCopying || !self.listView.document!.allowsPrinting) {
-            self.showSecureLimitTip()
-        }
-        
-        if self.model.needConvertNotes {
-            self.showConvertNotesProgress()
-        }
-        if (self._documentFirstLoad) {
-            self.checkShouldAutoOpenLeftVC()
-            if (KMPreferenceManager.shared.openLastUnlockedDocumentWhenAppStart) {
-                let pageNumber = KMPreferenceManager.shared.getPageNumber(forKey: self.listView.document?.documentURL.path ?? "")
-                let pageScale = KMPreferenceManager.shared.getPageScale(forKey: self.listView.document?.documentURL.path ?? "")
-                if (pageScale != nil) {
-                    self.listView.scaleFactor = CGFloat(pageScale!)
-                }
-                if (pageNumber != nil && pageNumber! >= 0 && pageNumber! < (self.listView.document?.pageCount ?? 0)) {
-                    self.listView.go(toPageIndex: pageNumber!, animated: false)
-                } else {
-                    self._goToFirstPageForFristAppear()
-                }
-            } else {
-                self._goToFirstPageForFristAppear()
-            }
-            self._documentFirstLoad = false
-        }
-    }
-    
-    func tabViewIsDragging() -> Bool {
-        let level = self.view.window?.level ?? .normal
-        return level == .floating
-    }
-    
+      
     // MARK: - Noti Actions
     
     internal func documentDidUnlockNotification(_ sender: Notification) {

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

@@ -1041,15 +1041,6 @@
 		9FF0D0532B6A3EE40018A732 /* CPDFListView+Form.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FF0D0522B6A3EE40018A732 /* CPDFListView+Form.swift */; };
 		9FF0D0542B6A3EE40018A732 /* CPDFListView+Form.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FF0D0522B6A3EE40018A732 /* CPDFListView+Form.swift */; };
 		9FF0D0552B6A3EE40018A732 /* CPDFListView+Form.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FF0D0522B6A3EE40018A732 /* CPDFListView+Form.swift */; };
-		9FF0D0582B6A43750018A732 /* KMPDFAnnotationButtonWidgetSub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FF0D0572B6A43750018A732 /* KMPDFAnnotationButtonWidgetSub.swift */; };
-		9FF0D0592B6A43750018A732 /* KMPDFAnnotationButtonWidgetSub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FF0D0572B6A43750018A732 /* KMPDFAnnotationButtonWidgetSub.swift */; };
-		9FF0D05A2B6A43750018A732 /* KMPDFAnnotationButtonWidgetSub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FF0D0572B6A43750018A732 /* KMPDFAnnotationButtonWidgetSub.swift */; };
-		9FF0D05C2B6A4C210018A732 /* KMPDFAnnotationChoiceWidgetSub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FF0D05B2B6A4C210018A732 /* KMPDFAnnotationChoiceWidgetSub.swift */; };
-		9FF0D05D2B6A4C210018A732 /* KMPDFAnnotationChoiceWidgetSub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FF0D05B2B6A4C210018A732 /* KMPDFAnnotationChoiceWidgetSub.swift */; };
-		9FF0D05E2B6A4C210018A732 /* KMPDFAnnotationChoiceWidgetSub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FF0D05B2B6A4C210018A732 /* KMPDFAnnotationChoiceWidgetSub.swift */; };
-		9FF0D0602B6A5DCF0018A732 /* KMPDFAnnotationTextWidgetSub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FF0D05F2B6A5DCF0018A732 /* KMPDFAnnotationTextWidgetSub.swift */; };
-		9FF0D0612B6A5DCF0018A732 /* KMPDFAnnotationTextWidgetSub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FF0D05F2B6A5DCF0018A732 /* KMPDFAnnotationTextWidgetSub.swift */; };
-		9FF0D0622B6A5DCF0018A732 /* KMPDFAnnotationTextWidgetSub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FF0D05F2B6A5DCF0018A732 /* KMPDFAnnotationTextWidgetSub.swift */; };
 		9FF371BA2C69A6BB005F9CC5 /* KMMeasureSideVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9FF371AD2C69A6BA005F9CC5 /* KMMeasureSideVC.xib */; };
 		9FF371BB2C69A6BB005F9CC5 /* KMMeasureSideVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FF371AE2C69A6BA005F9CC5 /* KMMeasureSideVC.swift */; };
 		9FF371BC2C69A6BB005F9CC5 /* CDistanceSettingWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9FF371B02C69A6BB005F9CC5 /* CDistanceSettingWindowController.xib */; };
@@ -1397,12 +1388,6 @@
 		AD1FE84C2BD920C300AA4A9B /* TextFieldFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = AD1FE84A2BD920C200AA4A9B /* TextFieldFormatter.m */; };
 		AD1FE84D2BD920C300AA4A9B /* TextFieldFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = AD1FE84A2BD920C200AA4A9B /* TextFieldFormatter.m */; };
 		AD1FE84E2BD920C300AA4A9B /* TextFieldFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = AD1FE84A2BD920C200AA4A9B /* TextFieldFormatter.m */; };
-		AD2432CF2B89DFED00A119A9 /* KMFormAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD2432CE2B89DFED00A119A9 /* KMFormAlertView.swift */; };
-		AD2432D02B89DFED00A119A9 /* KMFormAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD2432CE2B89DFED00A119A9 /* KMFormAlertView.swift */; };
-		AD2432D12B89DFED00A119A9 /* KMFormAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD2432CE2B89DFED00A119A9 /* KMFormAlertView.swift */; };
-		AD2432D32B89DFF800A119A9 /* KMFormAlertView.xib in Resources */ = {isa = PBXBuildFile; fileRef = AD2432D22B89DFF800A119A9 /* KMFormAlertView.xib */; };
-		AD2432D42B89DFF800A119A9 /* KMFormAlertView.xib in Resources */ = {isa = PBXBuildFile; fileRef = AD2432D22B89DFF800A119A9 /* KMFormAlertView.xib */; };
-		AD2432D52B89DFF800A119A9 /* KMFormAlertView.xib in Resources */ = {isa = PBXBuildFile; fileRef = AD2432D22B89DFF800A119A9 /* KMFormAlertView.xib */; };
 		AD2BF21A2B5553E70029F03F /* ComPDFKit_Conversion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ADA08A8029F13EE1009B2A7B /* ComPDFKit_Conversion.framework */; };
 		AD2BF21B2B5553E70029F03F /* ComPDFKit_Conversion.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = ADA08A8029F13EE1009B2A7B /* ComPDFKit_Conversion.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
 		AD2BF21C2B5553E90029F03F /* ComPDFKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ADA08A7C29F13EA0009B2A7B /* ComPDFKit.framework */; };
@@ -5367,9 +5352,6 @@
 		9FE0BBE32B0EFBA300CD1CAC /* KMAnnotationFontWindowController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KMAnnotationFontWindowController.xib; sourceTree = "<group>"; };
 		9FE0BBEA2B0F242C00CD1CAC /* NSUserDefaults_KMExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NSUserDefaults_KMExtension.swift; sourceTree = "<group>"; };
 		9FF0D0522B6A3EE40018A732 /* CPDFListView+Form.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CPDFListView+Form.swift"; sourceTree = "<group>"; };
-		9FF0D0572B6A43750018A732 /* KMPDFAnnotationButtonWidgetSub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMPDFAnnotationButtonWidgetSub.swift; sourceTree = "<group>"; };
-		9FF0D05B2B6A4C210018A732 /* KMPDFAnnotationChoiceWidgetSub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMPDFAnnotationChoiceWidgetSub.swift; sourceTree = "<group>"; };
-		9FF0D05F2B6A5DCF0018A732 /* KMPDFAnnotationTextWidgetSub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMPDFAnnotationTextWidgetSub.swift; sourceTree = "<group>"; };
 		9FF371AD2C69A6BA005F9CC5 /* KMMeasureSideVC.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = KMMeasureSideVC.xib; sourceTree = "<group>"; };
 		9FF371AE2C69A6BA005F9CC5 /* KMMeasureSideVC.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KMMeasureSideVC.swift; sourceTree = "<group>"; };
 		9FF371B02C69A6BB005F9CC5 /* CDistanceSettingWindowController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = CDistanceSettingWindowController.xib; sourceTree = "<group>"; };
@@ -5519,8 +5501,6 @@
 		AD1FE8132BD7C98300AA4A9B /* KMPDFPosterPrintWindowController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = KMPDFPosterPrintWindowController.xib; sourceTree = "<group>"; };
 		AD1FE84A2BD920C200AA4A9B /* TextFieldFormatter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TextFieldFormatter.m; sourceTree = "<group>"; };
 		AD1FE84B2BD920C200AA4A9B /* TextFieldFormatter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextFieldFormatter.h; sourceTree = "<group>"; };
-		AD2432CE2B89DFED00A119A9 /* KMFormAlertView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMFormAlertView.swift; sourceTree = "<group>"; };
-		AD2432D22B89DFF800A119A9 /* KMFormAlertView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KMFormAlertView.xib; sourceTree = "<group>"; };
 		AD2BEC002B5548DF0029F03F /* PDF_Reaer_Pro_EditionApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PDF_Reaer_Pro_EditionApp.swift; sourceTree = "<group>"; };
 		AD2BEC022B5548DF0029F03F /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
 		AD2BEC042B5548E00029F03F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
@@ -8179,17 +8159,6 @@
 			path = WindowController;
 			sourceTree = "<group>";
 		};
-		9FF0D0562B6A431E0018A732 /* Form */ = {
-			isa = PBXGroup;
-			children = (
-				AD2432C82B89DFB800A119A9 /* AlertView */,
-				9FF0D0572B6A43750018A732 /* KMPDFAnnotationButtonWidgetSub.swift */,
-				9FF0D05B2B6A4C210018A732 /* KMPDFAnnotationChoiceWidgetSub.swift */,
-				9FF0D05F2B6A5DCF0018A732 /* KMPDFAnnotationTextWidgetSub.swift */,
-			);
-			path = Form;
-			sourceTree = "<group>";
-		};
 		9FF371AB2C69A67B005F9CC5 /* Measure */ = {
 			isa = PBXGroup;
 			children = (
@@ -8642,15 +8611,6 @@
 			path = Poster;
 			sourceTree = "<group>";
 		};
-		AD2432C82B89DFB800A119A9 /* AlertView */ = {
-			isa = PBXGroup;
-			children = (
-				AD2432CE2B89DFED00A119A9 /* KMFormAlertView.swift */,
-				AD2432D22B89DFF800A119A9 /* KMFormAlertView.xib */,
-			);
-			path = AlertView;
-			sourceTree = "<group>";
-		};
 		AD2BEBFF2B5548DF0029F03F /* PDF Reaer Pro Edition */ = {
 			isa = PBXGroup;
 			children = (
@@ -10590,7 +10550,6 @@
 			isa = PBXGroup;
 			children = (
 				BB42A5D22B8ED7350092C524 /* TabWindowController */,
-				9FF0D0562B6A431E0018A732 /* Form */,
 				ADA08A8829F21A53009B2A7B /* Tools */,
 				9FDD0F58294AB3E7000C4DAD /* ViewController */,
 				89752D982936E4DE003FF08E /* Toolbar */,
@@ -13547,7 +13506,6 @@
 				BBEB0DE32CE36B47004C67BF /* KMRightSideController.xib in Resources */,
 				BBE788C62CBD2463008086E2 /* SelectVC.xib in Resources */,
 				89316855296E45CA0073EA59 /* KMImageAccessoryController.xib in Resources */,
-				AD2432D32B89DFF800A119A9 /* KMFormAlertView.xib in Resources */,
 				BB451AAD2CF59F68003E1565 /* KMNoteController.xib in Resources */,
 				AD07BCF02D02D6A60075054B /* KMBatchOperateRemoveHeaderFooterViewController.xib in Resources */,
 				657851652CFEA3C40023D640 /* KMBotaSearchViewController.xib in Resources */,
@@ -14165,7 +14123,6 @@
 				9FBA0EEA28FFC2FE001117AF /* Image.xcassets in Resources */,
 				ADFCEB682B4FBFC50001EBAF /* ad_cancel_button00.png in Resources */,
 				BB10E16B2CDC94E300471D47 /* KMBGTemplateItem.xib in Resources */,
-				AD2432D42B89DFF800A119A9 /* KMFormAlertView.xib in Resources */,
 				BB4F7E922B0C80000077EC8C /* KMNoteColorCollectionViewItem.xib in Resources */,
 				BBE0688E2CDDF116000512BC /* KMBatesController.xib in Resources */,
 				ADE86AEA2B0AF50B00414DFA /* KMCompareCoveringSettingWindowController.xib in Resources */,
@@ -14597,7 +14554,6 @@
 				BBB789B92BE8BF2400F7E09C /* AIChatDefaultTIpItem.xib in Resources */,
 				BB6B49B92D02D3F6003ECD26 /* KMTextSignatureView.xib in Resources */,
 				ADAFDA0F2AE8DD6600F084BC /* KMAdvertisementCollectionViewItem.xib in Resources */,
-				AD2432D52B89DFF800A119A9 /* KMFormAlertView.xib in Resources */,
 				9F1F82E82934D5240092C4B4 /* KMHomeExtractActionViewController.xib in Resources */,
 				ADDF83612B391A5C00A81A4E /* DSignatureCertifyDetailViewController.xib in Resources */,
 				BBA9222A2B4E96450061057A /* KMPurchaseCompareWindowController.xib in Resources */,
@@ -15186,7 +15142,6 @@
 				AD7D5CA02B8F34EC006562CD /* SKPDFSynchronizer.m in Sources */,
 				BBEC00C7295C319400A26C98 /* KMBatesManager.swift in Sources */,
 				BBB7898A2BE8BF2300F7E09C /* AIHeaderView.swift in Sources */,
-				9FF0D0582B6A43750018A732 /* KMPDFAnnotationButtonWidgetSub.swift in Sources */,
 				BBBB6CDA2AD15B900035AA66 /* CPDFFreeTextAnnotation+PDFListView.swift in Sources */,
 				BB1B0ABF2B4FC6E900889528 /* KMGuideInfoWindowController.swift in Sources */,
 				BB77C85F2BD506BE0065AFF2 /* CPDFAnnotation+KMExtension.swift in Sources */,
@@ -15772,7 +15727,6 @@
 				ADA08A8A29F21A53009B2A7B /* KMPDFViewAnnotationOnceModeStore.swift in Sources */,
 				AD7D5CCF2B9573FF006562CD /* KMBookmarkOutlinePageCellView.swift in Sources */,
 				BBBE209B2B21E5F100509C4E /* KMAlertTool.swift in Sources */,
-				9FF0D05C2B6A4C210018A732 /* KMPDFAnnotationChoiceWidgetSub.swift in Sources */,
 				BB78EAAA2B561F9700121691 /* KMFullScreenWindow.swift in Sources */,
 				BBFEF72F2B3A794700C28AC0 /* KMSystemViewMenu.swift in Sources */,
 				9FCFEC902AD11E5F00EAD2CB /* KMSplitView.swift in Sources */,
@@ -15864,7 +15818,6 @@
 				AD3AAD752B0DCEAA00DE5FE7 /* KMCompareSaveView.swift in Sources */,
 				65F9F4852CFC16A100F187A8 /* KMNSearchHanddler.swift in Sources */,
 				BB3A429E2B4BF03A006D0642 /* KMSystemPDFMenu.swift in Sources */,
-				9FF0D0602B6A5DCF0018A732 /* KMPDFAnnotationTextWidgetSub.swift in Sources */,
 				9F8539CB29430BF300DF644E /* KMBrowserWindowController.swift in Sources */,
 				9F0CB5192986568000007028 /* KMDesignToken+BorderRadiusTopRight.swift in Sources */,
 				BB2C845A2BAE6DC100AF6142 /* KMLeftMethodMode.swift in Sources */,
@@ -16047,7 +16000,6 @@
 				BB52F55C2CC1FBF6007418DB /* KMLinkPageView.swift in Sources */,
 				BB10E1672CDC94E300471D47 /* KMBGTemplateItem.swift in Sources */,
 				656C1E462CD0745200295F82 /* KMConvertSettingView.swift in Sources */,
-				AD2432CF2B89DFED00A119A9 /* KMFormAlertView.swift in Sources */,
 				BBFEF72B2B3A791B00C28AC0 /* KMSystemWindowMenu.swift in Sources */,
 				BB8810D02B4F980E00AFA63E /* NSNULL+Filtration.m in Sources */,
 				BBF7299B2B1961E800576AC5 /* KMAddWatermarkOprationQueue.swift in Sources */,
@@ -16337,7 +16289,6 @@
 				AD867FC629DFFBC400F00440 /* KMAnnotationOutlineRowView.swift in Sources */,
 				BB79FAB32CDC65BA00BF7B39 /* KMBGTemplateController.swift in Sources */,
 				BB4EEF2E29763EE7003A3537 /* KMRedactBaseWindowController.swift in Sources */,
-				AD2432D02B89DFED00A119A9 /* KMFormAlertView.swift in Sources */,
 				65F9F4802CFB5C3500F187A8 /* KMNBotaBaseViewController.swift in Sources */,
 				BB10E1682CDC94E300471D47 /* KMBGTemplateItem.swift in Sources */,
 				ADE86A8B2B02269400414DFA /* KMRemovePasswordWindowController.swift in Sources */,
@@ -16684,7 +16635,6 @@
 				BB3A66A82B078CA400575343 /* KMNoteOutlineView.swift in Sources */,
 				9F0CB4FA298655E500007028 /* KMDesignToken+Border.swift in Sources */,
 				ADD1B6E92946C02600C3FFF7 /* KMPrintChoosePageSizeMultipageView.swift in Sources */,
-				9FF0D0612B6A5DCF0018A732 /* KMPDFAnnotationTextWidgetSub.swift in Sources */,
 				BB19A7582CB7C724008204DC /* KMHistoryFileListItem.swift in Sources */,
 				BB96C42A2CE6DDB2003F3668 /* CPDFListView+CPDFEditArea.swift in Sources */,
 				BB6719F62AD2C949003D44D5 /* CPDFRedactAnnotation+PDFListView.swift in Sources */,
@@ -16850,7 +16800,6 @@
 				BB1B0AD82B4FC6E900889528 /* KMOpenFileGuideProperty.swift in Sources */,
 				BBB14A60297929BD00936EDB /* KMRedactPageRangeWindowController.swift in Sources */,
 				ADA08A8B29F21A53009B2A7B /* KMPDFViewAnnotationOnceModeStore.swift in Sources */,
-				9FF0D05D2B6A4C210018A732 /* KMPDFAnnotationChoiceWidgetSub.swift in Sources */,
 				BB6B49A62D02A072003ECD26 /* KMPDFSignatureDrawView.swift in Sources */,
 				9FF371E22C69D2F4005F9CC5 /* CPDFPolylineAnnotation+PDFListView.swift in Sources */,
 				BBBBB49A2B6F714000C7205E /* NSObject+OCExtensions.m in Sources */,
@@ -16883,7 +16832,6 @@
 				BB4A94A52B04DA0C00940F8B /* KMGOCRManagerNew.swift in Sources */,
 				BB0A823329C00400002C5C1B /* KMCommonEnum.swift in Sources */,
 				BB3198132AC5142900107371 /* NSMenu+KMExtension.swift in Sources */,
-				9FF0D0592B6A43750018A732 /* KMPDFAnnotationButtonWidgetSub.swift in Sources */,
 				ADB2D6FA294882AE0029D2B3 /* KMTextFieldStepperView.swift in Sources */,
 				BB1969CE2B2833DA00922736 /* KMProgressWindowController.swift in Sources */,
 				BB97BE252BC3E02D00BECEA8 /* SKExportAccessoryController.m in Sources */,
@@ -17320,7 +17268,6 @@
 				F3DB85F82CCA36F400D0AFDE /* KMNPageSizeTool.swift in Sources */,
 				BBE789072CBD2464008086E2 /* TooltipVC.swift in Sources */,
 				BB96A0BA2AFCE45800559E24 /* WaitingView.swift in Sources */,
-				9FF0D05E2B6A4C210018A732 /* KMPDFAnnotationChoiceWidgetSub.swift in Sources */,
 				BB2F18482A0C7E250003F65E /* KMConvertBaseView.swift in Sources */,
 				AD867FC729DFFBC400F00440 /* KMAnnotationOutlineRowView.swift in Sources */,
 				9FA607E028FD4C9F00B46586 /* KMHomePopViewController.swift in Sources */,
@@ -17490,7 +17437,6 @@
 				BBA388152AEF9A42004FE93F /* NSWindow+KMExtension.swift in Sources */,
 				9FD0D2A92AD4EFB000DA3FF8 /* KMSavePanelAccessoryController.swift in Sources */,
 				9F1FE4D129406E4700E952CA /* CTTabController.m in Sources */,
-				9FF0D0622B6A5DCF0018A732 /* KMPDFAnnotationTextWidgetSub.swift in Sources */,
 				AD07BCBD2D02CBB20075054B /* KMCompressSettingTableView.swift in Sources */,
 				9F8539E029470A0700DF644E /* KMTabStripView.swift in Sources */,
 				BBA8B7AC2935DC120097D183 /* KMRemovePasswordResultTipView.swift in Sources */,
@@ -17801,7 +17747,6 @@
 				BB853C7F2AF8B5D6009C20C1 /* KMBatchOperateAddPasswordViewController.swift in Sources */,
 				AD3AAD252B0B6F9E00DE5FE7 /* KMCompareContentView.swift in Sources */,
 				ADDEEA6C2AD3CF3A00EF675D /* KMDrawSignatureView.swift in Sources */,
-				AD2432D12B89DFED00A119A9 /* KMFormAlertView.swift in Sources */,
 				9F1F82EC2935D02E0092C4B4 /* KMComboBox.swift in Sources */,
 				8997012128F41AB8009AF911 /* KMLeftSideViewController.swift in Sources */,
 				65B1439D2CF06B97001B5A69 /* NSViewController+DesignToken.swift in Sources */,
@@ -17991,7 +17936,6 @@
 				AD1FE8432BD7C98300AA4A9B /* KMPosterPrintManager.m in Sources */,
 				BBE788B32CBD2463008086E2 /* MessageVC.swift in Sources */,
 				BB9695B429BDA46500FD68D3 /* SKLocalization.m in Sources */,
-				9FF0D05A2B6A43750018A732 /* KMPDFAnnotationButtonWidgetSub.swift in Sources */,
 				BBE788AA2CBD2463008086E2 /* SidebarDemoVC.swift in Sources */,
 				ADB2D6FB294882AE0029D2B3 /* KMTextFieldStepperView.swift in Sources */,
 				AD9527F0295578BD0039D2BC /* KMBaseTextFieldPresenter.swift in Sources */,