KMCommonEnum.swift 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. //
  2. // KMCommonEnum.swift
  3. // Cisdem PDFMaster
  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 static let copy = "c"
  32. public static let cut = "x"
  33. public static let paste = "v"
  34. public func string() -> String {
  35. guard let value = Unicode.Scalar(self.rawValue) else {
  36. return ""
  37. }
  38. return String(value)
  39. }
  40. }
  41. @objc enum KMPageRange: Int {
  42. case all = 0 // 全部// 奇数
  43. case odd // 奇数
  44. case even // 偶数
  45. case custom // 自定义
  46. case current // 当前页
  47. case horizontal // 横向
  48. case vertical // 纵向
  49. }
  50. @objc enum KMItemKey: Int {
  51. case print = 0 // 打印
  52. case delete
  53. case leftRotate
  54. case rightRotate
  55. case cut
  56. case paste
  57. case pageEdit
  58. // 降级
  59. case demote
  60. // 升级
  61. case promote
  62. }
  63. @objc enum KMSortMode: Int {
  64. case none = 0 // 无
  65. case ascending // 升序
  66. case descending // 降序
  67. }
  68. @objc enum KMResult: Int {
  69. case cancel = 0 // 关闭
  70. case ok // 确认
  71. case success // 成功
  72. case failure // 失败
  73. }
  74. enum KMInsertPosition {
  75. case first
  76. case last
  77. case before
  78. case after
  79. }