123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- //
- // KMSystemMenu.swift
- // PDF Reader Pro
- //
- // Created by tangchao on 2023/4/24.
- //
- import Cocoa
- class KMSystemMenu: NSObject {
- public struct File {
-
- }
- public struct Edit {
-
- }
- public struct View {
-
- }
- public struct Annotation {
- }
- public struct PDF {
-
- }
- public struct Goto {
-
- }
- public struct Tool {
-
- }
- public struct Window {
-
- }
-
- public static func isFileSelector(sel: Selector) -> Bool {
- return KMSystemMenu.File.actions().contains(sel)
- }
- public static func isEditSelector(sel: Selector) -> Bool {
- return KMSystemMenu.Edit.actions().contains(sel)
- }
- public static func isViewSelector(sel: Selector) -> Bool {
- return KMSystemMenu.View.actions().contains(sel)
- }
- public static func isAnnotationSelector(sel: Selector) -> Bool {
- return KMSystemMenu.Annotation.actions().contains(sel)
- }
- public static func isPDFSelector(sel: Selector) -> Bool {
- return KMSystemMenu.PDF.actions().contains(sel)
- }
- public static func isGotoSelector(sel: Selector) -> Bool {
- return KMSystemMenu.Goto.actions().contains(sel)
- }
- public static func isToolSelector(sel: Selector) -> Bool {
- return KMSystemMenu.Tool.actions().contains(sel)
- }
- public static func isWindowSelector(sel: Selector) -> Bool {
- return KMSystemMenu.Window.actions().contains(sel)
- }
- }
|