1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- //
- // KMSystemEditMenu.swift
- // PDF Reader Pro
- //
- // Created by tangchao on 2023/12/26.
- //
- import Foundation
- @objc protocol KMSystemEditMenuProtocol {
- @objc optional func undo(_ sender: Any?)
- @objc optional func redo(_ sender: Any?)
-
- @objc optional func cut(_ sender: Any?)
- @objc optional func copy(_ sender: Any?)
- @objc optional func paste(_ sender: Any?)
- @objc optional func delete(_ sender: Any?)
-
- @objc optional func menuItemAction_find(_ sender: Any)
-
- @objc optional func changeFont(_ sender: Any?)
-
- }
- extension KMSystemMenu.Edit {
- public static let undoSelector = NSSelectorFromString("undo:")
- public static let redoSelector = NSSelectorFromString("redo:")
-
- public static let cutSelector = NSSelectorFromString("cut:")
- public static let copySelector = NSSelectorFromString("copy:")
- public static let pasteSelector = NSSelectorFromString("paste:")
- public static let deleteSelector = NSSelectorFromString("delete:")
-
- public static let findSelector = NSSelectorFromString("menuItemAction_find:")
-
- public static let changeFontSelector = NSSelectorFromString("changeFont:")
-
- public static func actions() -> [Selector] {
- return [self.undoSelector, self.redoSelector,
- self.cutSelector, self.copySelector, self.pasteSelector, self.deleteSelector,
- self.findSelector,
- self.changeFontSelector]
- }
- }
|