12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- //
- // KMSystemPDFMenu.swift
- // PDF Reader Pro
- //
- // Created by tangchao on 2024/1/8.
- //
- import Cocoa
- @objc protocol KMSystemPDFMenuProtocol: NSObjectProtocol {
- // PDF Display
- @objc optional func changeDisplayMode(_ sender: Any?)
- @objc optional func toggleDisplayAsBook(_ sender: Any?)
- @objc optional func toggleDisplayPageBreaks(_ sender: Any?)
- @objc optional func changeDisplayBox(_ sender: Any?)
-
- @objc optional func toggleAutoScale(_ sender: Any?)
- @objc optional func doZoomToActualSize(_ sender: Any?)
- @objc optional func doZoomToFit(_ sender: Any?)
- @objc optional func doZoomIn(_ sender: Any?)
- @objc optional func doZoomOut(_ sender: Any?)
- @objc optional func doMarqueeZoomTool(_ sender: Any?)
-
- @objc optional func highlightFormFiled(_ sender: Any?)
- @objc optional func highlightLinks(_ sender: Any?)
- @objc optional func resetForm(_ sender: Any?)
- @objc optional func removeAllAnnotation(_ sender: Any?)
-
- @objc optional func savePDFSettingToDefaults(_ sender: Any?)
- }
- extension KMSystemMenu.PDF {
-
- public static let changeDisplayModeSelector = NSSelectorFromString("changeDisplayMode:")
- public static let toggleDisplayAsBookSelector = NSSelectorFromString("toggleDisplayAsBook:")
- public static let toggleDisplayPageBreaksSelector = NSSelectorFromString("toggleDisplayPageBreaks:")
- public static let changeDisplayBoxSelector = NSSelectorFromString("changeDisplayBox:")
-
- public static let toggleAutoScaleSelector = NSSelectorFromString("toggleAutoScale:")
- public static let doZoomToActualSizeSelector = NSSelectorFromString("doZoomToActualSize:")
- public static let doZoomToFitSelector = NSSelectorFromString("doZoomToFit:")
- public static let doZoomInSelector = NSSelectorFromString("doZoomIn:")
- public static let doZoomOutSelector = NSSelectorFromString("doZoomOut:")
- public static let doMarqueeZoomToolSelector = NSSelectorFromString("doMarqueeZoomTool:")
-
- public static let highlightFormFiledSelector = NSSelectorFromString("highlightFormFiled:")
- public static let highlightLinksSelector = NSSelectorFromString("highlightLinks:")
-
- public static let resetFormSelector = NSSelectorFromString("resetForm:")
- public static let removeAllAnnotationSelector = NSSelectorFromString("removeAllAnnotation:")
-
- public static let savePDFSettingToDefaultsSelector = NSSelectorFromString("savePDFSettingToDefaults:")
-
- public static func actions() -> [Selector] {
- return [self.changeDisplayModeSelector, self.toggleDisplayAsBookSelector, self.toggleDisplayPageBreaksSelector, self.changeDisplayBoxSelector,
- self.toggleAutoScaleSelector, self.doZoomToActualSizeSelector, self.doZoomToFitSelector, self.doZoomInSelector, self.doZoomOutSelector, self.doMarqueeZoomToolSelector,
- self.highlightFormFiledSelector, self.highlightLinksSelector,
- self.resetFormSelector, self.removeAllAnnotationSelector,
- self.savePDFSettingToDefaultsSelector]
- }
- }
|