CPDFListViewConfig.swift 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. //
  2. // CPDFListViewConfig.swift
  3. // PDF Reader Pro
  4. //
  5. // Created by wanjun on 2023/10/11.
  6. //
  7. import Cocoa
  8. @objcMembers
  9. class CPDFListViewConfig: NSObject {
  10. var _annotationBorderOffset: NSNumber = 5
  11. var _annotationBorderColor: NSColor = NSColor(red: 82.0/255.0, green: 102.0/255.0, blue: 204.0/255.0, alpha: 1)
  12. var _dragHoverColor: NSColor = NSColor(red: 23/255.0, green: 112/255.0, blue: 244/255.0, alpha: 1.0)
  13. var isSaveDefault: Bool = false
  14. var _isSquareFromPolygon: Bool = false
  15. var _polylineSelectIndex: Int = 0
  16. var _polygonSelectIndex: Int = 0
  17. static let defaultManager: CPDFListViewConfig = {
  18. let config = CPDFListViewConfig()
  19. return config
  20. }()
  21. //Get、Set
  22. var annotationBorderOffset: NSNumber {
  23. get {
  24. return _annotationBorderOffset
  25. }
  26. set {
  27. _annotationBorderOffset = newValue
  28. }
  29. }
  30. var annotationBorderColor: NSColor {
  31. get {
  32. return _annotationBorderColor
  33. }
  34. set {
  35. _annotationBorderColor = newValue
  36. }
  37. }
  38. var dragHoverColor: NSColor {
  39. get {
  40. return _dragHoverColor
  41. }
  42. set {
  43. _dragHoverColor = newValue
  44. }
  45. }
  46. var isSquareFromPolygon: Bool {
  47. get {
  48. return _isSquareFromPolygon
  49. }
  50. set {
  51. _isSquareFromPolygon = newValue
  52. }
  53. }
  54. var polylineSelectIndex: Int {
  55. get {
  56. return _polylineSelectIndex
  57. }
  58. set {
  59. _polylineSelectIndex = newValue
  60. }
  61. }
  62. var polygonSelectIndex: Int {
  63. get {
  64. return _polygonSelectIndex
  65. }
  66. set {
  67. _polygonSelectIndex = newValue
  68. }
  69. }
  70. }