// // KMPDFMenuConfig.swift // PDF Reader Pro // // Created by Niehaoyu on 2024/10/23. // import Foundation import KMComponentLibrary let PDFViewMenuIdentifier_Space = "PDFViewMenuIdentifier_Space" //MARK: -PageEdit let ThumbnailMenuIdentifier_Copy = "ThumbnailMenuIdentifier_Copy" let ThumbnailMenuIdentifier_Cut = "ThumbnailMenuIdentifier_Cut" let ThumbnailMenuIdentifier_Paste = "ThumbnailMenuIdentifier_Paste" let ThumbnailMenuIdentifier_Delete = "ThumbnailMenuIdentifier_Delete" let ThumbnailMenuIdentifier_RotateRight = "ThumbnailMenuIdentifier_RotateRight" let ThumbnailMenuIdentifier_RotateLeft = "ThumbnailMenuIdentifier_RotateLeft" let ThumbnailMenuIdentifier_InsertFile = "ThumbnailMenuIdentifier_InsertFile" let ThumbnailMenuIdentifier_InsertBlank = "ThumbnailMenuIdentifier_InsertBlank" let ThumbnailMenuIdentifier_Replace = "ThumbnailMenuIdentifier_Replace" let ThumbnailMenuIdentifier_Share = "ThumbnailMenuIdentifier_Share" let ThumbnailMenuIdentifier_Export = "ThumbnailMenuIdentifier_Export" let ThumbnailMenuIdentifier_PastNull = "ThumbnailMenuIdentifier_PastNull" let ThumbnailMenuIdentifier_FileShowSize = "ThumbnailMenuIdentifier_FileShowSize" //MARK: - 幻灯片 let PDFViewMenuIdentifier_PageNext = "PDFViewMenuIdentifier_PageNext" let PDFViewMenuIdentifier_PagePrevious = "PDFViewMenuIdentifier_PagePrevious" let PDFViewMenuIdentifier_PageFirst = "PDFViewMenuIdentifier_PageFirst" let PDFViewMenuIdentifier_PageLast = "PDFViewMenuIdentifier_PageLast" let PDFViewMenuIdentifier_Presentation_LaserPoint = "PDFViewMenuIdentifier_Presentation_LaserPoint" let PDFViewMenuIdentifier_Presentation_Brush = "PDFViewMenuIdentifier_Presentation_Brush" let PDFViewMenuIdentifier_Presentation_Exit = "PDFViewMenuIdentifier_Presentation_Exit" //MARK: - 常规模式 let PDFViewMenuIdentifier_Normal_AITool = "PDFViewMenuIdentifier_Normal_AITool" let PDFViewMenuIdentifier_Normal_AIRewrite = "PDFViewMenuIdentifier_Normal_AIRewrite" let PDFViewMenuIdentifier_Normal_AIProofread = "PDFViewMenuIdentifier_Normal_AIProofread" let PDFViewMenuIdentifier_Normal_AITranslate = "PDFViewMenuIdentifier_Normal_AITranslate" let PDFViewMenuIdentifier_Normal_Past = "PDFViewMenuIdentifier_Normal_Past" let PDFViewMenuIdentifier_Normal_SelectAllText = "PDFViewMenuIdentifier_Normal_SelectAllText" let PDFViewMenuIdentifier_Normal_AddBook = "PDFViewMenuIdentifier_Normal_AddBook" let PDFViewMenuIdentifier_Normal_ViewTools = "PDFViewMenuIdentifier_Normal_ViewTools" let PDFViewMenuIdentifier_Normal_TextTool = "PDFViewMenuIdentifier_Normal_TextTool" let PDFViewMenuIdentifier_Normal_MoveTool = "PDFViewMenuIdentifier_Normal_MoveTool" let PDFViewMenuIdentifier_Normal_SelectTool = "PDFViewMenuIdentifier_Normal_SelectTool" let PDFViewMenuIdentifier_Normal_MagnifyTool = "PDFViewMenuIdentifier_Normal_MagnifyTool" let PDFViewMenuIdentifier_Normal_SelectZoomTool = "PDFViewMenuIdentifier_Normal_SelectZoomTool" let PDFViewMenuIdentifier_Normal_PageView = "PDFViewMenuIdentifier_Normal_PageView" let PDFViewMenuIdentifier_Normal_Single = "PDFViewMenuIdentifier_Normal_Single" let PDFViewMenuIdentifier_Normal_SingleContinuous = "PDFViewMenuIdentifier_Normal_SingleContinuous" let PDFViewMenuIdentifier_Normal_TwoPages = "PDFViewMenuIdentifier_Normal_TwoPages" let PDFViewMenuIdentifier_Normal_TwoPagesContinuous = "PDFViewMenuIdentifier_Normal_TwoPagesContinuous" let PDFViewMenuIdentifier_Normal_BookMode = "PDFViewMenuIdentifier_Normal_BookMode" let PDFViewMenuIdentifier_Normal_ReadMode = "PDFViewMenuIdentifier_Normal_ReadMode" let PDFViewMenuIdentifier_Normal_Scale = "PDFViewMenuIdentifier_Normal_Scale" let PDFViewMenuIdentifier_Normal_ScaleWidth = "PDFViewMenuIdentifier_Normal_ScaleWidth" let PDFViewMenuIdentifier_Normal_ScalePage = "PDFViewMenuIdentifier_Normal_ScalePage" let PDFViewMenuIdentifier_Normal_ScaleOrg = "PDFViewMenuIdentifier_Normal_ScaleOrg" let PDFViewMenuIdentifier_Normal_ScaleZoomIn = "PDFViewMenuIdentifier_Normal_ScaleZoomIn" let PDFViewMenuIdentifier_Normal_ScaleZoomOut = "PDFViewMenuIdentifier_Normal_ScaleZoomOut" let PDFViewMenuIdentifier_Normal_PageRotate = "PDFViewMenuIdentifier_Normal_PageRotate" let PDFViewMenuIdentifier_Normal_RotateLeft = "PDFViewMenuIdentifier_Normal_RotateLeft" let PDFViewMenuIdentifier_Normal_RotateRight = "PDFViewMenuIdentifier_Normal_RotateRight" let PDFViewMenuIdentifier_Normal_PageNum = "PDFViewMenuIdentifier_Normal_PageNum" let PDFViewMenuIdentifier_Normal_EnterPageNum = "PDFViewMenuIdentifier_Normal_EnterPageNum" let PDFViewMenuIdentifier_Normal_PageBack = "PDFViewMenuIdentifier_Normal_PageBack" let PDFViewMenuIdentifier_Normal_PageForward = "PDFViewMenuIdentifier_Normal_PageForward" let PDFViewMenuIdentifier_Normal_AutoScroll = "PDFViewMenuIdentifier_Normal_AutoScroll" let PDFViewMenuIdentifier_Normal_HightForm = "PDFViewMenuIdentifier_Normal_HightForm" let PDFViewMenuIdentifier_Normal_HightLink = "PDFViewMenuIdentifier_Normal_HightLink" let PDFViewMenuIdentifier_Normal_RestForm = "PDFViewMenuIdentifier_Normal_RestForm" let PDFViewMenuIdentifier_Normal_Search = "PDFViewMenuIdentifier_Normal_Search" let PDFViewMenuIdentifier_Normal_Print = "PDFViewMenuIdentifier_Normal_Print" let PDFViewMenuIdentifier_Normal_Properties = "PDFViewMenuIdentifier_Normal_Properties" let PDFViewMenuIdentifier_Normal_Copy = "PDFViewMenuIdentifier_Normal_Copy" let PDFViewMenuIdentifier_Normal_Hight = "PDFViewMenuIdentifier_Normal_Hight" let PDFViewMenuIdentifier_Normal_Underline = "PDFViewMenuIdentifier_Normal_Underline" let PDFViewMenuIdentifier_Normal_Squiggly = "PDFViewMenuIdentifier_Normal_Squiggly" let PDFViewMenuIdentifier_Normal_StrikeOut = "PDFViewMenuIdentifier_Normal_StrikeOut" let PDFViewMenuIdentifier_Normal_Square = "PDFViewMenuIdentifier_Normal_Square" let PDFViewMenuIdentifier_Normal_Circle = "PDFViewMenuIdentifier_Normal_Circle" let PDFViewMenuIdentifier_Normal_AddOutLine = "PDFViewMenuIdentifier_Normal_AddOutLine" let PDFViewMenuIdentifier_Normal_TTS = "PDFViewMenuIdentifier_Normal_TTS" let PDFViewMenuIdentifier_Normal_SearchText = "PDFViewMenuIdentifier_Normal_SearchText" let PDFViewMenuIdentifier_Normal_SelectAllForm = "PDFViewMenuIdentifier_Normal_SelectAllForm" let PDFViewMenuIdentifier_Normal_ShowFormName = "PDFViewMenuIdentifier_Normal_ShowFormName" let PDFViewMenuIdentifier_Normal_SelectAllAnnotation = "PDFViewMenuIdentifier_Normal_SelectAllAnnotation" let PDFViewMenuIdentifier_Normal_ShowAnnotation = "PDFViewMenuIdentifier_Normal_ShowAnnotation" let PDFViewMenuIdentifier_Normal_CopyText = "PDFViewMenuIdentifier_Normal_CopyText" let PDFViewMenuIdentifier_Normal_Cut = "PDFViewMenuIdentifier_Normal_Cut" let PDFViewMenuIdentifier_Normal_Delete = "PDFViewMenuIdentifier_Normal_Delete" let PDFViewMenuIdentifier_Normal_ShowPopUI = "PDFViewMenuIdentifier_Normal_ShowPopUI" let PDFViewMenuIdentifier_Normal_LinkReade = "PDFViewMenuIdentifier_Normal_LinkReade" let PDFViewMenuIdentifier_Normal_SortAnnotation = "PDFViewMenuIdentifier_Normal_SortAnnotation" let PDFViewMenuIdentifier_Normal_SortFirstAnnotation = "PDFViewMenuIdentifier_Normal_SortFirstAnnotation" let PDFViewMenuIdentifier_Normal_SortTopAnnotation = "PDFViewMenuIdentifier_Normal_SortTopAnnotation" let PDFViewMenuIdentifier_Normal_SortBottomAnnotation = "PDFViewMenuIdentifier_Normal_SortBottomAnnotation" let PDFViewMenuIdentifier_Normal_SortLastAnnotation = "PDFViewMenuIdentifier_Normal_SortLastAnnotation" let PDFViewMenuIdentifier_Normal_Content = "PDFViewMenuIdentifier_Normal_Content" let PDFViewMenuIdentifier_Redact_Apply = "PDFViewMenuIdentifier_Redact_Apply" let PDFViewMenuIdentifier_Redact_Multipage = "PDFViewMenuIdentifier_Redact_Multipage" let PDFViewMenuIdentifier_Redact_Default = "PDFViewMenuIdentifier_Redact_Default" let PDFViewMenuIdentifier_Split_ViewMode = "PDFViewMenuIdentifier_Split_ViewMode" let PDFViewMenuIdentifier_Split_ViewSingleMode = "PDFViewMenuIdentifier_Split_ViewSingleMode" let PDFViewMenuIdentifier_Split_ViewVerticalMode = "PDFViewMenuIdentifier_Split_ViewVerticalMode" let PDFViewMenuIdentifier_Split_ViewHorizontalMode = "PDFViewMenuIdentifier_Split_ViewHorizontalMode" let PDFViewMenuIdentifier_Split_Sync = "PDFViewMenuIdentifier_Split_Sync" let PDFViewMenuIdentifier_Split_ShowBar = "PDFViewMenuIdentifier_Split_ShowBar" let PDFViewMenuIdentifier_Normal_Aligning = "PDFViewMenuIdentifier_Normal_Aligning" let PDFViewMenuIdentifier_Normal_LeftAlight = "PDFViewMenuIdentifier_Normal_LeftAlight" let PDFViewMenuIdentifier_Normal_VerticallyAlight = "PDFViewMenuIdentifier_Normal_VerticallyAlight" let PDFViewMenuIdentifier_Normal_RightAlight = "PDFViewMenuIdentifier_Normal_RightAlight" let PDFViewMenuIdentifier_Normal_TopAlight = "PDFViewMenuIdentifier_Normal_TopAlight" let PDFViewMenuIdentifier_Normal_HorizontallyAlight = "PDFViewMenuIdentifier_Normal_HorizontallyAlight" let PDFViewMenuIdentifier_Normal_BottomAlight = "PDFViewMenuIdentifier_Normal_BottomAlight" let PDFViewMenuIdentifier_Normal_DistributeHorizontally = "PDFViewMenuIdentifier_Normal_DistributeHorizontally" let PDFViewMenuIdentifier_Normal_DistributeVertically = "PDFViewMenuIdentifier_Normal_DistributeVertically" let PDFViewMenuIdentifier_Normal_Export = "PDFViewMenuIdentifier_Normal_Export" let PDFViewMenuIdentifier_Normal_ExportJPG = "PDFViewMenuIdentifier_Normal_ExportJPG" let PDFViewMenuIdentifier_Normal_ExportPNG = "PDFViewMenuIdentifier_Normal_ExportPNG" let PDFViewMenuIdentifier_Normal_ExportPDF = "PDFViewMenuIdentifier_Normal_ExportPDF" let PDFViewMenuIdentifier_Normal_RedactProperties = "PDFViewMenuIdentifier_Normal_RedactProperties" let PDFViewMenuIdentifier_Edit_Paste = "PDFViewMenuIdentifier_Edit_Paste" let PDFViewMenuIdentifier_Edit_NoStylePaste = "PDFViewMenuIdentifier_Edit_NoStylePaste" let PDFViewMenuIdentifier_Edit_SelectAll = "PDFViewMenuIdentifier_Edit_SelectAll" let PDFViewMenuIdentifier_Edit_AddLink = "PDFViewMenuIdentifier_Edit_AddLink" let PDFViewMenuIdentifier_Edit_AddText = "PDFViewMenuIdentifier_Edit_AddText" let PDFViewMenuIdentifier_Edit_AddImage = "PDFViewMenuIdentifier_Edit_AddImage" let PDFViewMenuIdentifier_Edit_Font = "PDFViewMenuIdentifier_Edit_Font" let PDFViewMenuIdentifier_Edit_FontBold = "PDFViewMenuIdentifier_Edit_FontBold" let PDFViewMenuIdentifier_Edit_FontItalic = "PDFViewMenuIdentifier_Edit_FontItalic" let PDFViewMenuIdentifier_Edit_FontUnderline = "PDFViewMenuIdentifier_Edit_FontUnderline" let PDFViewMenuIdentifier_Edit_FontStrikeout = "PDFViewMenuIdentifier_Edit_FontStrikeout" let PDFViewMenuIdentifier_Edit_FontZoomIn = "PDFViewMenuIdentifier_Edit_FontZoomIn" let PDFViewMenuIdentifier_Edit_FontZoomOut = "PDFViewMenuIdentifier_Edit_FontZoomOut" let PDFViewMenuIdentifier_Edit_FontColor = "PDFViewMenuIdentifier_Edit_FontColor" let PDFViewMenuIdentifier_Edit_FontName = "PDFViewMenuIdentifier_Edit_FontName" let PDFViewMenuIdentifier_Edit_FontH1Name = "PDFViewMenuIdentifier_Edit_FontH1Name" let PDFViewMenuIdentifier_Edit_FontH2Name = "PDFViewMenuIdentifier_Edit_FontH2Name" let PDFViewMenuIdentifier_Edit_FontH3Name = "PDFViewMenuIdentifier_Edit_FontH3Name" let PDFViewMenuIdentifier_Edit_FontB1Name = "PDFViewMenuIdentifier_Edit_FontB1Name" let PDFViewMenuIdentifier_Edit_FontB2Name = "PDFViewMenuIdentifier_Edit_FontB2Name" let PDFViewMenuIdentifier_Edit_FontB3Name = "PDFViewMenuIdentifier_Edit_FontB3Name" let PDFViewMenuIdentifier_Edit_FontAlight = "PDFViewMenuIdentifier_Edit_FontAlight" let PDFViewMenuIdentifier_Edit_FontLeftAlight = "PDFViewMenuIdentifier_Edit_FontLeftAlight" let PDFViewMenuIdentifier_Edit_FontCenterAlight = "PDFViewMenuIdentifier_Edit_FontCenterAlight" let PDFViewMenuIdentifier_Edit_FontRightAlight = "PDFViewMenuIdentifier_Edit_FontRightAlight" let PDFViewMenuIdentifier_Edit_FontJustAlight = "PDFViewMenuIdentifier_Edit_FontJustAlight" let PDFViewMenuIdentifier_Edit_RotateLeft = "PDFViewMenuIdentifier_Edit_RotateLeft" let PDFViewMenuIdentifier_Edit_RotateRight = "PDFViewMenuIdentifier_Edit_RotateRight" let PDFViewMenuIdentifier_Edit_HorizontalMirror = "PDFViewMenuIdentifier_Edit_HorizontalMirror" let PDFViewMenuIdentifier_Edit_VerticalMirror = "PDFViewMenuIdentifier_Edit_VerticalMirror" let PDFViewMenuIdentifier_Edit_Crop = "PDFViewMenuIdentifier_Edit_Crop" let PDFViewMenuIdentifier_Edit_Replace = "PDFViewMenuIdentifier_Edit_Replace" let BOTAMenuIdentifier_Annotation_Expand = "BOTAMenuIdentifier_Annotation_Expand" let BOTAMenuIdentifier_Annotation_Sort = "BOTAMenuIdentifier_Annotation_Sort" let BOTAMenuIdentifier_Annotation_SortPage = "BOTAMenuIdentifier_Annotation_SortPage" let BOTAMenuIdentifier_Annotation_SortAscTime = "BOTAMenuIdentifier_Annotation_SortAscTime" let BOTAMenuIdentifier_Annotation_SortDesTime = "BOTAMenuIdentifier_Annotation_SortDesTime" let BOTAMenuIdentifier_Annotation_Improt = "BOTAMenuIdentifier_Annotation_Improt" let BOTAMenuIdentifier_Annotation_Export = "BOTAMenuIdentifier_Annotation_Export" let BOTAMenuIdentifier_Annotation_RemoveAll = "BOTAMenuIdentifier_Annotation_RemoveAll" let BOTAMenuIdentifier_Annotation_DeleteRep = "BOTAMenuIdentifier_Annotation_DeleteRep" let BOTAMenuIdentifier_Annotation_EditNote = "BOTAMenuIdentifier_Annotation_EditNote" let BOTAMenuIdentifier_Annotation_AddMark = "BOTAMenuIdentifier_Annotation_AddMark" let BOTAMenuIdentifier_Annotation_AddRep = "BOTAMenuIdentifier_Annotation_AddRep" let BOTAMenuIdentifier_Annotation_RepState = "BOTAMenuIdentifier_Annotation_RepState" let BOTAMenuIdentifier_Annotation_RepStateNone = "BOTAMenuIdentifier_Annotation_RepStateNone" let BOTAMenuIdentifier_Annotation_RepStateAccepted = "BOTAMenuIdentifier_Annotation_RepStateAccepted" let BOTAMenuIdentifier_Annotation_RepStateRejected = "BOTAMenuIdentifier_Annotation_RepStateRejected" let BOTAMenuIdentifier_Annotation_RepStateCancelled = "BOTAMenuIdentifier_Annotation_RepStateCancelled" let BOTAMenuIdentifier_Annotation_RepStateCompleted = "BOTAMenuIdentifier_Annotation_RepStateCompleted" let BOTAMenuIdentifier_Annotation_DeleteSignRep = "BOTAMenuIdentifier_Annotation_DeleteSignRep" let BOTAMenuIdentifier_Annotation_DeleteMuteRep = "BOTAMenuIdentifier_Annotation_DeleteMuteRep" @objcMembers class KMPDFMenuConfig: NSString { class func aiMenuItemProperty(theEvent:NSEvent?)->ComponentMenuitemProperty { let properties_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(multipleSelect: false, itemSelected: false, isDisabled: false, keyEquivalent: nil, text: KMLocalizedString("AI Tools"), identifier: PDFViewMenuIdentifier_Normal_AITool) var subMenuItemArr: [ComponentMenuitemProperty] = [] let subItem0Property: ComponentMenuitemProperty = ComponentMenuitemProperty(multipleSelect: false, itemSelected: false, isDisabled: false, keyEquivalent: nil, text: KMLocalizedString("AI Rewrite"),identifier: PDFViewMenuIdentifier_Normal_AIRewrite) let subItem1Property: ComponentMenuitemProperty = ComponentMenuitemProperty(multipleSelect: false, itemSelected: false, isDisabled: false, keyEquivalent: nil, text: KMLocalizedString("AI Proofread"),identifier: PDFViewMenuIdentifier_Normal_AIProofread) let subItem2Property: ComponentMenuitemProperty = ComponentMenuitemProperty(multipleSelect: false, itemSelected: false, isDisabled: false, keyEquivalent: nil, text: KMLocalizedString("AI Translate"),identifier: PDFViewMenuIdentifier_Normal_AITranslate) subMenuItemArr.append(subItem0Property) subMenuItemArr.append(subItem1Property) subMenuItemArr.append(subItem2Property) properties_Menuitem.subPropertys = subMenuItemArr return properties_Menuitem } class func viewModeMenuItemProperty(theEvent:NSEvent?)->ComponentMenuitemProperty { let properties_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(multipleSelect: false, itemSelected: false, isDisabled: false, keyEquivalent: nil, text: KMLocalizedString("Tool Mode"), identifier: PDFViewMenuIdentifier_Normal_ViewTools) var subMenuItemArr: [ComponentMenuitemProperty] = [] let subItem0Property: ComponentMenuitemProperty = ComponentMenuitemProperty(multipleSelect: false, itemSelected: false, isDisabled: false, keyEquivalent: "⇧1", text: KMLocalizedString("Text"),identifier: PDFViewMenuIdentifier_Normal_TextTool) let subItem1Property: ComponentMenuitemProperty = ComponentMenuitemProperty(multipleSelect: false, itemSelected: false, isDisabled: false, keyEquivalent: "⇧2", text: KMLocalizedString("Scroll"),identifier: PDFViewMenuIdentifier_Normal_MoveTool) let subItem2Property: ComponentMenuitemProperty = ComponentMenuitemProperty(multipleSelect: false, itemSelected: false, isDisabled: false, keyEquivalent: "⇧3", text: KMLocalizedString("Magnify"),identifier: PDFViewMenuIdentifier_Normal_MagnifyTool) let subItem3Property: ComponentMenuitemProperty = ComponentMenuitemProperty(multipleSelect: false, itemSelected: false, isDisabled: false, keyEquivalent: "⇧4", text: KMLocalizedString("Select"),identifier: PDFViewMenuIdentifier_Normal_SelectTool) let subItem4Property: ComponentMenuitemProperty = ComponentMenuitemProperty(multipleSelect: false, itemSelected: false, isDisabled: false, keyEquivalent: "⇧5", text: KMLocalizedString("Area Zoom"),identifier: PDFViewMenuIdentifier_Normal_SelectZoomTool) subMenuItemArr.append(subItem0Property) subMenuItemArr.append(subItem1Property) subMenuItemArr.append(subItem2Property) subMenuItemArr.append(subItem3Property) subMenuItemArr.append(subItem4Property) properties_Menuitem.subPropertys = subMenuItemArr return properties_Menuitem } class func pageViewMenuItemProperty(theEvent:NSEvent?,listView:CPDFListView?)->ComponentMenuitemProperty { let properties_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(multipleSelect: false, itemSelected: false, isDisabled: false, keyEquivalent: nil, text: KMLocalizedString("PDF Display"), identifier: PDFViewMenuIdentifier_Normal_PageView) var subMenuItemArr: [ComponentMenuitemProperty] = [] let subItem0Property: ComponentMenuitemProperty = ComponentMenuitemProperty(multipleSelect: false, itemSelected: false, isDisabled: false, keyEquivalent: "⌃⌘1", text: KMLocalizedString("Single Page"), identifier: PDFViewMenuIdentifier_Normal_Single, representedObject: listView) let subItem1Property: ComponentMenuitemProperty = ComponentMenuitemProperty(multipleSelect: false, itemSelected: false, isDisabled: false, keyEquivalent: "⌃⌘2", text: KMLocalizedString("Single Page Continuous"), identifier: PDFViewMenuIdentifier_Normal_SingleContinuous, representedObject: listView) let subItem2Property: ComponentMenuitemProperty = ComponentMenuitemProperty(multipleSelect: false, itemSelected: false, isDisabled: false, keyEquivalent: "⌃⌘3", text: KMLocalizedString("Two Pages"), identifier: PDFViewMenuIdentifier_Normal_TwoPages, representedObject: listView) let subItem3Property: ComponentMenuitemProperty = ComponentMenuitemProperty(multipleSelect: false, itemSelected: false, isDisabled: false, keyEquivalent: "⌃⌘4", text: KMLocalizedString("Two Pages Continuous"), identifier: PDFViewMenuIdentifier_Normal_TwoPagesContinuous, representedObject: listView) let subItem4Property: ComponentMenuitemProperty = ComponentMenuitemProperty(multipleSelect: false, itemSelected: false, isDisabled: false, keyEquivalent: nil, text: KMLocalizedString("Book Mode"),identifier: PDFViewMenuIdentifier_Normal_BookMode, representedObject: listView) subMenuItemArr.append(subItem0Property) subMenuItemArr.append(subItem1Property) subMenuItemArr.append(subItem2Property) subMenuItemArr.append(subItem3Property) subMenuItemArr.append(subItem4Property) properties_Menuitem.subPropertys = subMenuItemArr return properties_Menuitem } class func scaleViewMenuItemProperty(theEvent:NSEvent?,listView:CPDFListView?)->ComponentMenuitemProperty { let properties_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(multipleSelect: false, itemSelected: false, isDisabled: false, keyEquivalent: nil, text: KMLocalizedString("Zoom"), identifier: PDFViewMenuIdentifier_Normal_Scale) var subMenuItemArr: [ComponentMenuitemProperty] = [] let subItem0Property: ComponentMenuitemProperty = ComponentMenuitemProperty(multipleSelect: false, itemSelected: false, isDisabled: false, keyEquivalent: "⌘1", text: KMLocalizedString("Zoom To Width"),identifier: PDFViewMenuIdentifier_Normal_ScaleWidth, representedObject: listView) let subItem1Property: ComponentMenuitemProperty = ComponentMenuitemProperty(multipleSelect: false, itemSelected: false, isDisabled: false, keyEquivalent: "⌘2", text: KMLocalizedString("Automatically Resize"),identifier: PDFViewMenuIdentifier_Normal_ScalePage, representedObject: listView) let subItem2Property: ComponentMenuitemProperty = ComponentMenuitemProperty(multipleSelect: false, itemSelected: false, isDisabled: false, keyEquivalent: "⌘0", text: KMLocalizedString("Actual Size"),identifier: PDFViewMenuIdentifier_Normal_ScaleOrg, representedObject: listView) let subItem3Property: ComponentMenuitemProperty = ComponentMenuitemProperty(multipleSelect: false, itemSelected: false, isDisabled: false, keyEquivalent: "⌘+", text: KMLocalizedString("Zoom In"),identifier: PDFViewMenuIdentifier_Normal_ScaleZoomIn, representedObject: listView) let subItem4Property: ComponentMenuitemProperty = ComponentMenuitemProperty(multipleSelect: false, itemSelected: false, isDisabled: false, keyEquivalent: "⌘-", text: KMLocalizedString("Zoom Out"),identifier: PDFViewMenuIdentifier_Normal_ScaleZoomOut, representedObject: listView) subMenuItemArr.append(subItem0Property) subMenuItemArr.append(subItem1Property) subMenuItemArr.append(subItem2Property) subMenuItemArr.append(subItem3Property) subMenuItemArr.append(subItem4Property) properties_Menuitem.subPropertys = subMenuItemArr return properties_Menuitem } class func pageRotateMenuItemProperty(theEvent:NSEvent?,listView:CPDFListView?)->ComponentMenuitemProperty { let properties_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(multipleSelect: false, itemSelected: false, isDisabled: false, keyEquivalent: nil, text: KMLocalizedString("Rotate Page"), identifier: PDFViewMenuIdentifier_Normal_PageRotate) var subMenuItemArr: [ComponentMenuitemProperty] = [] let subItem0Property: ComponentMenuitemProperty = ComponentMenuitemProperty(multipleSelect: false, itemSelected: false, isDisabled: false, keyEquivalent: "⌘L", text: KMLocalizedString("Rotate Left"),identifier: PDFViewMenuIdentifier_Normal_RotateLeft, representedObject: ["Object": listView, "theEvent": theEvent]) let subItem1Property: ComponentMenuitemProperty = ComponentMenuitemProperty(multipleSelect: false, itemSelected: false, isDisabled: false, keyEquivalent: "⌘R", text: KMLocalizedString("Rotate Right"),identifier: PDFViewMenuIdentifier_Normal_RotateRight, representedObject: ["Object": listView, "theEvent": theEvent]) subMenuItemArr.append(subItem0Property) subMenuItemArr.append(subItem1Property) properties_Menuitem.subPropertys = subMenuItemArr return properties_Menuitem } class func pageNumMenuItemProperty(theEvent:NSEvent?,listView:CPDFListView?)->ComponentMenuitemProperty { let properties_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(multipleSelect: false, itemSelected: false, isDisabled: false, keyEquivalent: nil, text: KMLocalizedString("Page"), identifier: PDFViewMenuIdentifier_Normal_PageNum) var subMenuItemArr: [ComponentMenuitemProperty] = [] let subItem0Property: ComponentMenuitemProperty = ComponentMenuitemProperty(multipleSelect: false, itemSelected: false, isDisabled: false, keyEquivalent: "⌘▶", text: KMLocalizedString("Next Page"),identifier: PDFViewMenuIdentifier_PageNext, representedObject: listView) let subItem1Property: ComponentMenuitemProperty = ComponentMenuitemProperty(multipleSelect: false, itemSelected: false, isDisabled: false, keyEquivalent: "⌘◀", text: KMLocalizedString("Previous Page"),identifier: PDFViewMenuIdentifier_PagePrevious, representedObject: listView) let subItem2Property: ComponentMenuitemProperty = ComponentMenuitemProperty(multipleSelect: false, itemSelected: false, isDisabled: false, keyEquivalent: "⌘▲", text: KMLocalizedString("First"),identifier: PDFViewMenuIdentifier_PageFirst, representedObject: listView) let subItem3Property: ComponentMenuitemProperty = ComponentMenuitemProperty(multipleSelect: false, itemSelected: false, isDisabled: false, keyEquivalent: "⌘▼", text: KMLocalizedString("Last"),identifier: PDFViewMenuIdentifier_PageLast, representedObject: listView) let subItem4Property: ComponentMenuitemProperty = ComponentMenuitemProperty(multipleSelect: false, itemSelected: false, isDisabled: false, keyEquivalent: "⌥⌘G", text: KMLocalizedString("Go To Page…"),identifier: PDFViewMenuIdentifier_Normal_EnterPageNum, representedObject: listView) let subItem5Property: ComponentMenuitemProperty = ComponentMenuitemProperty(multipleSelect: false, itemSelected: false, isDisabled: false, keyEquivalent: "⌘[", text: KMLocalizedString("Forward"),identifier: PDFViewMenuIdentifier_Normal_PageForward, representedObject: listView) let subItem6Property: ComponentMenuitemProperty = ComponentMenuitemProperty(multipleSelect: false, itemSelected: false, isDisabled: false, keyEquivalent: "⌘]", text: KMLocalizedString("Back"),identifier: PDFViewMenuIdentifier_Normal_PageBack, representedObject: listView) subMenuItemArr.append(subItem0Property) subMenuItemArr.append(subItem1Property) subMenuItemArr.append(subItem2Property) subMenuItemArr.append(subItem3Property) subMenuItemArr.append(ComponentMenuitemProperty.divider()) subMenuItemArr.append(subItem4Property) subMenuItemArr.append(ComponentMenuitemProperty.divider()) subMenuItemArr.append(subItem5Property) subMenuItemArr.append(subItem6Property) properties_Menuitem.subPropertys = subMenuItemArr return properties_Menuitem } class func pasteNumMenuItemProperty(theEvent:NSEvent?)->ComponentMenuitemProperty { let past_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(keyEquivalent: "⌘V", text: KMLocalizedString("Paste"), identifier: PDFViewMenuIdentifier_Normal_Past,representedObject: theEvent) return past_Menuitem } class func seletAllMenuItemProperty(theEvent:NSEvent?,listView:CPDFListView?)->ComponentMenuitemProperty { let selectAll_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(keyEquivalent: "⌘A", text: KMLocalizedString("Select All"), identifier: PDFViewMenuIdentifier_Normal_SelectAllText,representedObject: listView) return selectAll_Menuitem } class func addBookMenuItemProperty(theEvent:NSEvent?,listView:CPDFListView?)->ComponentMenuitemProperty { var pagePoint = NSPoint.zero var isHoveBookMark = false if let page = listView?.pageAndPoint(&pagePoint, for: theEvent, nearest: true) { isHoveBookMark = listView?.document.bookmark(forPageIndex: UInt(page.pageIndex())) != nil } var text = KMLocalizedString("Add Bookmark") if isHoveBookMark == true { text = KMLocalizedString("Remove Bookmark") } let addBook_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(keyEquivalent: nil, text: text, identifier: PDFViewMenuIdentifier_Normal_AddBook,representedObject: theEvent) return addBook_Menuitem } class func readerModeItemProperty(theEvent:NSEvent?)->ComponentMenuitemProperty { let readModel = UserDefaults.standard.bool(forKey: CPDFViewIsReadModeKey) var text = KMLocalizedString("Read Mode On") if readModel == true { text = KMLocalizedString("Read Mode Off") } else { text = KMLocalizedString("Read Mode On") } let readerMode_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(keyEquivalent: nil, text: text, identifier: PDFViewMenuIdentifier_Normal_ReadMode,representedObject: theEvent) return readerMode_Menuitem } class func scrollMenuItemProperty(theEvent:NSEvent?,listView:CPDFListView?)->ComponentMenuitemProperty { let scroll_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(keyEquivalent: nil, text: KMLocalizedString("Auto Scroll"), identifier: PDFViewMenuIdentifier_Normal_AutoScroll,representedObject: theEvent) if ((listView?.isAutoFlow()) == true) { scroll_Menuitem.righticon = NSImage(named: "KMNImageNameMenuSelect") } return scroll_Menuitem } class func hightLinkMenuItemProperty(theEvent:NSEvent?)->ComponentMenuitemProperty { let hightLink_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(keyEquivalent: nil, text: KMLocalizedString("Highlight Links"), identifier: PDFViewMenuIdentifier_Normal_HightLink,representedObject: theEvent) let highlightLinkFiled = CPDFKitConfig.sharedInstance().enableLinkFieldHighlight() if highlightLinkFiled { hightLink_Menuitem.righticon = NSImage(named: "KMNImageNameMenuSelect") } return hightLink_Menuitem } class func hightFormMenuItemProperty(theEvent:NSEvent?)->ComponentMenuitemProperty { let hightForm_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(keyEquivalent: nil, text: KMLocalizedString("Highlight Form Fields"), identifier: PDFViewMenuIdentifier_Normal_HightForm,representedObject: theEvent) let highlightFormFiled = CPDFKitConfig.sharedInstance().enableFormFieldHighlight() if highlightFormFiled { hightForm_Menuitem.righticon = NSImage(named: "KMNImageNameMenuSelect") } return hightForm_Menuitem } class func resetFormItemProperty(theEvent:NSEvent?,listView:CPDFListView?)->ComponentMenuitemProperty { let resetForm_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(keyEquivalent: nil, text: KMLocalizedString("Reset Form"), identifier: PDFViewMenuIdentifier_Normal_RestForm,representedObject: listView) return resetForm_Menuitem } class func searchItemProperty(theEvent:NSEvent?)->ComponentMenuitemProperty { let search_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(keyEquivalent: "⌘F", text: KMLocalizedString("Search"), identifier: PDFViewMenuIdentifier_Normal_Search,representedObject: theEvent) return search_Menuitem } class func printProperty(theEvent:NSEvent?,listView:CPDFListView?)->ComponentMenuitemProperty { let print_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(keyEquivalent: "⌘P", text: KMLocalizedString("Print"), identifier: PDFViewMenuIdentifier_Normal_Print,representedObject: listView) return print_Menuitem } class func propertieItemProperty(theEvent:NSEvent?,listView:CPDFListView?)->ComponentMenuitemProperty { let propertie_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(keyEquivalent: "⌘D", text: KMLocalizedString("Properties..."), identifier: PDFViewMenuIdentifier_Normal_Properties,representedObject: listView) return propertie_Menuitem } class func copyItemProperty(theEvent:NSEvent?)->ComponentMenuitemProperty { let copy_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(keyEquivalent: "⌘C", text: KMLocalizedString("Copy"), identifier: PDFViewMenuIdentifier_Normal_Copy,representedObject: theEvent) return copy_Menuitem } class func hightMarkItemProperty(theEvent:NSEvent?)->ComponentMenuitemProperty { let hightMark_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(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", 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", 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", 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", 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", text: KMLocalizedString("Circle"), identifier: PDFViewMenuIdentifier_Normal_Circle,representedObject: theEvent) return propertie_Menuitem } class func addOutlineItemProperty(theEvent:NSEvent?)->ComponentMenuitemProperty { let propertie_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(keyEquivalent: nil, text: KMLocalizedString("Add Outline Item"), identifier: PDFViewMenuIdentifier_Normal_AddOutLine,representedObject: theEvent) return propertie_Menuitem } class func ttsItemProperty(theEvent:NSEvent?)->ComponentMenuitemProperty { let propertie_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(keyEquivalent: nil, text: KMLocalizedString("TTS"), identifier: PDFViewMenuIdentifier_Normal_TTS,representedObject: theEvent) return propertie_Menuitem } class func searchTextItemProperty(theEvent:NSEvent?,listView:CPDFListView?)->ComponentMenuitemProperty { let propertie_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(keyEquivalent: nil, text: KMLocalizedString("Search") + " " + "\"" + (listView?.currentSelection.string() ?? "") + "\"", identifier: PDFViewMenuIdentifier_Normal_SearchText,representedObject: listView) return propertie_Menuitem } class func selectAllFormItemProperty(theEvent:NSEvent?,listView:CPDFListView?)->ComponentMenuitemProperty { let propertie_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(keyEquivalent: "⌘A", text: KMLocalizedString("Select All"), identifier: PDFViewMenuIdentifier_Normal_SelectAllForm,representedObject: listView) return propertie_Menuitem } class func showFormNameItemProperty(theEvent:NSEvent?,listView:CPDFListView?)->ComponentMenuitemProperty { let propertie_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(keyEquivalent: nil, text: KMLocalizedString("Display name"), identifier: PDFViewMenuIdentifier_Normal_ShowFormName,representedObject: listView) if(listView?.showFormFieldName == true) { propertie_Menuitem.righticon = NSImage(named: "KMNImageNameMenuSelect") } return propertie_Menuitem } class func selectAllAnnoationItemProperty(theEvent:NSEvent?,listView:CPDFListView?)->ComponentMenuitemProperty { let propertie_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(keyEquivalent: "⌥⌘A", text: KMLocalizedString("Select All Annotation"), identifier: PDFViewMenuIdentifier_Normal_SelectAllAnnotation,representedObject: listView) return propertie_Menuitem } class func showAnnoationItemProperty(theEvent:NSEvent?,listView:CPDFListView?)->ComponentMenuitemProperty { let hideNotes = listView?.hideNotes var text = KMLocalizedString("Show Note") if hideNotes == true { text = KMLocalizedString("Show Note") } else { text = KMLocalizedString("Hiden Note") } let propertie_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(keyEquivalent: nil, text: text, identifier: PDFViewMenuIdentifier_Normal_ShowAnnotation,representedObject: listView) return propertie_Menuitem } class func copyTextItemProperty(theEvent:NSEvent?)->ComponentMenuitemProperty { let propertie_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(keyEquivalent: "⌘C", text: KMLocalizedString("Copy Text"), identifier: PDFViewMenuIdentifier_Normal_CopyText,representedObject: theEvent) return propertie_Menuitem } class func cutProperty(theEvent:NSEvent?)->ComponentMenuitemProperty { let propertie_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(keyEquivalent: "⌘X", text: KMLocalizedString("Cut"), identifier: PDFViewMenuIdentifier_Normal_Cut,representedObject: theEvent) return propertie_Menuitem } class func deleteProperty(theEvent:NSEvent?)->ComponentMenuitemProperty { let propertie_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(keyEquivalent: "⌫", text: KMLocalizedString("Delete"), identifier: PDFViewMenuIdentifier_Normal_Delete,representedObject: theEvent) return propertie_Menuitem } class func showPopProperty(theEvent:NSEvent?)->ComponentMenuitemProperty { let propertie_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(keyEquivalent: nil, text: KMLocalizedString("Show Levitating tools..."), identifier: PDFViewMenuIdentifier_Normal_ShowPopUI,representedObject: theEvent) return propertie_Menuitem } class func linkReadProperty(theEvent:NSEvent?,listView:CPDFListView?)->ComponentMenuitemProperty { let propertie_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(keyEquivalent: nil, text: KMLocalizedString("Preview"), identifier: PDFViewMenuIdentifier_Normal_LinkReade,representedObject: theEvent) return propertie_Menuitem } class func sortAnnotationMenuItemProperty(theEvent:NSEvent?,listView:CPDFListView?)->ComponentMenuitemProperty { let properties_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(multipleSelect: false, itemSelected: false, isDisabled: false, keyEquivalent: nil, text: KMLocalizedString("Sort"), identifier: PDFViewMenuIdentifier_Normal_SortAnnotation) var subMenuItemArr: [ComponentMenuitemProperty] = [] let subItem0Property: ComponentMenuitemProperty = ComponentMenuitemProperty(text: KMLocalizedString("Bring to Front"),identifier: PDFViewMenuIdentifier_Normal_SortFirstAnnotation, representedObject: listView) let subItem1Property: ComponentMenuitemProperty = ComponentMenuitemProperty(text: KMLocalizedString("Bring Forward"),identifier: PDFViewMenuIdentifier_Normal_SortTopAnnotation, representedObject: listView) let subItem2Property: ComponentMenuitemProperty = ComponentMenuitemProperty( text: KMLocalizedString("Send Backward"),identifier: PDFViewMenuIdentifier_Normal_SortBottomAnnotation, representedObject: listView) let subItem3Property: ComponentMenuitemProperty = ComponentMenuitemProperty(text: KMLocalizedString("Send to Back"),identifier: PDFViewMenuIdentifier_Normal_SortLastAnnotation, representedObject: listView) subMenuItemArr.append(subItem0Property) subMenuItemArr.append(subItem1Property) subMenuItemArr.append(subItem2Property) subMenuItemArr.append(subItem3Property) properties_Menuitem.subPropertys = subMenuItemArr return properties_Menuitem } class func editContentProperty(theEvent:NSEvent?,listView:CPDFListView?)->ComponentMenuitemProperty { let propertie_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(keyEquivalent: nil, text: KMLocalizedString("Edit"), identifier: PDFViewMenuIdentifier_Normal_Content,representedObject: theEvent) return propertie_Menuitem } class func redactApplyProperty(theEvent:NSEvent?,listView:CPDFListView?)->ComponentMenuitemProperty { let propertie_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(keyEquivalent: nil, text: KMLocalizedString("Apply Redactions"), identifier: PDFViewMenuIdentifier_Redact_Apply,representedObject: listView) return propertie_Menuitem } class func redactMultiPageProperty(theEvent:NSEvent?,listView:CPDFListView?)->ComponentMenuitemProperty { let propertie_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(keyEquivalent: nil, text: KMLocalizedString("Repeat Mark Across Pages"), identifier: PDFViewMenuIdentifier_Redact_Multipage,representedObject: listView) return propertie_Menuitem } class func redactDefaultProperty(theEvent:NSEvent?,listView:CPDFListView?)->ComponentMenuitemProperty { let propertie_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(keyEquivalent: nil, text: KMLocalizedString("Make Current Properties Default"), identifier: PDFViewMenuIdentifier_Redact_Default,representedObject: listView) return propertie_Menuitem } class func splitViewMenuItemProperty(theEvent:NSEvent?,listView:CPDFListView?)->ComponentMenuitemProperty { let properties_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(text: KMLocalizedString("Split View"), identifier: PDFViewMenuIdentifier_Split_ViewMode) var subMenuItemArr: [ComponentMenuitemProperty] = [] 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) let subItem2Property: ComponentMenuitemProperty = ComponentMenuitemProperty( text: KMLocalizedString("Vertical"),identifier: PDFViewMenuIdentifier_Split_ViewVerticalMode, representedObject: listView) subMenuItemArr.append(subItem0Property) subMenuItemArr.append(subItem1Property) subMenuItemArr.append(subItem2Property) properties_Menuitem.subPropertys = subMenuItemArr return properties_Menuitem } class func splitSyncProperty(theEvent:NSEvent?,listView:CPDFListView?)->ComponentMenuitemProperty { let propertie_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(keyEquivalent: nil, text: KMLocalizedString("Scroll and zoom simultaneously"), identifier: PDFViewMenuIdentifier_Split_Sync,representedObject: listView) return propertie_Menuitem } class func showBarProperty(theEvent:NSEvent?,listView:CPDFListView?)->ComponentMenuitemProperty { let propertie_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(keyEquivalent: nil, text: KMLocalizedString("Show Status Bar"), identifier: PDFViewMenuIdentifier_Split_ShowBar,representedObject: listView) if(listView?.isShowSplitBar == true) { propertie_Menuitem.righticon = NSImage(named: "KMNImageNameMenuSelect") } return propertie_Menuitem } class func objectAlightProperty(theEvent:NSEvent?,listView:CPDFListView?)->ComponentMenuitemProperty { let propertie_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(keyEquivalent: nil, text: KMLocalizedString("Align"), identifier: PDFViewMenuIdentifier_Normal_Aligning,representedObject: listView) var subMenuItemArr: [ComponentMenuitemProperty] = [] let subItem0Property: ComponentMenuitemProperty = ComponentMenuitemProperty(text: KMLocalizedString("Align Left"),identifier: PDFViewMenuIdentifier_Normal_LeftAlight, representedObject: listView) let subItem1Property: ComponentMenuitemProperty = ComponentMenuitemProperty(text: KMLocalizedString("Align Vertically"),identifier: PDFViewMenuIdentifier_Normal_HorizontallyAlight, representedObject: listView) let subItem2Property: ComponentMenuitemProperty = ComponentMenuitemProperty( text: KMLocalizedString("Align Right"),identifier: PDFViewMenuIdentifier_Normal_RightAlight, representedObject: listView) let subItem3Property: ComponentMenuitemProperty = ComponentMenuitemProperty( text: KMLocalizedString("Align Top"),identifier: PDFViewMenuIdentifier_Normal_TopAlight, representedObject: listView) let subItem4Property: ComponentMenuitemProperty = ComponentMenuitemProperty( text: KMLocalizedString("Align Horizontally"),identifier: PDFViewMenuIdentifier_Normal_HorizontallyAlight, representedObject: listView) let subItem5Property: ComponentMenuitemProperty = ComponentMenuitemProperty( text: KMLocalizedString("Align Bottom"),identifier: PDFViewMenuIdentifier_Normal_BottomAlight, representedObject: listView) let subItem6Property: ComponentMenuitemProperty = ComponentMenuitemProperty( text: KMLocalizedString("Distribute Vertically"),identifier: PDFViewMenuIdentifier_Normal_DistributeVertically, representedObject: listView) let subItem7Property: ComponentMenuitemProperty = ComponentMenuitemProperty( text: KMLocalizedString("Distribute Horizontally"),identifier: PDFViewMenuIdentifier_Normal_DistributeHorizontally, representedObject: listView) subMenuItemArr.append(subItem0Property) subMenuItemArr.append(subItem1Property) subMenuItemArr.append(subItem2Property) subMenuItemArr.append(ComponentMenuitemProperty.divider()) subMenuItemArr.append(subItem3Property) subMenuItemArr.append(subItem4Property) subMenuItemArr.append(subItem5Property) if listView?.activeAnnotations.count ?? 0 > 3 || listView?.km_EditingAreas().count ?? 0 > 3 { subMenuItemArr.append(ComponentMenuitemProperty.divider()) subMenuItemArr.append(subItem6Property) subMenuItemArr.append(subItem7Property) } propertie_Menuitem.subPropertys = subMenuItemArr return propertie_Menuitem } class func exportProperty(theEvent:NSEvent?,listView:CPDFListView?)->ComponentMenuitemProperty { let propertie_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(keyEquivalent: nil, text: KMLocalizedString("Export"), identifier: PDFViewMenuIdentifier_Normal_Export,representedObject: listView) var subMenuItemArr: [ComponentMenuitemProperty] = [] let subItem0Property: ComponentMenuitemProperty = ComponentMenuitemProperty(text: KMLocalizedString("JPG"),identifier: PDFViewMenuIdentifier_Normal_ExportJPG, representedObject: listView) let subItem1Property: ComponentMenuitemProperty = ComponentMenuitemProperty(text: KMLocalizedString("PNG"),identifier: PDFViewMenuIdentifier_Normal_ExportPNG, representedObject: listView) let subItem2Property: ComponentMenuitemProperty = ComponentMenuitemProperty( text: KMLocalizedString("PDF"),identifier: PDFViewMenuIdentifier_Normal_ExportPNG, representedObject: listView) subMenuItemArr.append(subItem0Property) subMenuItemArr.append(subItem1Property) subMenuItemArr.append(subItem2Property) propertie_Menuitem.subPropertys = subMenuItemArr return propertie_Menuitem } class func editPastProperty(theEvent:NSEvent?,listView:CPDFListView?)->ComponentMenuitemProperty { let past_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(keyEquivalent: "⌘V", text: KMLocalizedString("Paste and Match Style"), identifier: PDFViewMenuIdentifier_Edit_Paste,representedObject: theEvent) return past_Menuitem } class func editPastNoStyleProperty(theEvent:NSEvent?,listView:CPDFListView?)->ComponentMenuitemProperty { let propertie_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(keyEquivalent: "⇧⌘V", text: KMLocalizedString("Paste"), identifier: PDFViewMenuIdentifier_Edit_NoStylePaste,representedObject: listView) return propertie_Menuitem } class func editSelectAllProperty(theEvent:NSEvent?,listView:CPDFListView?)->ComponentMenuitemProperty { let propertie_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(keyEquivalent: "⌘A", text: KMLocalizedString("Select All"), identifier: PDFViewMenuIdentifier_Edit_SelectAll,representedObject: listView) return propertie_Menuitem } class func addLinkProperty(theEvent:NSEvent?,listView:CPDFListView?)->ComponentMenuitemProperty { let propertie_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(keyEquivalent: "⇧⌘L", text: KMLocalizedString("Link"), identifier: PDFViewMenuIdentifier_Edit_AddLink,representedObject: listView) return propertie_Menuitem } class func addTextProperty(theEvent:NSEvent?,listView:CPDFListView?)->ComponentMenuitemProperty { let propertie_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(keyEquivalent: nil, text: KMLocalizedString("Add Text"), identifier: PDFViewMenuIdentifier_Edit_AddText,representedObject: listView) return propertie_Menuitem } class func addImageProperty(theEvent:NSEvent?,listView:CPDFListView?)->ComponentMenuitemProperty { let propertie_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(keyEquivalent: nil, text: KMLocalizedString("Add Image"), identifier: PDFViewMenuIdentifier_Edit_AddImage,representedObject: listView) return propertie_Menuitem } class func editFontProperty(theEvent:NSEvent?,listView:CPDFListView?)->ComponentMenuitemProperty { let propertie_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(keyEquivalent: nil, text: KMLocalizedString("Font"), identifier: PDFViewMenuIdentifier_Edit_Font, representedObject: listView) var subMenuItemArr: [ComponentMenuitemProperty] = [] let subItem0Property: ComponentMenuitemProperty = ComponentMenuitemProperty(keyEquivalent: "⌘B",text: KMLocalizedString("Bold"),identifier: PDFViewMenuIdentifier_Edit_FontBold, representedObject: listView) let subItem1Property: ComponentMenuitemProperty = ComponentMenuitemProperty(keyEquivalent: "⌘I",text: KMLocalizedString("Italic"),identifier: PDFViewMenuIdentifier_Edit_FontItalic, representedObject: listView) let subItem2Property: ComponentMenuitemProperty = ComponentMenuitemProperty( keyEquivalent: "⌘U",text: KMLocalizedString("Underline"),identifier: PDFViewMenuIdentifier_Edit_FontUnderline, representedObject: listView) let subItem3Property: ComponentMenuitemProperty = ComponentMenuitemProperty( keyEquivalent: nil,text: KMLocalizedString("Strikethrough"),identifier: PDFViewMenuIdentifier_Edit_FontStrikeout, representedObject: listView) let subItem4Property: ComponentMenuitemProperty = ComponentMenuitemProperty( keyEquivalent: "⌥⌘+",text: KMLocalizedString("Bigger"),identifier: PDFViewMenuIdentifier_Edit_FontZoomIn, representedObject: listView) let subItem5Property: ComponentMenuitemProperty = ComponentMenuitemProperty( keyEquivalent: "⌥⌘-",text: KMLocalizedString("Smaller"),identifier: PDFViewMenuIdentifier_Edit_FontZoomOut, representedObject: listView) let subItem6Property: ComponentMenuitemProperty = ComponentMenuitemProperty( keyEquivalent: "⇧⌘C",text: KMLocalizedString("Font Color"),identifier: PDFViewMenuIdentifier_Edit_FontColor, representedObject: listView) subMenuItemArr.append(subItem0Property) subMenuItemArr.append(subItem1Property) subMenuItemArr.append(subItem2Property) subMenuItemArr.append(subItem3Property) subMenuItemArr.append(ComponentMenuitemProperty.divider()) subMenuItemArr.append(subItem4Property) subMenuItemArr.append(subItem5Property) subMenuItemArr.append(ComponentMenuitemProperty.divider()) subMenuItemArr.append(subItem6Property) propertie_Menuitem.subPropertys = subMenuItemArr return propertie_Menuitem } class func editFontNameProperty(theEvent:NSEvent?,listView:CPDFListView?)->ComponentMenuitemProperty { let propertie_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(keyEquivalent: nil, text: KMLocalizedString("Default Style"), identifier: PDFViewMenuIdentifier_Edit_FontName, representedObject: listView) var subMenuItemArr: [ComponentMenuitemProperty] = [] let subItem0Property: ComponentMenuitemProperty = ComponentMenuitemProperty(keyEquivalent: nil,text: KMLocalizedString("H1 Headline"),identifier: PDFViewMenuIdentifier_Edit_FontH1Name, representedObject: listView) let subItem1Property: ComponentMenuitemProperty = ComponentMenuitemProperty(keyEquivalent: nil,text: KMLocalizedString("H2 Title"),identifier: PDFViewMenuIdentifier_Edit_FontH2Name, representedObject: listView) let subItem2Property: ComponentMenuitemProperty = ComponentMenuitemProperty( keyEquivalent: nil,text: KMLocalizedString("H3 Subtitle"),identifier: PDFViewMenuIdentifier_Edit_FontH3Name, representedObject: listView) let subItem3Property: ComponentMenuitemProperty = ComponentMenuitemProperty( keyEquivalent: nil,text: KMLocalizedString("B1 Text"),identifier: PDFViewMenuIdentifier_Edit_FontB1Name, representedObject: listView) let subItem4Property: ComponentMenuitemProperty = ComponentMenuitemProperty( keyEquivalent: nil,text: KMLocalizedString("B2 Small Text"),identifier: PDFViewMenuIdentifier_Edit_FontB2Name, representedObject: listView) let subItem5Property: ComponentMenuitemProperty = ComponentMenuitemProperty( keyEquivalent: nil,text: KMLocalizedString("B3 Describtion"),identifier: PDFViewMenuIdentifier_Edit_FontB3Name, representedObject: listView) subMenuItemArr.append(subItem0Property) subMenuItemArr.append(subItem1Property) subMenuItemArr.append(subItem2Property) subMenuItemArr.append(subItem3Property) subMenuItemArr.append(subItem4Property) subMenuItemArr.append(subItem5Property) propertie_Menuitem.subPropertys = subMenuItemArr return propertie_Menuitem } class func editFontAlighProperty(theEvent:NSEvent?,listView:CPDFListView?)->ComponentMenuitemProperty { let propertie_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(keyEquivalent: nil, text: KMLocalizedString("Align"), identifier: PDFViewMenuIdentifier_Edit_FontAlight,representedObject: listView) var subMenuItemArr: [ComponentMenuitemProperty] = [] let subItem0Property: ComponentMenuitemProperty = ComponentMenuitemProperty(keyEquivalent: "⌘{",text: KMLocalizedString("Align Left"),identifier: PDFViewMenuIdentifier_Edit_FontLeftAlight, representedObject: listView) let subItem1Property: ComponentMenuitemProperty = ComponentMenuitemProperty(keyEquivalent: "⌘|",text: KMLocalizedString("Center"),identifier: PDFViewMenuIdentifier_Edit_FontCenterAlight, representedObject: listView) let subItem2Property: ComponentMenuitemProperty = ComponentMenuitemProperty( keyEquivalent: "⌘}",text: KMLocalizedString("Align Right"),identifier: PDFViewMenuIdentifier_Edit_FontRightAlight, representedObject: listView) let subItem3Property: ComponentMenuitemProperty = ComponentMenuitemProperty( keyEquivalent: nil,text: KMLocalizedString("Align both ends"),identifier: PDFViewMenuIdentifier_Edit_FontJustAlight, representedObject: listView) subMenuItemArr.append(subItem0Property) subMenuItemArr.append(subItem1Property) subMenuItemArr.append(subItem2Property) subMenuItemArr.append(subItem3Property) propertie_Menuitem.subPropertys = subMenuItemArr return propertie_Menuitem } class func editRotateLeftProperty(theEvent:NSEvent?,listView:CPDFListView?)->ComponentMenuitemProperty { let propertie_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(keyEquivalent: nil, text: KMLocalizedString("Rotate Left"), identifier: PDFViewMenuIdentifier_Edit_RotateLeft,representedObject: listView) return propertie_Menuitem } class func editRotateRightProperty(theEvent:NSEvent?,listView:CPDFListView?)->ComponentMenuitemProperty { let propertie_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(keyEquivalent: nil, text: KMLocalizedString("Rotate Right"), identifier: PDFViewMenuIdentifier_Edit_RotateRight,representedObject: listView) return propertie_Menuitem } class func editHorizontalMirrorProperty(theEvent:NSEvent?,listView:CPDFListView?)->ComponentMenuitemProperty { let propertie_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(keyEquivalent: nil, text: KMLocalizedString("Flip horizontal"), identifier: PDFViewMenuIdentifier_Edit_HorizontalMirror,representedObject: listView) return propertie_Menuitem } class func editVerticalMirrorProperty(theEvent:NSEvent?,listView:CPDFListView?)->ComponentMenuitemProperty { let propertie_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(keyEquivalent: nil, text: KMLocalizedString("Flip vertical"), identifier: PDFViewMenuIdentifier_Edit_VerticalMirror,representedObject: listView) return propertie_Menuitem } class func editCropProperty(theEvent:NSEvent?,listView:CPDFListView?)->ComponentMenuitemProperty { let propertie_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(keyEquivalent: nil, text: KMLocalizedString("Crop"), identifier: PDFViewMenuIdentifier_Edit_Crop,representedObject: listView) return propertie_Menuitem } class func editReplaceProperty(theEvent:NSEvent?,listView:CPDFListView?)->ComponentMenuitemProperty { let propertie_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(keyEquivalent: nil, text: KMLocalizedString("Replace"), identifier: PDFViewMenuIdentifier_Edit_Replace,representedObject: listView) return propertie_Menuitem } class func redactPropertiesProperty(theEvent:NSEvent?,listView:CPDFListView?)->ComponentMenuitemProperty { let propertie_Menuitem: ComponentMenuitemProperty = ComponentMenuitemProperty(keyEquivalent: nil, text: KMLocalizedString("Properties..."), identifier: PDFViewMenuIdentifier_Normal_RedactProperties,representedObject: listView) return propertie_Menuitem } class func clickMenuUI(items:[String],theEvent:NSEvent?,listView:CPDFListView?)->KMNMenuStruct { var viewHeight: CGFloat = 8 var menuItemArr: [ComponentMenuitemProperty] = [] for item in items { if item == PDFViewMenuIdentifier_Normal_AITool { menuItemArr.append(KMPDFMenuConfig.aiMenuItemProperty(theEvent: theEvent)) } else if item == PDFViewMenuIdentifier_Normal_Past { menuItemArr.append(KMPDFMenuConfig.pasteNumMenuItemProperty(theEvent: theEvent)) } else if item == PDFViewMenuIdentifier_Normal_SelectAllText { menuItemArr.append(KMPDFMenuConfig.seletAllMenuItemProperty(theEvent: theEvent,listView: listView)) } else if item == PDFViewMenuIdentifier_Normal_AddBook { menuItemArr.append(KMPDFMenuConfig.addBookMenuItemProperty(theEvent: theEvent,listView: listView)) } else if item == PDFViewMenuIdentifier_Normal_ViewTools { menuItemArr.append(KMPDFMenuConfig.viewModeMenuItemProperty(theEvent: theEvent)) } else if item == PDFViewMenuIdentifier_Normal_PageView { menuItemArr.append(KMPDFMenuConfig.pageViewMenuItemProperty(theEvent: theEvent,listView: listView)) } else if item == PDFViewMenuIdentifier_Normal_ReadMode { menuItemArr.append(KMPDFMenuConfig.readerModeItemProperty(theEvent: theEvent)) } else if item == PDFViewMenuIdentifier_Normal_Scale { menuItemArr.append(KMPDFMenuConfig.scaleViewMenuItemProperty(theEvent: theEvent,listView: listView)) } else if item == PDFViewMenuIdentifier_Normal_PageRotate { menuItemArr.append(KMPDFMenuConfig.pageRotateMenuItemProperty(theEvent: theEvent,listView: listView)) } else if item == PDFViewMenuIdentifier_Normal_PageNum { menuItemArr.append(KMPDFMenuConfig.pageNumMenuItemProperty(theEvent: theEvent,listView: listView)) } else if item == PDFViewMenuIdentifier_Normal_AutoScroll { menuItemArr.append(KMPDFMenuConfig.scrollMenuItemProperty(theEvent: theEvent,listView: listView)) } else if item == PDFViewMenuIdentifier_Normal_HightForm { menuItemArr.append(KMPDFMenuConfig.hightFormMenuItemProperty(theEvent: theEvent)) } else if item == PDFViewMenuIdentifier_Normal_HightLink { menuItemArr.append(KMPDFMenuConfig.hightLinkMenuItemProperty(theEvent: theEvent)) } else if item == PDFViewMenuIdentifier_Normal_RestForm { menuItemArr.append(KMPDFMenuConfig.resetFormItemProperty(theEvent: theEvent,listView: listView)) } else if item == PDFViewMenuIdentifier_Normal_Search { menuItemArr.append(KMPDFMenuConfig.searchItemProperty(theEvent: theEvent)) } else if item == PDFViewMenuIdentifier_Normal_Print { menuItemArr.append(KMPDFMenuConfig.printProperty(theEvent: theEvent,listView: listView)) } else if item == PDFViewMenuIdentifier_Normal_Properties { menuItemArr.append(KMPDFMenuConfig.propertieItemProperty(theEvent: theEvent,listView: listView)) } else if item == PDFViewMenuIdentifier_Space { menuItemArr.append(ComponentMenuitemProperty.divider()) } else if item == PDFViewMenuIdentifier_Normal_Copy { menuItemArr.append(KMPDFMenuConfig.copyItemProperty(theEvent: theEvent)) } else if item == PDFViewMenuIdentifier_Normal_Hight { menuItemArr.append(KMPDFMenuConfig.hightMarkItemProperty(theEvent: theEvent)) } else if item == PDFViewMenuIdentifier_Normal_Underline { menuItemArr.append(KMPDFMenuConfig.underLineItemProperty(theEvent: theEvent)) } else if item == PDFViewMenuIdentifier_Normal_Squiggly { menuItemArr.append(KMPDFMenuConfig.squigglyItemProperty(theEvent: theEvent)) } else if item == PDFViewMenuIdentifier_Normal_StrikeOut { menuItemArr.append(KMPDFMenuConfig.strikethroughItemProperty(theEvent: theEvent)) } else if item == PDFViewMenuIdentifier_Normal_Square { menuItemArr.append(KMPDFMenuConfig.squareItemProperty(theEvent: theEvent)) } else if item == PDFViewMenuIdentifier_Normal_Circle { menuItemArr.append(KMPDFMenuConfig.circleItemProperty(theEvent: theEvent)) } else if item == PDFViewMenuIdentifier_Normal_AddOutLine { menuItemArr.append(KMPDFMenuConfig.addOutlineItemProperty(theEvent: theEvent)) } else if item == PDFViewMenuIdentifier_Normal_TTS { menuItemArr.append(KMPDFMenuConfig.ttsItemProperty(theEvent: theEvent)) } else if item == PDFViewMenuIdentifier_Normal_SearchText { menuItemArr.append(KMPDFMenuConfig.searchTextItemProperty(theEvent: theEvent, listView: listView)) } else if item == PDFViewMenuIdentifier_Normal_SelectAllForm { menuItemArr.append(KMPDFMenuConfig.selectAllFormItemProperty(theEvent: theEvent,listView: listView)) } else if item == PDFViewMenuIdentifier_Normal_ShowFormName { menuItemArr.append(KMPDFMenuConfig.showFormNameItemProperty(theEvent: theEvent, listView: listView)) } else if item == PDFViewMenuIdentifier_Normal_SelectAllAnnotation { menuItemArr.append(KMPDFMenuConfig.selectAllAnnoationItemProperty(theEvent: theEvent,listView: listView)) } else if item == PDFViewMenuIdentifier_Normal_ShowAnnotation { menuItemArr.append(KMPDFMenuConfig.showAnnoationItemProperty(theEvent: theEvent, listView: listView)) } else if item == PDFViewMenuIdentifier_Normal_CopyText { menuItemArr.append(KMPDFMenuConfig.copyTextItemProperty(theEvent: theEvent)) } else if item == PDFViewMenuIdentifier_Normal_Cut { menuItemArr.append(KMPDFMenuConfig.cutProperty(theEvent: theEvent)) } else if item == PDFViewMenuIdentifier_Normal_Delete { menuItemArr.append(KMPDFMenuConfig.deleteProperty(theEvent: theEvent)) } else if item == PDFViewMenuIdentifier_Normal_ShowPopUI { menuItemArr.append(KMPDFMenuConfig.showPopProperty(theEvent: theEvent)) } else if item == PDFViewMenuIdentifier_Normal_LinkReade { menuItemArr.append(KMPDFMenuConfig.linkReadProperty(theEvent: theEvent, listView: listView)) } else if item == PDFViewMenuIdentifier_Normal_SortAnnotation { menuItemArr.append(KMPDFMenuConfig.sortAnnotationMenuItemProperty(theEvent: theEvent, listView: listView)) } else if item == PDFViewMenuIdentifier_Normal_Content { menuItemArr.append(KMPDFMenuConfig.editContentProperty(theEvent: theEvent, listView: listView)) } else if item == PDFViewMenuIdentifier_Normal_ShowAnnotation { menuItemArr.append(KMPDFMenuConfig.showAnnoationItemProperty(theEvent: theEvent, listView: listView)) } else if item == PDFViewMenuIdentifier_Redact_Apply { menuItemArr.append(KMPDFMenuConfig.redactApplyProperty(theEvent: theEvent, listView: listView)) } else if item == PDFViewMenuIdentifier_Redact_Multipage { menuItemArr.append(KMPDFMenuConfig.redactMultiPageProperty(theEvent: theEvent, listView: listView)) } else if item == PDFViewMenuIdentifier_Redact_Default { menuItemArr.append(KMPDFMenuConfig.redactDefaultProperty(theEvent: theEvent, listView: listView)) } else if item == PDFViewMenuIdentifier_Split_ViewMode { menuItemArr.append(KMPDFMenuConfig.splitViewMenuItemProperty(theEvent: theEvent, listView: listView)) } else if item == PDFViewMenuIdentifier_Split_Sync { menuItemArr.append(KMPDFMenuConfig.splitSyncProperty(theEvent: theEvent, listView: listView)) } else if item == PDFViewMenuIdentifier_Split_ShowBar { menuItemArr.append(KMPDFMenuConfig.showBarProperty(theEvent: theEvent, listView: listView)) } else if item == PDFViewMenuIdentifier_Normal_Aligning { menuItemArr.append(KMPDFMenuConfig.objectAlightProperty(theEvent: theEvent, listView: listView)) } else if item == PDFViewMenuIdentifier_Normal_Export { menuItemArr.append(KMPDFMenuConfig.exportProperty(theEvent: theEvent, listView: listView)) } else if item == PDFViewMenuIdentifier_Edit_Paste { menuItemArr.append(KMPDFMenuConfig.editPastProperty(theEvent: theEvent, listView: listView)) } else if item == PDFViewMenuIdentifier_Edit_NoStylePaste { menuItemArr.append(KMPDFMenuConfig.editPastNoStyleProperty(theEvent: theEvent, listView: listView)) } else if item == PDFViewMenuIdentifier_Edit_SelectAll { menuItemArr.append(KMPDFMenuConfig.editSelectAllProperty(theEvent: theEvent, listView: listView)) } else if item == PDFViewMenuIdentifier_Edit_AddLink { menuItemArr.append(KMPDFMenuConfig.addLinkProperty(theEvent: theEvent, listView: listView)) } else if item == PDFViewMenuIdentifier_Edit_AddText { menuItemArr.append(KMPDFMenuConfig.addTextProperty(theEvent: theEvent, listView: listView)) } else if item == PDFViewMenuIdentifier_Edit_AddImage { menuItemArr.append(KMPDFMenuConfig.addImageProperty(theEvent: theEvent, listView: listView)) } else if item == PDFViewMenuIdentifier_Edit_Font { menuItemArr.append(KMPDFMenuConfig.editFontProperty(theEvent: theEvent, listView: listView)) } else if item == PDFViewMenuIdentifier_Edit_FontName { menuItemArr.append(KMPDFMenuConfig.editFontNameProperty(theEvent: theEvent, listView: listView)) } else if item == PDFViewMenuIdentifier_Edit_FontAlight { menuItemArr.append(KMPDFMenuConfig.editFontAlighProperty(theEvent: theEvent, listView: listView)) } else if item == PDFViewMenuIdentifier_Edit_RotateLeft { menuItemArr.append(KMPDFMenuConfig.editRotateLeftProperty(theEvent: theEvent, listView: listView)) } else if item == PDFViewMenuIdentifier_Edit_RotateRight { menuItemArr.append(KMPDFMenuConfig.editRotateRightProperty(theEvent: theEvent, listView: listView)) } else if item == PDFViewMenuIdentifier_Edit_HorizontalMirror { menuItemArr.append(KMPDFMenuConfig.editHorizontalMirrorProperty(theEvent: theEvent, listView: listView)) } else if item == PDFViewMenuIdentifier_Edit_VerticalMirror { menuItemArr.append(KMPDFMenuConfig.editVerticalMirrorProperty(theEvent: theEvent, listView: listView)) } else if item == PDFViewMenuIdentifier_Edit_Crop { menuItemArr.append(KMPDFMenuConfig.editCropProperty(theEvent: theEvent, listView: listView)) } else if item == PDFViewMenuIdentifier_Edit_Replace { menuItemArr.append(KMPDFMenuConfig.editReplaceProperty(theEvent: theEvent, listView: listView)) } else if item == PDFViewMenuIdentifier_Normal_RedactProperties { menuItemArr.append(KMPDFMenuConfig.redactPropertiesProperty(theEvent: theEvent, listView: listView)) } if(item == PDFViewMenuIdentifier_Space) { viewHeight += 8 } else { viewHeight += 36 } } let menuStruct = KMNMenuStruct(menuitems: menuItemArr, viewHeight: viewHeight) return menuStruct } }