|
@@ -549,45 +549,26 @@ extension KMToolbarViewController : KMToolbarViewDelegate,NSToolbarItemValidatio
|
|
if identifier == KMLeftControlToolbarItemIdentifier {
|
|
if identifier == KMLeftControlToolbarItemIdentifier {
|
|
item?.image = NSImage(named: "KMImageNameUXIconBtnTriLeftNor")
|
|
item?.image = NSImage(named: "KMImageNameUXIconBtnTriLeftNor")
|
|
item?.titleName = NSLocalizedString("Panel", comment: "")
|
|
item?.titleName = NSLocalizedString("Panel", comment: "")
|
|
- item?.alternateImage = NSImage(named: "KMImageNameUXIconBtnTriLeftNor")
|
|
|
|
item?.target = self
|
|
item?.target = self
|
|
- item?.btnTag = KMToolbarViewType.LeftPanel.rawValue
|
|
|
|
item?.toolTip = NSLocalizedString("View Settings", comment: "")
|
|
item?.toolTip = NSLocalizedString("View Settings", comment: "")
|
|
item?.boxImagePosition = .imageAbove
|
|
item?.boxImagePosition = .imageAbove
|
|
item?.btnAction = #selector(leftPanelAction)
|
|
item?.btnAction = #selector(leftPanelAction)
|
|
-
|
|
|
|
- let menuItem = NSMenuItem.init(title: (item?.titleName)!, action: #selector(leftPanelAction), target: self)
|
|
|
|
- menuItem.target = self
|
|
|
|
- menuItem.tag = item!.btnTag
|
|
|
|
- item?.menuFormRepresentation = menuItem
|
|
|
|
} else if identifier == KMDocumentZoomToolbarItemIdentifier {
|
|
} else if identifier == KMDocumentZoomToolbarItemIdentifier {
|
|
item?.image = NSImage(named: "KMImageNameUXIconToolbarZoominNor")
|
|
item?.image = NSImage(named: "KMImageNameUXIconToolbarZoominNor")
|
|
item?.titleName = NSLocalizedString("", comment: "")
|
|
item?.titleName = NSLocalizedString("", comment: "")
|
|
- item?.alternateImage = NSImage(named: "KMImageNameUXIconToolbarZoominNor")
|
|
|
|
item?.target = self
|
|
item?.target = self
|
|
item?.btnTag = 1
|
|
item?.btnTag = 1
|
|
item?.toolTip = NSLocalizedString("Zoom In", comment: "")
|
|
item?.toolTip = NSLocalizedString("Zoom In", comment: "")
|
|
item?.boxImagePosition = .imageAbove
|
|
item?.boxImagePosition = .imageAbove
|
|
item?.btnAction = #selector(zoomPDFViewButtonAction)
|
|
item?.btnAction = #selector(zoomPDFViewButtonAction)
|
|
-
|
|
|
|
- let menuItem = NSMenuItem.init(title: (item?.titleName)!, action: #selector(zoomPDFViewButtonAction), target: self)
|
|
|
|
- menuItem.target = self
|
|
|
|
- menuItem.tag = item!.btnTag
|
|
|
|
- item?.menuFormRepresentation = menuItem
|
|
|
|
} else if identifier == KMDocumentZoomOutToolbarItemIdentifier {
|
|
} else if identifier == KMDocumentZoomOutToolbarItemIdentifier {
|
|
item?.image = NSImage(named: "KMImageNameUXIconToolbarZoomoutNor")
|
|
item?.image = NSImage(named: "KMImageNameUXIconToolbarZoomoutNor")
|
|
item?.titleName = NSLocalizedString("", comment: "")
|
|
item?.titleName = NSLocalizedString("", comment: "")
|
|
- item?.alternateImage = NSImage(named: "KMImageNameUXIconToolbarZoomoutNor")
|
|
|
|
item?.target = self
|
|
item?.target = self
|
|
item?.btnTag = 0
|
|
item?.btnTag = 0
|
|
item?.toolTip = NSLocalizedString("Zoom Out", comment: "")
|
|
item?.toolTip = NSLocalizedString("Zoom Out", comment: "")
|
|
item?.boxImagePosition = .imageAbove
|
|
item?.boxImagePosition = .imageAbove
|
|
item?.btnAction = #selector(zoomPDFViewButtonAction)
|
|
item?.btnAction = #selector(zoomPDFViewButtonAction)
|
|
-
|
|
|
|
- let menuItem = NSMenuItem.init(title: item?.titleName ?? "", action: #selector(zoomPDFViewButtonAction), target: self)
|
|
|
|
- menuItem.target = self
|
|
|
|
- menuItem.tag = item!.btnTag
|
|
|
|
- item?.menuFormRepresentation = menuItem
|
|
|
|
} else if identifier == KMDocumentZoomViewToolbarItemIdentifier{
|
|
} else if identifier == KMDocumentZoomViewToolbarItemIdentifier{
|
|
item?.titleName = NSLocalizedString("Zoom", comment: "")
|
|
item?.titleName = NSLocalizedString("Zoom", comment: "")
|
|
item?.target = self
|
|
item?.target = self
|
|
@@ -610,176 +591,103 @@ extension KMToolbarViewController : KMToolbarViewDelegate,NSToolbarItemValidatio
|
|
} else if identifier == KMDocumentNextPageToolbarItemIdentifier {
|
|
} else if identifier == KMDocumentNextPageToolbarItemIdentifier {
|
|
item?.image = NSImage(named: "KMImageNameToolbarPagenextNor")
|
|
item?.image = NSImage(named: "KMImageNameToolbarPagenextNor")
|
|
item?.titleName = NSLocalizedString("Next", comment: "")
|
|
item?.titleName = NSLocalizedString("Next", comment: "")
|
|
- item?.alternateImage = NSImage(named: "KMImageNameToolbarPagenextNor")
|
|
|
|
item?.target = self
|
|
item?.target = self
|
|
- item?.btnTag = 2
|
|
|
|
item?.toolTip = NSLocalizedString("Go To Next Page", comment: "")
|
|
item?.toolTip = NSLocalizedString("Go To Next Page", comment: "")
|
|
item?.boxImagePosition = .imageAbove
|
|
item?.boxImagePosition = .imageAbove
|
|
item?.btnAction = #selector(itemAction)
|
|
item?.btnAction = #selector(itemAction)
|
|
-
|
|
|
|
- let menuItem = NSMenuItem.init(title: item?.titleName ?? "", action: #selector(zoomPDFViewButtonAction), target: self)
|
|
|
|
- menuItem.target = self
|
|
|
|
- menuItem.tag = item!.btnTag
|
|
|
|
- item?.menuFormRepresentation = menuItem
|
|
|
|
} else if identifier == KMDocumentPreviousPageToolbarItemIdentifier {
|
|
} else if identifier == KMDocumentPreviousPageToolbarItemIdentifier {
|
|
item?.image = NSImage(named: "KMImageNameToolbarPagepreviousNor")
|
|
item?.image = NSImage(named: "KMImageNameToolbarPagepreviousNor")
|
|
item?.titleName = NSLocalizedString("Previous", comment: "")
|
|
item?.titleName = NSLocalizedString("Previous", comment: "")
|
|
- item?.alternateImage = NSImage(named: "KMImageNameToolbarPagepreviousNor")
|
|
|
|
item?.target = self
|
|
item?.target = self
|
|
- item?.btnTag = 3
|
|
|
|
item?.toolTip = NSLocalizedString("Go To Previous Page", comment: "")
|
|
item?.toolTip = NSLocalizedString("Go To Previous Page", comment: "")
|
|
item?.boxImagePosition = .imageAbove
|
|
item?.boxImagePosition = .imageAbove
|
|
item?.btnAction = #selector(itemAction)
|
|
item?.btnAction = #selector(itemAction)
|
|
-
|
|
|
|
- let menuItem = NSMenuItem.init(title: item!.titleName ?? "", action: #selector(zoomPDFViewButtonAction), target: self)
|
|
|
|
- menuItem.target = self
|
|
|
|
- menuItem.tag = item!.btnTag
|
|
|
|
- item?.menuFormRepresentation = menuItem
|
|
|
|
} else if identifier == KMDocumentHomeToolbarItemIdentifier {
|
|
} else if identifier == KMDocumentHomeToolbarItemIdentifier {
|
|
item?.image = NSImage(named: "KMImageNameToolbarHomeNor")
|
|
item?.image = NSImage(named: "KMImageNameToolbarHomeNor")
|
|
item?.titleName = NSLocalizedString("Home", comment: "")
|
|
item?.titleName = NSLocalizedString("Home", comment: "")
|
|
- item?.alternateImage = NSImage(named: "KMImageNameToolbarHomeNor")
|
|
|
|
item?.target = self
|
|
item?.target = self
|
|
- item?.btnTag = 4
|
|
|
|
item?.toolTip = NSLocalizedString("A Welcome Gift from Us", comment: "")
|
|
item?.toolTip = NSLocalizedString("A Welcome Gift from Us", comment: "")
|
|
item?.boxImagePosition = .imageAbove
|
|
item?.boxImagePosition = .imageAbove
|
|
item?.btnAction = #selector(itemAction)
|
|
item?.btnAction = #selector(itemAction)
|
|
-
|
|
|
|
- let menuItem = NSMenuItem.init(title: item!.titleName ?? "", action: #selector(zoomPDFViewButtonAction), target: self)
|
|
|
|
- menuItem.target = self
|
|
|
|
- menuItem.tag = item!.btnTag
|
|
|
|
- item?.menuFormRepresentation = menuItem
|
|
|
|
} else if identifier == KMDocumentAnnotationToolbarItemIdentifier {
|
|
} else if identifier == KMDocumentAnnotationToolbarItemIdentifier {
|
|
item?.titleName = NSLocalizedString("Tools", comment: "")
|
|
item?.titleName = NSLocalizedString("Tools", comment: "")
|
|
item?.image = NSImage(named: "KMImageNameUXIconToolbarMytoolsNor")
|
|
item?.image = NSImage(named: "KMImageNameUXIconToolbarMytoolsNor")
|
|
item?.target = self
|
|
item?.target = self
|
|
-// item?.isMainTool = true
|
|
|
|
item?.toolTip = String(format: "%@: %@, %@, %@, %@", KMLocalizedString("Tool Mode", nil),KMLocalizedString("Annotate", nil),KMLocalizedString("Scroll", nil),KMLocalizedString("Magnify", nil),KMLocalizedString("Select", nil))
|
|
item?.toolTip = String(format: "%@: %@, %@, %@, %@", KMLocalizedString("Tool Mode", nil),KMLocalizedString("Annotate", nil),KMLocalizedString("Scroll", nil),KMLocalizedString("Magnify", nil),KMLocalizedString("Select", nil))
|
|
item?.btnTag = KMToolbarViewType.Annatiton.rawValue
|
|
item?.btnTag = KMToolbarViewType.Annatiton.rawValue
|
|
item?.btnAction = #selector(leftControllButtonAction)
|
|
item?.btnAction = #selector(leftControllButtonAction)
|
|
item?.boxImagePosition = .imageAbove
|
|
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 == KMDocumentPageToolbarItemIdentifier {
|
|
} else if identifier == KMDocumentPageToolbarItemIdentifier {
|
|
item?.titleName = NSLocalizedString("Page Edit", comment: "")
|
|
item?.titleName = NSLocalizedString("Page Edit", comment: "")
|
|
item?.target = self
|
|
item?.target = self
|
|
-// item?.isMainTool = true
|
|
|
|
item?.image = NSImage(named: "KMImageNameUXIconToolbarPageeditNor")
|
|
item?.image = NSImage(named: "KMImageNameUXIconToolbarPageeditNor")
|
|
item?.toolTip = NSLocalizedString("PDF page editor: insert, delete, extract, rotate, reposition, and replace pages in a PDF", comment: "")
|
|
item?.toolTip = NSLocalizedString("PDF page editor: insert, delete, extract, rotate, reposition, and replace pages in a PDF", comment: "")
|
|
item?.btnTag = KMToolbarViewType.Page.rawValue
|
|
item?.btnTag = KMToolbarViewType.Page.rawValue
|
|
item?.btnAction = #selector(leftControllButtonAction)
|
|
item?.btnAction = #selector(leftControllButtonAction)
|
|
item?.boxImagePosition = .imageAbove
|
|
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 == KMDocumentConversonToolbarItemIdentifier {
|
|
} else if identifier == KMDocumentConversonToolbarItemIdentifier {
|
|
item?.titleName = NSLocalizedString("Converter", comment: "")
|
|
item?.titleName = NSLocalizedString("Converter", comment: "")
|
|
item?.target = self
|
|
item?.target = self
|
|
-// item?.isMainTool = true
|
|
|
|
item?.image = NSImage(named: "KMImageNameUXIconToolbarConvertNor")
|
|
item?.image = NSImage(named: "KMImageNameUXIconToolbarConvertNor")
|
|
item?.toolTip = NSLocalizedString("Convert PDFs to Microsoft Word, PowerPoint, Excel, RTF, Text, Image, CSV, and more Offline", comment: "")
|
|
item?.toolTip = NSLocalizedString("Convert PDFs to Microsoft Word, PowerPoint, Excel, RTF, Text, Image, CSV, and more Offline", comment: "")
|
|
item?.btnTag = KMToolbarViewType.Conversion.rawValue
|
|
item?.btnTag = KMToolbarViewType.Conversion.rawValue
|
|
item?.btnAction = #selector(leftControllButtonAction)
|
|
item?.btnAction = #selector(leftControllButtonAction)
|
|
item?.boxImagePosition = .imageAbove
|
|
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 {
|
|
} else if identifier == KMDocumentScanOCRToolbarItemIdentifier {
|
|
item?.titleName = NSLocalizedString("OCR", comment: "")
|
|
item?.titleName = NSLocalizedString("OCR", comment: "")
|
|
item?.target = self
|
|
item?.target = self
|
|
-// item?.isMainTool = true
|
|
|
|
item?.image = NSImage(named: "KMImageNameToolbarOCRNor")
|
|
item?.image = NSImage(named: "KMImageNameToolbarOCRNor")
|
|
item?.boxImagePosition = .imageAbove
|
|
item?.boxImagePosition = .imageAbove
|
|
item?.btnTag = KMToolbarViewType.ScanOCR.rawValue
|
|
item?.btnTag = KMToolbarViewType.ScanOCR.rawValue
|
|
item?.toolTip = NSLocalizedString("Recognize text from Image-based or Scanned PDF with OCR", comment: "")
|
|
item?.toolTip = NSLocalizedString("Recognize text from Image-based or Scanned PDF with OCR", comment: "")
|
|
item?.btnAction = #selector(leftControllButtonAction)
|
|
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 == KMToolbarToolEnhancedScanIdentifier {
|
|
} else if identifier == KMToolbarToolEnhancedScanIdentifier {
|
|
item?.image = NSImage(named: "KMImageNameMainToolEnhancedScan")
|
|
item?.image = NSImage(named: "KMImageNameMainToolEnhancedScan")
|
|
- item?.alternateImage = NSImage(named: "KMImageNameMainToolEnhancedScan")
|
|
|
|
item?.target = self
|
|
item?.target = self
|
|
item?.btnTag = 0
|
|
item?.btnTag = 0
|
|
item?.toolTip = NSLocalizedString("Enhanced Scan", comment: "")
|
|
item?.toolTip = NSLocalizedString("Enhanced Scan", comment: "")
|
|
item?.titleName = NSLocalizedString("Enhanced Scan", comment: "")
|
|
item?.titleName = NSLocalizedString("Enhanced Scan", comment: "")
|
|
item?.boxImagePosition = .imageLeft
|
|
item?.boxImagePosition = .imageLeft
|
|
item?.btnAction = #selector(scanOCRModelSelect)
|
|
item?.btnAction = #selector(scanOCRModelSelect)
|
|
-
|
|
|
|
} else if identifier == KMToolbarToolOCRTextIdentifier {
|
|
} else if identifier == KMToolbarToolOCRTextIdentifier {
|
|
item?.image = NSImage(named: "KMImageNameMainToolOCRText")
|
|
item?.image = NSImage(named: "KMImageNameMainToolOCRText")
|
|
- item?.alternateImage = NSImage(named: "KMImageNameMainToolOCRText")
|
|
|
|
item?.target = self
|
|
item?.target = self
|
|
- item?.btnTag = 1
|
|
|
|
item?.toolTip = NSLocalizedString("OCR Text Recognition", comment: "")
|
|
item?.toolTip = NSLocalizedString("OCR Text Recognition", comment: "")
|
|
item?.titleName = NSLocalizedString("OCR Text Recognition", comment: "")
|
|
item?.titleName = NSLocalizedString("OCR Text Recognition", comment: "")
|
|
item?.boxImagePosition = .imageLeft
|
|
item?.boxImagePosition = .imageLeft
|
|
item?.btnAction = #selector(scanOCRModelSelect)
|
|
item?.btnAction = #selector(scanOCRModelSelect)
|
|
-
|
|
|
|
} else if identifier == KMDocumentEditToolbarItemIdentifier {
|
|
} else if identifier == KMDocumentEditToolbarItemIdentifier {
|
|
item?.titleName = NSLocalizedString("Edit PDF", comment: "")
|
|
item?.titleName = NSLocalizedString("Edit PDF", comment: "")
|
|
item?.target = self
|
|
item?.target = self
|
|
-// item?.isMainTool = true
|
|
|
|
item?.image = NSImage(named: "KMImageNameUXIconToolbarEditNor")
|
|
item?.image = NSImage(named: "KMImageNameUXIconToolbarEditNor")
|
|
item?.boxImagePosition = .imageAbove
|
|
item?.boxImagePosition = .imageAbove
|
|
item?.btnTag = KMToolbarViewType.editPDF.rawValue
|
|
item?.btnTag = KMToolbarViewType.editPDF.rawValue
|
|
item?.toolTip = NSLocalizedString("Edit text and image in PDF", comment: "")
|
|
item?.toolTip = NSLocalizedString("Edit text and image in PDF", comment: "")
|
|
item?.btnAction = #selector(leftControllButtonAction)
|
|
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 == KMDocumentFormToolbarItemIdentifier {
|
|
} else if identifier == KMDocumentFormToolbarItemIdentifier {
|
|
item?.titleName = NSLocalizedString("Forms", comment: "")
|
|
item?.titleName = NSLocalizedString("Forms", comment: "")
|
|
item?.target = self
|
|
item?.target = self
|
|
-// item?.isMainTool = true
|
|
|
|
item?.image = NSImage(named: "KMImageNameUXIconToolbarFormNor")
|
|
item?.image = NSImage(named: "KMImageNameUXIconToolbarFormNor")
|
|
item?.boxImagePosition = .imageAbove
|
|
item?.boxImagePosition = .imageAbove
|
|
item?.btnTag = KMToolbarViewType.Form.rawValue
|
|
item?.btnTag = KMToolbarViewType.Form.rawValue
|
|
item?.toolTip = NSLocalizedString("Edit PDF Form", comment: "")
|
|
item?.toolTip = NSLocalizedString("Edit PDF Form", comment: "")
|
|
item?.btnAction = #selector(leftControllButtonAction)
|
|
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 == KMDocumentFillSginToolbarItemIdentifier {
|
|
} else if identifier == KMDocumentFillSginToolbarItemIdentifier {
|
|
item?.titleName = NSLocalizedString("Fill & Sign", comment: "")
|
|
item?.titleName = NSLocalizedString("Fill & Sign", comment: "")
|
|
item?.target = self
|
|
item?.target = self
|
|
-// item?.isMainTool = true
|
|
|
|
item?.image = NSImage(named: "KMImageNameUXIconToolbarFillsignNor")
|
|
item?.image = NSImage(named: "KMImageNameUXIconToolbarFillsignNor")
|
|
item?.boxImagePosition = .imageAbove
|
|
item?.boxImagePosition = .imageAbove
|
|
item?.btnTag = KMToolbarViewType.FillSign.rawValue
|
|
item?.btnTag = KMToolbarViewType.FillSign.rawValue
|
|
item?.toolTip = NSLocalizedString("Fill and sign forms", comment: "")
|
|
item?.toolTip = NSLocalizedString("Fill and sign forms", comment: "")
|
|
item?.btnAction = #selector(leftControllButtonAction)
|
|
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 == KMDocumentToolToolbarItemIdentifier {
|
|
} else if identifier == KMDocumentToolToolbarItemIdentifier {
|
|
item?.titleName = NSLocalizedString("Editor", comment: "")
|
|
item?.titleName = NSLocalizedString("Editor", comment: "")
|
|
item?.target = self
|
|
item?.target = self
|
|
-// item?.isMainTool = true
|
|
|
|
item?.image = NSImage(named: "KMImageNameUXIconToolbarEdittoolNor")
|
|
item?.image = NSImage(named: "KMImageNameUXIconToolbarEdittoolNor")
|
|
item?.boxImagePosition = .imageAbove
|
|
item?.boxImagePosition = .imageAbove
|
|
item?.btnTag = KMToolbarViewType.Tool.rawValue
|
|
item?.btnTag = KMToolbarViewType.Tool.rawValue
|
|
item?.toolTip = NSLocalizedString("Edit, delete, cut, copy, paste, and insert text in PDFs", comment: "")
|
|
item?.toolTip = NSLocalizedString("Edit, delete, cut, copy, paste, and insert text in PDFs", comment: "")
|
|
item?.btnAction = #selector(leftControllButtonAction)
|
|
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 {
|
|
} else if identifier == KMDocumentRedactToolbarItemIdentifier {
|
|
item?.titleName = NSLocalizedString("Redact Text", comment: "")
|
|
item?.titleName = NSLocalizedString("Redact Text", comment: "")
|
|
item?.target = self
|
|
item?.target = self
|
|
@@ -788,51 +696,30 @@ extension KMToolbarViewController : KMToolbarViewDelegate,NSToolbarItemValidatio
|
|
item?.btnTag = KMToolbarViewType.redact.rawValue
|
|
item?.btnTag = KMToolbarViewType.redact.rawValue
|
|
item?.toolTip = NSLocalizedString("Mark for redaction", comment: "")
|
|
item?.toolTip = NSLocalizedString("Mark for redaction", comment: "")
|
|
item?.btnAction = #selector(leftControllButtonAction)
|
|
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 == KMDocumentAITranslationToolbarItemIdentifier {
|
|
} else if identifier == KMDocumentAITranslationToolbarItemIdentifier {
|
|
item?.image = NSImage(named: "ic_function_other_AITranslation")
|
|
item?.image = NSImage(named: "ic_function_other_AITranslation")
|
|
item?.titleName = "AI Translation"
|
|
item?.titleName = "AI Translation"
|
|
- item?.alternateImage = NSImage(named: "ic_function_other_AITranslation")
|
|
|
|
item?.target = self
|
|
item?.target = self
|
|
item?.toolTip = NSLocalizedString("AI Translation", comment: "")
|
|
item?.toolTip = NSLocalizedString("AI Translation", comment: "")
|
|
item?.boxImagePosition = .imageOnly
|
|
item?.boxImagePosition = .imageOnly
|
|
item?.btnAction = #selector(aiTranslationButtonAction)
|
|
item?.btnAction = #selector(aiTranslationButtonAction)
|
|
-
|
|
|
|
- let menuItem = NSMenuItem.init(title: item!.titleName ?? "", action: #selector(aiTranslationButtonAction), target: self)
|
|
|
|
- menuItem.target = self
|
|
|
|
- item?.menuFormRepresentation = menuItem
|
|
|
|
} else if identifier == KMDocumentPrintToolbarItemIdentifier {
|
|
} else if identifier == KMDocumentPrintToolbarItemIdentifier {
|
|
item?.image = NSImage(named: "KMImageNameMainToolbarPrint")
|
|
item?.image = NSImage(named: "KMImageNameMainToolbarPrint")
|
|
item?.titleName = "Print"
|
|
item?.titleName = "Print"
|
|
- item?.alternateImage = NSImage(named: "KMImageNameMainToolbarPrint")
|
|
|
|
item?.target = self
|
|
item?.target = self
|
|
item?.toolTip = NSLocalizedString("Print", comment: "")
|
|
item?.toolTip = NSLocalizedString("Print", comment: "")
|
|
item?.boxImagePosition = .imageOnly
|
|
item?.boxImagePosition = .imageOnly
|
|
item?.btnAction = #selector(printPDFViewButtonAction)
|
|
item?.btnAction = #selector(printPDFViewButtonAction)
|
|
-
|
|
|
|
- let menuItem = NSMenuItem.init(title: item!.titleName ?? "", action: #selector(printPDFViewButtonAction), target: self)
|
|
|
|
- menuItem.target = self
|
|
|
|
- item?.menuFormRepresentation = menuItem
|
|
|
|
} else if identifier == KMDocumentViewSettingToolbarItemIdentifier {
|
|
} else if identifier == KMDocumentViewSettingToolbarItemIdentifier {
|
|
item?.image = NSImage(named: "KMImageNameUXIconToolbarPageviewNor")
|
|
item?.image = NSImage(named: "KMImageNameUXIconToolbarPageviewNor")
|
|
item?.titleName = NSLocalizedString("Page Display", comment: "")
|
|
item?.titleName = NSLocalizedString("Page Display", comment: "")
|
|
- item?.alternateImage = NSImage(named: "KMImageNameUXIconToolbarPageviewNor")
|
|
|
|
item?.target = self
|
|
item?.target = self
|
|
item?.toolTip = NSLocalizedString("Page Display", comment: "")
|
|
item?.toolTip = NSLocalizedString("Page Display", comment: "")
|
|
item?.boxImagePosition = .imageAbove
|
|
item?.boxImagePosition = .imageAbove
|
|
item?.btnAction = #selector(itemAction)
|
|
item?.btnAction = #selector(itemAction)
|
|
-
|
|
|
|
- let menuItem = NSMenuItem.init(title: item!.titleName ?? "", action: #selector(itemAction), target: self)
|
|
|
|
- menuItem.target = self
|
|
|
|
- item?.menuFormRepresentation = menuItem
|
|
|
|
} else if identifier == KMDocumentShareToolbarItemIdentifier {
|
|
} else if identifier == KMDocumentShareToolbarItemIdentifier {
|
|
item?.image = NSImage(named: "KMImageNameUXIconToolbarShareNor")
|
|
item?.image = NSImage(named: "KMImageNameUXIconToolbarShareNor")
|
|
item?.titleName = NSLocalizedString("Share", comment: "")
|
|
item?.titleName = NSLocalizedString("Share", comment: "")
|
|
- item?.alternateImage = NSImage(named: "KMImageNameUXIconToolbarShareNor")
|
|
|
|
item?.target = self
|
|
item?.target = self
|
|
item?.toolTip = NSLocalizedString("Share the file with others", comment: "")
|
|
item?.toolTip = NSLocalizedString("Share the file with others", comment: "")
|
|
item?.boxImagePosition = .imageAbove
|
|
item?.boxImagePosition = .imageAbove
|
|
@@ -870,18 +757,11 @@ extension KMToolbarViewController : KMToolbarViewDelegate,NSToolbarItemValidatio
|
|
item?.customizeView = view
|
|
item?.customizeView = view
|
|
} else if identifier == KMRightControlToolbarItemIdentifier {
|
|
} else if identifier == KMRightControlToolbarItemIdentifier {
|
|
item?.image = NSImage(named: "KMImageNameUXIconBtnTriRightNor")
|
|
item?.image = NSImage(named: "KMImageNameUXIconBtnTriRightNor")
|
|
- item?.titleName = NSLocalizedString("Properties", comment: "")
|
|
|
|
- item?.alternateImage = NSImage(named: "KMImageNameUXIconBtnTriRightNor")
|
|
|
|
|
|
+ item?.titleName = NSLocalizedString("Properties", comment: "")
|
|
item?.target = self
|
|
item?.target = self
|
|
- item?.btnTag = KMToolbarViewType.RightPanel.rawValue
|
|
|
|
item?.toolTip = NSLocalizedString("Show/Hide Annotation Properties Panel", comment: "")
|
|
item?.toolTip = NSLocalizedString("Show/Hide Annotation Properties Panel", comment: "")
|
|
item?.boxImagePosition = .imageOnly
|
|
item?.boxImagePosition = .imageOnly
|
|
item?.btnAction = #selector(rightPanelControllButtonAction)
|
|
item?.btnAction = #selector(rightPanelControllButtonAction)
|
|
-
|
|
|
|
- let menuItem = NSMenuItem.init(title: item!.titleName ?? "", action: #selector(rightPanelControllButtonAction), target: self)
|
|
|
|
- menuItem.target = self
|
|
|
|
- menuItem.tag = item!.btnTag
|
|
|
|
- item?.menuFormRepresentation = menuItem
|
|
|
|
} else if identifier == KMToolbarMoveToolModeItemIdentifier {
|
|
} else if identifier == KMToolbarMoveToolModeItemIdentifier {
|
|
item?.titleName = NSLocalizedString("Scroll Tool", comment: "")
|
|
item?.titleName = NSLocalizedString("Scroll Tool", comment: "")
|
|
item?.image = NSImage(named: KMImageNameUXIconSubtoolbarMytoolsPantool)
|
|
item?.image = NSImage(named: KMImageNameUXIconSubtoolbarMytoolsPantool)
|