123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205 |
- //
- // KMSystemToolMenu.swift
- // PDF Reader Pro
- //
- // Created by tangchao on 2023/12/26.
- //
- import Foundation
- @objc protocol KMSystemToolMenuProtocol: NSObjectProtocol {
- @objc optional func getInfo(_ sender: Any?)
- @objc optional func orderFrontNotesPanel(_ sender: Any?)
- @objc optional func orderFrontLineInspector(_ sender: Any?)
-
- @objc optional func menuItemAction_textTool(_ sender: Any)
- @objc func menuItemAction_scrolTool(_ sender: Any)
- @objc func menuItemAction_zoomOutTool(_ sender: Any)
- @objc func menuItemAction_selectTool(_ sender: Any)
- @objc optional func menuItemAction_redact(_ sender: Any)
- @objc optional func menuItemAction_warkmark(_ sender: Any)
- @objc optional func menuItemAction_background(_ sender: Any)
- @objc optional func menuItemAction_headerfooter(_ sender: Any)
- @objc optional func menuItemAction_bates(_ sender: Any)
- @objc optional func menuItemAction_batch(_ sender: Any)
-
- @objc optional func extractImage(_ sender: Any?)
-
- @objc optional func changeToolMode(_ sender: Any?)
-
- // convert
- @objc optional func convert(_ sender: Any?)
- @objc optional func imageToPDF(_ sender: Any?)
-
- // ocr
- @objc optional func ocr(_ sender: Any?)
-
- @objc optional func pageEdit(_ sender: Any?)
- @objc optional func textEditAction(_ sender: Any?)
-
- // Editor
- @objc optional func compression(_ sender: Any?)
- @objc optional func merge(_ sender: Any?)
- @objc optional func security(_ sender: Any?)
- @objc optional func decryption(_ sender: Any?)
-
- // crop
- @objc optional func cropAll(_ sender: Any?)
- @objc optional func crop(_ sender: Any?)
- @objc optional func autoCropAll(_ sender: Any?)
- @objc optional func smartAutoCropAll(_ sender: Any?)
- @objc optional func cropOptionsModel(_ sender: Any?)
- @objc optional func selectToolModel(_ sender: Any?)
-
- // snapshot
- @objc optional func takeSnapshot(_ sender: Any?)
- @objc optional func takeSnapshotSelectContent(_ sender: Any?)
-
- @objc optional func addWatermark(_ sender: Any?)
- @objc optional func editWatermark(_ sender: Any?)
- @objc optional func batchAddWatermark(_ sender: Any?)
- @objc optional func batchRemoveWatermark(_ sender: Any?)
- @objc optional func removeWatermark(_ sender: Any?)
- @objc optional func templateWatermark(_ sender: Any?)
-
- @objc optional func addBackground(_ sender: Any?)
- @objc optional func removeBackground(_ sender: Any?)
- @objc optional func batchAddBackground(_ sender: Any?)
- @objc optional func batchRemoveBackground(_ sender: Any?)
- @objc optional func templateBackground(_ sender: Any?)
-
- @objc optional func addHeaderFooter(_ sender: Any?)
- @objc optional func removeHeaderFooter(_ sender: Any?)
- @objc optional func batchAddHeaderFooter(_ sender: Any?)
- @objc optional func batchRemoveHeaderFooter(_ sender: Any?)
- @objc optional func templateHeaderFooter(_ sender: Any?)
-
- @objc optional func addHeaderFooterBates(_ sender: Any?)
- @objc optional func removeHeaderFooterBates(_ sender: Any?)
- @objc optional func batchAddBates(_ sender: Any?)
- @objc optional func batchRemoveBates(_ sender: Any?)
- @objc optional func templateBates(_ sender: Any?)
-
- @objc optional func togglePoster(_ sender: Any?)
- @objc optional func toggleMultiple(_ sender: Any?)
- @objc optional func toggleBooklet(_ sender: Any?)
-
- @objc optional func rotateRight(_ sender: Any?)
- @objc optional func rotateLeft(_ sender: Any?)
- @objc optional func rotateAllRight(_ sender: Any?)
- @objc optional func rotateAllLeft(_ sender: Any?)
-
- @objc optional func autoSelectContent(_ sender: Any?)
-
- }
- extension KMSystemMenu.Tool {
- public static let getInfoSelector = NSSelectorFromString("getInfo:")
- public static let orderFrontNotesPanelSelector = NSSelectorFromString("orderFrontNotesPanel:")
- public static let orderFrontLineInspectorSelector = NSSelectorFromString("orderFrontLineInspector:")
-
- public static let textToolSelector = NSSelectorFromString("menuItemAction_textTool:")
- public static let scrolToolSelector = NSSelectorFromString("menuItemAction_scrolTool:")
- public static let zoomToolSelector = NSSelectorFromString("menuItemAction_zoomOutTool:")
- public static let selectToolSelector = NSSelectorFromString("menuItemAction_selectTool:")
- public static let redactSelector = NSSelectorFromString("menuItemAction_redact:")
- public static let warkmarkSelector = NSSelectorFromString("menuItemAction_warkmark:")
- public static let backgroundSelector = NSSelectorFromString("menuItemAction_background:")
- public static let headerfooterSelector = NSSelectorFromString("menuItemAction_headerfooter:")
- public static let batesSelector = NSSelectorFromString("menuItemAction_bates:")
- public static let batchSelector = NSSelectorFromString("menuItemAction_batch:")
-
- public static let extractImageSelector = NSSelectorFromString("extractImage:")
-
- public static let changeAnnotationModeSelector = NSSelectorFromString("changeAnnotationMode:")
-
- public static let changeToolModeSelector = NSSelectorFromString("changeToolMode:")
-
- // convert
- public static let convertSelector = NSSelectorFromString("convert:")
- public static let imageToPDFSelector = NSSelectorFromString("imageToPDF:")
-
- // ocr
- public static let ocrSelector = NSSelectorFromString("ocr:")
-
- public static let pageEditSelector = NSSelectorFromString("pageEdit:")
- public static let textEditSelector = NSSelectorFromString("textEditAction:")
-
- // Editor
- public static let compressSelector = NSSelectorFromString("compression:")
- public static let mergeSelector = NSSelectorFromString("merge:")
- public static let securitySelector = NSSelectorFromString("security:")
- public static let decryptionSelector = NSSelectorFromString("decryption:")
-
- // crop
- public static let cropAllSelector = NSSelectorFromString("cropAll:")
- public static let cropSelector = NSSelectorFromString("crop:")
- public static let autoCropAllSelector = NSSelectorFromString("autoCropAll:")
- public static let smartAutoCropAllSelector = NSSelectorFromString("smartAutoCropAll:")
- public static let cropOptionsSelector = NSSelectorFromString("cropOptionsModel:")
- public static let selectToolModelSelector = NSSelectorFromString("selectToolModel:")
-
- // snapshot
- public static let takeSnapshotSelector = NSSelectorFromString("takeSnapshot:")
- public static let takeSnapshotSelectContentSelector = NSSelectorFromString("takeSnapshotSelectContent:")
-
- public static let addWatermarkSelector = NSSelectorFromString("addWatermark:")
- public static let editWatermarkSelector = NSSelectorFromString("editWatermark:")
- public static let batchAddWatermarkSelector = NSSelectorFromString("batchAddWatermark:")
- public static let batchRemoveWatermarkSelector = NSSelectorFromString("batchRemoveWatermark:")
- public static let removeWatermarkSelector = NSSelectorFromString("removeWatermark:")
- public static let templateWatermarkSelector = NSSelectorFromString("templateWatermark:")
-
- // @objc optional func addBackground(_ sender: Any?)
- // @objc optional func removeBackground(_ sender: Any?)
- // @objc optional func batchAddBackground(_ sender: Any?)
- // @objc optional func batchRemoveBackground(_ sender: Any?)
- // @objc optional func templateBackground(_ sender: Any?)
- //
- // @objc optional func addHeaderFooter(_ sender: Any?)
- // @objc optional func removeHeaderFooter(_ sender: Any?)
- // @objc optional func batchAddHeaderFooter(_ sender: Any?)
- // @objc optional func batchRemoveHeaderFooter(_ sender: Any?)
- // @objc optional func templateHeaderFooter(_ sender: Any?)
- //
- // @objc optional func addHeaderFooterBates(_ sender: Any?)
- // @objc optional func removeHeaderFooterBates(_ sender: Any?)
- // @objc optional func batchAddBates(_ sender: Any?)
- // @objc optional func batchRemoveBates(_ sender: Any?)
- // @objc optional func templateBates(_ sender: Any?)
-
-
- public static let togglePosterSelector = NSSelectorFromString("togglePoster:")
- public static let toggleMultipleSelector = NSSelectorFromString("toggleMultiple:")
- public static let toggleBookletSelector = NSSelectorFromString("toggleBooklet:")
-
- // rotate
- public static let rotateRightSelector = NSSelectorFromString("rotateRight:")
- public static let rotateLeftSelector = NSSelectorFromString("rotateLeft:")
- public static let rotateAllRightSelector = NSSelectorFromString("rotateAllRight:")
- public static let rotateAllLeftSelector = NSSelectorFromString("rotateAllLeft:")
-
- public static let autoSelectContentSelector = NSSelectorFromString("autoSelectContent:")
-
- public static func actions() -> [Selector] {
- return [self.getInfoSelector ,self.orderFrontNotesPanelSelector, self.orderFrontLineInspectorSelector,
- self.textToolSelector, self.scrolToolSelector, self.zoomToolSelector, self.selectToolSelector,
- self.redactSelector, self.warkmarkSelector, self.backgroundSelector, self.headerfooterSelector,
- self.batesSelector, self.batchSelector,
- self.extractImageSelector, self.changeAnnotationModeSelector, self.changeToolModeSelector,
- // convert
- self.convertSelector, self.imageToPDFSelector,
- self.ocrSelector, self.pageEditSelector, self.textEditSelector,
- // Editor
- self.compressSelector, self.mergeSelector, self.securitySelector, self.decryptionSelector,
- // crop
- self.cropAllSelector, self.cropSelector, self.autoCropAllSelector, self.smartAutoCropAllSelector, self.cropOptionsSelector, self.selectToolModelSelector,
- // snapshot
- self.takeSnapshotSelector, self.takeSnapshotSelectContentSelector,
- self.togglePosterSelector, self.toggleMultipleSelector, self.toggleBookletSelector,
- // rotate
- self.rotateRightSelector, self.rotateLeftSelector, self.rotateAllLeftSelector, self.rotateAllRightSelector,
- self.autoSelectContentSelector
- ]
- }
- }
|