KMCommonEnum.swift 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. //
  2. // KMCommonEnum.swift
  3. // PDF Reader Pro
  4. //
  5. // Created by tangchao on 2023/3/14.
  6. //
  7. import Foundation
  8. @objc enum KMRotateType: Int {
  9. case clockwise = 0 // 顺时针
  10. case anticlockwise // 逆时针
  11. }
  12. @objc enum KMPDFZoomType: Int {
  13. case width = 0
  14. case fit //适应页面
  15. case actualSize // 实际大小
  16. case zoom_In
  17. case zoom_Out
  18. }
  19. @objc enum KMKeyEquivalent: UInt32 {
  20. case esc = 27
  21. // case enter = UInt32("r")
  22. public static let enter = "\r"
  23. public static let copy = "c"
  24. public static let cut = "x"
  25. public static let paste = "v"
  26. public func string() -> String {
  27. guard let value = Unicode.Scalar(self.rawValue) else {
  28. return ""
  29. }
  30. return String(value)
  31. }
  32. }
  33. @objc enum KMPageRange: Int {
  34. case all = 0 // 全部// 奇数
  35. case odd // 奇数
  36. case even // 偶数
  37. case custom // 自定义
  38. case current // 当前页
  39. case horizontal // 横向
  40. case vertical // 纵向
  41. }
  42. @objc enum KMItemKey: Int {
  43. case print = 0 // 打印
  44. case delete
  45. case leftRotate
  46. case rightRotate
  47. case cut
  48. case paste
  49. case pageEdit
  50. // 降级
  51. case demote
  52. // 升级
  53. case promote
  54. case tts
  55. }
  56. @objc enum KMSortMode: Int {
  57. case none = 0 // 无
  58. case ascending // 升序
  59. case descending // 降序
  60. }
  61. @objc enum KMResult: Int {
  62. case cancel = 0 // 关闭
  63. case ok // 确认
  64. case success // 成功
  65. case failure // 失败
  66. }
  67. enum KMInsertPosition {
  68. case first
  69. case last
  70. case before
  71. case after
  72. }
  73. @objc enum KMDesignTokenState : Int {
  74. case Norm = 0
  75. case Hov
  76. case Sel
  77. case Act
  78. case Disabled
  79. case Custom
  80. case None
  81. case Change
  82. case Focus
  83. case Error_def
  84. case Error_focus
  85. case Checked
  86. case Checked_dis
  87. }