12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259 |
- //
- // 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
- }
-
- }
|