KMCommonEnum.swift 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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. case horizontal // 横向
  45. case vertical // 纵向
  46. }
  47. @objc enum KMItemKey: Int {
  48. case print = 0 // 打印
  49. case delete
  50. case leftRotate
  51. case rightRotate
  52. case cut
  53. case paste
  54. }
  55. @objc enum KMSortMode: Int {
  56. case none = 0 // 无
  57. case ascending // 升序
  58. case descending // 降序
  59. }