// // KMSystemFileMenu.swift // PDF Reader Pro // // Created by tangchao on 2023/12/26. // import Foundation protocol KMSystemFileMenuProtocol { /// New func menuItemAction_newDocumentFromClipboard(_ sender: Any?) func menuItemAction_newDocumetFromImage(_ sender: Any?) func menuItemAction_importFromWebPage(_ sender: Any?) /// screenShot func menuItemAction_screenShotSelectArea(_ sender: Any?) func menuItemAction_screenShotWindow(_ sender: Any?) func menuItemAction_screenShotFullScreenDelay(_ sender: Any?) func menuItemAction_screenShotFullScreen(_ sender: Any?) func menuItemClick_saveAsFlattenedPDF(_ sender: Any) func menuItemClick_mergePDF(_ sender: Any) func menuItemClick_Compress(_ sender: Any) func menuItemClick_Convert(_ sender: Any) func menuItemAction_ConvertToWord(_ sender: Any) func menuItemAction_ConvertToExcel(_ sender: Any) func menuItemAction_ConvertToPPT(_ sender: Any) func menuItemAction_ConvertToRTF(_ sender: Any) func menuItemAction_ConvertToHTML(_ sender: Any) func menuItemAction_ConvertToText(_ sender: Any) func menuItemAction_ConvertToCSV(_ sender: Any) func menuItemAction_ConvertToImage(_ sender: Any) func menuItemClick_SettingPassword(_ sender: Any) func menuItemClick_RemovePassword(_ sender: Any) func menuItemAction_closeWindow(_ sender: Any) func menuItemAction_closeAllWindows(_ sender: Any) func menuItemAction_closeTagPage(_ sender: Any) func menuItemAction_showInFinder(_ sender: Any) func menuItemAction_property(_ sender: Any) func menuItemAction_print(_ sender: Any) func newDocumentFromClipboard(_ sender: Any?) func newDocumentFromImage(_ sender: Any?) func importFromWebPage(_ sender: Any?) func screenShot_SelectArea(_ sender: Any?) func screenShot_Window(_ sender: Any?) func screenShot_FullScreenDelay(_ sender: Any?) func screenShot_FullScreen(_ sender: Any?) } extension KMSystemFileMenuProtocol { func menuItemClick_Convert(_ sender: Any) {} func menuItemAction_newDocumentFromClipboard(_ sender: Any?) {} func menuItemAction_newDocumetFromImage(_ sender: Any?) {} func menuItemAction_importFromWebPage(_ sender: Any?) {} func menuItemAction_screenShotSelectArea(_ sender: Any?) {} func menuItemAction_screenShotWindow(_ sender: Any?) {} func menuItemAction_screenShotFullScreenDelay(_ sender: Any?) {} func menuItemAction_screenShotFullScreen(_ sender: Any?) {} func newDocumentFromClipboard(_ sender: Any?) {} func newDocumentFromImage(_ sender: Any?) {} func importFromWebPage(_ sender: Any?) {} func screenShot_SelectArea(_ sender: Any?) {} func screenShot_Window(_ sender: Any?) {} func screenShot_FullScreenDelay(_ sender: Any?) {} func screenShot_FullScreen(_ sender: Any?) {} } extension KMSystemMenu.File { public static let saveAsFlattenedPDFSelector = NSSelectorFromString("menuItemClick_saveAsFlattenedPDF:") public static let mergePDFSelector = NSSelectorFromString("menuItemClick_mergePDF:") public static let compressSelector = NSSelectorFromString("menuItemClick_Compress:") public static let convertSelector = NSSelectorFromString("menuItemClick_Convert:") public static let convertToWordSelector = NSSelectorFromString("menuItemAction_ConvertToWord:") public static let convertToExcelSelector = NSSelectorFromString("menuItemAction_ConvertToExcel:") public static let convertToPPTSelector = NSSelectorFromString("menuItemAction_ConvertToPPT:") public static let convertToRTFSelector = NSSelectorFromString("menuItemAction_ConvertToRTF:") public static let convertToHTMLSelector = NSSelectorFromString("menuItemAction_ConvertToHTML:") public static let convertToTextSelector = NSSelectorFromString("menuItemAction_ConvertToText:") public static let convertToCSVSelector = NSSelectorFromString("menuItemAction_ConvertToCSV:") public static let convertToImageSelector = NSSelectorFromString("menuItemAction_ConvertToImage:") public static let settingPasswordSelector = NSSelectorFromString("menuItemClick_SettingPassword:") public static let removePasswordSelector = NSSelectorFromString("menuItemClick_RemovePassword:") public static let closeWindowSelector = NSSelectorFromString("menuItemAction_closeWindow:") public static let closeAllWindowsSelector = NSSelectorFromString("menuItemAction_closeAllWindows:") public static let closeTagPageSelector = NSSelectorFromString("menuItemAction_closeTagPage:") public static let showInFinderSelector = NSSelectorFromString("menuItemAction_showInFinder:") public static let propertySelector = NSSelectorFromString("menuItemAction_property:") public static let printSelector = NSSelectorFromString("menuItemAction_print:") public static let newDocumentFromClipboardSelector = NSSelectorFromString("newDocumentFromClipboard:") public static let newDocumentFromImageSelector = NSSelectorFromString("newDocumentFromImage:") public static let importFromWebPageSelector = NSSelectorFromString("importFromWebPage:") public static let screenShotSelectAreaSelector = NSSelectorFromString("screenShot_SelectArea:") public static let screenShotWindowSelector = NSSelectorFromString("screenShot_Window:") public static let screenShotFullScreenDelaySelector = NSSelectorFromString("screenShot_FullScreenDelay:") public static let screenShotFullScreenSelector = NSSelectorFromString("screenShot_FullScreen:") public static func actions() -> [Selector] { return [self.saveAsFlattenedPDFSelector, self.mergePDFSelector, self.compressSelector, // convert self.convertSelector, self.convertToWordSelector, self.convertToExcelSelector, self.convertToPPTSelector, self.convertToRTFSelector, self.convertToHTMLSelector, self.convertToTextSelector, self.convertToCSVSelector, self.convertToImageSelector, // secure self.settingPasswordSelector, self.removePasswordSelector, // other self.closeWindowSelector, self.closeAllWindowsSelector, self.closeTagPageSelector, self.showInFinderSelector, self.propertySelector, self.printSelector, self.newDocumentFromClipboardSelector, self.newDocumentFromImageSelector, self.importFromWebPageSelector, self.screenShotSelectAreaSelector, self.screenShotWindowSelector, self.screenShotFullScreenDelaySelector, self.screenShotFullScreenSelector] } }