// // KMCommonEnum.swift // PDF Master // // Created by tangchao on 2023/3/14. // import Foundation @objc enum KMPDFDisplayType: Int { case singlePage = 0, singlePageContinuous case twoUp, twoUpContinuous case bookMode, bookContinuous case readModel, readContinuous } @objc enum KMRotateType: Int { case clockwise = 0 // 顺时针 case anticlockwise // 逆时针 } @objc enum KMZoomType: Int { case z_in = 0 // 缩小 case out // 放大 } @objc enum KMPDFZoomType: Int { case width = 0 case fit case actualSize // 实际大小 } @objc enum KMKeyEquivalent: UInt32 { case esc = 27 // case enter = UInt32("r") public static let enter = "\r" public func string() -> String { guard let value = Unicode.Scalar(self.rawValue) else { return "" } return String(value) } } @objc enum KMPageRange: Int { case all = 0 // 全部 case current // 奇数 case odd // 偶数 case even // 当前页 case custom // 自定义 case horizontal // 横向 case vertical // 纵向 } @objc enum KMItemKey: Int { case print = 0 // 打印 case delete case leftRotate case rightRotate case cut case paste } @objc enum KMSortMode: Int { case none = 0 // 无 case ascending // 升序 case descending // 降序 } @objc enum KMResult: Int { case cancel = 0 // 关闭 case ok // 确认 case success // 成功 case failure // 失败 }