KMSystemGotoMenu.swift 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. //
  2. // KMSystemGotoMenu.swift
  3. // PDF Reader Pro
  4. //
  5. // Created by tangchao on 2023/12/26.
  6. //
  7. import Foundation
  8. protocol KMSystemGotoMenuProtocol {
  9. func menuItemAction_nextPage(_ sender: Any)
  10. func menuItemAction_forwardPage(_ sender: Any)
  11. func menuItemAction_firstPage(_ sender: Any)
  12. func menuItemAction_lastPage(_ sender: Any)
  13. func menuItemAction_forward(_ sender: Any)
  14. func menuItemAction_goback(_ sender: Any)
  15. func menuItemAction_gotoPage(_ sender: Any)
  16. func goToMarkedPage(_ sender: Any?)
  17. func markPage(_ sender: Any?)
  18. }
  19. extension KMSystemMenu.Goto {
  20. public static let nextPageSelector = NSSelectorFromString("menuItemAction_nextPage:")
  21. public static let forwardPageSelector = NSSelectorFromString("menuItemAction_forwardPage:")
  22. public static let firstPageSelector = NSSelectorFromString("menuItemAction_firstPage:")
  23. public static let lastPageSelector = NSSelectorFromString("menuItemAction_lastPage:")
  24. public static let forwardSelector = NSSelectorFromString("menuItemAction_forward:")
  25. public static let gobackSelector = NSSelectorFromString("menuItemAction_goback:")
  26. public static let gotoPageSelector = NSSelectorFromString("menuItemAction_gotoPage:")
  27. public static let goToMarkedPageSelector = NSSelectorFromString("goToMarkedPage:")
  28. public static let markPageSelector = NSSelectorFromString("markPage:")
  29. public static func actions() -> [Selector] {
  30. return [self.nextPageSelector, self.forwardPageSelector, self.firstPageSelector, self.lastPageSelector,
  31. self.forwardSelector, self.gobackSelector, self.gotoPageSelector,
  32. self.goToMarkedPageSelector, self.markPageSelector]
  33. }
  34. }