|
@@ -18,6 +18,7 @@ import Cocoa
|
|
|
case Form
|
|
|
case FillSign
|
|
|
case Tool
|
|
|
+ case redact
|
|
|
case Move
|
|
|
case Magnify
|
|
|
case Select
|
|
@@ -407,11 +408,14 @@ extension KMToolbarViewController : KMToolbarViewDelegate,NSToolbarItemValidatio
|
|
|
return []
|
|
|
case .Main:
|
|
|
return [KMDocumentAnnotationToolbarItemIdentifier,
|
|
|
- KMDocumentEditToolbarItemIdentifier,
|
|
|
KMDocumentPageToolbarItemIdentifier,
|
|
|
+ KMDocumentToolToolbarItemIdentifier,
|
|
|
KMDocumentConversonToolbarItemIdentifier,
|
|
|
-// KMDocumentFillSginToolbarItemIdentifier,
|
|
|
- KMDocumentToolToolbarItemIdentifier]
|
|
|
+ KMDocumentFormToolbarItemIdentifier,
|
|
|
+ KMDocumentFillSginToolbarItemIdentifier,
|
|
|
+ KMDocumentEditToolbarItemIdentifier,
|
|
|
+ KMDocumentRedactToolbarItemIdentifier,
|
|
|
+ KMDocumentScanOCRToolbarItemIdentifier]
|
|
|
case .Annatiton,.Magnify,.Move,.Select,.SelectZoom:
|
|
|
return [KMToolbarMoveToolModeItemIdentifier,
|
|
|
KMToolbarMagnifyToolModeItemIdentifier,
|
|
@@ -562,12 +566,14 @@ extension KMToolbarViewController : KMToolbarViewDelegate,NSToolbarItemValidatio
|
|
|
menuItem.tag = item!.btnTag
|
|
|
item?.menuFormRepresentation = menuItem
|
|
|
} else if identifier == KMDocumentAnnotationToolbarItemIdentifier {
|
|
|
- item?.titleName = NSLocalizedString("Annotation", comment: "")
|
|
|
+ item?.titleName = NSLocalizedString("Tools", comment: "")
|
|
|
+ item?.image = NSImage(named: "KMImageNameUXIconToolbarMytoolsNor")
|
|
|
item?.target = self
|
|
|
- item?.isMainTool = true
|
|
|
+// item?.isMainTool = true
|
|
|
item?.toolTip = NSLocalizedString("Add annotation with highlight, text and shape tool", comment: "")
|
|
|
item?.btnTag = KMToolbarViewType.Annatiton.rawValue
|
|
|
item?.btnAction = #selector(leftControllButtonAction)
|
|
|
+ item?.boxImagePosition = .imageAbove
|
|
|
|
|
|
let menuItem = NSMenuItem.init(title: item!.titleName ?? "", action: #selector(leftControllButtonAction), target: self)
|
|
|
menuItem.target = self
|
|
@@ -576,10 +582,13 @@ extension KMToolbarViewController : KMToolbarViewDelegate,NSToolbarItemValidatio
|
|
|
} else if identifier == KMDocumentPageToolbarItemIdentifier {
|
|
|
item?.titleName = NSLocalizedString("Page Edit", comment: "")
|
|
|
item?.target = self
|
|
|
- item?.isMainTool = true
|
|
|
+// item?.isMainTool = true
|
|
|
+ item?.image = NSImage(named: "KMImageNameUXIconToolbarPageeditNor")
|
|
|
item?.toolTip = NSLocalizedString("PDF Page Editor: rotate, delete, paste, copy, and cut pages", comment: "")
|
|
|
item?.btnTag = KMToolbarViewType.Page.rawValue
|
|
|
item?.btnAction = #selector(leftControllButtonAction)
|
|
|
+ item?.boxImagePosition = .imageAbove
|
|
|
+
|
|
|
let menuItem = NSMenuItem.init(title: item!.titleName ?? "", action: #selector(leftControllButtonAction), target: self)
|
|
|
menuItem.target = self
|
|
|
menuItem.tag = item!.btnTag
|
|
@@ -587,19 +596,23 @@ extension KMToolbarViewController : KMToolbarViewDelegate,NSToolbarItemValidatio
|
|
|
} else if identifier == KMDocumentConversonToolbarItemIdentifier {
|
|
|
item?.titleName = NSLocalizedString("Converter", comment: "")
|
|
|
item?.target = self
|
|
|
- item?.isMainTool = true
|
|
|
+// item?.isMainTool = true
|
|
|
+ item?.image = NSImage(named: "KMImageNameUXIconToolbarConvertNor")
|
|
|
item?.toolTip = NSLocalizedString("Convert PDF to Word, Excel, PPT, RTF, CSV, HTML, Text and Image.", comment: "")
|
|
|
item?.btnTag = KMToolbarViewType.Conversion.rawValue
|
|
|
item?.btnAction = #selector(leftControllButtonAction)
|
|
|
+ item?.boxImagePosition = .imageAbove
|
|
|
|
|
|
let menuItem = NSMenuItem.init(title: item!.titleName ?? "", action: #selector(leftControllButtonAction), target: self)
|
|
|
menuItem.target = self
|
|
|
menuItem.tag = item!.btnTag
|
|
|
item?.menuFormRepresentation = menuItem
|
|
|
} else if identifier == KMDocumentScanOCRToolbarItemIdentifier {
|
|
|
- item?.titleName = NSLocalizedString("Scan & OCR", comment: "")
|
|
|
+ item?.titleName = NSLocalizedString("OCR", comment: "")
|
|
|
item?.target = self
|
|
|
- item?.isMainTool = true
|
|
|
+// item?.isMainTool = true
|
|
|
+ item?.image = NSImage(named: "KMImageNameToolbarOCRNor")
|
|
|
+ item?.boxImagePosition = .imageAbove
|
|
|
item?.btnTag = KMToolbarViewType.ScanOCR.rawValue
|
|
|
item?.toolTip = NSLocalizedString("Scan & OCR", comment: "")
|
|
|
item?.btnAction = #selector(leftControllButtonAction)
|
|
@@ -628,9 +641,11 @@ extension KMToolbarViewController : KMToolbarViewDelegate,NSToolbarItemValidatio
|
|
|
item?.btnAction = #selector(scanOCRModelSelect)
|
|
|
|
|
|
} else if identifier == KMDocumentEditToolbarItemIdentifier {
|
|
|
- item?.titleName = NSLocalizedString("Edit", comment: "")
|
|
|
+ item?.titleName = NSLocalizedString("Edit PDF", comment: "")
|
|
|
item?.target = self
|
|
|
- item?.isMainTool = true
|
|
|
+// item?.isMainTool = true
|
|
|
+ item?.image = NSImage(named: "KMImageNameUXIconToolbarEditNor")
|
|
|
+ item?.boxImagePosition = .imageAbove
|
|
|
item?.btnTag = KMToolbarViewType.editPDF.rawValue
|
|
|
item?.toolTip = NSLocalizedString("Edit text and image in PDF", comment: "")
|
|
|
item?.btnAction = #selector(leftControllButtonAction)
|
|
@@ -640,9 +655,11 @@ extension KMToolbarViewController : KMToolbarViewDelegate,NSToolbarItemValidatio
|
|
|
menuItem.tag = item!.btnTag
|
|
|
item?.menuFormRepresentation = menuItem
|
|
|
} else if identifier == KMDocumentFormToolbarItemIdentifier {
|
|
|
- item?.titleName = NSLocalizedString("Form", comment: "")
|
|
|
+ item?.titleName = NSLocalizedString("Forms", comment: "")
|
|
|
item?.target = self
|
|
|
- item?.isMainTool = true
|
|
|
+// item?.isMainTool = true
|
|
|
+ item?.image = NSImage(named: "KMImageNameUXIconToolbarFormNor")
|
|
|
+ item?.boxImagePosition = .imageAbove
|
|
|
item?.btnTag = KMToolbarViewType.Form.rawValue
|
|
|
item?.toolTip = NSLocalizedString("Form", comment: "")
|
|
|
item?.btnAction = #selector(leftControllButtonAction)
|
|
@@ -652,9 +669,11 @@ extension KMToolbarViewController : KMToolbarViewDelegate,NSToolbarItemValidatio
|
|
|
menuItem.tag = item!.btnTag
|
|
|
item?.menuFormRepresentation = menuItem
|
|
|
} else if identifier == KMDocumentFillSginToolbarItemIdentifier {
|
|
|
- item?.titleName = NSLocalizedString("Fillsign", comment: "")
|
|
|
+ item?.titleName = NSLocalizedString("Fill & Sign", comment: "")
|
|
|
item?.target = self
|
|
|
- item?.isMainTool = true
|
|
|
+// item?.isMainTool = true
|
|
|
+ item?.image = NSImage(named: "KMImageNameUXIconToolbarFillsignNor")
|
|
|
+ item?.boxImagePosition = .imageAbove
|
|
|
item?.btnTag = KMToolbarViewType.FillSign.rawValue
|
|
|
item?.toolTip = NSLocalizedString("Fill and sign forms or allow others to sign them", comment: "")
|
|
|
item?.btnAction = #selector(leftControllButtonAction)
|
|
@@ -664,13 +683,28 @@ extension KMToolbarViewController : KMToolbarViewDelegate,NSToolbarItemValidatio
|
|
|
menuItem.tag = item!.btnTag
|
|
|
item?.menuFormRepresentation = menuItem
|
|
|
} else if identifier == KMDocumentToolToolbarItemIdentifier {
|
|
|
- item?.titleName = NSLocalizedString("Tools", comment: "")
|
|
|
+ item?.titleName = NSLocalizedString("Editor", comment: "")
|
|
|
item?.target = self
|
|
|
- item?.isMainTool = true
|
|
|
+// item?.isMainTool = true
|
|
|
+ item?.image = NSImage(named: "KMImageNameUXIconToolbarEdittoolNor")
|
|
|
+ item?.boxImagePosition = .imageAbove
|
|
|
item?.btnTag = KMToolbarViewType.Tool.rawValue
|
|
|
item?.toolTip = NSLocalizedString("Advanced editing tools", comment: "")
|
|
|
item?.btnAction = #selector(leftControllButtonAction)
|
|
|
|
|
|
+ let menuItem = NSMenuItem.init(title: item!.titleName ?? "", action: #selector(leftControllButtonAction), target: self)
|
|
|
+ menuItem.target = self
|
|
|
+ menuItem.tag = item!.btnTag
|
|
|
+ item?.menuFormRepresentation = menuItem
|
|
|
+ } else if identifier == KMDocumentRedactToolbarItemIdentifier {
|
|
|
+ item?.titleName = NSLocalizedString("Redact Text", comment: "")
|
|
|
+ item?.target = self
|
|
|
+ item?.image = NSImage(named: "KMImageNameUXIconToolbarRedactNor")
|
|
|
+ item?.boxImagePosition = .imageAbove
|
|
|
+ item?.btnTag = KMToolbarViewType.redact.rawValue
|
|
|
+ item?.toolTip = NSLocalizedString("Advanced editing tools", comment: "")
|
|
|
+ item?.btnAction = #selector(leftControllButtonAction)
|
|
|
+
|
|
|
let menuItem = NSMenuItem.init(title: item!.titleName ?? "", action: #selector(leftControllButtonAction), target: self)
|
|
|
menuItem.target = self
|
|
|
menuItem.tag = item!.btnTag
|