KMCommonEnum.swift 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. //
  2. // KMCommonEnum.swift
  3. // PDF Master
  4. //
  5. // Created by tangchao on 2023/3/14.
  6. //
  7. import Foundation
  8. @objc enum KMPDFDisplayType: Int {
  9. case singlePage = 0, singlePageContinuous
  10. case twoUp, twoUpContinuous
  11. case bookMode, bookContinuous
  12. case readModel, readContinuous
  13. }
  14. @objc enum KMRotateType: Int {
  15. case clockwise = 0 // 顺时针
  16. case anticlockwise // 逆时针
  17. }
  18. @objc enum KMZoomType: Int {
  19. case z_in = 0 // 缩小
  20. case out // 放大
  21. }
  22. @objc enum KMPDFZoomType: Int {
  23. case width = 0
  24. case fit
  25. case actualSize // 实际大小
  26. }
  27. @objc enum KMKeyEquivalent: UInt32 {
  28. case esc = 27
  29. // case enter = UInt32("r")
  30. public static let enter = "\r"
  31. public func string() -> String {
  32. guard let value = Unicode.Scalar(self.rawValue) else {
  33. return ""
  34. }
  35. return String(value)
  36. }
  37. }
  38. @objc enum KMPageRange: Int {
  39. case all = 0 // 全部
  40. case current // 奇数
  41. case odd // 偶数
  42. case even // 当前页
  43. case custom // 自定义
  44. }
  45. @objc enum KMItemKey: Int {
  46. case print = 0 // 打印
  47. case delete
  48. case leftRotate
  49. case rightRotate
  50. case cut
  51. case paste
  52. }