瀏覽代碼

【2025】【PDFView】注释及未选中注释自测bug修改(内容编辑未做)

dinglingui 3 周之前
父節點
當前提交
94ca8b82e7

+ 4 - 0
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.h

@@ -231,6 +231,8 @@ enum {
 
 @property (nonatomic, readonly) BOOL isShowSplitBar;
 
+@property (nonatomic, readonly) BOOL isSyncSplitView;
+
 @property (nonatomic, strong) KMDrawView *presentationDrawView;
 
 - (CPDFAnnotation *)addAnnotationWithType:(CAnnotationType)annotationType selection:(CPDFSelection *)selection page:(CPDFPage *)page bounds:(NSRect)bounds;
@@ -400,6 +402,8 @@ enum {
 
 - (BOOL)PDFListViewSplitModeShowBar;
 
+- (BOOL)PDFListViewSyncSplitView;
+
 - (BOOL)PDFListViewShowTipView;
 
 - (void)PDFListViewAnnotationEditModeChange:(CPDFListView *)pdfListView forAnnotation:(CPDFAnnotation *)anotation;

+ 8 - 0
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.m

@@ -603,6 +603,14 @@ void CPDFListViewOCDrawLineHandles(CGContextRef context, CGRect rect, CGFloat ra
     return NO;
 }
 
+- (BOOL)isSyncSplitView {
+    if ([self.pdfListViewDelegate respondsToSelector:@selector(PDFListViewSyncSplitView)]) {
+        return [self.pdfListViewDelegate PDFListViewSyncSplitView];
+    }
+    
+    return NO;
+}
+
 - (void)setShowFormFieldName:(BOOL)showFormFieldName {
     _showFormFieldName = showFormFieldName;
     

+ 93 - 46
PDF Office/PDF Master/KMClass/KMPDFViewController/KMMainViewController.swift

@@ -1105,6 +1105,8 @@ struct KMNMWCFlags {
             updatePDFDisplaySettingView()
         }
         
+        UserDefaults.setDefaultBoolValue(true, toKey: CPDFViewIsReadModeKey)
+
         if infoSplitViewLeftConst.constant != 0 {
             infoSplitViewLeftConst.constant = 0
             
@@ -1153,6 +1155,8 @@ struct KMNMWCFlags {
             UserDefaults.setDefaultBoolValue(false, toKey: "ShowDisplayViewWhenExitPDFReadMode")
         }
         
+        UserDefaults.setDefaultBoolValue(false, toKey: CPDFViewIsReadModeKey)
+        
         if let index = UserDefaults.getDefaultIntValue(forKey: "viewManagerPdfSideBarTypeRawValue") {
             let type = KMPDFSidebarType(rawValue: index) ?? .none
             viewManager.pdfSideBarType = type
@@ -5902,7 +5906,7 @@ extension KMMainViewController: CPDFViewDelegate,CPDFListViewDelegate {
         var pagePoint = CGPoint.zero
         let point = self.view.convert(theEvent.locationInWindow, from: nil)
         
-        let isShowPopUI:Bool = !SettingsManager.sharedInstance.showQuickActionBar
+        let isShowPopUI:Bool = true
 
         if let page = pdfListView.pageAndPoint(&pagePoint, for: theEvent, nearest: false) {
             if view.window?.interactionMode == .presentation {
@@ -5921,10 +5925,17 @@ extension KMMainViewController: CPDFViewDelegate,CPDFListViewDelegate {
                     var isSameAnnotation = true
                     let firstAnnotation = activeAnnotations?.first
                     
+                    var isContainMark = false
+                    if firstAnnotation?.isKind(of: CPDFMarkupAnnotation.self) == true {
+                        isContainMark = true
+                    }
                     for i in 1..<(activeAnnotations?.count ?? 1) {
+                        //Form 注释不能用这个判断
                         if firstAnnotation?.type != activeAnnotations?[i].type {
                             isSameAnnotation = false
-                            break
+                        }
+                        if activeAnnotations?[i].isKind(of: CPDFMarkupAnnotation.self) == true {
+                            isContainMark = true
                         }
                     }
                     
@@ -5933,6 +5944,10 @@ extension KMMainViewController: CPDFViewDelegate,CPDFListViewDelegate {
                             menuStringArr.append(PDFViewMenuIdentifier_Normal_CopyText)
                             menuStringArr.append(PDFViewMenuIdentifier_Normal_Delete)
                             menuStringArr.append(PDFViewMenuIdentifier_Space)
+                            if(isShowPopUI){
+                                menuStringArr.append(PDFViewMenuIdentifier_Normal_ShowPopUI)
+                                menuStringArr.append(PDFViewMenuIdentifier_Space)
+                            }
                         } else if firstAnnotation?.isKind(of: CPDFRedactAnnotation.self) == true {
                             menuStringArr.append(PDFViewMenuIdentifier_Normal_Delete)
                             menuStringArr.append(PDFViewMenuIdentifier_Space)
@@ -5942,17 +5957,22 @@ extension KMMainViewController: CPDFViewDelegate,CPDFListViewDelegate {
                             menuStringArr.append(PDFViewMenuIdentifier_Normal_Copy)
                             menuStringArr.append(PDFViewMenuIdentifier_Normal_Cut)
                             menuStringArr.append(PDFViewMenuIdentifier_Normal_Delete)
-                            menuStringArr.append(PDFViewMenuIdentifier_Space)
-                        }
-                        
-                        if(isShowPopUI){
-                            menuStringArr.append(PDFViewMenuIdentifier_Normal_ShowPopUI)
-                            menuStringArr.append(PDFViewMenuIdentifier_Space)
+                            
+                            if firstAnnotation?.isKind(of: CPDFLinkAnnotation.self) == true {
+                                
+                            } else {
+                                if(isShowPopUI){
+                                    menuStringArr.append(PDFViewMenuIdentifier_Space)
+                                    menuStringArr.append(PDFViewMenuIdentifier_Normal_ShowPopUI)
+                                }
+                            }
+
                         }
-                        
+                                                
                         if firstAnnotation?.isKind(of: CPDFRedactAnnotation.self) == true {
                             
                         } else {
+                            menuStringArr.append(PDFViewMenuIdentifier_Space)
                             menuStringArr.append(PDFViewMenuIdentifier_Normal_SortAnnotation)
                         }
                         
@@ -5962,7 +5982,9 @@ extension KMMainViewController: CPDFViewDelegate,CPDFListViewDelegate {
                         }
                     } else {
                         menuStringArr.append(PDFViewMenuIdentifier_Normal_Copy)
-                        menuStringArr.append(PDFViewMenuIdentifier_Normal_Cut)
+                        if isContainMark == false {
+                            menuStringArr.append(PDFViewMenuIdentifier_Normal_Cut)
+                        }
                         menuStringArr.append(PDFViewMenuIdentifier_Normal_Delete)
                         menuStringArr.append(PDFViewMenuIdentifier_Space)
                         menuStringArr.append(PDFViewMenuIdentifier_Normal_SortAnnotation)
@@ -5971,16 +5993,20 @@ extension KMMainViewController: CPDFViewDelegate,CPDFListViewDelegate {
                         }
                     }
                 } else if activeAnnotations?.count == 1 {
-                    if pdfListView.activeAnnotation.isKind(of: CPDFMarkupAnnotation.self) {
+                    let activeAnnotation = pdfListView.activeAnnotation!
+                    if activeAnnotation.isKind(of: CPDFMarkupAnnotation.self) {
                         menuStringArr.append(PDFViewMenuIdentifier_Normal_CopyText)
                         menuStringArr.append(PDFViewMenuIdentifier_Normal_Delete)
+                        menuStringArr.append(PDFViewMenuIdentifier_Space)
+                        menuStringArr.append(PDFViewMenuIdentifier_Normal_Content)
                         if(isShowPopUI){
                             menuStringArr.append(PDFViewMenuIdentifier_Space)
                             menuStringArr.append(PDFViewMenuIdentifier_Normal_ShowPopUI)
                         }
+
                         menuStringArr.append(PDFViewMenuIdentifier_Space)
                         menuStringArr.append(PDFViewMenuIdentifier_Normal_SortAnnotation)
-                    } else if pdfListView.activeAnnotation.isKind(of: CPDFRedactAnnotation.self) {
+                    } else if activeAnnotation.isKind(of: CPDFRedactAnnotation.self) {
                         menuStringArr.append(PDFViewMenuIdentifier_Normal_Delete)
                         menuStringArr.append(PDFViewMenuIdentifier_Space)
                         menuStringArr.append(PDFViewMenuIdentifier_Redact_Apply)
@@ -5988,8 +6014,8 @@ extension KMMainViewController: CPDFViewDelegate,CPDFListViewDelegate {
                         menuStringArr.append(PDFViewMenuIdentifier_Space)
                         menuStringArr.append(PDFViewMenuIdentifier_Normal_RedactProperties)
                         menuStringArr.append(PDFViewMenuIdentifier_Redact_Default)
-                    } else if listView.activeAnnotation.isKind(of: CPDFLinkAnnotation.self) {
-                        let link = listView.activeAnnotation as? CPDFLinkAnnotation
+                    } else if activeAnnotation.isKind(of: CPDFLinkAnnotation.self) {
+                        let link = activeAnnotation as? CPDFLinkAnnotation
                         menuStringArr.append(PDFViewMenuIdentifier_Normal_Copy)
                         menuStringArr.append(PDFViewMenuIdentifier_Normal_Cut)
                         menuStringArr.append(PDFViewMenuIdentifier_Normal_Delete)
@@ -5997,24 +6023,23 @@ extension KMMainViewController: CPDFViewDelegate,CPDFListViewDelegate {
                             menuStringArr.append(PDFViewMenuIdentifier_Space)
                             menuStringArr.append(PDFViewMenuIdentifier_Normal_ShowPopUI)
                         }
-                    } else if pdfListView.activeAnnotation.isKind(of: CPDFWidgetAnnotation.self) {
-                        menuStringArr.append(PDFViewMenuIdentifier_Normal_Copy)
-                        menuStringArr.append(PDFViewMenuIdentifier_Normal_Cut)
-                        menuStringArr.append(PDFViewMenuIdentifier_Normal_Delete)
-                        menuStringArr.append(PDFViewMenuIdentifier_Space)
-                        if(isShowPopUI){
-                            menuStringArr.append(PDFViewMenuIdentifier_Normal_ShowPopUI)
-                            menuStringArr.append(PDFViewMenuIdentifier_Space)
-                        }
-                        menuStringArr.append(PDFViewMenuIdentifier_Normal_SortAnnotation)
                     } else {
+                        if activeAnnotation.isKind(of: CPDFSignatureWidgetAnnotation.self) {
+                            let signatureWidgetAnnotation = activeAnnotation as? CPDFSignatureWidgetAnnotation
+                            if(signatureWidgetAnnotation?.isSigned() == true) {
+                                return
+                            }
+
+                        }
                         menuStringArr.append(PDFViewMenuIdentifier_Normal_Copy)
                         menuStringArr.append(PDFViewMenuIdentifier_Normal_Cut)
                         menuStringArr.append(PDFViewMenuIdentifier_Normal_Delete)
                         menuStringArr.append(PDFViewMenuIdentifier_Space)
 
-                        if pdfListView.activeAnnotation.isKind(of: CPDFTextAnnotation.self) ||
-                            pdfListView.activeAnnotation.isKind(of: CPDFFreeTextAnnotation.self) {
+                        if activeAnnotation.isKind(of: CPDFTextAnnotation.self) ||
+                           activeAnnotation.isKind(of: CPDFFreeTextAnnotation.self) ||
+                           activeAnnotation.isKind(of: CSelfSignAnnotation.self) ||
+                           activeAnnotation.isKind(of: CPDFWidgetAnnotation.self) {
                             
                         } else {
                             menuStringArr.append(PDFViewMenuIdentifier_Normal_Content)
@@ -6129,10 +6154,10 @@ extension KMMainViewController: CPDFViewDelegate,CPDFListViewDelegate {
                                     menuStringArr.append(PDFViewMenuIdentifier_Space)
                                     menuStringArr.append(PDFViewMenuIdentifier_Normal_AddBook)
                                     menuStringArr.append(PDFViewMenuIdentifier_Space)
-                                    menuStringArr.append(PDFViewMenuIdentifier_Normal_ViewTools)
-                                    menuStringArr.append(PDFViewMenuIdentifier_Space)
                                 }
                             }
+                            menuStringArr.append(PDFViewMenuIdentifier_Normal_ViewTools)
+                            menuStringArr.append(PDFViewMenuIdentifier_Space)
                     
                             menuStringArr.append(PDFViewMenuIdentifier_Normal_PageView)
                             if(listView.viewSplitMode != .disable) {
@@ -6169,14 +6194,30 @@ extension KMMainViewController: CPDFViewDelegate,CPDFListViewDelegate {
             }
         } else {
             var menuStringArr: [String] = []
-            menuStringArr.append(PDFViewMenuIdentifier_Normal_PageView)
-            menuStringArr.append(PDFViewMenuIdentifier_Normal_ReadMode)
-            menuStringArr.append(PDFViewMenuIdentifier_Space)
-            menuStringArr.append(PDFViewMenuIdentifier_Normal_Scale)
-            menuStringArr.append(PDFViewMenuIdentifier_Space)
-            menuStringArr.append(PDFViewMenuIdentifier_Normal_HightLink)
-            menuStringArr.append(PDFViewMenuIdentifier_Normal_HightForm)
-            menuStringArr.append(PDFViewMenuIdentifier_Normal_RestForm)
+            if(listView.viewSplitMode != .disable) {
+                menuStringArr.append(PDFViewMenuIdentifier_Split_ViewMode)
+                menuStringArr.append(PDFViewMenuIdentifier_Split_Sync)
+                menuStringArr.append(PDFViewMenuIdentifier_Split_ShowBar)
+                menuStringArr.append(PDFViewMenuIdentifier_Space)
+                
+                menuStringArr.append(PDFViewMenuIdentifier_Normal_PageView)
+
+                menuStringArr.append(PDFViewMenuIdentifier_Space)
+                menuStringArr.append(PDFViewMenuIdentifier_Normal_Scale)
+                menuStringArr.append(PDFViewMenuIdentifier_Space)
+                menuStringArr.append(PDFViewMenuIdentifier_Normal_HightLink)
+                menuStringArr.append(PDFViewMenuIdentifier_Normal_HightForm)
+                menuStringArr.append(PDFViewMenuIdentifier_Normal_RestForm)
+            } else {
+                menuStringArr.append(PDFViewMenuIdentifier_Normal_PageView)
+                menuStringArr.append(PDFViewMenuIdentifier_Normal_ReadMode)
+                menuStringArr.append(PDFViewMenuIdentifier_Space)
+                menuStringArr.append(PDFViewMenuIdentifier_Normal_Scale)
+                menuStringArr.append(PDFViewMenuIdentifier_Space)
+                menuStringArr.append(PDFViewMenuIdentifier_Normal_HightLink)
+                menuStringArr.append(PDFViewMenuIdentifier_Normal_HightForm)
+                menuStringArr.append(PDFViewMenuIdentifier_Normal_RestForm)
+            }
             let menuStruct = KMPDFMenuConfig.clickMenuUI(items: menuStringArr, theEvent: theEvent, listView: pdfListView)
             groupListMenuGroup?.pagePoint = pagePoint
             groupListMenuGroup?.groupDelegate = self
@@ -6485,6 +6526,10 @@ extension KMMainViewController: CPDFViewDelegate,CPDFListViewDelegate {
         return viewManager.splitShowBottomBar
     }
     
+    func pdfListViewSyncSplitView() -> Bool {
+        return viewManager.splitShowBottomBar
+    }
+    
     func pdfListViewEndEditMode(_ pdfListView: CPDFListView!) {
         let document = listView.document
         if(document != nil) {
@@ -6929,38 +6974,38 @@ extension KMMainViewController: ComponentGroupDelegate {
             listView.toolMode = .CMoveToolMode
             listView.annotationType = .unkown
             viewManager.viewToolsType = .Scroll
-            pdfToolbarController?.reloadToolsView()
             
             pdfToolbarController?.viewManager?.toolMode = .None
             pdfToolbarController?.viewManager?.subToolMode = .None
             refreshToolbarViewHeightInfo()
+            pdfToolbarController?.reloadData()
         } else if(menuItemProperty?.identifier == PDFViewMenuIdentifier_Normal_SelectTool) {
             listView.toolMode = .CSelectToolMode
             listView.annotationType = .unkown
             viewManager.viewToolsType = .Content_Selection
-            pdfToolbarController?.reloadToolsView()
             
             pdfToolbarController?.viewManager?.toolMode = .None
             pdfToolbarController?.viewManager?.subToolMode = .None
             refreshToolbarViewHeightInfo()
+            pdfToolbarController?.reloadData()
         } else if(menuItemProperty?.identifier == PDFViewMenuIdentifier_Normal_MagnifyTool) {
             listView.toolMode = .CMagnifyToolMode
             listView.annotationType = .unkown
             viewManager.viewToolsType = .Magnify
-            pdfToolbarController?.reloadToolsView()
             
             pdfToolbarController?.viewManager?.toolMode = .None
             pdfToolbarController?.viewManager?.subToolMode = .None
             refreshToolbarViewHeightInfo()
+            pdfToolbarController?.reloadData()
         } else if(menuItemProperty?.identifier == PDFViewMenuIdentifier_Normal_SelectZoomTool) {
             listView.toolMode = .CSelectZoomToolMode
             listView.annotationType = .unkown
             viewManager.viewToolsType = .AreaZoom
-            pdfToolbarController?.reloadToolsView()
             
             pdfToolbarController?.viewManager?.toolMode = .None
             pdfToolbarController?.viewManager?.subToolMode = .None
             refreshToolbarViewHeightInfo()
+            pdfToolbarController?.reloadData()
         } else if(menuItemProperty?.identifier == PDFViewMenuIdentifier_Normal_Single) {
             if let objectListView = menuItemProperty?.representedObject as? CPDFListView {
                 objectListView.menuItemClick_SinglePage(nil)
@@ -7068,14 +7113,14 @@ extension KMMainViewController: ComponentGroupDelegate {
             gotoPage(nil)
         } else if(menuItemProperty?.identifier == PDFViewMenuIdentifier_Normal_PageBack) {
             if let objectListView = menuItemProperty?.representedObject as? CPDFListView {
-                if(objectListView.km_canGoForward() == true) {
-                    objectListView.km_goForward(nil)
+                if(objectListView.km_canGoBack() == true) {
+                    objectListView.km_goBack(nil)
                 }
             }
         } else if(menuItemProperty?.identifier == PDFViewMenuIdentifier_Normal_PageForward) {
             if let objectListView = menuItemProperty?.representedObject as? CPDFListView {
-                if(objectListView.km_canGoBack() == true) {
-                    objectListView.km_goBack(nil)
+                if(objectListView.km_canGoForward() == true) {
+                    objectListView.km_goForward(nil)
                 }
             }
         } else if(menuItemProperty?.identifier == PDFViewMenuIdentifier_Normal_AutoScroll) {
@@ -7265,8 +7310,10 @@ extension KMMainViewController: ComponentGroupDelegate {
         } else if(menuItemProperty?.identifier == PDFViewMenuIdentifier_Redact_Apply) {
             redactApplyAction()
         } else if(menuItemProperty?.identifier == PDFViewMenuIdentifier_Redact_Multipage) {
-            if let redactAnnotation = listView.activeAnnotation as? CPDFRedactAnnotation {
-                redactMultipageAction(redactAnnotation: redactAnnotation)
+            for activeAnnotation in listView.activeAnnotations {
+                if let redactAnnotation = activeAnnotation as? CPDFRedactAnnotation {
+                    redactMultipageAction(redactAnnotation: redactAnnotation)
+                }
             }
         } else if(menuItemProperty?.identifier == PDFViewMenuIdentifier_Redact_Default) {
             if let redactAnnotation = listView.activeAnnotation as? CPDFRedactAnnotation {

+ 57 - 22
PDF Office/PDF Master/KMClass/KMPDFViewController/KMPDFMenuConfig.swift

@@ -362,7 +362,7 @@ let BOTAMenuIdentifier_Annotation_DeleteMuteRep = "BOTAMenuIdentifier_Annotation
                                                                                     itemSelected: false,
                                                                                     isDisabled: false,
                                                                                     keyEquivalent: "⌘2",
-                                                                                    text: KMLocalizedString("Automatically Resize"),identifier: PDFViewMenuIdentifier_Normal_ScalePage,
+                                                                                    text: KMLocalizedString("Adapt to Page"),identifier: PDFViewMenuIdentifier_Normal_ScalePage,
                                                                                     representedObject: listView)
         let subItem2Property: ComponentMenuitemProperty = ComponentMenuitemProperty(multipleSelect: false,
                                                                                     itemSelected: false,
@@ -616,43 +616,67 @@ let BOTAMenuIdentifier_Annotation_DeleteMuteRep = "BOTAMenuIdentifier_Annotation
         return copy_Menuitem
     }
     
-    class func hightMarkItemProperty(theEvent:NSEvent?)->ComponentMenuitemProperty {
-        let hightMark_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(keyEquivalent: "⌃⌘H",
+    class func hightMarkItemProperty(theEvent:NSEvent?,listView:CPDFListView?)->ComponentMenuitemProperty {
+        var isDisAble = false
+        if listView?.hideNotes == true {
+            isDisAble = true
+        }
+        let hightMark_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(isDisabled: isDisAble,keyEquivalent: "⌃⌘H",
                                                                                        text: KMLocalizedString("Highlight"),
                                                                                        identifier: PDFViewMenuIdentifier_Normal_Hight,representedObject: theEvent)
         return hightMark_Menuitem
     }
     
-    class func underLineItemProperty(theEvent:NSEvent?)->ComponentMenuitemProperty {
-        let underLine_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(keyEquivalent: "⌃⌘U",
+    class func underLineItemProperty(theEvent:NSEvent?,listView:CPDFListView?)->ComponentMenuitemProperty {
+        var isDisAble = false
+        if listView?.hideNotes == true {
+            isDisAble = true
+        }
+        let underLine_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(isDisabled: isDisAble,keyEquivalent: "⌃⌘U",
                                                                                        text: KMLocalizedString("Underline"),
                                                                                        identifier: PDFViewMenuIdentifier_Normal_Underline,representedObject: theEvent)
         return underLine_Menuitem
     }
     
-    class func strikethroughItemProperty(theEvent:NSEvent?)->ComponentMenuitemProperty {
-        let strikethrough_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(keyEquivalent: "⌃⌘D",
+    class func strikethroughItemProperty(theEvent:NSEvent?,listView:CPDFListView?)->ComponentMenuitemProperty {
+        var isDisAble = false
+        if listView?.hideNotes == true {
+            isDisAble = true
+        }
+        let strikethrough_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(isDisabled: isDisAble,keyEquivalent: "⌃⌘D",
                                                                                        text: KMLocalizedString("Strikethrough"),
                                                                                        identifier: PDFViewMenuIdentifier_Normal_StrikeOut,representedObject: theEvent)
         return strikethrough_Menuitem
     }
     
-    class func squigglyItemProperty(theEvent:NSEvent?)->ComponentMenuitemProperty {
-        let squiggly_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(keyEquivalent: "⌃⌘V",
+    class func squigglyItemProperty(theEvent:NSEvent?,listView:CPDFListView?)->ComponentMenuitemProperty {
+        var isDisAble = false
+        if listView?.hideNotes == true {
+            isDisAble = true
+        }
+        let squiggly_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(isDisabled: isDisAble,keyEquivalent: "⌃⌘V",
                                                                                        text: KMLocalizedString("Squiggly"),
                                                                                        identifier: PDFViewMenuIdentifier_Normal_Squiggly,representedObject: theEvent)
         return squiggly_Menuitem
     }
     
-    class func squareItemProperty(theEvent:NSEvent?)->ComponentMenuitemProperty {
-        let propertie_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(keyEquivalent: "⌃⌘R",
+    class func squareItemProperty(theEvent:NSEvent?,listView:CPDFListView?)->ComponentMenuitemProperty {
+        var isDisAble = false
+        if listView?.hideNotes == true {
+            isDisAble = true
+        }
+        let propertie_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(isDisabled: isDisAble,keyEquivalent: "⌃⌘R",
                                                                                        text: KMLocalizedString("Rectangle"),
                                                                                        identifier: PDFViewMenuIdentifier_Normal_Square,representedObject: theEvent)
         return propertie_Menuitem
     }
     
-    class func circleItemProperty(theEvent:NSEvent?)->ComponentMenuitemProperty {
-        let propertie_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(keyEquivalent: "⌃⌘O",
+    class func circleItemProperty(theEvent:NSEvent?,listView:CPDFListView?)->ComponentMenuitemProperty {
+        var isDisAble = false
+        if listView?.hideNotes == true {
+            isDisAble = true
+        }
+        let propertie_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(isDisabled: isDisAble,keyEquivalent: "⌃⌘O",
                                                                                        text: KMLocalizedString("Circle"),
                                                                                        identifier: PDFViewMenuIdentifier_Normal_Circle,representedObject: theEvent)
         return propertie_Menuitem
@@ -836,14 +860,22 @@ let BOTAMenuIdentifier_Annotation_DeleteMuteRep = "BOTAMenuIdentifier_Annotation
         let subItem0Property: ComponentMenuitemProperty = ComponentMenuitemProperty(text: KMLocalizedString("Single"),identifier: PDFViewMenuIdentifier_Split_ViewSingleMode,
                                                                                     representedObject: listView)
         let subItem1Property: ComponentMenuitemProperty = ComponentMenuitemProperty(text: KMLocalizedString("Horizontal"),identifier: PDFViewMenuIdentifier_Split_ViewHorizontalMode,
+           
                                                                                     representedObject: listView)
+                                                                                    
+                                                                                    
+        if(listView?.viewSplitMode == .horizontal) {
+            subItem1Property.righticon = NSImage(named: "KMNImageNameMenuSelect")
+        }
         let subItem2Property: ComponentMenuitemProperty = ComponentMenuitemProperty(
                                                                                     text: KMLocalizedString("Vertical"),identifier: PDFViewMenuIdentifier_Split_ViewVerticalMode,
                                                                                     representedObject: listView)
-        
-        subMenuItemArr.append(subItem0Property)
-        subMenuItemArr.append(subItem1Property)
+        if(listView?.viewSplitMode == .vertical) {
+            subItem2Property.righticon = NSImage(named: "KMNImageNameMenuSelect")
+        }
         subMenuItemArr.append(subItem2Property)
+        subMenuItemArr.append(subItem1Property)
+        subMenuItemArr.append(subItem0Property)
         properties_Menuitem.subPropertys = subMenuItemArr
         
         return properties_Menuitem
@@ -853,6 +885,9 @@ let BOTAMenuIdentifier_Annotation_DeleteMuteRep = "BOTAMenuIdentifier_Annotation
         let propertie_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(keyEquivalent: nil,
                                                                                        text: KMLocalizedString("Scroll and zoom simultaneously"),
                                                                                        identifier: PDFViewMenuIdentifier_Split_Sync,representedObject: listView)
+        if(listView?.isSyncSplitView == true) {
+            propertie_Menuitem.righticon = NSImage(named: "KMNImageNameMenuSelect")
+        }
         return propertie_Menuitem
     }
     
@@ -1169,17 +1204,17 @@ let BOTAMenuIdentifier_Annotation_DeleteMuteRep = "BOTAMenuIdentifier_Annotation
             } else if item == PDFViewMenuIdentifier_Normal_Copy {
                 menuItemArr.append(KMPDFMenuConfig.copyItemProperty(theEvent: theEvent))
             } else if item == PDFViewMenuIdentifier_Normal_Hight {
-                menuItemArr.append(KMPDFMenuConfig.hightMarkItemProperty(theEvent: theEvent))
+                menuItemArr.append(KMPDFMenuConfig.hightMarkItemProperty(theEvent: theEvent,listView: listView))
             } else if item == PDFViewMenuIdentifier_Normal_Underline {
-                menuItemArr.append(KMPDFMenuConfig.underLineItemProperty(theEvent: theEvent))
+                menuItemArr.append(KMPDFMenuConfig.underLineItemProperty(theEvent: theEvent,listView: listView))
             } else if item == PDFViewMenuIdentifier_Normal_Squiggly {
-                menuItemArr.append(KMPDFMenuConfig.squigglyItemProperty(theEvent: theEvent))
+                menuItemArr.append(KMPDFMenuConfig.squigglyItemProperty(theEvent: theEvent,listView: listView))
             } else if item == PDFViewMenuIdentifier_Normal_StrikeOut {
-                menuItemArr.append(KMPDFMenuConfig.strikethroughItemProperty(theEvent: theEvent))
+                menuItemArr.append(KMPDFMenuConfig.strikethroughItemProperty(theEvent: theEvent,listView: listView))
             } else if item == PDFViewMenuIdentifier_Normal_Square {
-                menuItemArr.append(KMPDFMenuConfig.squareItemProperty(theEvent: theEvent))
+                menuItemArr.append(KMPDFMenuConfig.squareItemProperty(theEvent: theEvent,listView: listView))
             } else if item == PDFViewMenuIdentifier_Normal_Circle {
-                menuItemArr.append(KMPDFMenuConfig.circleItemProperty(theEvent: theEvent))
+                menuItemArr.append(KMPDFMenuConfig.circleItemProperty(theEvent: theEvent,listView: listView))
             } else if item == PDFViewMenuIdentifier_Normal_AddOutLine {
                 menuItemArr.append(KMPDFMenuConfig.addOutlineItemProperty(theEvent: theEvent))
             } else if item == PDFViewMenuIdentifier_Normal_TTS {