KMMainModel.swift 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. //
  2. // KMMainModel.swift
  3. // PDF Reader Pro
  4. //
  5. // Created by tangchao on 2024/4/30.
  6. //
  7. import Cocoa
  8. extension KMMainModel.Key {
  9. static let kLeftSidePaneWidth = "leftSidePaneWidth"
  10. static let kRightSidePaneWidth = "rightSidePaneWidth"
  11. static let kSnapshots = "snapshots"
  12. static let kDisplaysPageBreaks = "displaysPageBreaks"
  13. static let kDisplaysAsBook = "displaysAsBook"
  14. static let kDisplayMode = "displayMode"
  15. static let kDisplayBox = "displayBox"
  16. static let kHasHorizontalScroller = "hasHorizontalScroller"
  17. static let kHasVerticalsCroller = "hasVerticalScroller"
  18. static let kAutoHidesScrollers = "autoHidesScrollers"
  19. static let kScaleFactor = "scaleFactor"
  20. static let kAutoScales = "autoScales"
  21. static let pageIndex = "pageIndex"
  22. static let scrollPoint = "scrollPoint"
  23. static let locked = "locked"
  24. }
  25. @objcMembers class KMMainModel: NSObject {
  26. struct Key {}
  27. // 标识 pdf 已编辑
  28. var isPDFDocumentEdited = false
  29. // 标识 pdf文字图片已编辑
  30. var isPDFTextImageEdited = false
  31. var password: String?
  32. var isShowQuickTour = false
  33. var isSaveKeyChain = true
  34. var rightMouseEventing = false
  35. var hasAddRedact: Bool = false
  36. var isShowBOTA: Bool = false
  37. let panelWidth = 212.0
  38. let defaultRightWidth = 260.0
  39. var lastLeftPanWidth = 0.0
  40. var lastRightPanWidth = 0.0
  41. var leftPanelOpen: Bool = false
  42. var rightPanelIsOpen = false
  43. var beforeMarkedPageIndex = NSNotFound
  44. var markedPageIndex = NSNotFound
  45. var beforeMarkedPagePoint = NSPoint.zero
  46. var markedPagePoint = NSPoint.zero
  47. var needConvertNotes = true
  48. var addAnnotations: [CPDFAnnotation] = []
  49. var removeAnnotations: [CPDFAnnotation] = []
  50. }