KMSystemWindowMenu.swift 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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. func performFit(_ sender: Any)
  15. }
  16. extension KMSystemWindowMenuRrotocol {
  17. func menuItemAction_currentWindowName(_ sender: Any) {}
  18. func performFit(_ sender: Any) {}
  19. }
  20. extension KMSystemMenu.Window {
  21. public static let showForwardTagPageSelector = NSSelectorFromString("menuItemAction_showForwardTagPage:")
  22. public static let showNextTagPageSelector = NSSelectorFromString("menuItemAction_showNextTagPage:")
  23. public static let newTagPageToNewWindowSelector = NSSelectorFromString("menuItemAction_newTagPageToNewWindow:")
  24. public static let mergeAllWindowSelector = NSSelectorFromString("menuItemAction_mergeAllWindow:")
  25. public static let currentWindowNameSelector = NSSelectorFromString("menuItemAction_currentWindowName:")
  26. public static let performFitSelector = NSSelectorFromString("performFit:")
  27. public static func actions() -> [Selector] {
  28. return [self.showForwardTagPageSelector, self.showNextTagPageSelector,
  29. self.newTagPageToNewWindowSelector, self.mergeAllWindowSelector, self.performFitSelector,
  30. self.currentWindowNameSelector]
  31. }
  32. }