KMSystemGotoMenu.swift 1.4 KB

123456789101112131415161718192021222324252627282930313233
  1. //
  2. // KMSystemGotoMenu.swift
  3. // PDF Master
  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. }
  17. extension KMSystemMenu.Goto {
  18. public static let nextPageSelector = NSSelectorFromString("menuItemAction_nextPage:")
  19. public static let forwardPageSelector = NSSelectorFromString("menuItemAction_forwardPage:")
  20. public static let firstPageSelector = NSSelectorFromString("menuItemAction_firstPage:")
  21. public static let lastPageSelector = NSSelectorFromString("menuItemAction_lastPage:")
  22. public static let forwardSelector = NSSelectorFromString("menuItemAction_forward:")
  23. public static let gobackSelector = NSSelectorFromString("menuItemAction_goback:")
  24. public static let gotoPageSelector = NSSelectorFromString("menuItemAction_gotoPage:")
  25. public static func actions() -> [Selector] {
  26. return [self.nextPageSelector, self.forwardPageSelector, self.firstPageSelector, self.lastPageSelector,
  27. self.forwardSelector, self.gobackSelector, self.gotoPageSelector]
  28. }
  29. }