Ver código fonte

【2025】【密文】密文属性面板操作

dinglingui 2 meses atrás
pai
commit
86f9074e43

+ 423 - 118
PDF Office/PDF Master/Class/PDFTools/Redact/Window/KMRedactPropertiesWindowController.swift

@@ -7,32 +7,39 @@
 
 import Cocoa
 
-class KMRedactPropertiesWindowController: NSWindowController {
+import KMComponentLibrary
+
+class KMRedactPropertiesWindowController: KMNBaseWindowController {
     
     var readactAnnotation: CPDFRedactAnnotation?
     
+    @IBOutlet weak var titleLabel: NSTextField!
+    @IBOutlet weak var subLabel: NSTextField!
+    
     @IBOutlet weak var outlineColorLabel: NSTextField!
-    @IBOutlet weak var outlineColorWell: NSColorWell!
+    @IBOutlet weak var outlineColorItem: ComponentCColorItem!
     @IBOutlet weak var fillColorLabel: NSTextField!
-    @IBOutlet weak var fillColorWell: NSColorWell!
+    @IBOutlet weak var fillColorItem: ComponentCColorItem!
     
-    @IBOutlet weak var overlayTextButton: NSButton!
     @IBOutlet weak var overlayTextLabel: NSTextField!
-    @IBOutlet weak var overlayTextField: NSTextField!
+    @IBOutlet weak var overlayTextarea: ComponentTextarea!
     @IBOutlet weak var fontSizeLabel: NSTextField!
     
-    @IBOutlet weak var fontSizeComboBox: NSComboBox!
+    @IBOutlet weak var fontSizeComboSelect: ComponentSelect!
     @IBOutlet weak var alignementLabel: NSTextField!
-    @IBOutlet weak var segmentedControl: NSSegmentedControl!
+    @IBOutlet var alightLeftButton: ComponentButton!
+    @IBOutlet var alightRightButton: ComponentButton!
+    @IBOutlet var alightCenteButton: ComponentButton!
+
     @IBOutlet weak var fontColorLabel: NSTextField!
+    @IBOutlet weak var fontColorItem: ComponentCColorItem!
+    @IBOutlet weak var makePropertiesButton: ComponentButton!
+    @IBOutlet weak var cancelButton: ComponentButton!
+    @IBOutlet weak var okButton: ComponentButton!
     
-    @IBOutlet weak var fontColorWell: NSColorWell!
-    @IBOutlet weak var makePropertiesButton: NSButton!
-    @IBOutlet weak var cancelButton: NSButton!
-    @IBOutlet weak var okButton: NSButton!
-    /*
-     @property (nonatomic,assign) NSModalSession modalSession;
-     */
+    @IBOutlet var cancelWidthButton:NSLayoutConstraint!
+    @IBOutlet var okWidthButton:NSLayoutConstraint!
+    @IBOutlet var makePropertiesWidthButton:NSLayoutConstraint!
     
     var callback: ((_ anno: CPDFRedactAnnotation?)->Void)?
 
@@ -40,148 +47,446 @@ class KMRedactPropertiesWindowController: NSWindowController {
         self.init(windowNibName: "KMRedactPropertiesWindowController")
     }
     
+    override func initContentView() {
+        super.initContentView()
+        
+        fontColorItem.properties = ComponentCColorProperty(colorType: .color,
+                                                           state: .normal,
+                                                           isCustom: true,
+                                                           color: NSColor.red)
+        fontColorItem.delegate = self
+        fontColorItem.reloadData()
+        
+        outlineColorItem.properties = ComponentCColorProperty(colorType: .color,
+                                                              state: .normal,
+                                                              isCustom: true,
+                                                              color: NSColor.red)
+        outlineColorItem.delegate = self
+        outlineColorItem.reloadData()
+        
+        fillColorItem.properties = ComponentCColorProperty(colorType: .color,
+                                                           state: .normal,
+                                                           isCustom: true,
+                                                           color: NSColor.red)
+        fillColorItem.delegate = self
+        fillColorItem.reloadData()
+        
+        alightLeftButton.properties = ComponentButtonProperty(type: .text_gray,
+                                                              size: .s,
+                                                              state: .normal,
+                                                              onlyIcon: true,
+                                                              icon:NSImage(named: "KMNImageNameListViewPopAlightLeft"))
+        alightLeftButton.setTarget(self, action: #selector(alightLeftButtonClicked(_ :)))
+        
+        alightRightButton.properties = ComponentButtonProperty(type: .text_gray,
+                                                               size: .s,
+                                                               state: .normal,
+                                                               onlyIcon: true,
+                                                               icon:NSImage(named: "KMNImageNameListViewPopAlightRight"))
+        alightRightButton.setTarget(self, action: #selector(alightRightButtonClicked(_ :)))
+        
+        alightCenteButton.properties = ComponentButtonProperty(type: .text_gray,
+                                                               size: .s,
+                                                               state: .normal,
+                                                               onlyIcon: true,
+                                                               icon:NSImage(named: "KMNImageNameListViewPopAlightCenter"))
+        alightCenteButton.setTarget(self, action: #selector(alightCenterButtonClicked(_ :)))
+        
+        titleLabel.font = ComponentLibrary.shared.getFontFromKey ("mac/body-m-medium")
+        subLabel.font = ComponentLibrary.shared.getFontFromKey ("mac/body-s-medium")
+        outlineColorLabel.font = ComponentLibrary.shared.getFontFromKey ("mac/body-s-regular")
+        fillColorLabel.font = ComponentLibrary.shared.getFontFromKey ("mac/body-s-regular")
+        overlayTextLabel.font = ComponentLibrary.shared.getFontFromKey ("mac/body-s-medium")
+        fontColorLabel.font = ComponentLibrary.shared.getFontFromKey ("mac/body-s-regular")
+        fontSizeLabel.font = ComponentLibrary.shared.getFontFromKey ("mac/body-s-regular")
+        alignementLabel.font = ComponentLibrary.shared.getFontFromKey ("mac/body-s-regular")
+
+        okButton.properties = ComponentButtonProperty(type: .primary,
+                                                         size: .s,
+                                                         state: .normal,
+                                                         buttonText: KMLocalizedString("OK"))
+        okButton.setTarget(self, action: #selector(okButtonClicked(_ :)))
+        
+        cancelButton.properties = ComponentButtonProperty(type: .default_tertiary,
+                                                          size: .s,
+                                                          state: .normal,
+                                                          buttonText: KMLocalizedString("Cancel"))
+        cancelButton.setTarget(self, action: #selector(cancelButtonClicked(_ :)))
+        
+        makePropertiesButton.properties = ComponentButtonProperty(type: .default_tertiary,
+                                                          size: .s,
+                                                          state: .normal,
+                                                          buttonText: KMLocalizedString("Make Properties Default"))
+        makePropertiesButton.setTarget(self, action: #selector(makePropertiesButtonClicked(_ :)))
+        
+        overlayTextarea.properties = ComponentTextareaProperty(size: .s, state: .normal, isError: false, placeholderString: KMLocalizedString("Encrypted Content"), totalCount: -1, text: "", isDisabled: false)
+        overlayTextarea.delegate = self
+        
+        fontSizeComboSelect.properties = ComponentSelectProperties(size: .s,
+                                                                   state: .normal,
+                                                                   isDisabled: false,
+                                                                   isError: false,
+                                                                   leftIcon: false,
+                                                                   placeholder: nil,
+                                                                   errorText: nil,
+                                                                   creatable: true,
+                                                                   text: "4 pt")
+        
+        let menuItemString:[String] = ["4 pt",
+                                       "6 pt",
+                                       "8 pt",
+                                       "9 pt",
+                                       "10 pt",
+                                       "11 pt",
+                                       "12 pt",
+                                       "13 pt",
+                                       "14 pt",
+                                       "15 pt",
+                                       "16 pt",
+                                       "17 pt",
+                                       "18 pt",
+                                       "24 pt",
+                                       "36 pt",
+                                       "48 pt",
+                                       "64 pt",
+                                       "72 pt",
+                                       "98 pt",
+                                       "144 pt",
+                                       "288 pt"]
+        
+        var menuItemArr: [ComponentMenuitemProperty] = []
+        for language in menuItemString {
+            let itemProperty: ComponentMenuitemProperty = ComponentMenuitemProperty(multipleSelect: false,
+                                                                                    itemSelected: false,
+                                                                                    isDisabled: false,
+                                                                                    keyEquivalent: nil,
+                                                                                    text: language)
+            menuItemArr.append(itemProperty)
+        }
+
+        fontSizeComboSelect.delegate = self
+        fontSizeComboSelect.updateMenuItemsArr(menuItemArr)
+    }
+    
+    override func updateUILanguage() {
+        super.updateUILanguage()
+        
+        outlineColorLabel.stringValue = KMLocalizedString("Redaction Mark Outline Color:")
+        fillColorLabel.stringValue = KMLocalizedString("Redact Area Fill Color:")
+        overlayTextLabel.stringValue = KMLocalizedString("Overlay Text:")
+        alignementLabel.stringValue = KMLocalizedString("Text Alignment")
+        fontSizeLabel.stringValue = KMLocalizedString("Font Size")
+        fontColorLabel.stringValue = String(format: "%@:", KMLocalizedString("Font Color"))
+        
+        titleLabel.stringValue = KMLocalizedString("Redact Properties")
+        subLabel.stringValue = KMLocalizedString("Mark Color")
+
+        okButton.properties.buttonText = KMLocalizedString("OK")
+        cancelButton.properties.buttonText = KMLocalizedString("Cancel")
+        makePropertiesButton.properties.buttonText = KMLocalizedString("Make Properties Default")
+        
+        okWidthButton.constant = okButton.properties.propertyInfo.viewWidth
+        cancelWidthButton.constant = cancelButton.properties.propertyInfo.viewWidth
+        makePropertiesWidthButton.constant = makePropertiesButton.properties.propertyInfo.viewWidth
+    }
+    
+    override func updateUIThemeColor() {
+        super.updateUIThemeColor()
+        
+        window?.contentView?.wantsLayer = true
+        window?.contentView?.layer?.backgroundColor = ComponentLibrary.shared.getComponentColorFromKey("colorBg/popup").cgColor
+        
+        titleLabel.textColor = ComponentLibrary.shared.getComponentColorFromKey("colorText/1")
+        subLabel.textColor = ComponentLibrary.shared.getComponentColorFromKey("colorText/2")
+        outlineColorLabel.textColor = ComponentLibrary.shared.getComponentColorFromKey("comp-form/colorText-label")
+        fillColorLabel.textColor = ComponentLibrary.shared.getComponentColorFromKey("comp-form/colorText-label")
+        overlayTextLabel.textColor = ComponentLibrary.shared.getComponentColorFromKey("colorText/2")
+        fontColorLabel.textColor = ComponentLibrary.shared.getComponentColorFromKey("comp-form/colorText-label")
+        fontSizeLabel.textColor = ComponentLibrary.shared.getComponentColorFromKey("comp-form/colorText-label")
+        alignementLabel.textColor = ComponentLibrary.shared.getComponentColorFromKey("comp-form/colorText-label")
+    }
+    
+    private func updateLabelUI() {
+        if overlayTextarea.properties.text.isEmpty == true {
+            fontColorLabel.textColor = ComponentLibrary.shared.getComponentColorFromKey("comp-form/colorText-label-dis")
+            fontSizeLabel.textColor = ComponentLibrary.shared.getComponentColorFromKey("comp-form/colorText-label-dis")
+            alignementLabel.textColor = ComponentLibrary.shared.getComponentColorFromKey("comp-form/colorText-label-dis")
+            
+            fontSizeComboSelect.properties.isDisabled = true
+            fontSizeComboSelect.reloadData()
+            
+            alightLeftButton.properties.isDisabled = true
+            alightLeftButton.reloadData()
+            
+            alightCenteButton.properties.isDisabled = true
+            alightCenteButton.reloadData()
+            
+            alightRightButton.properties.isDisabled = true
+            alightRightButton.reloadData()
+            
+        } else {
+            fontColorLabel.textColor = ComponentLibrary.shared.getComponentColorFromKey("comp-form/colorText-label")
+            fontSizeLabel.textColor = ComponentLibrary.shared.getComponentColorFromKey("comp-form/colorText-label")
+            alignementLabel.textColor = ComponentLibrary.shared.getComponentColorFromKey("comp-form/colorText-label")
+            
+            fontSizeComboSelect.properties.isDisabled = false
+            fontSizeComboSelect.reloadData()
+            
+            alightLeftButton.properties.isDisabled = false
+            alightLeftButton.reloadData()
+            
+            alightCenteButton.properties.isDisabled = false
+            alightCenteButton.reloadData()
+            
+            alightRightButton.properties.isDisabled = false
+            alightRightButton.reloadData()
+        }
+    }
+    
     override func windowDidLoad() {
         super.windowDidLoad()
-    
-        self.outlineColorLabel.stringValue = KMLocalizedString("Redaction Mark Outline Color:")
-        self.fillColorLabel.stringValue = KMLocalizedString("Redact Area Fill Color:")
-        self.overlayTextButton.title = KMLocalizedString("Use Overlay Text")
-        self.overlayTextLabel.stringValue = KMLocalizedString("Overlay Text:")
-    //    self.repeatTextButton.title = NSLocalizedString(@"Repeat Text");
-    //    self.autoSizeTextButton.title = NSLocalizedString(@"Auto-Size text to fit redaction region");
-        self.alignementLabel.stringValue = KMLocalizedString("Text Alignment")
-        self.fontSizeLabel.stringValue = KMLocalizedString("Font Size")
-        self.fontColorLabel.stringValue = String(format: "%@:", KMLocalizedString("Font Color"))
-        self.makePropertiesButton.title = KMLocalizedString("Make Properties Default")
-        self.cancelButton.title = KMLocalizedString("Cancel")
-        self.okButton.title = KMLocalizedString("OK")
-        
-        if let anno = self.readactAnnotation {
-            self.outlineColorWell.color = anno.borderColor() ?? .red
-            self.fillColorWell.color = anno.interiorColor() ?? .clear
-            self.fontColorWell.color = anno.fontColor() ?? .red
-            
-            self.fontSizeComboBox.stringValue = String(format: "%.lf pt", anno.font().pointSize)
-            var segment = 0
+            
+        if let anno = readactAnnotation {
+            outlineColorItem.properties?.color = anno.borderColor() ?? .red
+            outlineColorItem.reloadData()
+            
+            fillColorItem.properties?.color = anno.interiorColor() ?? .clear
+            fillColorItem.reloadData()
+            
+            fontColorItem.properties?.color = anno.fontColor() ?? .red
+            fontColorItem.reloadData()
+            
+            fontSizeComboSelect.properties.text = String(format: "%.lf pt", anno.fontSize())
+            fontSizeComboSelect.reloadData()
+            
             if(anno.alignment().rawValue == 1) {
-                segment = 1
+                alightLeftButton.properties.state = .normal
+                alightCenteButton.properties.state = .pressed
+                alightRightButton.properties.state = .normal
             } else if (anno.alignment().rawValue == 2) {
-                segment = 2
-            }
-            self.segmentedControl.setSelected(true, forSegment: segment)
-            self.overlayTextField.stringValue = anno.overlayText() ?? ""
-            if(anno.overlayText().isEmpty == false) {
-                self.overlayTextButton.state = .on
+                alightLeftButton.properties.state = .normal
+                alightCenteButton.properties.state = .normal
+                alightRightButton.properties.state = .pressed
             } else {
-                self.overlayTextButton.state = .off
+                alightLeftButton.properties.state = .pressed
+                alightCenteButton.properties.state = .normal
+                alightRightButton.properties.state = .normal
             }
-            self.makePropertiesButton.isHidden = false
+            alightLeftButton.reloadData()
+            alightCenteButton.reloadData()
+            alightRightButton.reloadData()
+
+            overlayTextarea.properties.text = anno.overlayText() ?? ""
+            overlayTextarea.reloadData()
+            
+            makePropertiesButton.isHidden = false
         } else {
-            self.outlineColorWell.color = KMPDFAnnotationRedactConfig.shared.redactOutlineColor!
-            self.fillColorWell.color = KMPDFAnnotationRedactConfig.shared.redactFillColor!
-            self.fontColorWell.color = KMPDFAnnotationRedactConfig.shared.redactFontColor!
-            self.overlayTextButton.state = KMPDFAnnotationRedactConfig.shared.overlayText ? .on : .off
-    //        self.repeatTextButton.state  = [KMPDFAnnotationRedactConfig sharedInstance].repeatText ? NSControlStateValueOn : NSControlStateValueOff;
-    //        self.autoSizeTextButton.state  = [KMPDFAnnotationRedactConfig sharedInstance].autoSizeText ? NSControlStateValueOn : NSControlStateValueOff;
-            self.overlayTextField.stringValue = KMPDFAnnotationRedactConfig.shared.overlayTextString
-            self.fontSizeComboBox.stringValue = String(format: "%ld pt", KMPDFAnnotationRedactConfig.shared.fontSize)
-            var segment = 0
+            outlineColorItem.properties?.color = KMPDFAnnotationRedactConfig.shared.redactOutlineColor!
+            outlineColorItem.reloadData()
+            
+            fillColorItem.properties?.color = KMPDFAnnotationRedactConfig.shared.redactFillColor!
+            fillColorItem.reloadData()
+            
+            fontColorItem.properties?.color = KMPDFAnnotationRedactConfig.shared.redactFontColor!
+            fontColorItem.reloadData()
+            
+            overlayTextarea.properties.text = KMPDFAnnotationRedactConfig.shared.overlayTextString
+            overlayTextarea.reloadData()
+
+            fontSizeComboSelect.properties.text = String(format: "%ld pt", KMPDFAnnotationRedactConfig.shared.fontSize)
+            fontSizeComboSelect.reloadData()
+            
             if(KMPDFAnnotationRedactConfig.shared.textAlignment == 1) {
-                segment = 1
+                alightLeftButton.properties.state = .normal
+                alightCenteButton.properties.state = .pressed
+                alightRightButton.properties.state = .normal
             } else if (KMPDFAnnotationRedactConfig.shared.textAlignment == 2) {
-                segment = 2
+                alightLeftButton.properties.state = .normal
+                alightCenteButton.properties.state = .normal
+                alightRightButton.properties.state = .pressed
+            } else {
+                alightLeftButton.properties.state = .pressed
+                alightCenteButton.properties.state = .normal
+                alightRightButton.properties.state = .normal
             }
-            self.segmentedControl.setSelected(true, forSegment: segment)
-            self.makePropertiesButton.isHidden = true
+            alightLeftButton.reloadData()
+            alightCenteButton.reloadData()
+            alightRightButton.reloadData()
+
+            makePropertiesButton.isHidden = true
         }
         
-        self.updateUIState()
+        updateLabelUI()
+    }
+    
+    //MARK: - Action
+    @objc func alightLeftButtonClicked(_ sender: NSView) {
+        alightCenteButton.properties.state = .normal
+        alightRightButton.properties.state = .normal
+        
+        alightCenteButton.reloadData()
+        alightRightButton.reloadData()
     }
     
-    @IBAction func cancel_button(_ sender: AnyObject?) {
+    @objc func alightRightButtonClicked(_ sender: NSView) {
+        alightLeftButton.properties.state = .normal
+        alightRightButton.properties.state = .normal
+        
+        alightLeftButton.reloadData()
+        alightRightButton.reloadData()
+    }
+    
+    @objc func alightCenterButtonClicked(_ sender: NSView) {
+        alightLeftButton.properties.state = .normal
+        alightCenteButton.properties.state = .normal
+        
+        alightLeftButton.reloadData()
+        alightCenteButton.reloadData()
+    }
+    
+    @objc func makePropertiesButtonClicked(_ sender: AnyObject?) {
+        let s = (fontSizeComboSelect.properties.text as? NSString)?.trimmingCharacters(in: CharacterSet(charactersIn: " pt")) ?? ""
+        let fontsize = Int(s) ?? 12
+
+        KMPDFAnnotationRedactConfig.shared.redactOutlineColor = outlineColorItem.properties?.color
+        KMPDFAnnotationRedactConfig.shared.redactFillColor = fillColorItem.properties?.color
+        KMPDFAnnotationRedactConfig.shared.redactFontColor = fontColorItem.properties?.color
+        KMPDFAnnotationRedactConfig.shared.fontSize = fontsize
+        if alightLeftButton.properties.state == .pressed {
+            KMPDFAnnotationRedactConfig.shared.textAlignment = 0
+        } else if alightCenteButton.properties.state == .pressed {
+            KMPDFAnnotationRedactConfig.shared.textAlignment = 1
+        } else if alightRightButton.properties.state == .pressed {
+            KMPDFAnnotationRedactConfig.shared.textAlignment = 2
+        }
+        KMPDFAnnotationRedactConfig.shared.overlayTextString = overlayTextarea.properties.text
+    }
+    
+    @objc func cancelButtonClicked(_ sender: AnyObject?) {
         if self.callback != nil {
             self.callback!(self.readactAnnotation)
         }
         self.km_quick_endSheet()
     }
     
-    @IBAction func sure_button(_ sender: AnyObject?) {
-        let s = (self.fontSizeComboBox.stringValue as? NSString)?.trimmingCharacters(in: CharacterSet(charactersIn: " pt")) ?? ""
+    @objc func okButtonClicked(_ sender: AnyObject?) {
+        let s = (fontSizeComboSelect.properties.text as? NSString)?.trimmingCharacters(in: CharacterSet(charactersIn: " pt")) ?? ""
         let fontsize = Int(s) ?? 12
+        
         var alignment: NSTextAlignment = .left
-        if(self.segmentedControl.indexOfSelectedItem == 1) {
+        if alightCenteButton.properties.state == .pressed {
             alignment = .center
-        } else if (self.segmentedControl.indexOfSelectedItem == 2) {
+        } else if alightRightButton.properties.state == .pressed {
             alignment = .right
         }
-        
-        if(self.readactAnnotation == nil || self.makePropertiesButton.state == .on) {
-            KMPDFAnnotationRedactConfig.shared.redactOutlineColor = self.outlineColorWell.color
-            KMPDFAnnotationRedactConfig.shared.redactFillColor = self.fillColorWell.color
-            KMPDFAnnotationRedactConfig.shared.redactFontColor = self.fontColorWell.color
-            KMPDFAnnotationRedactConfig.shared.overlayText = self.overlayTextButton.state == .on
-            KMPDFAnnotationRedactConfig.shared.fontSize = fontsize
-            KMPDFAnnotationRedactConfig.shared.textAlignment = alignment.rawValue
-            if(self.overlayTextButton.state == .on) {
-                KMPDFAnnotationRedactConfig.shared.overlayTextString = self.overlayTextField.stringValue
-            } else {
-                KMPDFAnnotationRedactConfig.shared.overlayTextString = ""
-            }
+                
+        if let anno = readactAnnotation {
+            anno.setBorderColor(outlineColorItem.properties?.color)
+            anno.setInteriorColor(fillColorItem.properties?.color)
+            anno.setFontColor(fontColorItem.properties?.color)
+            anno.fontSize = fontsize.cgFloat
+            anno.setAlignment(alignment)
+            anno.setOverlayText(overlayTextarea.properties.text)
+        } else {
+            makePropertiesButtonClicked(makePropertiesButton)
         }
         
-        if let anno = self.readactAnnotation {
-            anno.setBorderColor(self.outlineColorWell.color)
-            anno.setInteriorColor(self.fillColorWell.color)
-            anno.setFontColor(self.fontColorWell.color)
-            if(self.overlayTextButton.state == .on) {
-                anno.setFont(.init(name: "Helvetica", size: fontsize.cgFloat))
-                anno.setAlignment(alignment)
-                anno.setOverlayText(self.overlayTextField.stringValue)
-            } else {
-                anno.setOverlayText("")
-            }
-        }
-        if self.callback != nil {
-            self.callback!(self.readactAnnotation)
-        }
+        callback?(readactAnnotation)
+
         self.km_quick_endSheet()
     }
     
     @IBAction func useOverlayText_button(_ sender: AnyObject?) {
-        self.updateUIState()
+        updateLabelUI()
+    }
+}
+
+//MARK: - ComponentTextareaDelegate
+extension KMRedactPropertiesWindowController: ComponentTextareaDelegate {
+    func componentTextareaTextDidBeginEditing(_ view: ComponentTextarea) {
+        
     }
     
-    @IBAction func autoSzieText_button(_ sender: AnyObject?) {
-        self.updateUIState()
+    func componentTextareaTextDidChange(_ view: ComponentTextarea) {
+        updateLabelUI()
     }
     
-    @IBAction func fontSize_Combox(_ sender: AnyObject?) {
+   func componentTextareaTextDidEndEditing(_ view: ComponentTextarea) {
         
     }
+}
 
-    func updateUIState() {
-        let state = self.overlayTextButton.state
-        let enabled = state == .on
-        self.overlayTextLabel.isEnabled = enabled
-        self.overlayTextField.isEnabled = enabled
-    //    self.autoSizeTextButton.enabled = state;
-        self.fontSizeLabel.isEnabled = enabled
-        self.fontSizeComboBox.isEnabled = enabled
-        self.alignementLabel.isEnabled = enabled
-        self.segmentedControl.isEnabled = enabled
-    //    self.repeatTextButton.enabled = state;
-        self.fontColorLabel.isEnabled = enabled
-        self.fontColorWell.isEnabled = enabled
-        if(enabled) {
-            self.overlayTextLabel.textColor = .labelColor
-            self.fontSizeLabel.textColor = .labelColor
-            self.alignementLabel.textColor = .labelColor
-            self.fontColorLabel.textColor = .labelColor
-        } else {
-            self.overlayTextLabel.textColor = .tertiaryLabelColor
-            self.fontSizeLabel.textColor = .tertiaryLabelColor
-            self.fontColorLabel.textColor = .tertiaryLabelColor
-            self.alignementLabel.textColor = .tertiaryLabelColor
+//MARK: - ComponentSelectDelegate
+extension KMRedactPropertiesWindowController: ComponentSelectDelegate {
+    
+    func componentSelectDidSelect(view: ComponentSelect?, menuItemProperty: ComponentMenuitemProperty?) {
+        
+    }
+    
+    func componentSelectTextDidBeginEditing(_ view: ComponentSelect) {
+        
+    }
+    
+    func componentSelectTextDidChange(_ view: ComponentSelect) {
+        
+    }
+    
+    func componentSelectTextDidEndEditing(_ view: ComponentSelect) {
+        
+    }
+    
+    func componentSelectTextDidEndEditing(_ view: ComponentSelect, removeUnit text: String?) {
+        
+    }
+    
+    @objc func fontColorChange(_ sender: Any) {
+        if let color = (sender as? NSColorPanel)?.color {
+            fontColorItem.properties?.color = color
+            fontColorItem.reloadData()
         }
     }
+    
+    @objc func borderColorChange(_ sender: Any) {
+        if let color = (sender as? NSColorPanel)?.color {
+            outlineColorItem.properties?.color = color
+            outlineColorItem.reloadData()
+        }
+    }
+
+    @objc func fillColorChange(_ sender: Any) {
+        if let color = (sender as? NSColorPanel)?.color {
+            fillColorItem.properties?.color = color
+            fillColorItem.reloadData()
+        }
+    }
+
 }
+
+//MARK: - ComponentSelectDelegate
+extension KMRedactPropertiesWindowController: ComponentCColorDelegate {
+    func componentCColorDidChooseColor(_ view: NSView, _ color: NSColor?) {
+        let colorPanel = NSColorPanel.shared
+        
+        colorPanel.setTarget(self)
+        colorPanel.showsAlpha = false
+
+        if (view == fontColorItem) {
+            fontColorItem.properties?.state = .normal
+            fontColorItem.reloadData()
+            
+            colorPanel.setAction(#selector(self.fontColorChange(_:)))
+        } else if(view == outlineColorItem) {
+            outlineColorItem.properties?.state = .normal
+            outlineColorItem.reloadData()
+            
+            colorPanel.setAction(#selector(self.borderColorChange(_:)))
+        } else if(view == fillColorItem) {
+            fillColorItem.properties?.state = .normal
+            fillColorItem.reloadData()
+            
+            colorPanel.setAction(#selector(self.fillColorChange(_:)))
+        }
+        colorPanel.orderFront(nil)
+    }
+}
+

+ 162 - 185
PDF Office/PDF Master/Class/PDFTools/Redact/Window/KMRedactPropertiesWindowController.xib

@@ -1,29 +1,35 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21701" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21507" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
     <dependencies>
         <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21701"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21507"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
         <customObject id="-2" userLabel="File's Owner" customClass="KMRedactPropertiesWindowController">
             <connections>
+                <outlet property="alightCenteButton" destination="KZn-gA-Sq8" id="xcE-Ic-gDO"/>
+                <outlet property="alightLeftButton" destination="chi-da-VkN" id="cBG-Ts-WHc"/>
+                <outlet property="alightRightButton" destination="mX1-8G-glL" id="5Lu-tj-WlE"/>
                 <outlet property="alignementLabel" destination="1C1-xe-nXS" id="v0D-g3-8RG"/>
-                <outlet property="cancelButton" destination="MLL-VU-pGx" id="ns1-sa-PhW"/>
+                <outlet property="cancelButton" destination="gQK-no-HBC" id="pLF-tb-uZA"/>
+                <outlet property="cancelWidthButton" destination="1Oi-Eb-L31" id="xPx-Mb-uvd"/>
+                <outlet property="fillColorItem" destination="b0s-8X-hPx" id="3e2-VW-MDX"/>
                 <outlet property="fillColorLabel" destination="NCn-2e-s8W" id="4Yu-w1-YFl"/>
-                <outlet property="fillColorWell" destination="86V-WX-odK" id="6eZ-8K-ENr"/>
+                <outlet property="fontColorItem" destination="BbW-Bu-gyV" id="mHS-BK-vgf"/>
                 <outlet property="fontColorLabel" destination="J29-tc-QgL" id="0da-kZ-Z7D"/>
-                <outlet property="fontColorWell" destination="Sua-4n-8zo" id="zsa-tH-6B2"/>
-                <outlet property="fontSizeComboBox" destination="Ipi-UI-ZtO" id="pfb-Yo-swB"/>
+                <outlet property="fontSizeComboSelect" destination="w7u-h7-LbV" id="McQ-CM-M8i"/>
                 <outlet property="fontSizeLabel" destination="vtH-vu-OhB" id="8y9-VZ-5H2"/>
-                <outlet property="makePropertiesButton" destination="VMG-lY-O6p" id="Zmc-wl-o1d"/>
-                <outlet property="okButton" destination="8Vm-rr-xqQ" id="RSy-Qx-VlA"/>
+                <outlet property="makePropertiesButton" destination="s5q-23-Ymn" id="qUU-5y-Rn9"/>
+                <outlet property="makePropertiesWidthButton" destination="DzD-xB-Yd4" id="Cs9-lh-JUW"/>
+                <outlet property="okButton" destination="iKX-Y3-10u" id="K4n-fc-Ybi"/>
+                <outlet property="okWidthButton" destination="heT-Bb-c5W" id="4pH-2J-V4b"/>
+                <outlet property="outlineColorItem" destination="rqS-H2-cSD" id="zQ0-RP-2EP"/>
                 <outlet property="outlineColorLabel" destination="Rss-gV-GIO" id="8BK-Pi-ws5"/>
-                <outlet property="outlineColorWell" destination="fwt-Td-i6C" id="Y1d-uP-fUy"/>
-                <outlet property="overlayTextButton" destination="CZo-W6-acg" id="cP5-Lp-Rtk"/>
-                <outlet property="overlayTextField" destination="CXh-KX-5IW" id="DoC-0F-mGQ"/>
                 <outlet property="overlayTextLabel" destination="fao-XN-Ag4" id="kE2-ox-V3e"/>
-                <outlet property="segmentedControl" destination="dLt-g4-HJe" id="OkU-Lo-4Ur"/>
+                <outlet property="overlayTextarea" destination="Tdu-gt-Xly" id="d7K-Sw-o05"/>
+                <outlet property="subLabel" destination="RgM-mz-38G" id="3a0-WP-AAx"/>
+                <outlet property="titleLabel" destination="zAA-Ry-vgk" id="mHs-F7-2aU"/>
                 <outlet property="window" destination="F0z-JX-Cv5" id="gIp-Ho-8D9"/>
             </connections>
         </customObject>
@@ -32,79 +38,45 @@
         <window allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" hasShadow="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" titlebarAppearsTransparent="YES" id="F0z-JX-Cv5">
             <windowStyleMask key="styleMask" titled="YES" fullSizeContentView="YES"/>
             <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
-            <rect key="contentRect" x="1129" y="555" width="438" height="385"/>
-            <rect key="screenRect" x="0.0" y="0.0" width="1440" height="875"/>
+            <rect key="contentRect" x="1129" y="555" width="554" height="862"/>
+            <rect key="screenRect" x="0.0" y="0.0" width="2560" height="1415"/>
             <value key="minSize" type="size" width="438" height="406"/>
-            <view key="contentView" misplaced="YES" id="se5-gp-TjO">
-                <rect key="frame" x="0.0" y="0.0" width="438" height="385"/>
+            <view key="contentView" id="se5-gp-TjO">
+                <rect key="frame" x="0.0" y="0.0" width="350" height="464"/>
                 <autoresizingMask key="autoresizingMask"/>
                 <subviews>
                     <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Rss-gV-GIO">
-                        <rect key="frame" x="18" y="294" width="186" height="16"/>
+                        <rect key="frame" x="22" y="352" width="186" height="16"/>
                         <textFieldCell key="cell" lineBreakMode="clipping" title="Redaction Mark Outline Color:" id="CAI-NU-kmO">
                             <font key="font" metaFont="system"/>
                             <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
                             <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                         </textFieldCell>
                     </textField>
-                    <colorWell translatesAutoresizingMaskIntoConstraints="NO" id="fwt-Td-i6C">
-                        <rect key="frame" x="207" y="288" width="50" height="27"/>
-                        <constraints>
-                            <constraint firstAttribute="width" constant="44" id="mBg-Iv-cxH"/>
-                            <constraint firstAttribute="height" constant="23" id="yQB-eS-BD6"/>
-                        </constraints>
-                        <color key="color" name="systemRedColor" catalog="System" colorSpace="catalog"/>
-                    </colorWell>
                     <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="NCn-2e-s8W">
-                        <rect key="frame" x="18" y="260" width="139" height="16"/>
+                        <rect key="frame" x="22" y="312" width="139" height="16"/>
                         <textFieldCell key="cell" lineBreakMode="clipping" title="Redact Area Fill Color:" id="bRL-34-Yx1">
                             <font key="font" metaFont="system"/>
                             <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
                             <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                         </textFieldCell>
                     </textField>
-                    <colorWell translatesAutoresizingMaskIntoConstraints="NO" id="86V-WX-odK">
-                        <rect key="frame" x="160" y="255" width="50" height="27"/>
-                        <constraints>
-                            <constraint firstAttribute="width" constant="44" id="9oW-mA-mKS"/>
-                            <constraint firstAttribute="height" constant="23" id="Cxk-u4-EUC"/>
-                        </constraints>
-                        <color key="color" name="labelColor" catalog="System" colorSpace="catalog"/>
-                    </colorWell>
-                    <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="CZo-W6-acg">
-                        <rect key="frame" x="18" y="221" width="129" height="18"/>
-                        <buttonCell key="cell" type="check" title="Use Overlay Text" bezelStyle="regularSquare" imagePosition="left" inset="2" id="B5k-fz-Jsz">
-                            <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
-                            <font key="font" metaFont="system"/>
-                        </buttonCell>
-                        <connections>
-                            <action selector="useOverlayText_button:" target="-2" id="dC4-y4-LYZ"/>
-                        </connections>
-                    </button>
-                    <box title="Box" titlePosition="noTitle" translatesAutoresizingMaskIntoConstraints="NO" id="wyt-sb-oUb">
-                        <rect key="frame" x="17" y="54" width="404" height="166"/>
+                    <box borderType="none" title="Box" titlePosition="noTitle" translatesAutoresizingMaskIntoConstraints="NO" id="wyt-sb-oUb">
+                        <rect key="frame" x="21" y="68" width="312" height="213"/>
                         <view key="contentView" id="mn5-Os-322">
-                            <rect key="frame" x="4" y="5" width="396" height="158"/>
+                            <rect key="frame" x="0.0" y="0.0" width="312" height="213"/>
                             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                             <subviews>
                                 <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="fao-XN-Ag4">
-                                    <rect key="frame" x="8" y="132" width="83" height="16"/>
+                                    <rect key="frame" x="-2" y="197" width="83" height="16"/>
                                     <textFieldCell key="cell" lineBreakMode="clipping" title="Overlay Text:" id="fpy-jA-tgr">
                                         <font key="font" usesAppearanceFont="YES"/>
                                         <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
                                         <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                     </textFieldCell>
                                 </textField>
-                                <textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="CXh-KX-5IW">
-                                    <rect key="frame" x="10" y="107" width="376" height="21"/>
-                                    <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" drawsBackground="YES" id="PkW-14-Nsh">
-                                        <font key="font" metaFont="system"/>
-                                        <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
-                                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                                    </textFieldCell>
-                                </textField>
                                 <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="vtH-vu-OhB">
-                                    <rect key="frame" x="8" y="76" width="64" height="16"/>
+                                    <rect key="frame" x="-2" y="97" width="64" height="16"/>
                                     <textFieldCell key="cell" lineBreakMode="clipping" title="Font Size:" id="eJ5-M5-mQ8">
                                         <font key="font" metaFont="system"/>
                                         <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@@ -112,168 +84,173 @@
                                     </textFieldCell>
                                 </textField>
                                 <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="1C1-xe-nXS">
-                                    <rect key="frame" x="8" y="44" width="98" height="16"/>
+                                    <rect key="frame" x="-2" y="49" width="98" height="16"/>
                                     <textFieldCell key="cell" lineBreakMode="clipping" title="Text Alignment:" id="Sq3-kf-C6E">
                                         <font key="font" usesAppearanceFont="YES"/>
                                         <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
                                         <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                     </textFieldCell>
                                 </textField>
-                                <segmentedControl verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="dLt-g4-HJe">
-                                    <rect key="frame" x="110" y="41" width="108" height="22"/>
-                                    <constraints>
-                                        <constraint firstAttribute="height" constant="20" id="1eb-hz-sfc"/>
-                                    </constraints>
-                                    <segmentedCell key="cell" borderStyle="border" alignment="left" style="rounded" trackingMode="selectOne" id="tS6-hJ-cnC">
-                                        <font key="font" metaFont="system"/>
-                                        <segments>
-                                            <segment image="KMImageNameUXIconPropertybarTextalignLeftSel" width="32"/>
-                                            <segment image="KMImageNameUXIconPropertybarTextalignCenterSel" width="32" selected="YES" tag="1"/>
-                                            <segment image="KMImageNameUXIconPropertybarTextalignRightSel" width="32"/>
-                                        </segments>
-                                    </segmentedCell>
-                                </segmentedControl>
                                 <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="J29-tc-QgL">
-                                    <rect key="frame" x="8" y="12" width="72" height="16"/>
+                                    <rect key="frame" x="-2" y="9" width="72" height="16"/>
                                     <textFieldCell key="cell" lineBreakMode="clipping" title="Font Color:" id="zfd-vs-D01">
                                         <font key="font" metaFont="system"/>
                                         <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
                                         <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                     </textFieldCell>
                                 </textField>
-                                <colorWell translatesAutoresizingMaskIntoConstraints="NO" id="Sua-4n-8zo">
-                                    <rect key="frame" x="83" y="7" width="50" height="27"/>
+                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="Tdu-gt-Xly" customClass="ComponentTextarea" customModule="KMComponentLibrary">
+                                    <rect key="frame" x="0.0" y="129" width="312" height="56"/>
                                     <constraints>
-                                        <constraint firstAttribute="width" constant="44" id="koz-8J-ih5"/>
-                                        <constraint firstAttribute="height" constant="23" id="uTM-AA-Ugf"/>
+                                        <constraint firstAttribute="width" constant="312" id="6bx-2B-NYB"/>
+                                        <constraint firstAttribute="height" constant="56" id="BMN-Cv-keS"/>
                                     </constraints>
-                                    <color key="color" name="systemRedColor" catalog="System" colorSpace="catalog"/>
-                                </colorWell>
-                                <comboBox verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Ipi-UI-ZtO">
-                                    <rect key="frame" x="77" y="72" width="199" height="23"/>
+                                </customView>
+                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="BbW-Bu-gyV" customClass="ComponentCColorItem" customModule="KMComponentLibrary">
+                                    <rect key="frame" x="76" y="0.0" width="32" height="34"/>
                                     <constraints>
-                                        <constraint firstAttribute="width" constant="195" id="5ed-Dp-hR4"/>
-                                        <constraint firstAttribute="height" constant="20" id="hz4-Ge-DQp"/>
+                                        <constraint firstAttribute="height" constant="34" id="5B7-31-bce"/>
+                                        <constraint firstAttribute="width" constant="32" id="ydj-PO-4E5"/>
                                     </constraints>
-                                    <comboBoxCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" alignment="left" completes="NO" numberOfVisibleItems="5" id="BbW-Tx-5mc" customClass="KMComboBoxCell">
-                                        <font key="font" metaFont="system"/>
-                                        <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
-                                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                                        <objectValues>
-                                            <string>4 pt</string>
-                                            <string>6 pt</string>
-                                            <string>8 pt</string>
-                                            <string>9 pt</string>
-                                            <string>10 pt</string>
-                                            <string>11 pt</string>
-                                            <string>12 pt</string>
-                                            <string>13 pt</string>
-                                            <string>14 pt</string>
-                                            <string>15 pt</string>
-                                            <string>16 pt</string>
-                                            <string>17 pt</string>
-                                            <string>18 pt</string>
-                                            <string>24 pt</string>
-                                            <string>36 pt</string>
-                                            <string>48 pt</string>
-                                            <string>64 pt</string>
-                                            <string>72 pt</string>
-                                            <string>98 pt</string>
-                                            <string>144 pt</string>
-                                            <string>288 pt</string>
-                                        </objectValues>
-                                    </comboBoxCell>
-                                </comboBox>
+                                </customView>
+                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="w7u-h7-LbV" customClass="ComponentSelect" customModule="KMComponentLibrary">
+                                    <rect key="frame" x="68" y="89" width="244" height="32"/>
+                                    <constraints>
+                                        <constraint firstAttribute="height" constant="32" id="A0G-8j-fle"/>
+                                    </constraints>
+                                </customView>
+                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="chi-da-VkN" customClass="ComponentButton" customModule="KMComponentLibrary">
+                                    <rect key="frame" x="102" y="40" width="32" height="34"/>
+                                    <constraints>
+                                        <constraint firstAttribute="height" constant="34" id="ddi-SA-pOg"/>
+                                        <constraint firstAttribute="width" constant="32" id="ghJ-l2-yQd"/>
+                                    </constraints>
+                                </customView>
+                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="KZn-gA-Sq8" customClass="ComponentButton" customModule="KMComponentLibrary">
+                                    <rect key="frame" x="138" y="40" width="32" height="34"/>
+                                    <constraints>
+                                        <constraint firstAttribute="width" constant="32" id="RQO-jr-vq7"/>
+                                        <constraint firstAttribute="height" constant="34" id="vkh-BC-B4g"/>
+                                    </constraints>
+                                </customView>
+                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="mX1-8G-glL" customClass="ComponentButton" customModule="KMComponentLibrary">
+                                    <rect key="frame" x="174" y="40" width="32" height="34"/>
+                                    <constraints>
+                                        <constraint firstAttribute="height" constant="34" id="2lv-7v-PDE"/>
+                                        <constraint firstAttribute="width" constant="32" id="kSX-Jd-OcB"/>
+                                    </constraints>
+                                </customView>
                             </subviews>
                             <constraints>
-                                <constraint firstItem="CXh-KX-5IW" firstAttribute="top" secondItem="fao-XN-Ag4" secondAttribute="bottom" constant="4" id="3Ia-de-f4t"/>
-                                <constraint firstItem="dLt-g4-HJe" firstAttribute="leading" secondItem="1C1-xe-nXS" secondAttribute="trailing" constant="8" id="4AA-rK-788"/>
+                                <constraint firstItem="KZn-gA-Sq8" firstAttribute="centerY" secondItem="chi-da-VkN" secondAttribute="centerY" id="7B3-fe-GiO"/>
                                 <constraint firstItem="J29-tc-QgL" firstAttribute="leading" secondItem="1C1-xe-nXS" secondAttribute="leading" id="7xm-Mr-SYH"/>
-                                <constraint firstItem="Ipi-UI-ZtO" firstAttribute="centerY" secondItem="vtH-vu-OhB" secondAttribute="centerY" id="95p-pH-k9o"/>
-                                <constraint firstItem="vtH-vu-OhB" firstAttribute="leading" secondItem="CXh-KX-5IW" secondAttribute="leading" id="HOf-pD-ZQJ"/>
-                                <constraint firstItem="fao-XN-Ag4" firstAttribute="leading" secondItem="mn5-Os-322" secondAttribute="leading" constant="10" id="Qht-0S-6KG"/>
-                                <constraint firstItem="J29-tc-QgL" firstAttribute="top" secondItem="dLt-g4-HJe" secondAttribute="bottom" constant="14" id="R4K-Nf-rd5"/>
-                                <constraint firstItem="fao-XN-Ag4" firstAttribute="top" secondItem="mn5-Os-322" secondAttribute="top" constant="10" id="VOI-vN-vEo"/>
-                                <constraint firstItem="Sua-4n-8zo" firstAttribute="centerY" secondItem="J29-tc-QgL" secondAttribute="centerY" id="XSe-Q9-raS"/>
-                                <constraint firstItem="vtH-vu-OhB" firstAttribute="top" secondItem="CXh-KX-5IW" secondAttribute="bottom" constant="15" id="ZRI-jM-m8F"/>
-                                <constraint firstItem="Ipi-UI-ZtO" firstAttribute="leading" secondItem="vtH-vu-OhB" secondAttribute="trailing" constant="8" id="brT-KT-FnD"/>
-                                <constraint firstItem="dLt-g4-HJe" firstAttribute="centerY" secondItem="1C1-xe-nXS" secondAttribute="centerY" id="cQg-lU-iBG"/>
+                                <constraint firstItem="vtH-vu-OhB" firstAttribute="leading" secondItem="mn5-Os-322" secondAttribute="leading" id="9YU-RG-15X"/>
+                                <constraint firstItem="vtH-vu-OhB" firstAttribute="top" secondItem="Tdu-gt-Xly" secondAttribute="bottom" constant="16" id="IgN-a2-F5m"/>
+                                <constraint firstItem="1C1-xe-nXS" firstAttribute="top" secondItem="w7u-h7-LbV" secondAttribute="bottom" constant="24" id="Pc6-8q-0Vs"/>
+                                <constraint firstAttribute="trailing" secondItem="w7u-h7-LbV" secondAttribute="trailing" id="Pcl-Hh-6rt"/>
+                                <constraint firstItem="fao-XN-Ag4" firstAttribute="leading" secondItem="mn5-Os-322" secondAttribute="leading" id="Qht-0S-6KG"/>
+                                <constraint firstItem="J29-tc-QgL" firstAttribute="top" secondItem="1C1-xe-nXS" secondAttribute="bottom" constant="24" id="UVJ-CT-FF2"/>
+                                <constraint firstItem="fao-XN-Ag4" firstAttribute="top" secondItem="mn5-Os-322" secondAttribute="top" id="VOI-vN-vEo"/>
+                                <constraint firstItem="mX1-8G-glL" firstAttribute="centerY" secondItem="chi-da-VkN" secondAttribute="centerY" id="Wpj-i5-Rjd"/>
+                                <constraint firstItem="KZn-gA-Sq8" firstAttribute="leading" secondItem="chi-da-VkN" secondAttribute="trailing" constant="4" id="ayX-Zk-MN7"/>
                                 <constraint firstItem="1C1-xe-nXS" firstAttribute="leading" secondItem="vtH-vu-OhB" secondAttribute="leading" id="fS6-4F-hbK"/>
-                                <constraint firstAttribute="trailing" secondItem="CXh-KX-5IW" secondAttribute="trailing" constant="10" id="o5v-UB-GVh"/>
-                                <constraint firstItem="Sua-4n-8zo" firstAttribute="leading" secondItem="J29-tc-QgL" secondAttribute="trailing" constant="8" id="rKH-To-YJg"/>
-                                <constraint firstItem="CXh-KX-5IW" firstAttribute="leading" secondItem="fao-XN-Ag4" secondAttribute="leading" id="uTc-5K-U8F"/>
-                                <constraint firstAttribute="bottom" secondItem="J29-tc-QgL" secondAttribute="bottom" constant="12" id="uk9-PW-uql"/>
-                                <constraint firstItem="1C1-xe-nXS" firstAttribute="top" secondItem="vtH-vu-OhB" secondAttribute="bottom" constant="16" id="vae-6V-j1s"/>
+                                <constraint firstItem="Tdu-gt-Xly" firstAttribute="top" secondItem="fao-XN-Ag4" secondAttribute="bottom" constant="12" id="gA8-G9-r3f"/>
+                                <constraint firstItem="BbW-Bu-gyV" firstAttribute="centerY" secondItem="J29-tc-QgL" secondAttribute="centerY" id="ndu-vo-w0A"/>
+                                <constraint firstItem="w7u-h7-LbV" firstAttribute="leading" secondItem="vtH-vu-OhB" secondAttribute="trailing" constant="8" id="nmg-A5-c3n"/>
+                                <constraint firstAttribute="bottom" secondItem="BbW-Bu-gyV" secondAttribute="bottom" id="pYg-G2-iSN"/>
+                                <constraint firstItem="BbW-Bu-gyV" firstAttribute="leading" secondItem="J29-tc-QgL" secondAttribute="trailing" constant="8" id="piR-ou-d2B"/>
+                                <constraint firstItem="chi-da-VkN" firstAttribute="leading" secondItem="1C1-xe-nXS" secondAttribute="trailing" constant="8" id="q2r-Je-6pS"/>
+                                <constraint firstItem="Tdu-gt-Xly" firstAttribute="leading" secondItem="mn5-Os-322" secondAttribute="leading" id="qgE-Hk-qBO"/>
+                                <constraint firstItem="mX1-8G-glL" firstAttribute="leading" secondItem="KZn-gA-Sq8" secondAttribute="trailing" constant="4" id="r0V-IU-ayk"/>
+                                <constraint firstAttribute="trailing" secondItem="Tdu-gt-Xly" secondAttribute="trailing" id="rXV-WP-5qv"/>
+                                <constraint firstItem="chi-da-VkN" firstAttribute="centerY" secondItem="1C1-xe-nXS" secondAttribute="centerY" id="sMW-zf-MLn"/>
+                                <constraint firstItem="w7u-h7-LbV" firstAttribute="centerY" secondItem="vtH-vu-OhB" secondAttribute="centerY" id="tjo-gF-vkw"/>
                             </constraints>
                         </view>
                     </box>
-                    <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="VMG-lY-O6p">
-                        <rect key="frame" x="19" y="19" width="172" height="18"/>
-                        <buttonCell key="cell" type="check" title="Make Properties Default" bezelStyle="regularSquare" imagePosition="left" inset="2" id="Dnu-dG-VYG">
-                            <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
-                            <font key="font" metaFont="system"/>
-                        </buttonCell>
-                    </button>
-                    <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="8Vm-rr-xqQ">
-                        <rect key="frame" x="371" y="11" width="53" height="34"/>
-                        <buttonCell key="cell" type="push" title="OK" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="a8p-YN-bIo">
-                            <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="zAA-Ry-vgk">
+                        <rect key="frame" x="22" y="432" width="306" height="16"/>
+                        <textFieldCell key="cell" lineBreakMode="clipping" title="Redact Properties" id="WBB-ol-FER">
                             <font key="font" metaFont="system"/>
-                            <string key="keyEquivalent" base64-UTF8="YES">
-DQ
-</string>
-                        </buttonCell>
-                        <connections>
-                            <action selector="sure_button:" target="-2" id="bYT-WF-dE4"/>
-                        </connections>
-                    </button>
-                    <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="MLL-VU-pGx">
-                        <rect key="frame" x="301" y="12" width="76" height="32"/>
-                        <buttonCell key="cell" type="push" title="Cancel" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="88s-Is-tgF">
-                            <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                            <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
+                            <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+                        </textFieldCell>
+                    </textField>
+                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="RgM-mz-38G">
+                        <rect key="frame" x="22" y="388" width="306" height="16"/>
+                        <textFieldCell key="cell" lineBreakMode="clipping" title="Mark Color" id="umZ-hV-sk8">
                             <font key="font" metaFont="system"/>
-                            <string key="keyEquivalent" base64-UTF8="YES">
-Gw
-</string>
-                        </buttonCell>
-                        <connections>
-                            <action selector="cancel_button:" target="-2" id="hg5-6i-xEh"/>
-                        </connections>
-                    </button>
+                            <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
+                            <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+                        </textFieldCell>
+                    </textField>
+                    <customView translatesAutoresizingMaskIntoConstraints="NO" id="rqS-H2-cSD" customClass="ComponentCColorItem" customModule="KMComponentLibrary">
+                        <rect key="frame" x="214" y="343" width="32" height="34"/>
+                        <constraints>
+                            <constraint firstAttribute="width" constant="32" id="JG1-vP-DTi"/>
+                            <constraint firstAttribute="height" constant="34" id="NOO-VY-ysL"/>
+                        </constraints>
+                    </customView>
+                    <customView translatesAutoresizingMaskIntoConstraints="NO" id="b0s-8X-hPx" customClass="ComponentCColorItem" customModule="KMComponentLibrary">
+                        <rect key="frame" x="167" y="303" width="32" height="34"/>
+                        <constraints>
+                            <constraint firstAttribute="width" constant="32" id="0Kv-oB-sjA"/>
+                            <constraint firstAttribute="height" constant="34" id="cxj-Fh-6oM"/>
+                        </constraints>
+                    </customView>
+                    <customView translatesAutoresizingMaskIntoConstraints="NO" id="iKX-Y3-10u" customClass="ComponentButton" customModule="KMComponentLibrary">
+                        <rect key="frame" x="264" y="16" width="62" height="32"/>
+                        <constraints>
+                            <constraint firstAttribute="width" constant="62" id="heT-Bb-c5W"/>
+                            <constraint firstAttribute="height" constant="32" id="iGw-3I-6WU"/>
+                        </constraints>
+                    </customView>
+                    <customView translatesAutoresizingMaskIntoConstraints="NO" id="gQK-no-HBC" customClass="ComponentButton" customModule="KMComponentLibrary">
+                        <rect key="frame" x="194" y="16" width="62" height="32"/>
+                        <constraints>
+                            <constraint firstAttribute="width" constant="62" id="1Oi-Eb-L31"/>
+                            <constraint firstAttribute="height" constant="32" id="ddB-A4-SLV"/>
+                        </constraints>
+                    </customView>
+                    <customView translatesAutoresizingMaskIntoConstraints="NO" id="s5q-23-Ymn" customClass="ComponentButton" customModule="KMComponentLibrary">
+                        <rect key="frame" x="24" y="16" width="62" height="32"/>
+                        <constraints>
+                            <constraint firstAttribute="height" constant="32" id="3XM-ke-dPi"/>
+                            <constraint firstAttribute="width" constant="62" id="DzD-xB-Yd4"/>
+                        </constraints>
+                    </customView>
                 </subviews>
                 <constraints>
-                    <constraint firstItem="Rss-gV-GIO" firstAttribute="leading" secondItem="se5-gp-TjO" secondAttribute="leading" constant="20" id="3hL-KS-02q"/>
-                    <constraint firstAttribute="bottom" secondItem="VMG-lY-O6p" secondAttribute="bottom" constant="20" id="4ss-OL-lS2"/>
-                    <constraint firstItem="86V-WX-odK" firstAttribute="leading" secondItem="NCn-2e-s8W" secondAttribute="trailing" constant="8" id="9L5-nD-rMe"/>
-                    <constraint firstItem="NCn-2e-s8W" firstAttribute="top" secondItem="fwt-Td-i6C" secondAttribute="bottom" constant="14" id="9UJ-Ys-x0x"/>
-                    <constraint firstItem="VMG-lY-O6p" firstAttribute="leading" secondItem="mn5-Os-322" secondAttribute="leading" id="Bt2-O5-Xwe"/>
-                    <constraint firstItem="CZo-W6-acg" firstAttribute="leading" secondItem="NCn-2e-s8W" secondAttribute="leading" id="EhO-NW-c4a"/>
-                    <constraint firstItem="86V-WX-odK" firstAttribute="centerY" secondItem="NCn-2e-s8W" secondAttribute="centerY" id="GA2-2O-J1o"/>
-                    <constraint firstItem="8Vm-rr-xqQ" firstAttribute="trailing" secondItem="mn5-Os-322" secondAttribute="trailing" id="NlE-4r-YEN"/>
-                    <constraint firstItem="8Vm-rr-xqQ" firstAttribute="leading" secondItem="MLL-VU-pGx" secondAttribute="trailing" constant="8" id="S1K-C1-uS2"/>
-                    <constraint firstItem="fwt-Td-i6C" firstAttribute="leading" secondItem="Rss-gV-GIO" secondAttribute="trailing" constant="8" id="Sbx-kb-R1P"/>
-                    <constraint firstItem="fwt-Td-i6C" firstAttribute="centerY" secondItem="Rss-gV-GIO" secondAttribute="centerY" id="XGh-a1-vWa"/>
-                    <constraint firstItem="wyt-sb-oUb" firstAttribute="top" secondItem="CZo-W6-acg" secondAttribute="bottom" constant="4" id="aD7-Gy-tE6"/>
-                    <constraint firstItem="CZo-W6-acg" firstAttribute="top" secondItem="NCn-2e-s8W" secondAttribute="bottom" constant="22" id="aDt-WC-AKI"/>
-                    <constraint firstItem="NCn-2e-s8W" firstAttribute="leading" secondItem="se5-gp-TjO" secondAttribute="leading" constant="20" id="aGg-4S-CU8"/>
+                    <constraint firstItem="iKX-Y3-10u" firstAttribute="top" secondItem="wyt-sb-oUb" secondAttribute="bottom" constant="24" id="02o-hG-EKb"/>
+                    <constraint firstItem="RgM-mz-38G" firstAttribute="trailing" secondItem="zAA-Ry-vgk" secondAttribute="trailing" id="1ER-3g-2o8"/>
+                    <constraint firstAttribute="bottom" secondItem="s5q-23-Ymn" secondAttribute="bottom" constant="16" id="4ye-OM-gwz"/>
+                    <constraint firstItem="b0s-8X-hPx" firstAttribute="leading" secondItem="NCn-2e-s8W" secondAttribute="trailing" constant="8" id="AD7-Vv-S0V"/>
+                    <constraint firstAttribute="trailing" secondItem="iKX-Y3-10u" secondAttribute="trailing" constant="24" id="ChR-TX-AE3"/>
+                    <constraint firstItem="zAA-Ry-vgk" firstAttribute="top" secondItem="se5-gp-TjO" secondAttribute="top" constant="16" id="ENp-R2-Pch"/>
+                    <constraint firstAttribute="bottom" secondItem="iKX-Y3-10u" secondAttribute="bottom" constant="16" id="I08-Na-0EA"/>
+                    <constraint firstItem="iKX-Y3-10u" firstAttribute="leading" secondItem="gQK-no-HBC" secondAttribute="trailing" constant="8" id="IIK-hG-OUf"/>
+                    <constraint firstItem="iKX-Y3-10u" firstAttribute="centerY" secondItem="gQK-no-HBC" secondAttribute="centerY" id="JoU-45-o0C"/>
+                    <constraint firstItem="NCn-2e-s8W" firstAttribute="top" secondItem="Rss-gV-GIO" secondAttribute="bottom" constant="24" id="NTD-4w-DMo"/>
+                    <constraint firstItem="NCn-2e-s8W" firstAttribute="leading" secondItem="Rss-gV-GIO" secondAttribute="leading" id="S72-4o-IGc"/>
+                    <constraint firstItem="b0s-8X-hPx" firstAttribute="centerY" secondItem="NCn-2e-s8W" secondAttribute="centerY" id="X48-Kg-LaY"/>
                     <constraint firstAttribute="trailing" secondItem="wyt-sb-oUb" secondAttribute="trailing" constant="20" id="aOE-8I-Xec"/>
-                    <constraint firstItem="VMG-lY-O6p" firstAttribute="top" secondItem="wyt-sb-oUb" secondAttribute="bottom" constant="22" id="b3z-vw-mYA"/>
-                    <constraint firstItem="8Vm-rr-xqQ" firstAttribute="top" secondItem="wyt-sb-oUb" secondAttribute="bottom" constant="18" id="bln-ac-gUZ"/>
-                    <constraint firstItem="wyt-sb-oUb" firstAttribute="leading" secondItem="CZo-W6-acg" secondAttribute="leading" id="nEC-Lh-CaG"/>
-                    <constraint firstAttribute="bottom" secondItem="8Vm-rr-xqQ" secondAttribute="bottom" constant="18" id="py2-X3-et0"/>
-                    <constraint firstItem="MLL-VU-pGx" firstAttribute="centerY" secondItem="8Vm-rr-xqQ" secondAttribute="centerY" id="sNi-r0-dYf"/>
-                    <constraint firstItem="Rss-gV-GIO" firstAttribute="top" secondItem="se5-gp-TjO" secondAttribute="top" constant="22" id="vxP-2h-ruO"/>
+                    <constraint firstItem="rqS-H2-cSD" firstAttribute="centerY" secondItem="Rss-gV-GIO" secondAttribute="centerY" id="awM-Gw-Rcw"/>
+                    <constraint firstItem="RgM-mz-38G" firstAttribute="top" secondItem="zAA-Ry-vgk" secondAttribute="bottom" constant="28" id="dhd-71-fil"/>
+                    <constraint firstItem="RgM-mz-38G" firstAttribute="leading" secondItem="zAA-Ry-vgk" secondAttribute="leading" id="doX-DE-gkM"/>
+                    <constraint firstAttribute="trailing" secondItem="zAA-Ry-vgk" secondAttribute="trailing" constant="24" id="eah-hs-QVS"/>
+                    <constraint firstItem="zAA-Ry-vgk" firstAttribute="leading" secondItem="se5-gp-TjO" secondAttribute="leading" constant="24" id="i20-D9-nC4"/>
+                    <constraint firstItem="Rss-gV-GIO" firstAttribute="leading" secondItem="RgM-mz-38G" secondAttribute="leading" id="lNE-la-hNJ"/>
+                    <constraint firstItem="wyt-sb-oUb" firstAttribute="top" secondItem="b0s-8X-hPx" secondAttribute="bottom" constant="24" id="mAv-Rk-M48"/>
+                    <constraint firstItem="rqS-H2-cSD" firstAttribute="leading" secondItem="Rss-gV-GIO" secondAttribute="trailing" constant="8" id="qhI-id-WCl"/>
+                    <constraint firstItem="s5q-23-Ymn" firstAttribute="leading" secondItem="se5-gp-TjO" secondAttribute="leading" constant="24" id="s0g-9F-iDa"/>
+                    <constraint firstItem="wyt-sb-oUb" firstAttribute="leading" secondItem="zAA-Ry-vgk" secondAttribute="leading" id="xcU-c3-w8r"/>
+                    <constraint firstItem="Rss-gV-GIO" firstAttribute="top" secondItem="RgM-mz-38G" secondAttribute="bottom" constant="20" id="y40-lu-6Ul"/>
                 </constraints>
             </view>
             <connections>
                 <outlet property="delegate" destination="-2" id="0bl-1N-AYu"/>
             </connections>
-            <point key="canvasLocation" x="183" y="185"/>
+            <point key="canvasLocation" x="211" y="420"/>
         </window>
     </objects>
-    <resources>
-        <image name="KMImageNameUXIconPropertybarTextalignCenterSel" width="20" height="20"/>
-        <image name="KMImageNameUXIconPropertybarTextalignLeftSel" width="20" height="20"/>
-        <image name="KMImageNameUXIconPropertybarTextalignRightSel" width="20" height="20"/>
-    </resources>
 </document>

+ 0 - 253
PDF Office/PDF Master/Class/PDFWindowController/Form/KMFormActionButtonPopWindowController.swift

@@ -1,253 +0,0 @@
-//
-//  KMFormActionButtonPopWindowController.swift
-//  PDF Reader Pro
-//
-//  Created by wanjun on 2024/2/2.
-//
-
-import Cocoa
-
-@objcMembers
-class KMFormActionButtonPopWindowController: NSWindowController {
-    
-    @IBOutlet private weak var actionLabel: NSTextField!
-    @IBOutlet private weak var actionComboBox: NSComboBox!
-    @IBOutlet private weak var label: NSTextField!
-    @IBOutlet private weak var labelTextField: NSTextField!
-    @IBOutlet private weak var presenceLabel: NSTextField!
-    @IBOutlet private weak var visibleComboBox: NSComboBox!
-    @IBOutlet private weak var emailButton: NSButton!
-    @IBOutlet private weak var emailTextField: NSTextField!
-    @IBOutlet private weak var urlButton: NSButton!
-    @IBOutlet private weak var urlTextField: NSTextField!
-    @IBOutlet private weak var cancelButton: NSButton!
-    @IBOutlet private weak var okButton: NSButton!
-    
-    private var settingButtonWidget: CPDFButtonWidgetAnnotation?
-    private var isEdit: Bool = false
-    private var handler: ((Int) -> Void)!
-
-    // MARK: Dealloc
-    
-    deinit {
-        NotificationCenter.default.removeObserver(self)
-    }
-    
-    // MARK: init Methods
-
-    convenience init(buttonWidget: CPDFButtonWidgetAnnotation, isEdit: Bool) {
-        self.init(windowNibName: "KMFormActionButtonPopWindowController")
-        
-        settingButtonWidget = buttonWidget
-        self.isEdit = isEdit
-    }
-    
-    // MARK: Life Cycle
-    
-    override func windowDidLoad() {
-        super.windowDidLoad()
-        
-        localizedString()
-        if isEdit {
-            configuViews()
-        }
-        emailTextField.inputContext?.allowedInputSourceLocales = [NSAllRomanInputSourcesLocaleIdentifier]
-        urlTextField.inputContext?.allowedInputSourceLocales = [NSAllRomanInputSourcesLocaleIdentifier]
-    }
-    
-    // MARK: Private Methods
-    
-    func localizedString() {
-        cancelButton.title = NSLocalizedString("Cancel", comment: "")
-        okButton.title = NSLocalizedString("OK", comment: "")
-        actionLabel.stringValue = NSLocalizedString("Action", comment: "")
-        presenceLabel.stringValue = NSLocalizedString("Button Field", comment: "")
-        label.stringValue = NSLocalizedString("Label", comment: "")
-        labelTextField.stringValue = NSLocalizedString("Submit", comment: "")
-        
-        actionComboBox.removeAllItems()
-        actionComboBox.stringValue = NSLocalizedString("Submit", comment: "")
-        actionComboBox.addItems(withObjectValues: [
-            NSLocalizedString("Submit", comment: ""),
-            NSLocalizedString("Print", comment: "")
-        ])
-        actionComboBox.selectItem(at: 0)
-        
-        visibleComboBox.removeAllItems()
-        visibleComboBox.stringValue = NSLocalizedString("Visible", comment: "")
-        visibleComboBox.addItems(withObjectValues: [
-            NSLocalizedString("Visible", comment: ""),
-            NSLocalizedString("Hidden", comment: ""),
-            NSLocalizedString("Visible but doesn't print", comment: "")
-        ])
-        
-        emailButton.title = NSLocalizedString("Submit to Email", comment: "")
-        urlButton.title = NSLocalizedString("Submit to URL", comment: "")
-        
-        urlTextField.isEnabled = false
-        emailTextField.isEnabled = true
-        
-        NotificationCenter.default.addObserver(self, selector: #selector(textFieldDidChange), name: NSControl.textDidChangeNotification, object: labelTextField)
-    }
-
-    func configuViews() {
-        labelTextField.stringValue = settingButtonWidget?.caption() ?? NSLocalizedString("Submit", comment: "")
-        let shouldDisplay = settingButtonWidget?.shouldDisplay() ?? false
-        let shouldPrint = settingButtonWidget?.shouldPrint() ?? false
-        
-        if shouldDisplay && !shouldPrint {
-            visibleComboBox.selectItem(at: 2)
-        } else if shouldDisplay && shouldPrint {
-            visibleComboBox.selectItem(at: 0)
-        } else if shouldPrint && !shouldDisplay {
-            visibleComboBox.selectItem(at: 0)
-        }
-        
-        if settingButtonWidget?.mouseUpAction() is CPDFAnnotation {
-            actionComboBox.selectItem(at: 1)
-            urlButton.isEnabled = false
-            emailButton.isEnabled = false
-            urlTextField.isEnabled = false
-            emailTextField.isEnabled = false
-        } else {
-            actionComboBox.selectItem(at: 0)
-            urlButton.isEnabled = true
-            emailButton.isEnabled = true
-            urlTextField.isEnabled = true
-            emailTextField.isEnabled = true
-            
-            if let urlAction = settingButtonWidget!.mouseUpAction() as? CPDFURLAction {
-                if urlAction.url().fileURL.absoluteString.hasPrefix("mailto:") {
-                    urlButton.state = .off
-                    emailButton.state = .on
-                    emailTextField.stringValue = urlAction.url().fileURL.absoluteString
-                } else {
-                    urlButton.state = .on
-                    emailButton.state = .off
-                    urlTextField.stringValue = urlAction.url().fileURL.absoluteString
-                }
-            }
-        }
-    }
-    
-    @IBAction private func dismissSheet(_ sender: Any) {
-        if #available(macOS 10.13, *) {
-            NSApp.endSheet(window!, returnCode: (sender as? NSControl)?.tag ?? 0)
-        } else {
-            NSApp.endSheet(window!)
-        }
-        window!.orderOut(self)
-    }
-    
-    @objc private func didEndSheet(_ sheet: NSWindow?, returnCode: Int, contextInfo: UnsafeMutableRawPointer?) {
-        if contextInfo != nil && self.handler != nil {
-            self.handler!(returnCode)
-        }
-    }
-    
-    func beginSheetModal(for window: NSWindow?, completionHandler handler: ((Int) -> Void)?) {
-        if window != nil {
-            window!.beginSheet(self.window!) { ModalResponse in
-                self.handler?(ModalResponse.rawValue)
-            }
-        }
-        self.handler = handler
-    }
-    
-    // MARK: Button Actions
-    
-    @IBAction func comboBoxClicked_ActionSelect(_ sender: Any) {
-        guard let comboBox = sender as? NSComboBox else {
-            return
-        }
-        
-        if comboBox.indexOfSelectedItem == 1 {
-            emailButton.isEnabled = false
-            urlButton.isEnabled = false
-            urlTextField.stringValue = ""
-            emailTextField.stringValue = ""
-            urlTextField.isEnabled = false
-            emailTextField.isEnabled = false
-            
-            labelTextField.stringValue = NSLocalizedString("Print", comment: "")
-        } else {
-            emailButton.isEnabled = true
-            urlButton.isEnabled = true
-            urlTextField.isEnabled = true
-            emailTextField.isEnabled = true
-            labelTextField.stringValue = NSLocalizedString("Submit", comment: "")
-        }
-    }
-
-    @IBAction func buttonClicked_MailOrURLSelect(_ sender: Any) {
-        guard let button = sender as? NSButton else {
-            return
-        }
-        
-        if button.tag == 1 {
-            emailButton.state = NSControl.StateValue.off
-            urlButton.state = NSControl.StateValue.on
-            emailTextField.isEnabled = false
-            urlTextField.isEnabled = true
-        } else {
-            emailButton.state = NSControl.StateValue.on
-            urlButton.state = NSControl.StateValue.off
-            urlTextField.isEnabled = false
-            emailTextField.isEnabled = true
-        }
-    }
-
-    @IBAction func buttonClicked_CancelSetting(_ sender: Any) {
-        dismissSheet(cancelButton as Any)
-    }
-    
-    @IBAction func buttonClicked_ConfirmSetting(_ sender: Any) {
-        if actionComboBox.indexOfSelectedItem == 0 {
-            var url: String?
-            if urlButton.state == .on {
-                if urlTextField.stringValue.hasPrefix("http://") || urlTextField.stringValue.hasPrefix("https://") {
-                    url = urlTextField.stringValue
-                } else {
-                    url = "http://\(urlTextField.stringValue)"
-                }
-            } else {
-                if emailTextField.stringValue.hasPrefix("mailto:") {
-                    url = emailTextField.stringValue
-                } else {
-                    url = "mailto:\(emailTextField.stringValue)"
-                }
-            }
-            if let action = CPDFURLAction(url: url) {
-                settingButtonWidget?.setMouseUpAction(action)
-            }
-        } else {
-            if let action = CPDFNamedAction(name: .print) {
-                settingButtonWidget?.setMouseUpAction(action)
-            }
-        }
-        
-        if visibleComboBox.indexOfSelectedItem == 0 {
-            settingButtonWidget?.setShouldDisplay(true)
-            settingButtonWidget?.setShouldPrint(true)
-        } else if visibleComboBox.indexOfSelectedItem == 1 {
-            settingButtonWidget?.setShouldDisplay(false)
-            settingButtonWidget?.setShouldPrint(true)
-        } else {
-            settingButtonWidget?.setShouldDisplay(true)
-            settingButtonWidget?.setShouldPrint(false)
-        }
-        
-        settingButtonWidget?.setCaption(labelTextField.stringValue)
-
-        NotificationCenter.default.post(name: NSNotification.Name("KMFormActionButtonChange"), object: nil, userInfo: nil)
-        dismissSheet(okButton as Any)
-    }
-    
-    // MARK: NSNotification Action
-    
-    @objc func textFieldDidChange() {
-        settingButtonWidget?.setCaption(labelTextField.stringValue)
-        
-        NotificationCenter.default.post(name: Notification.Name("KMFormActionButtonLabelTextField"), object: self)
-    }
-}

+ 0 - 218
PDF Office/PDF Master/Class/PDFWindowController/Form/KMFormActionButtonPopWindowController.xib

@@ -1,218 +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="KMFormActionButtonPopWindowController" customModule="PDF_Reader_Pro" customModuleProvider="target">
-            <connections>
-                <outlet property="actionComboBox" destination="Bmd-Qo-clZ" id="XeC-hy-MxS"/>
-                <outlet property="actionLabel" destination="gOb-OI-feU" id="kON-pw-8oW"/>
-                <outlet property="cancelButton" destination="AmK-R1-fam" id="Frn-z2-uhY"/>
-                <outlet property="emailButton" destination="VHh-E5-AVJ" id="FP2-zc-4qH"/>
-                <outlet property="emailTextField" destination="pJK-CS-UiB" id="M5g-Kc-JJm"/>
-                <outlet property="label" destination="LfD-bl-T3c" id="Axk-0r-o7h"/>
-                <outlet property="labelTextField" destination="jQK-hR-5Yw" id="JjS-pu-CT1"/>
-                <outlet property="okButton" destination="dz5-Ak-kQt" id="xES-MW-LGv"/>
-                <outlet property="presenceLabel" destination="bOj-H3-vy9" id="hna-ZW-SCe"/>
-                <outlet property="urlButton" destination="KhV-Aq-35U" id="oyK-2d-d4z"/>
-                <outlet property="urlTextField" destination="aQw-DO-oGy" id="VdL-62-Rtd"/>
-                <outlet property="visibleComboBox" destination="q5S-9w-Wv1" id="lNB-s0-bpP"/>
-                <outlet property="window" destination="F0z-JX-Cv5" id="gIp-Ho-8D9"/>
-            </connections>
-        </customObject>
-        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
-        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
-        <window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" id="F0z-JX-Cv5">
-            <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES"/>
-            <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
-            <rect key="contentRect" x="196" y="240" width="520" height="270"/>
-            <rect key="screenRect" x="0.0" y="0.0" width="1920" height="1055"/>
-            <view key="contentView" wantsLayer="YES" id="se5-gp-TjO">
-                <rect key="frame" x="0.0" y="0.0" width="520" height="270"/>
-                <autoresizingMask key="autoresizingMask"/>
-                <subviews>
-                    <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="AmK-R1-fam">
-                        <rect key="frame" x="289" y="13" width="111" height="33"/>
-                        <buttonCell key="cell" type="push" title="Cancel" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="Ohq-AM-h7E">
-                            <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                            <font key="font" metaFont="system"/>
-                            <string key="keyEquivalent" base64-UTF8="YES">
-Gw
-</string>
-                        </buttonCell>
-                        <constraints>
-                            <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="97" id="lPn-o1-y8Q"/>
-                            <constraint firstAttribute="height" constant="21" id="xKS-JG-CFD"/>
-                        </constraints>
-                        <connections>
-                            <action selector="buttonClicked_CancelSetting:" target="-2" id="mzW-TE-MQ4"/>
-                        </connections>
-                    </button>
-                    <comboBox focusRingType="none" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="q5S-9w-Wv1">
-                        <rect key="frame" x="97" y="198" width="124" height="23"/>
-                        <constraints>
-                            <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="120" id="k2M-n5-pOf"/>
-                        </constraints>
-                        <comboBoxCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" alignment="center" title="Visible" drawsBackground="YES" completes="NO" numberOfVisibleItems="5" id="eEB-pT-Eo0">
-                            <font key="font" metaFont="system"/>
-                            <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
-                            <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                            <objectValues>
-                                <string>Hidden</string>
-                                <string>Visible</string>
-                                <string>Visible but doesn't print</string>
-                            </objectValues>
-                        </comboBoxCell>
-                    </comboBox>
-                    <textField focusRingType="none" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="bOj-H3-vy9">
-                        <rect key="frame" x="18" y="202" width="77" height="16"/>
-                        <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Button Field" id="eTp-99-RIg">
-                            <font key="font" metaFont="system"/>
-                            <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
-                            <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
-                        </textFieldCell>
-                    </textField>
-                    <textField focusRingType="none" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="jQK-hR-5Yw">
-                        <rect key="frame" x="342" y="235" width="120" height="21"/>
-                        <constraints>
-                            <constraint firstAttribute="width" constant="120" id="g3a-bz-d3J"/>
-                        </constraints>
-                        <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" alignment="center" title="Submit" drawsBackground="YES" id="tSZ-WR-xno">
-                            <font key="font" metaFont="system"/>
-                            <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
-                            <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                        </textFieldCell>
-                    </textField>
-                    <textField focusRingType="none" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="LfD-bl-T3c">
-                        <rect key="frame" x="302" y="237" width="37" height="16"/>
-                        <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Label" id="gL2-5w-EYB">
-                            <font key="font" metaFont="system"/>
-                            <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
-                            <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
-                        </textFieldCell>
-                    </textField>
-                    <button tag="1" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="KhV-Aq-35U">
-                        <rect key="frame" x="18" y="110" width="114" height="18"/>
-                        <buttonCell key="cell" type="radio" title="Submit to URL" bezelStyle="regularSquare" imagePosition="left" alignment="left" inset="2" id="oke-c2-aLs">
-                            <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
-                            <font key="font" metaFont="system"/>
-                        </buttonCell>
-                        <connections>
-                            <action selector="buttonClicked_MailOrURLSelect:" target="-2" id="3l2-eu-33j"/>
-                        </connections>
-                    </button>
-                    <button tag="1" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="dz5-Ak-kQt">
-                        <rect key="frame" x="406" y="13" width="111" height="33"/>
-                        <buttonCell key="cell" type="push" title="OK" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="2qZ-jR-9Ci">
-                            <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                            <font key="font" metaFont="system"/>
-                            <string key="keyEquivalent" base64-UTF8="YES">
-DQ
-</string>
-                        </buttonCell>
-                        <connections>
-                            <action selector="buttonClicked_ConfirmSetting:" target="-2" id="JnO-KZ-z5f"/>
-                        </connections>
-                    </button>
-                    <comboBox focusRingType="none" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Bmd-Qo-clZ">
-                        <rect key="frame" x="97" y="233" width="124" height="23"/>
-                        <constraints>
-                            <constraint firstAttribute="width" constant="120" id="jY9-1s-ubU"/>
-                        </constraints>
-                        <comboBoxCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" alignment="center" title="Submit" drawsBackground="YES" completes="NO" numberOfVisibleItems="2" id="ix3-0H-16S">
-                            <font key="font" metaFont="system"/>
-                            <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
-                            <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                            <objectValues>
-                                <string>Submit</string>
-                                <string>Print</string>
-                            </objectValues>
-                        </comboBoxCell>
-                        <connections>
-                            <action selector="comboBoxClicked_ActionSelect:" target="-2" id="f3W-XT-oRb"/>
-                        </connections>
-                    </comboBox>
-                    <textField focusRingType="none" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="pJK-CS-UiB">
-                        <rect key="frame" x="40" y="132" width="320" height="21"/>
-                        <constraints>
-                            <constraint firstAttribute="width" constant="320" id="wlv-Bh-5ip"/>
-                        </constraints>
-                        <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" placeholderString="support@pdfreaderpro.com" drawsBackground="YES" id="aya-7F-2Ni">
-                            <font key="font" metaFont="system"/>
-                            <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
-                            <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                        </textFieldCell>
-                    </textField>
-                    <textField focusRingType="none" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="aQw-DO-oGy">
-                        <rect key="frame" x="40" y="85" width="320" height="21"/>
-                        <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" placeholderString="https://www.pdfreaderpro.com" drawsBackground="YES" id="fpF-jv-uu6">
-                            <font key="font" metaFont="system"/>
-                            <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
-                            <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                        </textFieldCell>
-                    </textField>
-                    <textField focusRingType="none" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="gOb-OI-feU">
-                        <rect key="frame" x="52" y="237" width="43" height="16"/>
-                        <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Action" id="LQ5-tv-Vbx">
-                            <font key="font" metaFont="system"/>
-                            <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
-                            <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
-                        </textFieldCell>
-                    </textField>
-                    <box verticalHuggingPriority="750" boxType="separator" translatesAutoresizingMaskIntoConstraints="NO" id="ekx-q5-dQF">
-                        <rect key="frame" x="11" y="182" width="496" height="5"/>
-                    </box>
-                    <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="VHh-E5-AVJ">
-                        <rect key="frame" x="18" y="157" width="121" height="18"/>
-                        <buttonCell key="cell" type="radio" title="Submit to Email" bezelStyle="regularSquare" imagePosition="left" alignment="left" state="on" inset="2" id="VX6-ks-mcx">
-                            <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
-                            <font key="font" metaFont="system"/>
-                        </buttonCell>
-                        <connections>
-                            <action selector="buttonClicked_MailOrURLSelect:" target="-2" id="Omm-hc-BjC"/>
-                        </connections>
-                    </button>
-                </subviews>
-                <constraints>
-                    <constraint firstItem="jQK-hR-5Yw" firstAttribute="leading" secondItem="LfD-bl-T3c" secondAttribute="trailing" constant="5" id="1ed-WS-Iu0"/>
-                    <constraint firstItem="q5S-9w-Wv1" firstAttribute="centerY" secondItem="bOj-H3-vy9" secondAttribute="centerY" id="1iy-RI-ed3"/>
-                    <constraint firstItem="dz5-Ak-kQt" firstAttribute="leading" secondItem="AmK-R1-fam" secondAttribute="trailing" constant="20" id="Crn-7s-d7U"/>
-                    <constraint firstAttribute="trailing" secondItem="dz5-Ak-kQt" secondAttribute="trailing" constant="10" id="Fep-6W-em8"/>
-                    <constraint firstItem="ekx-q5-dQF" firstAttribute="leading" secondItem="se5-gp-TjO" secondAttribute="leading" constant="11" id="Flc-6s-OLJ"/>
-                    <constraint firstAttribute="bottom" secondItem="dz5-Ak-kQt" secondAttribute="bottom" constant="20" id="FmY-WD-T4w"/>
-                    <constraint firstItem="pJK-CS-UiB" firstAttribute="top" secondItem="VHh-E5-AVJ" secondAttribute="bottom" constant="5" id="Iua-HH-2R6"/>
-                    <constraint firstItem="Bmd-Qo-clZ" firstAttribute="centerY" secondItem="gOb-OI-feU" secondAttribute="centerY" id="Jqt-q0-wKx"/>
-                    <constraint firstItem="q5S-9w-Wv1" firstAttribute="top" secondItem="Bmd-Qo-clZ" secondAttribute="bottom" constant="15" id="K6f-Dx-PBY"/>
-                    <constraint firstItem="bOj-H3-vy9" firstAttribute="leading" secondItem="se5-gp-TjO" secondAttribute="leading" constant="20" id="K8i-Jc-er2"/>
-                    <constraint firstItem="q5S-9w-Wv1" firstAttribute="leading" secondItem="Bmd-Qo-clZ" secondAttribute="leading" id="LAE-OF-y6k"/>
-                    <constraint firstItem="LfD-bl-T3c" firstAttribute="centerY" secondItem="gOb-OI-feU" secondAttribute="centerY" id="bUA-gZ-D5y"/>
-                    <constraint firstItem="pJK-CS-UiB" firstAttribute="leading" secondItem="se5-gp-TjO" secondAttribute="leading" constant="40" id="eee-rw-Tyv"/>
-                    <constraint firstItem="KhV-Aq-35U" firstAttribute="top" secondItem="pJK-CS-UiB" secondAttribute="bottom" constant="5" id="esH-x3-c75"/>
-                    <constraint firstItem="aQw-DO-oGy" firstAttribute="leading" secondItem="pJK-CS-UiB" secondAttribute="leading" id="ggp-Xc-Cfc"/>
-                    <constraint firstItem="ekx-q5-dQF" firstAttribute="top" secondItem="q5S-9w-Wv1" secondAttribute="bottom" constant="15" id="h4j-cC-HfL"/>
-                    <constraint firstItem="aQw-DO-oGy" firstAttribute="trailing" secondItem="pJK-CS-UiB" secondAttribute="trailing" id="hcP-rn-udO"/>
-                    <constraint firstItem="KhV-Aq-35U" firstAttribute="leading" secondItem="VHh-E5-AVJ" secondAttribute="leading" id="jdj-ru-8Jy"/>
-                    <constraint firstItem="aQw-DO-oGy" firstAttribute="top" secondItem="KhV-Aq-35U" secondAttribute="bottom" constant="5" id="jqo-V7-0iY"/>
-                    <constraint firstItem="dz5-Ak-kQt" firstAttribute="width" secondItem="AmK-R1-fam" secondAttribute="width" id="m9i-Ke-vVu"/>
-                    <constraint firstItem="jQK-hR-5Yw" firstAttribute="centerY" secondItem="gOb-OI-feU" secondAttribute="centerY" id="maW-oA-Vhs"/>
-                    <constraint firstItem="VHh-E5-AVJ" firstAttribute="leading" secondItem="se5-gp-TjO" secondAttribute="leading" constant="20" id="pyQ-uc-P7j"/>
-                    <constraint firstItem="VHh-E5-AVJ" firstAttribute="top" secondItem="ekx-q5-dQF" secondAttribute="bottom" constant="10" id="tJk-TL-Sk3"/>
-                    <constraint firstItem="LfD-bl-T3c" firstAttribute="centerX" secondItem="se5-gp-TjO" secondAttribute="centerX" constant="60" id="ur7-c5-7Kf"/>
-                    <constraint firstItem="Bmd-Qo-clZ" firstAttribute="leading" secondItem="gOb-OI-feU" secondAttribute="trailing" constant="5" id="uug-ul-oFQ"/>
-                    <constraint firstAttribute="trailing" secondItem="ekx-q5-dQF" secondAttribute="trailing" constant="13" id="v2o-WK-fxc"/>
-                    <constraint firstItem="Bmd-Qo-clZ" firstAttribute="top" secondItem="se5-gp-TjO" secondAttribute="top" constant="15" id="x55-v4-6JN"/>
-                    <constraint firstItem="dz5-Ak-kQt" firstAttribute="height" secondItem="AmK-R1-fam" secondAttribute="height" id="yQr-5p-M02"/>
-                    <constraint firstItem="q5S-9w-Wv1" firstAttribute="leading" secondItem="bOj-H3-vy9" secondAttribute="trailing" constant="5" id="yrk-JU-4k0"/>
-                    <constraint firstItem="dz5-Ak-kQt" firstAttribute="centerY" secondItem="AmK-R1-fam" secondAttribute="centerY" id="zvb-rU-Gld"/>
-                </constraints>
-            </view>
-            <connections>
-                <outlet property="delegate" destination="-2" id="0bl-1N-AYu"/>
-            </connections>
-            <point key="canvasLocation" x="139" y="147"/>
-        </window>
-    </objects>
-</document>

+ 1 - 4
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/CPDFRedactAnnotation+PDFListView.swift

@@ -62,10 +62,7 @@ import Foundation
                 context.stroke(KMRectInset(NSRectToCGRect(rect), 0,0), width: lineWidth)
             }
         } else {
-            context.setLineWidth(lineWidth)
-            CPDFListViewDrawLineHandles(context, rect, 4.0/2)
-            // 绘制路径
-            context.strokePath()
+            KMContextStrokeRect(context, KMRectInset(NSRectToCGRect(rect), lineWidth, lineWidth))
         }
         context.restoreGState()
     }

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

@@ -1196,7 +1196,10 @@ void CPDFListViewOCDrawLineHandles(CGContextRef context, CGRect rect, CGFloat ra
         [[self window] makeFirstResponder:self];
         
         [self setNeedsDisplayAnnotation:annotation];
-    } else if ([annotation isKindOfClass:[CPDFButtonWidgetAnnotation class]] || [annotation isKindOfClass:[CPDFChoiceWidgetAnnotation class]] || [annotation isKindOfClass:[CPDFSignatureWidgetAnnotation class]]) {
+    } else if ([annotation isKindOfClass:[CPDFButtonWidgetAnnotation class]] ||
+               [annotation isKindOfClass:[CPDFChoiceWidgetAnnotation class]] ||
+               [annotation isKindOfClass:[CPDFSignatureWidgetAnnotation class]] ||
+               [annotation isKindOfClass:[CPDFRedactAnnotation class]]) {
         if([self.pdfListViewDelegate respondsToSelector:@selector(PDFListViewEditAnnotation:forAnnotation:)]) {
             [self.pdfListViewDelegate PDFListViewEditAnnotation:self forAnnotation:annotation];
         }

+ 56 - 13
PDF Office/PDF Master/KMClass/KMPDFViewController/KMMainViewController.swift

@@ -375,12 +375,53 @@ struct KMNMWCFlags {
         }
         
         alertTipViewController.digitalDetailsCallback = { [weak self] in
-            
+        }
+        
+        alertTipViewController.redactApplyCallback = { [weak self] in
+            let returnCode = KMAlertTool.runModelForMainThread_r(message: "", informative: KMLocalizedString("This will permanently remove the redacted information from this document. Once you save this document, you won’t be able to retrieve the redacted information."), buttons: [KMLocalizedString("Apply"), KMLocalizedString("Cancel")])
+            if returnCode == .alertFirstButtonReturn {
+                DispatchQueue.main.async {
+                    self?.saveAsPath()
+                }
+            }
         }
                 
         newMwcFlags.settingUpWindow = false
     }
     
+   private func saveAsPath() {
+        let saveAccessCtr = KMSavePanelAccessoryController()
+        var fileName = listView.document.documentURL.deletingPathExtension().lastPathComponent
+        fileName = String(format: "%@_%@.pdf", fileName, "Redact")
+        let outputSavePanel = NSSavePanel()
+        outputSavePanel.allowedFileTypes = ["pdf"]
+        outputSavePanel.nameFieldStringValue = fileName
+        outputSavePanel.accessoryView = saveAccessCtr.view
+        outputSavePanel.beginSheetModal(for: NSApp.mainWindow!) { result in
+            if result == .OK {
+                self.listView.document.applyRedactions()
+                self.showProgressWindow(message: KMLocalizedString("Save") + "PDF")
+                self.progressC?.maxValue = 3.0
+                self.progressC?.increment(by: 1.0)
+                let savePDFPath = outputSavePanel.url!.path
+                // 执行进度 [假进度]
+                self.progressC?.increment(by: 1.0)
+                self.progressC?.increment(by: 1.0)
+                let isSuccess = self.listView.document.write(toFile: savePDFPath)
+                if (isSuccess) {
+                    if (saveAccessCtr.openAutomaticButton.state == .on) {
+                        NSDocumentController.shared.km_safe_openDocument(withContentsOf: outputSavePanel.url!, display: true) { _, _, _ in
+                        }
+                    } else {
+                        let url = URL(fileURLWithPath: savePDFPath)
+                        NSWorkspace.shared.activateFileViewerSelecting([url])
+                    }
+                }
+                
+                self.hiddenProgressWindow()
+            }
+         }
+     }
     
     private func reloadDigitalSigns() {
         let signatures = listView.document.signatures()
@@ -584,6 +625,11 @@ struct KMNMWCFlags {
             //MARK: -Protect
             listView.toolMode = .CTextToolMode
             
+            /*
+             let properties = KMRedactPropertiesWindowController()
+             self.km_beginSheet(windowC: properties)
+             */
+
             if subToolMode == .Redact {
                  //密文
                 listView.annotationType = .redact
@@ -3955,20 +4001,17 @@ extension KMMainViewController: CPDFViewDelegate,CPDFListViewDelegate {
                 configWindowVC.window?.center()
                 NSApplication.shared.runModal(for: configWindowVC.window!)
             }
-        } else if anotation.isKind(of: CPDFChoiceWidgetAnnotation.self) {
-            if let choiceWidget = anotation as? CPDFChoiceWidgetAnnotation {
-                
-            }
-        } else if anotation.isKind(of: CPDFButtonWidgetAnnotation.self) {
-            if let buttonWidget = anotation as? CPDFButtonWidgetAnnotation {
-                let buttonWindowController = KMFormActionButtonPopWindowController(buttonWidget: buttonWidget, isEdit: false)
-                buttonWindowController.beginSheetModal(for: listView.window) {[weak self] result in
-                    buttonWidget.updateAppearanceStream()
-                    self?.listView.setNeedsDisplayAnnotationViewFor(buttonWidget.page)
-                    if result == 0 {
-                        self?.listView.remove(anotation)
+        } else if anotation.isKind(of: CPDFRedactAnnotation.self) {
+            if let redactAnnotation = anotation as? CPDFRedactAnnotation {
+                let properties = KMRedactPropertiesWindowController()
+                properties.readactAnnotation = redactAnnotation
+                self.km_beginSheet(windowC: properties)
+                properties.callback = { [weak self] annotation in
+                    if let page = annotation.page {
+                        self?.listView.setNeedsDisplayAnnotationViewFor(page)
                     }
                 }
+
             }
         }
     }

+ 69 - 5
PDF Office/PDF Master/KMClass/PDFListView/ViewController/KMNAlertTipViewController.swift

@@ -15,6 +15,8 @@ typealias EnterPasswordCallback = () -> ()
 
 typealias DigitalDetailsCallback = () -> ()
 
+typealias RedactApplyCallback = () -> ()
+
 @objc public enum CPromptDignSignaturesState: NSInteger {
     case failure = 0
     case Unknown = 1
@@ -29,18 +31,22 @@ class KMNAlertTipViewController: KMNBaseViewController {
     @IBOutlet var secureComponentAlert: ComponentAlert!
     //数字签名提示
     @IBOutlet var digitalComponentAlert: ComponentAlert!
+    //密文提示
+    @IBOutlet var redactComponentAlert: ComponentAlert!
     
     var type:CPromptDignSignaturesState = .failure
     
     var isShowFormAlert = true
     var isShowDigitalAlert = true
     var isShowSecureAlert = true
-    
+    var isShowRedactAlert = true
+
     weak var listView:CPDFListView?
     
     var formFieldHighlightCallback: FormFieldHighlightCallback?
     var enterPasswordCallback: EnterPasswordCallback?
     var digitalDetailsCallback: DigitalDetailsCallback?
+    var redactApplyCallback: RedactApplyCallback?
 
     override func viewDidLoad() {
         super.viewDidLoad()
@@ -73,6 +79,9 @@ class KMNAlertTipViewController: KMNBaseViewController {
         
         digitalComponentAlert.properties = ComponentAlertProperty(subTitle: KMLocalizedString("Signature is valid."),detailButtonString:nil)
         digitalComponentAlert.delegate = self
+        
+        redactComponentAlert.properties = ComponentAlertProperty(subTitle: KMLocalizedString("There are unapplied redactions in this file"),detailButtonString:KMLocalizedString("Apply"))
+        redactComponentAlert.delegate = self
     }
     
    public func reloadFormAlertUI() {
@@ -185,8 +194,8 @@ class KMNAlertTipViewController: KMNBaseViewController {
                     digitalComponentAlert.properties.iconImage = NSImage(named: "KMNImageNameSigntureVerifySuccess")
                     digitalComponentAlert.properties.subTitle = KMLocalizedString("Signature is valid.")
                 } else if(.Unknown == self.type) {
-                    digitalComponentAlert.properties.iconImage = NSImage(named: "KMNImageNameSigntureTrustedFailure")
                     digitalComponentAlert.properties.messageType = .warning
+                    digitalComponentAlert.properties.iconImage = NSImage(named: "KMNImageNameSigntureTrustedFailure")
 
                     if(signatures.count > 1) {
                         digitalComponentAlert.properties.subTitle = KMLocalizedString("At least one signature is invalid.")
@@ -214,10 +223,56 @@ class KMNAlertTipViewController: KMNBaseViewController {
             }
         }
     }
+    
+    public func reloadRedactAlertUI() {
+        if isShowRedactAlert == true {
+            var isContainsRedact = false
+            for i in 0..<(listView?.document?.pageCount ?? 0) {
+                guard i < listView?.document?.pageCount ?? 0 else { continue }
+                let page = listView?.document.page(at: i)
+                if let annotations = page?.annotations, !annotations.isEmpty {
+                    for annotation in annotations {
+                        if annotation is CPDFRedactAnnotation {
+                            isContainsRedact = true
+                            break
+                        }
+                    }
+                }
+                if isContainsRedact {
+                    break
+                }
+            }
+            if isContainsRedact {
+                if redactComponentAlert.superview == nil {
+                    redactComponentAlert.frame = CGRect(x: 0, y: 0, width: listView?.frame.width ?? 0, height: 32.0)
+                    redactComponentAlert.autoresizingMask = .width
+                    self.view.addSubview(redactComponentAlert)
+                }
+                redactComponentAlert.reloadData()
+            } else {
+                if redactComponentAlert.superview != nil {
+                    redactComponentAlert.removeFromSuperview()
+                }
+            }
+        } else {
+            if redactComponentAlert.superview != nil {
+                redactComponentAlert.removeFromSuperview()
+            }
+        }
+     }
 
     public func reloadAlertUIFrame() {
         var alertHeight = 0.0
+        
+        if digitalComponentAlert.superview != nil {
+            digitalComponentAlert.frame = CGRect(x: 0, y: alertHeight, width: listView?.frame.width ?? 0, height: 32.0)
+            alertHeight += 32.0
+        }
+        
         if formComponentAlert.superview != nil {
+            if alertHeight > 0 {
+                alertHeight += 1
+            }
             formComponentAlert.frame = CGRect(x: 0, y: alertHeight, width: listView?.frame.width ?? 0, height: 32.0)
             alertHeight += 32.0
         }
@@ -230,13 +285,14 @@ class KMNAlertTipViewController: KMNBaseViewController {
             alertHeight += 32.0
         }
         
-        if digitalComponentAlert.superview != nil {
+        if redactComponentAlert.superview != nil {
             if alertHeight > 0 {
                 alertHeight += 1
             }
-            digitalComponentAlert.frame = CGRect(x: 0, y: alertHeight, width: listView?.frame.width ?? 0, height: 32.0)
+            redactComponentAlert.frame = CGRect(x: 0, y: alertHeight, width: listView?.frame.width ?? 0, height: 32.0)
             alertHeight += 32.0
         }
+        
         if(alertHeight > 0) {
             var rect = self.view.frame
             rect.size.height = alertHeight
@@ -258,8 +314,8 @@ class KMNAlertTipViewController: KMNBaseViewController {
         reloadSecureAlertUI()
         reloadFormAlertUI()
         reloadDigitalAlertUI()
+        reloadRedactAlertUI()
         reloadAlertUIFrame()
-        
     }
 }
 
@@ -268,10 +324,16 @@ extension KMNAlertTipViewController: ComponentAlertDelegate {
      func componentAlertDidCloseButtonClick(inputView: ComponentAlert) {
          if inputView == formComponentAlert {
              isShowFormAlert = false
+             reloadFormAlertUI()
          } else if inputView == secureComponentAlert {
              isShowSecureAlert = false
+             reloadSecureAlertUI()
          } else if inputView == digitalComponentAlert {
              isShowDigitalAlert = false
+             reloadDigitalAlertUI()
+         } else if inputView == redactComponentAlert {
+             isShowRedactAlert = false
+             reloadRedactAlertUI()
          }
          
          reloadAlertUIFrame()
@@ -295,6 +357,8 @@ extension KMNAlertTipViewController: ComponentAlertDelegate {
                 enterPasswordCallback?()
             } else if inputView == digitalComponentAlert {
                 digitalDetailsCallback?()
+            } else if inputView == redactComponentAlert {
+                redactApplyCallback?()
             }
         }
     }

+ 6 - 0
PDF Office/PDF Master/KMClass/PDFListView/ViewController/KMNAlertTipViewController.xib

@@ -10,6 +10,7 @@
             <connections>
                 <outlet property="digitalComponentAlert" destination="tJq-OT-DnI" id="ZQr-RM-JDw"/>
                 <outlet property="formComponentAlert" destination="mRC-8x-Alh" id="Xil-cj-MUh"/>
+                <outlet property="redactComponentAlert" destination="o7v-dL-U67" id="Vnx-GT-JKg"/>
                 <outlet property="secureComponentAlert" destination="r3h-xZ-vuk" id="r09-ao-TwC"/>
                 <outlet property="view" destination="Hz6-mo-xeY" id="0bl-1N-x8E"/>
             </connections>
@@ -36,5 +37,10 @@
             <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
             <point key="canvasLocation" x="55" y="427"/>
         </customView>
+        <customView id="o7v-dL-U67" customClass="ComponentAlert" customModule="KMComponentLibrary">
+            <rect key="frame" x="0.0" y="0.0" width="350" height="90"/>
+            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+            <point key="canvasLocation" x="55" y="427"/>
+        </customView>
     </objects>
 </document>

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

@@ -966,12 +966,6 @@
 		9FD0FA4E29D43D6800F2AB0D /* KMDeviceBrowserWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9FD0FA4A29D43D6800F2AB0D /* KMDeviceBrowserWindowController.xib */; };
 		9FD0FA4F29D43D6800F2AB0D /* KMDeviceBrowserWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9FD0FA4A29D43D6800F2AB0D /* KMDeviceBrowserWindowController.xib */; };
 		9FD0FA5029D43D6800F2AB0D /* KMDeviceBrowserWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9FD0FA4A29D43D6800F2AB0D /* KMDeviceBrowserWindowController.xib */; };
-		9FDCD8162B6CC88000E22166 /* KMFormActionButtonPopWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FDCD8142B6CC88000E22166 /* KMFormActionButtonPopWindowController.swift */; };
-		9FDCD8172B6CC88000E22166 /* KMFormActionButtonPopWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FDCD8142B6CC88000E22166 /* KMFormActionButtonPopWindowController.swift */; };
-		9FDCD8182B6CC88000E22166 /* KMFormActionButtonPopWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FDCD8142B6CC88000E22166 /* KMFormActionButtonPopWindowController.swift */; };
-		9FDCD8192B6CC88000E22166 /* KMFormActionButtonPopWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9FDCD8152B6CC88000E22166 /* KMFormActionButtonPopWindowController.xib */; };
-		9FDCD81A2B6CC88000E22166 /* KMFormActionButtonPopWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9FDCD8152B6CC88000E22166 /* KMFormActionButtonPopWindowController.xib */; };
-		9FDCD81B2B6CC88000E22166 /* KMFormActionButtonPopWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9FDCD8152B6CC88000E22166 /* KMFormActionButtonPopWindowController.xib */; };
 		9FDD0F64294AB645000C4DAD /* KMMainViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FDD0F62294AB645000C4DAD /* KMMainViewController.swift */; };
 		9FDD0F65294AB645000C4DAD /* KMMainViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FDD0F62294AB645000C4DAD /* KMMainViewController.swift */; };
 		9FDD0F66294AB645000C4DAD /* KMMainViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FDD0F62294AB645000C4DAD /* KMMainViewController.swift */; };
@@ -5384,8 +5378,6 @@
 		9FD0D2AE2AD51BCC00DA3FF8 /* CPDFListEditAnnotationViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CPDFListEditAnnotationViewController.swift; sourceTree = "<group>"; };
 		9FD0FA4929D43D6800F2AB0D /* KMDeviceBrowserWindowController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMDeviceBrowserWindowController.swift; sourceTree = "<group>"; };
 		9FD0FA4A29D43D6800F2AB0D /* KMDeviceBrowserWindowController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KMDeviceBrowserWindowController.xib; sourceTree = "<group>"; };
-		9FDCD8142B6CC88000E22166 /* KMFormActionButtonPopWindowController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMFormActionButtonPopWindowController.swift; sourceTree = "<group>"; };
-		9FDCD8152B6CC88000E22166 /* KMFormActionButtonPopWindowController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KMFormActionButtonPopWindowController.xib; sourceTree = "<group>"; };
 		9FDD0F62294AB645000C4DAD /* KMMainViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMMainViewController.swift; sourceTree = "<group>"; };
 		9FDD0F63294AB645000C4DAD /* KMMainViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KMMainViewController.xib; sourceTree = "<group>"; };
 		9FDD0F6A294AD12C000C4DAD /* KMMainViewController+UI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "KMMainViewController+UI.swift"; sourceTree = "<group>"; };
@@ -8257,8 +8249,6 @@
 				9FF0D0572B6A43750018A732 /* KMPDFAnnotationButtonWidgetSub.swift */,
 				9FF0D05B2B6A4C210018A732 /* KMPDFAnnotationChoiceWidgetSub.swift */,
 				9FF0D05F2B6A5DCF0018A732 /* KMPDFAnnotationTextWidgetSub.swift */,
-				9FDCD8142B6CC88000E22166 /* KMFormActionButtonPopWindowController.swift */,
-				9FDCD8152B6CC88000E22166 /* KMFormActionButtonPopWindowController.xib */,
 			);
 			path = Form;
 			sourceTree = "<group>";
@@ -13649,7 +13639,6 @@
 				BB031B8A2C47BB090099F7AD /* KMUserFbDespItemView.xib in Resources */,
 				BBEB0DE32CE36B47004C67BF /* KMRightSideController.xib in Resources */,
 				BBE788C62CBD2463008086E2 /* SelectVC.xib in Resources */,
-				9FDCD8192B6CC88000E22166 /* KMFormActionButtonPopWindowController.xib in Resources */,
 				89316855296E45CA0073EA59 /* KMImageAccessoryController.xib in Resources */,
 				AD2432D32B89DFF800A119A9 /* KMFormAlertView.xib in Resources */,
 				BB451AAD2CF59F68003E1565 /* KMNoteController.xib in Resources */,
@@ -14600,7 +14589,6 @@
 				BB6EA2A42B70B8F2000D4490 /* KMConvertComparePayViewController.xib in Resources */,
 				BBD9223E2B50D6D600DB9585 /* rate_pic_star.pdf in Resources */,
 				BB19A7642CB7CFBC008204DC /* KMHomeQuickToolsView.xib in Resources */,
-				9FDCD81A2B6CC88000E22166 /* KMFormActionButtonPopWindowController.xib in Resources */,
 				BB6347B92AF224E200F5438E /* KMConvertCollectionViewHeader.xib in Resources */,
 				AD07BC922D02CBA90075054B /* KMBatchOperateCompressViewController.xib in Resources */,
 				BB5DA54E2BCFF4B300849E86 /* KMPageEditPopViewController.xib in Resources */,
@@ -14711,7 +14699,6 @@
 				BBB789B92BE8BF2400F7E09C /* AIChatDefaultTIpItem.xib in Resources */,
 				BB6B49B92D02D3F6003ECD26 /* KMTextSignatureView.xib in Resources */,
 				ADAFDA0F2AE8DD6600F084BC /* KMAdvertisementCollectionViewItem.xib in Resources */,
-				9FDCD81B2B6CC88000E22166 /* KMFormActionButtonPopWindowController.xib in Resources */,
 				AD2432D52B89DFF800A119A9 /* KMFormAlertView.xib in Resources */,
 				9F1F82E82934D5240092C4B4 /* KMHomeExtractActionViewController.xib in Resources */,
 				ADDF83612B391A5C00A81A4E /* DSignatureCertifyDetailViewController.xib in Resources */,
@@ -15730,7 +15717,6 @@
 				AD1CA4212A061D190070541F /* KMAnnotationScreenAuthorViewItem.swift in Sources */,
 				BB2F9AB82AFCC3AD00F9DD93 /* KMProfileInfo.swift in Sources */,
 				BBDF18042CD482D100ACDB15 /* KMWatermarkController.swift in Sources */,
-				9FDCD8162B6CC88000E22166 /* KMFormActionButtonPopWindowController.swift in Sources */,
 				ADFCEB752B4FC1660001EBAF /* KMAdsWebView.swift in Sources */,
 				AD055E252B70B3C10035F824 /* KMBookmarkController.swift in Sources */,
 				9F1F82DA292F84D60092C4B4 /* KMHomeInsertActionViewController.swift in Sources */,
@@ -17288,7 +17274,6 @@
 				BB90E4EF2AF3546500B04B9F /* NSUserDefaultsController+KMExtension.swift in Sources */,
 				ADDEEA7F2AD3FB1D00EF675D /* KMImageAccessoryController.swift in Sources */,
 				F3DB85F72CCA36F400D0AFDE /* KMNPageSizeTool.swift in Sources */,
-				9FDCD8172B6CC88000E22166 /* KMFormActionButtonPopWindowController.swift in Sources */,
 				BBB789AF2BE8BF2400F7E09C /* AIChatTranslateResultItem.swift in Sources */,
 				651675EA2CE3313500019A20 /* KMOutlineViewController.swift in Sources */,
 				BB7E59F72BBA427C0021E63D /* KMBrowserWindow.swift in Sources */,
@@ -18085,7 +18070,6 @@
 				BB1A916C2AFB7868005E5FD8 /* KMConvertWindowController.swift in Sources */,
 				9FCFEC7E2AC579F600EAD2CB /* CPDFListSignatureAnnotation.swift in Sources */,
 				BB8115FD29924A5F0008F536 /* KMSecureEncryptCheckCellView.swift in Sources */,
-				9FDCD8182B6CC88000E22166 /* KMFormActionButtonPopWindowController.swift in Sources */,
 				BB1B0AEE2B4FC6E900889528 /* KMGuideCoverView.swift in Sources */,
 				BB2C848A2BAE753F00AF6142 /* KMBotaTools.swift in Sources */,
 				BB9138492CEE08D400BAB4A7 /* KMCropCoverController.swift in Sources */,