ソースを参照

【2025】【综合】代码整理

niehaoyu 2 ヶ月 前
コミット
3f2ba66f9b

+ 0 - 47
PDF Office/PDF Master/Class/PDFWindowController/Toolbar/KMPopMenuButtonCell.swift

@@ -1,47 +0,0 @@
-//
-//  KMPopMenuButtonCell.swift
-//  PDF Reader Pro
-//
-//  Created by wanjun on 2023/10/7.
-//
-
-import Cocoa
-
-class KMPopMenuButtonCell: NSButtonCell {
-
-    override func titleRect(forBounds rect: NSRect) -> NSRect {
-        var rect1 = super.titleRect(forBounds: rect)
-        if ((self.image?.size.width) != nil) {
-            return NSMakeRect(21 + 5 + (self.image?.size.width)!, rect1.origin.y, self.attributedTitle.size().width, self.attributedTitle.size().height)
-        } else {
-            return NSMakeRect(21 + 5, rect1.origin.y, self.attributedTitle.size().width, self.attributedTitle.size().height)
-        }
-    }
-    
-    override func drawTitle(_ title: NSAttributedString, withFrame frame: NSRect, in controlView: NSView) -> NSRect {
-        if !isEnabled {
-            var txtColor = NSColor(red: 0, green: 0, blue: 0, alpha: 0.8)
-            
-            if #available(macOS 10.14, *) {
-                if let appearanceName = NSApp.effectiveAppearance.bestMatch(from: [.aqua, .darkAqua]) {
-                    if appearanceName == .darkAqua {
-                        txtColor = NSColor(white: 1.0, alpha: 0.5)
-                        let myAttr = NSMutableAttributedString(attributedString: title)
-                        myAttr.addAttribute(.foregroundColor, value: txtColor, range: NSRange(location: 0, length: myAttr.length))
-                        return super.drawTitle(myAttr, withFrame: frame, in: controlView)
-                    }
-                }
-            }
-        }
-        return super.drawTitle(title, withFrame: frame, in: controlView)
-    }
-    
-    override func imageRect(forBounds rect: NSRect) -> NSRect {
-        if let image = self.image {
-            var imageRect = super.imageRect(forBounds: rect)
-            imageRect.origin.x = 21
-            return imageRect
-        }
-        return NSRect.zero
-    }
-}

+ 0 - 401
PDF Office/PDF Master/Class/PDFWindowController/Toolbar/KMToolbarCustomViewController.swift

@@ -1,401 +0,0 @@
-//
-//  KMToolbarCustomViewController.swift
-//  PDF Reader Pro
-//
-//  Created by tangchao on 2023/10/26.
-//
-
-import Cocoa
-
-private let KMPasteboardTypeAllowedIndexSet: NSPasteboard.PasteboardType = NSPasteboard.PasteboardType(rawValue: "KMPasteboardTypeAllowedIndexSet")
-private let KMPasteboardTypeDefaultIndexSet: NSPasteboard.PasteboardType = NSPasteboard.PasteboardType(rawValue: "KMPasteboardTypeDefaultIndexSet")
-
-private let KMToolbarImageToPDFItemIdentifier = "KMToolbarImageToPDFItemIdentifier"
-private let KMToolbarRotateRightItemIdentifier = "KMToolbarRotateRightItemIdentifier"
-
-private let KMToolbarRotateLeftItemIdentifier = "KMToolbarRotateLeftItemIdentifier"
-private let KMToolbarPageBreaksItemIdentifier = "KMToolbarPageBreaksItemIdentifier"
-
-private let KMToolbarViewModeItemIdentifier = "KMToolbarViewModeItemIdentifier"
-private let KMToolbarDisplayModeItemIdentifier = "KMToolbarDisplayModeItemIdentifier"
-
-private let KMToolbarSpaceItemIdentifier = "KMToolbarSpaceItemIdentifier"
-//private let KMImageNameToolbarSpace = "KMImageNameToolbarSpace"
-private let KMToolbarFormAlignmentIdentifier = "KMToolbarFormAlignmentIdentifier"
-
-class KMToolbarCellView: NSTableCellView {
-    @IBOutlet weak var tickImageView: NSImageView!
-}
-
-class KMToolbarCustomViewController: NSViewController {
-    
-    @IBOutlet weak var titleLabel: NSTextField!
-    @IBOutlet weak var leftLabel: NSTextField!
-    @IBOutlet weak var rightLabel: NSTextField!
-    @IBOutlet weak var subTitleLabel: NSTextField!
-    
-    @IBOutlet weak var okButton: NSButton!
-    @IBOutlet weak var cancelButton: NSButton!
-    @IBOutlet weak var resetButton: NSButton!
-    @IBOutlet weak var addButton: NSButton!
-    @IBOutlet weak var removeButton: NSButton!
-    
-    @IBOutlet weak var allowedItemsTableView: NSTableView!
-    @IBOutlet weak var defaultItemsTableView: NSTableView!
-    
-    private var _allowedItems: [String] = []
-    private var _defaultItems: [String] = []
-    
-    weak var toolbar: KMToolbarView?
-    
-    var itemClick: KMCommonClickBlock?
-    
-    override func loadView() {
-        super.loadView()
-        
-        self.titleLabel.stringValue = KMLocalizedString("Customize Toolbar")
-        self.subTitleLabel.stringValue = String(format: "%@", KMLocalizedString("Drag-and-drop tools to change their order"))
-        self.leftLabel.stringValue = KMLocalizedString("Choose tools to add:")
-        self.rightLabel.stringValue = KMLocalizedString("Tools to show in Toolbar:")
-
-        self.okButton.title = KMLocalizedString("Done")
-        self.cancelButton.title = KMLocalizedString("Cancel")
-        self.resetButton.title = KMLocalizedString("Reset")
-        self.resetButton.toolTip = KMLocalizedString("Reset Toolbars")
-        
-        self.addButton.title = String(format: "%@  >>", KMLocalizedString("Add"))
-        self.addButton.toolTip = KMLocalizedString("Add to Toolbar")
-        
-        self.removeButton.title = String(format: "<<  %@", KMLocalizedString("Remove"))
-        self.removeButton.toolTip = KMLocalizedString("Remove from Toolbar")
-        
-        var color = NSColor(red: 51.0/255.0, green: 51.0/255.0, blue: 51.0/255.0, alpha: 1.0)
-        if (KMAppearance.isDarkMode()) {
-            color = NSColor(red: 1, green: 1, blue: 1, alpha: 0.5)
-        }
-        self.titleLabel.textColor = color
-        self.subTitleLabel.textColor = color
-        self.leftLabel.textColor = color
-        self.rightLabel.textColor = color
-        
-        self.addButton.wantsLayer = true
-        self.addButton.layer?.borderColor = NSColor(red: 153.0/255.0, green: 153.0/255.0, blue: 153.0/255.0, alpha: 1).cgColor
-        self.addButton.layer?.borderWidth = 1.0
-        self.addButton.layer?.cornerRadius = 4.0
-        self.removeButton.wantsLayer = true
-        self.removeButton.layer?.borderColor = NSColor(red: 153.0/255.0, green: 153.0/255.0, blue: 153.0/255.0, alpha: 1).cgColor
-        self.removeButton.layer?.borderWidth = 1.0
-        self.removeButton.layer?.cornerRadius = 4.0
-        
-        self.addButton.isEnabled = false
-        self.removeButton.isEnabled = false
-        
-        self.defaultItemsTableView.registerForDraggedTypes([KMPasteboardTypeAllowedIndexSet, KMPasteboardTypeDefaultIndexSet])
-
-        self._loadAllowedItems()
-        self._loadDefaultItems()
-    }
-    
-    override func viewDidLoad() {
-        super.viewDidLoad()
-        // Do view setup here.
-    }
-    
-    @IBAction @objc func okButtonAction(_ sender: NSButton) {
-        if self.toolbar?.toolbarIdentifier != nil && self._defaultItems.count > 0 {
-            if let data = self.toolbar?.toolbarIdentifier {
-                KMDataManager.ud_set(self._defaultItems, forKey: data)
-            }
-        }
-        self.itemClick?(1)
-        self.view.window?.close()
-    }
-    
-    @IBAction @objc func cancelButtonAction(_ sender: NSButton) {
-        self.itemClick?(0)
-        self.view.window?.close()
-    }
-    
-    @IBAction @objc func resetButtonAction(_ sender: NSButton) {
-        if let data = self.toolbar?.toolbarIdentifier {
-            KMDataManager.ud_removeObject(forKey: data)
-        }
-        
-        self._loadDefaultItems()
-        self.removeButton.isEnabled = true
-        self.allowedItemsTableView.reloadData()
-        self.defaultItemsTableView.reloadData()
-        
-        self.itemClick?(2)
-    }
-    
-    @IBAction @objc func addButtonAction(_ sender: NSButton) {
-        let selectedRowIndexes = self.allowedItemsTableView.selectedRowIndexes
-        if (selectedRowIndexes.count <= 0) {
-            return
-        }
-        var itemIdentifiers: [String] = []
-        for index in selectedRowIndexes {
-            itemIdentifiers.append(self._allowedItems[index])
-        }
-        if (itemIdentifiers.count > 0) {
-            var isAdded = false
-            for itemIdentifier in itemIdentifiers {
-                if self._defaultItems.contains(itemIdentifier) == false || itemIdentifier == KMToolbarSpaceItemIdentifier {
-                    self._defaultItems.append(itemIdentifier)
-                    isAdded = true
-                }
-            }
-            if (isAdded) {
-                self.allowedItemsTableView.reloadData()
-                self.defaultItemsTableView.reloadData()
-                self.defaultItemsTableView.scrollRowToVisible(self._defaultItems.count-1)
-                self.addButton.isEnabled = false
-                self.removeButton.isEnabled = true
-            } else {
-                
-            }
-        }
-    }
-    
-    @IBAction @objc func removeButtonAction(_ sender: NSButton) {
-        let selectedRowIndexes = self.defaultItemsTableView.selectedRowIndexes
-        if (selectedRowIndexes.count <= 0) {
-            return
-        }
-        for index in selectedRowIndexes.reversed() {
-            if index < self._defaultItems.count {
-                self._defaultItems.remove(at: index)
-            }
-            
-            if self._defaultItems.count <= 6 {
-                self.removeButton.isEnabled = false
-                break
-            }
-        }
-        
-        self.allowedItemsTableView.reloadData()
-        self.defaultItemsTableView.reloadData()
-        self.removeButton.isEnabled = false
-    }
-    
-    @objc func delete(_ sender: Any?) {
-        if self.defaultItemsTableView.isEqual(to: self.view.window?.firstResponder) {
-            self.removeButtonAction(self.removeButton)
-        }
-    }
-}
-
-extension KMToolbarCustomViewController: NSTableViewDelegate, NSTableViewDataSource {
-    func numberOfRows(in tableView: NSTableView) -> Int {
-        var rows = 0
-        if (self.allowedItemsTableView.isEqual(to: tableView)) {
-            rows = self._allowedItems.count
-        } else if (self.defaultItemsTableView.isEqual(to: tableView)) {
-            rows = self._defaultItems.count
-        }
-        return rows
-    }
-    
-    func tableView(_ tableView: NSTableView, viewFor tableColumn: NSTableColumn?, row: Int) -> NSView? {
-        var cellView: NSTableCellView?
-        var itemIdentifier: String?
-        if (self.allowedItemsTableView == tableView) {
-            cellView = tableView.makeView(withIdentifier: NSUserInterfaceItemIdentifier(rawValue: "KMAllowedItemsCell"), owner: self) as! NSTableCellView
-            itemIdentifier = self._allowedItems[row]
-        } else if (self.defaultItemsTableView == tableView) {
-            cellView = tableView.makeView(withIdentifier: NSUserInterfaceItemIdentifier(rawValue: "KMDefaultItemsCell"), owner: self) as! NSTableCellView
-            itemIdentifier = self._defaultItems[row]
-        }
-        if itemIdentifier == KMToolbarSpaceItemIdentifier || itemIdentifier == KMNewToolbarSpaceItemIdentifier {
-            cellView?.textField?.stringValue = KMLocalizedString("")
-            cellView?.imageView?.image = NSImage(named: KMImageNameToolbarSpace)
-        } else {
-            if let data = self.toolbar?.delegate?.toolbar?(self.toolbar!, itemFor: itemIdentifier!) {
-                if itemIdentifier == KMToolbarFormAlignmentIdentifier {
-                    cellView?.textField?.stringValue = KMLocalizedString("Alignment")
-                } else {
-                    cellView?.textField?.stringValue = data.titleName ?? ""
-                }
-                cellView?.imageView?.image = data.image
-            }
-        }
-        if let data = cellView?.isKind(of: KMToolbarCellView.self), data {
-            if self._defaultItems.contains(itemIdentifier!) && itemIdentifier != KMToolbarSpaceItemIdentifier {
-                (cellView as? KMToolbarCellView)?.tickImageView.image = NSImage(named: "KMImageNameToolbarSelected")
-            } else {
-                (cellView as? KMToolbarCellView)?.tickImageView.image = nil
-            }
-        }
-        return cellView;
-    }
-    
-    func tableView(_ tableView: NSTableView, shouldSelectRow row: Int) -> Bool {
-        if (self.allowedItemsTableView == tableView) {
-            let itemIdentifier = self._allowedItems[row]
-            if (self._defaultItems.contains(itemIdentifier) && itemIdentifier != KMToolbarSpaceItemIdentifier) {
-                return false
-            }
-        }
-        return true
-    }
-    
-    func tableViewSelectionDidChange(_ notification: Notification) {
-        self.allowedItemsTableView.delegate = nil
-        self.defaultItemsTableView.delegate = nil
-        let tableView = notification.object as? NSTableView
-        if (self.allowedItemsTableView == tableView) {
-            self.addButton.isEnabled = tableView!.selectedRowIndexes.count > 0 ? true : false
-            let set = NSIndexSet()
-            self.defaultItemsTableView.selectRowIndexes(set as IndexSet, byExtendingSelection: false)
-            self.removeButton.isEnabled = false
-        } else if (self.defaultItemsTableView == tableView) {
-            if self._defaultItems.count > 6 {
-                self.removeButton.isEnabled = tableView!.selectedRowIndexes.count > 0 ? true : false
-            } else {
-                self.removeButton.isEnabled = false
-            }
-            let set = NSIndexSet()
-            self.allowedItemsTableView.selectRowIndexes(set as IndexSet, byExtendingSelection: false)
-            self.addButton.isEnabled = false
-        }
-        self.allowedItemsTableView.delegate = self
-        self.defaultItemsTableView.delegate = self
-    }
-    
-    func tableView(_ tableView: NSTableView, writeRowsWith rowIndexes: IndexSet, to pboard: NSPasteboard) -> Bool {
-        let indexSetData = NSKeyedArchiver.archivedData(withRootObject: rowIndexes)
-        if (self.allowedItemsTableView == tableView) {
-            pboard.declareTypes([KMPasteboardTypeAllowedIndexSet], owner: self)
-            pboard.setData(indexSetData, forType: KMPasteboardTypeAllowedIndexSet)
-        } else if (self.defaultItemsTableView == tableView) {
-            pboard.declareTypes([KMPasteboardTypeDefaultIndexSet], owner: self)
-            pboard.setData(indexSetData, forType: KMPasteboardTypeDefaultIndexSet)
-        }
-        return true
-    }
-    
-    func tableView(_ tableView: NSTableView, validateDrop info: NSDraggingInfo, proposedRow row: Int, proposedDropOperation dropOperation: NSTableView.DropOperation) -> NSDragOperation {
-        if (self.defaultItemsTableView == tableView) {
-            if (dropOperation == .on) {
-                return NSDragOperation(rawValue: 0)
-            }
-            return .move
-        }
-        return NSDragOperation(rawValue: 0)
-    }
-    
-    func tableView(_ tableView: NSTableView, acceptDrop info: NSDraggingInfo, row: Int, dropOperation: NSTableView.DropOperation) -> Bool {
-        if (self.defaultItemsTableView == tableView) {
-            let pboard = info.draggingPasteboard
-            if pboard.availableType(from: [KMPasteboardTypeAllowedIndexSet]) != nil {
-                let rowData = pboard.data(forType: KMPasteboardTypeAllowedIndexSet)
-                let rowIndexes: IndexSet = NSKeyedUnarchiver.unarchiveObject(with: rowData!) as! IndexSet
-                var isAdded = false
-                for idx in rowIndexes.reversed() {
-                    let itemIdentifier = self._allowedItems[idx]
-                    if self._defaultItems.contains(itemIdentifier) == false || itemIdentifier == KMToolbarSpaceItemIdentifier {
-                        self._defaultItems.insert(itemIdentifier, at: row)
-                        isAdded = true
-                    }
-                }
-
-                if (isAdded) {
-                    self.allowedItemsTableView.reloadData()
-                    self.defaultItemsTableView.reloadData()
-                    return true
-                } else {
-                    
-                }
-            } else if pboard.availableType(from: [KMPasteboardTypeDefaultIndexSet]) != nil {
-                let rowData = pboard.data(forType: KMPasteboardTypeDefaultIndexSet)
-                let indexes: IndexSet = NSKeyedUnarchiver.unarchiveObject(with: rowData!) as! IndexSet
-                var items: [String] = []
-                for item in self._defaultItems {
-                    items.append(item)
-                }
-                
-                var moveItems: [String] = []
-                for index in indexes {
-                    moveItems.append(self._defaultItems[index])
-                }
-                
-                var index = 0
-                for index in indexes {
-                    self._defaultItems.remove(at: index)
-                }
-                var _row = row
-                if (_row > 0) {
-                    var item: String? = items[row-1]
-                    while (moveItems.contains(item ?? "")) {
-                        _row -= 1
-                        if (_row < 0) {
-                            item = nil
-                            break
-                        } else {
-                            item = items[_row]
-                        }
-                    }
-                    if (item != nil) {
-                        index = self._defaultItems.firstIndex(of: item!)!+1
-                    }
-                }
-                for i in 0 ..< moveItems.count {
-                    self._defaultItems.insert(moveItems[i], at: index+i)
-                }
-                self.allowedItemsTableView.reloadData()
-                self.defaultItemsTableView.reloadData()
-                return true
-            }
-        }
-        return false
-    }
-}
-
-extension KMToolbarCustomViewController: NSMenuItemValidation {
-    func validateMenuItem(_ menuItem: NSMenuItem) -> Bool {
-        if (menuItem.action == #selector(delete)) {
-            if (self.defaultItemsTableView != self.view.window!.firstResponder) {
-                return false
-            }
-        }
-        return true
-    }
-}
-
-// MARK: - Private Methods
-
-extension KMToolbarCustomViewController {
-    private func _loadAllowedItems() {
-        if let data = self.toolbar?.delegate?.toolbarAllowedItemIdentifiers?(self.toolbar!) {
-            self._allowedItems = data
-        }
-        
-        let itemArray = [KMToolbarImageToPDFItemIdentifier, KMToolbarRotateRightItemIdentifier, KMToolbarRotateLeftItemIdentifier, KMToolbarPageBreaksItemIdentifier, KMToolbarViewModeItemIdentifier, KMToolbarDisplayModeItemIdentifier, KMToolbarDividerItemIdentifier, KMToolbarShowToolbarItemIdentifier]
-        for itemStr in itemArray {
-            if (self._allowedItems.contains(itemStr)) {
-                self._allowedItems.removeObject(itemStr)
-            }
-        }
-    }
-
-    private func _loadDefaultItems() {
-        var itemIdentifiers: [String]? = self.toolbar?.toolbarIdentifier != nil ? (UserDefaults.standard.object(forKey: self.toolbar!.toolbarIdentifier!) as? [String]) : []
-        if itemIdentifiers == nil || itemIdentifiers!.count <= 0 {
-            if let items = self.toolbar?.delegate?.toolbarDefaultItemIdentifiers?(self.toolbar!) {
-                itemIdentifiers = items
-            }
-        }
-        
-        self._defaultItems.removeAll()
-        if (itemIdentifiers != nil) {
-            for itemI in itemIdentifiers! {
-                if itemI != KMToolbarDividerItemIdentifier {
-                    self._defaultItems.append(itemI)
-                }
-            }
-        } else {
-            self._defaultItems = []
-        }
-    }
-}

+ 0 - 358
PDF Office/PDF Master/Class/PDFWindowController/Toolbar/KMToolbarCustomViewController.xib

@@ -1,358 +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="KMToolbarCustomViewController">
-            <connections>
-                <outlet property="addButton" destination="bkC-VM-YPd" id="ura-jE-Cnb"/>
-                <outlet property="allowedItemsTableView" destination="FdJ-Fj-oML" id="j2g-x5-02f"/>
-                <outlet property="cancelButton" destination="fOg-Is-A3R" id="kFP-DB-5bk"/>
-                <outlet property="defaultItemsTableView" destination="ABU-lf-FEL" id="BQn-Ut-uru"/>
-                <outlet property="leftLabel" destination="f1D-Pb-iyF" id="2S2-eF-diO"/>
-                <outlet property="okButton" destination="JZu-O5-GoZ" id="NQd-Xw-QS4"/>
-                <outlet property="removeButton" destination="S3L-VY-gDi" id="LsF-KG-Ihz"/>
-                <outlet property="resetButton" destination="VEO-jz-lfH" id="xUa-Zr-Pfm"/>
-                <outlet property="rightLabel" destination="rVi-sQ-x2v" id="mr6-Th-fQ6"/>
-                <outlet property="subTitleLabel" destination="FBc-ch-2ME" id="RUE-Vd-eWl"/>
-                <outlet property="titleLabel" destination="lpU-dG-ZRi" id="76P-AH-dBD"/>
-                <outlet property="view" destination="Hz6-mo-xeY" id="0bl-1N-x8E"/>
-            </connections>
-        </customObject>
-        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
-        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
-        <customView id="Hz6-mo-xeY">
-            <rect key="frame" x="0.0" y="0.0" width="632" height="546"/>
-            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-            <subviews>
-                <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="JZu-O5-GoZ">
-                    <rect key="frame" x="513" y="13" width="94" height="32"/>
-                    <buttonCell key="cell" type="push" title="Done" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="rfx-u3-2x9">
-                        <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                        <font key="font" metaFont="system"/>
-                        <string key="keyEquivalent" base64-UTF8="YES">
-DQ
-</string>
-                    </buttonCell>
-                    <constraints>
-                        <constraint firstAttribute="width" constant="80" id="h2s-r9-6d8"/>
-                    </constraints>
-                    <connections>
-                        <action selector="okButtonAction:" target="-2" id="9tf-3v-g0t"/>
-                    </connections>
-                </button>
-                <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="fOg-Is-A3R">
-                    <rect key="frame" x="419" y="13" width="94" height="32"/>
-                    <buttonCell key="cell" type="push" title="Cancel" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="0x6-wB-v3u">
-                        <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" constant="80" id="1IZ-2V-dBT"/>
-                    </constraints>
-                    <connections>
-                        <action selector="cancelButtonAction:" target="-2" id="Ogb-1a-mak"/>
-                    </connections>
-                </button>
-                <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="VEO-jz-lfH">
-                    <rect key="frame" x="25" y="13" width="94" height="32"/>
-                    <buttonCell key="cell" type="push" title="Reset" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="bNS-W6-Syp">
-                        <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                        <font key="font" metaFont="system"/>
-                    </buttonCell>
-                    <constraints>
-                        <constraint firstAttribute="width" constant="80" id="wbC-5f-UKJ"/>
-                    </constraints>
-                    <connections>
-                        <action selector="resetButtonAction:" target="-2" id="NHV-fP-cgQ"/>
-                    </connections>
-                </button>
-                <scrollView autohidesScrollers="YES" horizontalLineScroll="38" horizontalPageScroll="10" verticalLineScroll="38" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="n2i-ID-avc">
-                    <rect key="frame" x="32" y="103" width="229" height="365"/>
-                    <clipView key="contentView" drawsBackground="NO" id="tYg-L5-HuW">
-                        <rect key="frame" x="1" y="1" width="227" height="363"/>
-                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                        <subviews>
-                            <tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" columnSelection="YES" autosaveColumns="NO" rowHeight="36" rowSizeStyle="automatic" viewBased="YES" id="FdJ-Fj-oML">
-                                <rect key="frame" x="0.0" y="0.0" width="227" height="363"/>
-                                <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                                <size key="intercellSpacing" width="3" height="2"/>
-                                <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
-                                <color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/>
-                                <tableColumns>
-                                    <tableColumn width="157" minWidth="40" maxWidth="1000" id="HMg-gy-4uB">
-                                        <tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border">
-                                            <color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
-                                            <color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/>
-                                        </tableHeaderCell>
-                                        <textFieldCell key="dataCell" lineBreakMode="truncatingTail" selectable="YES" editable="YES" title="Text Cell" id="6ct-I8-OFf">
-                                            <font key="font" metaFont="system"/>
-                                            <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
-                                            <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
-                                        </textFieldCell>
-                                        <tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
-                                        <prototypeCellViews>
-                                            <tableCellView identifier="KMAllowedItemsCell" id="u8k-Vq-Sh4" customClass="KMToolbarCellView" customModule="PDF_Reader_Pro" customModuleProvider="target">
-                                                <rect key="frame" x="1" y="1" width="166" height="36"/>
-                                                <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                                                <subviews>
-                                                    <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="UlQ-sL-b0L">
-                                                        <rect key="frame" x="8" y="8" width="20" height="20"/>
-                                                        <constraints>
-                                                            <constraint firstAttribute="height" constant="20" id="0kp-Kp-4Z2"/>
-                                                            <constraint firstAttribute="width" constant="20" id="dlo-Qq-Atd"/>
-                                                        </constraints>
-                                                        <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" id="ol3-6y-x6T"/>
-                                                    </imageView>
-                                                    <textField focusRingType="none" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="Dvo-uU-C7l">
-                                                        <rect key="frame" x="31" y="11" width="110" height="15"/>
-                                                        <textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" title="Table View Cell" id="odU-Fg-eBv">
-                                                            <font key="font" metaFont="cellTitle"/>
-                                                            <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
-                                                            <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
-                                                        </textFieldCell>
-                                                    </textField>
-                                                    <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="yMM-bR-gSP">
-                                                        <rect key="frame" x="144" y="11" width="14" height="14"/>
-                                                        <constraints>
-                                                            <constraint firstAttribute="height" constant="14" id="die-lI-6p0"/>
-                                                            <constraint firstAttribute="width" constant="14" id="hth-gj-lGP"/>
-                                                        </constraints>
-                                                        <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="ic_have" id="UZX-uW-L9B"/>
-                                                    </imageView>
-                                                </subviews>
-                                                <constraints>
-                                                    <constraint firstItem="yMM-bR-gSP" firstAttribute="leading" secondItem="Dvo-uU-C7l" secondAttribute="trailing" constant="5" id="PW0-nR-aVk"/>
-                                                    <constraint firstItem="yMM-bR-gSP" firstAttribute="centerY" secondItem="u8k-Vq-Sh4" secondAttribute="centerY" id="SMX-eR-vQh"/>
-                                                    <constraint firstItem="Dvo-uU-C7l" firstAttribute="leading" secondItem="UlQ-sL-b0L" secondAttribute="trailing" constant="5" id="Ud2-al-c5c"/>
-                                                    <constraint firstItem="UlQ-sL-b0L" firstAttribute="leading" secondItem="u8k-Vq-Sh4" secondAttribute="leading" constant="8" id="dOI-Lf-DTg"/>
-                                                    <constraint firstItem="Dvo-uU-C7l" firstAttribute="centerY" secondItem="u8k-Vq-Sh4" secondAttribute="centerY" id="m4B-3K-fOt"/>
-                                                    <constraint firstItem="UlQ-sL-b0L" firstAttribute="centerY" secondItem="u8k-Vq-Sh4" secondAttribute="centerY" id="pGU-g0-1rq"/>
-                                                    <constraint firstAttribute="trailing" secondItem="yMM-bR-gSP" secondAttribute="trailing" constant="8" id="vHp-7V-7Xs"/>
-                                                </constraints>
-                                                <connections>
-                                                    <outlet property="imageView" destination="UlQ-sL-b0L" id="aLb-T1-65t"/>
-                                                    <outlet property="textField" destination="Dvo-uU-C7l" id="Qlo-mk-yM0"/>
-                                                    <outlet property="tickImageView" destination="yMM-bR-gSP" id="z46-PJ-ZKJ"/>
-                                                </connections>
-                                            </tableCellView>
-                                        </prototypeCellViews>
-                                    </tableColumn>
-                                </tableColumns>
-                                <connections>
-                                    <outlet property="dataSource" destination="-2" id="0VP-YI-cEY"/>
-                                    <outlet property="delegate" destination="-2" id="2HG-0E-Euz"/>
-                                </connections>
-                            </tableView>
-                        </subviews>
-                        <nil key="backgroundColor"/>
-                    </clipView>
-                    <scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="6Mn-7M-jOy">
-                        <rect key="frame" x="1" y="261" width="203" height="16"/>
-                        <autoresizingMask key="autoresizingMask"/>
-                    </scroller>
-                    <scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="6lb-vU-nAU">
-                        <rect key="frame" x="224" y="17" width="15" height="102"/>
-                        <autoresizingMask key="autoresizingMask"/>
-                    </scroller>
-                </scrollView>
-                <scrollView autohidesScrollers="YES" horizontalLineScroll="38" horizontalPageScroll="10" verticalLineScroll="38" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="FCY-YF-hEJ">
-                    <rect key="frame" x="371" y="103" width="229" height="365"/>
-                    <clipView key="contentView" drawsBackground="NO" id="RDH-eA-U3m">
-                        <rect key="frame" x="1" y="1" width="227" height="363"/>
-                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                        <subviews>
-                            <tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" columnSelection="YES" autosaveColumns="NO" rowHeight="36" rowSizeStyle="automatic" viewBased="YES" id="ABU-lf-FEL">
-                                <rect key="frame" x="0.0" y="0.0" width="227" height="363"/>
-                                <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                                <size key="intercellSpacing" width="3" height="2"/>
-                                <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
-                                <color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/>
-                                <tableColumns>
-                                    <tableColumn width="157" minWidth="40" maxWidth="1000" id="qXF-na-3LA">
-                                        <tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border">
-                                            <color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
-                                            <color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/>
-                                        </tableHeaderCell>
-                                        <textFieldCell key="dataCell" lineBreakMode="truncatingTail" selectable="YES" editable="YES" title="Text Cell" id="3py-GG-ZFS">
-                                            <font key="font" metaFont="system"/>
-                                            <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
-                                            <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
-                                        </textFieldCell>
-                                        <tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
-                                        <prototypeCellViews>
-                                            <tableCellView identifier="KMDefaultItemsCell" id="08K-im-PCm">
-                                                <rect key="frame" x="1" y="1" width="166" height="36"/>
-                                                <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                                                <subviews>
-                                                    <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="VZL-c9-MbX">
-                                                        <rect key="frame" x="8" y="8" width="20" height="20"/>
-                                                        <constraints>
-                                                            <constraint firstAttribute="width" constant="20" id="Lk9-5S-bN3"/>
-                                                            <constraint firstAttribute="height" constant="20" id="eEu-JG-kYY"/>
-                                                        </constraints>
-                                                        <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" id="UwL-bD-Gm5"/>
-                                                    </imageView>
-                                                    <textField focusRingType="none" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="nNa-su-WPu">
-                                                        <rect key="frame" x="31" y="11" width="129" height="15"/>
-                                                        <textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" title="Table View Cell" id="Lej-Ie-YTM">
-                                                            <font key="font" metaFont="cellTitle"/>
-                                                            <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
-                                                            <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
-                                                        </textFieldCell>
-                                                    </textField>
-                                                </subviews>
-                                                <constraints>
-                                                    <constraint firstAttribute="trailing" secondItem="nNa-su-WPu" secondAttribute="trailing" constant="8" id="2OL-vi-icS"/>
-                                                    <constraint firstItem="nNa-su-WPu" firstAttribute="centerY" secondItem="08K-im-PCm" secondAttribute="centerY" id="830-8w-gYQ"/>
-                                                    <constraint firstItem="nNa-su-WPu" firstAttribute="leading" secondItem="VZL-c9-MbX" secondAttribute="trailing" constant="5" id="CtL-Ul-5Jj"/>
-                                                    <constraint firstItem="VZL-c9-MbX" firstAttribute="centerY" secondItem="08K-im-PCm" secondAttribute="centerY" id="PxO-jw-loT"/>
-                                                    <constraint firstItem="VZL-c9-MbX" firstAttribute="leading" secondItem="08K-im-PCm" secondAttribute="leading" constant="8" id="fnn-2D-vSV"/>
-                                                </constraints>
-                                                <connections>
-                                                    <outlet property="imageView" destination="VZL-c9-MbX" id="J4c-9Q-Seu"/>
-                                                    <outlet property="textField" destination="nNa-su-WPu" id="8FN-0k-mKC"/>
-                                                </connections>
-                                            </tableCellView>
-                                        </prototypeCellViews>
-                                    </tableColumn>
-                                </tableColumns>
-                                <connections>
-                                    <outlet property="dataSource" destination="-2" id="m6K-2l-vyv"/>
-                                    <outlet property="delegate" destination="-2" id="shg-4Q-Xvo"/>
-                                </connections>
-                            </tableView>
-                        </subviews>
-                        <nil key="backgroundColor"/>
-                    </clipView>
-                    <scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="C0w-YU-B9o">
-                        <rect key="frame" x="1" y="261" width="203" height="16"/>
-                        <autoresizingMask key="autoresizingMask"/>
-                    </scroller>
-                    <scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="J5N-Ha-WLc">
-                        <rect key="frame" x="224" y="17" width="15" height="102"/>
-                        <autoresizingMask key="autoresizingMask"/>
-                    </scroller>
-                </scrollView>
-                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="lpU-dG-ZRi">
-                    <rect key="frame" x="30" y="507" width="65" height="19"/>
-                    <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Custom" id="ejK-89-G5U">
-                        <font key="font" metaFont="systemBold" size="16"/>
-                        <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/>
-                        <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
-                    </textFieldCell>
-                </textField>
-                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="rVi-sQ-x2v">
-                    <rect key="frame" x="369" y="476" width="163" height="15"/>
-                    <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Options Currently Dispalyed" id="G51-Vy-5jr">
-                        <font key="font" metaFont="cellTitle"/>
-                        <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/>
-                        <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
-                    </textFieldCell>
-                </textField>
-                <button translatesAutoresizingMaskIntoConstraints="NO" id="bkC-VM-YPd">
-                    <rect key="frame" x="276" y="291" width="80" height="32"/>
-                    <buttonCell key="cell" type="square" title="Add  &gt;&gt;" bezelStyle="shadowlessSquare" alignment="center" imageScaling="proportionallyUpOrDown" inset="2" id="o0x-D0-sKR">
-                        <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                        <font key="font" metaFont="system"/>
-                    </buttonCell>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="32" id="XIj-w9-Jtq"/>
-                        <constraint firstAttribute="width" constant="80" id="gjT-bR-jWq"/>
-                    </constraints>
-                    <connections>
-                        <action selector="addButtonAction:" target="-2" id="Grg-ih-bAv"/>
-                    </connections>
-                </button>
-                <button translatesAutoresizingMaskIntoConstraints="NO" id="S3L-VY-gDi">
-                    <rect key="frame" x="276" y="249" width="80" height="32"/>
-                    <buttonCell key="cell" type="square" title="&lt;&lt; Remove" bezelStyle="shadowlessSquare" alignment="center" imageScaling="proportionallyUpOrDown" inset="2" id="9YJ-YG-LgS">
-                        <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                        <font key="font" metaFont="system"/>
-                    </buttonCell>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="32" id="HNl-Lx-qyz"/>
-                        <constraint firstAttribute="width" constant="80" id="bPA-5o-8W1"/>
-                    </constraints>
-                    <connections>
-                        <action selector="removeButtonAction:" target="-2" id="XAH-uT-0wt"/>
-                    </connections>
-                </button>
-                <box verticalHuggingPriority="750" boxType="separator" translatesAutoresizingMaskIntoConstraints="NO" id="Teh-6Q-kqh">
-                    <rect key="frame" x="32" y="58" width="568" height="5"/>
-                </box>
-                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="f1D-Pb-iyF">
-                    <rect key="frame" x="30" y="476" width="115" height="15"/>
-                    <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Choose Commands" id="HgT-hQ-cKy">
-                        <font key="font" metaFont="cellTitle"/>
-                        <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/>
-                        <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
-                    </textFieldCell>
-                </textField>
-                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="FBc-ch-2ME">
-                    <rect key="frame" x="393" y="67" width="180" height="30"/>
-                    <constraints>
-                        <constraint firstAttribute="width" constant="176" id="LR3-37-plu"/>
-                    </constraints>
-                    <textFieldCell key="cell" sendsActionOnEndEditing="YES" title="Drag-and-drop tools to change their order" id="JKk-71-bVk">
-                        <font key="font" metaFont="cellTitle"/>
-                        <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/>
-                        <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
-                    </textFieldCell>
-                </textField>
-                <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="5pR-Xn-Eok">
-                    <rect key="frame" x="376" y="75" width="14" height="14"/>
-                    <constraints>
-                        <constraint firstAttribute="width" constant="14" id="l8n-ym-Gdf"/>
-                        <constraint firstAttribute="height" constant="14" id="sQa-ad-HqK"/>
-                    </constraints>
-                    <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="KMImageNameToolbarAttention" id="ZTs-js-DjY"/>
-                </imageView>
-            </subviews>
-            <constraints>
-                <constraint firstItem="bkC-VM-YPd" firstAttribute="centerY" secondItem="n2i-ID-avc" secondAttribute="centerY" constant="-21" id="3lg-8W-ZAq"/>
-                <constraint firstItem="VEO-jz-lfH" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" constant="32" id="5RY-9w-OrC"/>
-                <constraint firstItem="bkC-VM-YPd" firstAttribute="centerX" secondItem="Hz6-mo-xeY" secondAttribute="centerX" id="5ir-zj-SNn"/>
-                <constraint firstItem="FCY-YF-hEJ" firstAttribute="top" secondItem="n2i-ID-avc" secondAttribute="top" id="7du-Zl-wm9"/>
-                <constraint firstAttribute="trailing" secondItem="Teh-6Q-kqh" secondAttribute="trailing" constant="32" id="A0x-cg-hCs"/>
-                <constraint firstItem="f1D-Pb-iyF" firstAttribute="top" secondItem="lpU-dG-ZRi" secondAttribute="bottom" constant="16" id="DXK-fg-dbv"/>
-                <constraint firstItem="FCY-YF-hEJ" firstAttribute="leading" secondItem="rVi-sQ-x2v" secondAttribute="leading" id="EhK-xd-4h3"/>
-                <constraint firstAttribute="bottom" secondItem="VEO-jz-lfH" secondAttribute="bottom" constant="20" id="H8o-vt-eEg"/>
-                <constraint firstItem="JZu-O5-GoZ" firstAttribute="centerY" secondItem="fOg-Is-A3R" secondAttribute="centerY" id="HO3-vq-K9D"/>
-                <constraint firstItem="FBc-ch-2ME" firstAttribute="top" secondItem="FCY-YF-hEJ" secondAttribute="bottom" constant="6" id="JKF-5e-AsK"/>
-                <constraint firstAttribute="trailing" secondItem="JZu-O5-GoZ" secondAttribute="trailing" constant="32" id="LKs-Ao-Bya"/>
-                <constraint firstItem="Teh-6Q-kqh" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" constant="32" id="Law-Lv-Afs"/>
-                <constraint firstItem="n2i-ID-avc" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" constant="32" id="NDd-Zq-S3K"/>
-                <constraint firstItem="JZu-O5-GoZ" firstAttribute="leading" secondItem="fOg-Is-A3R" secondAttribute="trailing" constant="14" id="Or8-ze-s31"/>
-                <constraint firstItem="VEO-jz-lfH" firstAttribute="top" secondItem="Teh-6Q-kqh" secondAttribute="bottom" constant="20" id="SIs-bM-pye"/>
-                <constraint firstItem="lpU-dG-ZRi" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" constant="32" id="T07-QQ-n1a"/>
-                <constraint firstItem="FCY-YF-hEJ" firstAttribute="width" secondItem="n2i-ID-avc" secondAttribute="width" id="Twv-MG-1EC"/>
-                <constraint firstItem="S3L-VY-gDi" firstAttribute="top" secondItem="bkC-VM-YPd" secondAttribute="bottom" constant="10" id="U3u-rb-O2o"/>
-                <constraint firstItem="FBc-ch-2ME" firstAttribute="centerY" secondItem="5pR-Xn-Eok" secondAttribute="centerY" id="e97-Nn-lP7"/>
-                <constraint firstItem="n2i-ID-avc" firstAttribute="width" secondItem="Hz6-mo-xeY" secondAttribute="width" multiplier="1:2" constant="-87" id="hGB-iw-Df1"/>
-                <constraint firstItem="Teh-6Q-kqh" firstAttribute="top" secondItem="FBc-ch-2ME" secondAttribute="bottom" constant="6" id="i92-il-NQw"/>
-                <constraint firstAttribute="bottom" secondItem="JZu-O5-GoZ" secondAttribute="bottom" constant="20" id="mky-N7-Gjo"/>
-                <constraint firstItem="S3L-VY-gDi" firstAttribute="centerX" secondItem="Hz6-mo-xeY" secondAttribute="centerX" id="oFT-sh-8LX"/>
-                <constraint firstItem="n2i-ID-avc" firstAttribute="top" secondItem="f1D-Pb-iyF" secondAttribute="bottom" constant="8" id="qLV-of-cO4"/>
-                <constraint firstItem="5pR-Xn-Eok" firstAttribute="leading" secondItem="FCY-YF-hEJ" secondAttribute="leading" constant="5" id="sD0-xs-zjJ"/>
-                <constraint firstAttribute="trailing" secondItem="FCY-YF-hEJ" secondAttribute="trailing" constant="32" id="tRc-0z-aHi"/>
-                <constraint firstItem="FCY-YF-hEJ" firstAttribute="bottom" secondItem="n2i-ID-avc" secondAttribute="bottom" id="uvY-KL-Jz4"/>
-                <constraint firstItem="FBc-ch-2ME" firstAttribute="leading" secondItem="5pR-Xn-Eok" secondAttribute="trailing" constant="5" id="wMk-iR-oX4"/>
-                <constraint firstItem="n2i-ID-avc" firstAttribute="leading" secondItem="f1D-Pb-iyF" secondAttribute="leading" id="wUi-F6-eKX"/>
-                <constraint firstItem="FCY-YF-hEJ" firstAttribute="top" secondItem="rVi-sQ-x2v" secondAttribute="bottom" constant="8" id="xPI-fz-ZOT"/>
-                <constraint firstItem="lpU-dG-ZRi" firstAttribute="top" secondItem="Hz6-mo-xeY" secondAttribute="top" constant="20" id="z5C-Um-97c"/>
-            </constraints>
-            <point key="canvasLocation" x="107" y="298"/>
-        </customView>
-    </objects>
-    <resources>
-        <image name="KMImageNameToolbarAttention" width="14" height="14"/>
-        <image name="ic_have" width="14" height="14"/>
-    </resources>
-</document>

+ 0 - 94
PDF Office/PDF Master/Class/PDFWindowController/Toolbar/View/KMPresentTableViewCell.swift

@@ -1,94 +0,0 @@
-//
-//  KMPresentTableViewCell.swift
-//  PDF Reader Pro
-//
-//  Created by liujiajie on 5/14/24.
-//
-
-import Cocoa
-
-
-@objc enum KMPresentTableViewCellType: Int {
-    case img = 0
-    case text
-}
-
-class KMPresentTableViewCell: NSTableCellView{
- 
-    var contentView: NSView?
-    var iv: NSImageView?
-    var label: NSTextField?
-    var type: KMPresentTableViewCellType?
-    
-    convenience init(type: KMPresentTableViewCellType) {
-        self.init()
-//        switch type {
-//        case .img:
-//            configuUIForImg()
-//        case .text:
-//            configuUIForText()
-//        default:
-//            break
-//        }
-        configuUi()
-        self.type = type
-    }
-//    convenience init() {
-//        self.init()
-//        configuUi()
-//    }
-    func configuUIForImg() {
-        self.iv = NSImageView(frame: .zero)
-        self.addSubview(self.iv!)
-        
-        self.iv?.mas_makeConstraints({ make in
-            make?.edges.equalTo()(self)
-//            make?.left.equalTo()(self)
-//            make?.top.equalTo()(self)?.offset()(12)
-//            make?.width.equalTo()(16)
-//            make?.height.equalTo()(16)
-        })
-    }
-    func configuUIForText() {
-        let tf = NSTextField(frame: .zero)
-        self.label = tf
-        self.label?.isBordered = false
-        self.label?.drawsBackground = true
-        self.label?.backgroundColor = NSColor.clear
-        self.label?.isEditable = false
-        self.addSubview(self.label!)
-        self.label?.mas_makeConstraints({ make in
-            make?.top.equalTo()(self)?.offset()(13)
-            make?.left.equalTo()(self)
-            
-        })
-        self.label?.textColor = KMAppearance.Layout.h0Color()
-        self.label?.font = NSFont.systemFont(ofSize: 12)
-    }
-    func configuUi() {
-        self.iv = NSImageView(frame: .zero)
-        self.addSubview(self.iv!)
-        self.iv?.mas_makeConstraints({ make in
-            make?.left.equalTo()(0)
-            make?.top.equalTo()(0)
-            make?.width.equalTo()(32)
-            make?.bottom.equalTo()(0)
-        })
-        let tf = NSTextField(frame: .zero)
-        self.label = tf
-        self.label?.isBordered = false
-        self.label?.drawsBackground = true
-        self.label?.backgroundColor = NSColor.clear
-        self.label?.isEditable = false
-        self.addSubview(self.label!)
-        self.label?.mas_makeConstraints({ make in
-//            make?.top.equalTo()(self)?.offset()(13)
-            make?.left.equalTo()(self.iv?.mas_right)
-            make?.right.equalTo()(self)
-            make?.centerY.equalTo()(self)
-        })
-        self.label?.textColor = KMAppearance.Layout.h0Color()
-        self.label?.font = NSFont.systemFont(ofSize: 12)
-        self.label?.maximumNumberOfLines = 1
-    }
-}

+ 0 - 129
PDF Office/PDF Master/KMClass/Tools/Category/AppKit/NSButton+DesignToken.swift

@@ -1,129 +0,0 @@
-//
-//  NSButton+DesignToken.swift
-//  PDF Reader Pro
-//
-//  Created by wanjun on 2023/3/9.
-//
-
-import Foundation
-
-extension NSButton {
-    func designToken(bgToken: String = "", textToken: String = "", heightConstraint: NSLayoutConstraint = NSLayoutConstraint(), state: KMDesignTokenState = .Norm) -> Void {
-        self.isBordered = false
-        self.wantsLayer = true
-
-        let designToken = KMDesignToken.shared
-        
-        var height: String?
-        var horizontalPadding: String?
-        var borderColor: NSColor?
-        var borderRadius: String?
-        var borderWidth: String?
-        var itemSpacing: String?
-        var fill: NSColor?
-        var textTypography: KMTypographyValue?
-        var textFill: NSColor?
-        
-        if bgToken != "" {
-            height = designToken.height(withToken: bgToken)
-            horizontalPadding = designToken.horizontalPadding(withToken: bgToken)
-            borderColor = designToken.border(withToken: bgToken)
-            borderRadius = designToken.borderRadius(withToken: bgToken)
-            borderWidth = designToken.borderWidth(withToken: bgToken)
-            itemSpacing = designToken.itemSpacing(withToken: bgToken)
-            fill = designToken.fill(withToken: bgToken)
-        }
-        if textToken != "" {
-            textTypography = designToken.typography(withToken: textToken)
-            textFill = designToken.fill(withToken: textToken)
-        }
-
-        if heightConstraint != nil {
-            if heightConstraint.shouldBeArchived {
-                heightConstraint.constant = height!.stringToCGFloat()
-            }
-        }
-        if itemSpacing != nil {}
-        if horizontalPadding != nil {}
-//        if textTypography != nil {
-//            var fontFamily: String = textTypography!.fontFamily
-//            let fontWeight: String = textTypography!.fontWeight
-//            if fontFamily.contains(" ") {
-//                fontFamily = fontFamily.replacingOccurrences(of: " ", with: "")
-//            }
-//            if fontWeight != "" {
-//                fontFamily = String(format: "%@-%@", fontFamily,fontWeight)
-//            }
-//            if state == .Norm {
-//                control.font = NSFont(name: fontFamily, size: textTypography!.fontSize.stringToCGFloat()) ?? NSFont.systemFont(ofSize: textTypography!.fontSize.stringToCGFloat())
-//                control.lineHeight = textTypography!.lineHeight.stringToCGFloat()
-//            } else if (state == .Hov) {
-//                control.font_hov = NSFont(name: fontFamily, size: textTypography!.fontSize.stringToCGFloat()) ?? NSFont.systemFont(ofSize: textTypography!.fontSize.stringToCGFloat())
-//                control.lineHeight_hov = textTypography!.lineHeight.stringToCGFloat()
-//            } else if (state == .Act) {
-//                control.font_act = NSFont(name: fontFamily, size: textTypography!.fontSize.stringToCGFloat()) ?? NSFont.systemFont(ofSize: textTypography!.fontSize.stringToCGFloat())
-//                control.lineHeight_act = textTypography!.lineHeight.stringToCGFloat()
-//            } else if (state == .Disabled) {
-//                control.font_disabled = NSFont(name: fontFamily, size: textTypography!.fontSize.stringToCGFloat()) ?? NSFont.systemFont(ofSize: textTypography!.fontSize.stringToCGFloat())
-//                control.lineHeight_disabled = textTypography!.lineHeight.stringToCGFloat()
-//            }
-//        }
-//        if fill != nil {
-//            if state == .Norm {
-//                control.background = fill!
-//            } else if (state == .Hov) {
-//                control.background_hov = fill!
-//            } else if (state == .Act) {
-//                control.background_act = fill!
-//            } else if (state == .Disabled) {
-//                control.background_disabled = fill!
-//            }
-//        }
-//        if textFill != nil {
-//            if state == .Norm {
-//                control.textColor = textFill!
-//            } else if (state == .Hov) {
-//                control.textColor_hov = textFill!
-//            } else if (state == .Act) {
-//                control.textColor_act = textFill!
-//            } else if (state == .Disabled) {
-//                control.textColor_disabled = textFill!
-//            }
-//        }
-//        if borderRadius != nil {
-//            if state == .Norm {
-//                control.cornerRadius =
-//                self.layer?.cornerRadius = borderRadius!.stringToCGFloat()
-//            } else if (state == .Hov) {
-//                control.cornerRadius_hov = Float(borderRadius!.stringToCGFloat())
-//            } else if (state == .Act) {
-//                control.cornerRadius_act = Float(borderRadius!.stringToCGFloat())
-//            } else if (state == .Disabled) {
-//                control.cornerRadius_disabled = Float(borderRadius!.stringToCGFloat())
-//            }
-//        }
-//        if borderWidth != nil {
-//            if state == .Norm {
-//                control.borderWidth = Float(borderWidth!.stringToCGFloat())
-//            } else if (state == .Hov) {
-//                control.borderWidth_hov = Float(borderWidth!.stringToCGFloat())
-//            } else if (state == .Act) {
-//                control.borderWidth_act = Float(borderWidth!.stringToCGFloat())
-//            } else if (state == .Disabled) {
-//                control.borderWidth_disabled = Float(borderWidth!.stringToCGFloat())
-//            }
-//        }
-//        if borderWidth != nil {
-//            if state == .Norm {
-//                control.borderColor = borderColor!
-//            } else if (state == .Hov) {
-//                control.borderColor_hov = borderColor!
-//            } else if (state == .Act) {
-//                control.borderColor_act = borderColor!
-//            } else if (state == .Disabled) {
-//                control.borderColor_disabled = borderColor!
-//            }
-//        }
-
-    }
-}