KMSystemWindowMenu.swift 1.4 KB

123456789101112131415161718192021222324252627282930313233
  1. //
  2. // KMSystemWindowMenu.swift
  3. // PDF Reader Pro
  4. //
  5. // Created by tangchao on 2023/12/26.
  6. //
  7. import Foundation
  8. protocol KMSystemWindowMenuRrotocol {
  9. func menuItemAction_showForwardTagPage(_ sender: Any)
  10. func menuItemAction_showNextTagPage(_ sender: Any)
  11. func menuItemAction_newTagPageToNewWindow(_ sender: Any)
  12. func menuItemAction_mergeAllWindow(_ sender: Any)
  13. func menuItemAction_currentWindowName(_ sender: Any)
  14. }
  15. extension KMSystemWindowMenuRrotocol {
  16. func menuItemAction_currentWindowName(_ sender: Any) {}
  17. }
  18. extension KMSystemMenu.Window {
  19. public static let showForwardTagPageSelector = NSSelectorFromString("menuItemAction_showForwardTagPage:")
  20. public static let showNextTagPageSelector = NSSelectorFromString("menuItemAction_showNextTagPage:")
  21. public static let newTagPageToNewWindowSelector = NSSelectorFromString("menuItemAction_newTagPageToNewWindow:")
  22. public static let mergeAllWindowSelector = NSSelectorFromString("menuItemAction_mergeAllWindow:")
  23. public static let currentWindowNameSelector = NSSelectorFromString("menuItemAction_currentWindowName:")
  24. public static func actions() -> [Selector] {
  25. return [self.showForwardTagPageSelector, self.showNextTagPageSelector,
  26. self.newTagPageToNewWindowSelector, self.mergeAllWindowSelector,
  27. self.currentWindowNameSelector]
  28. }
  29. }