1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- //
- // KMToolbarConfig.swift
- // PDF Reader Pro
- //
- // Created by Niehaoyu on 2024/8/5.
- //
- import Foundation
- @objc enum KMToolbarViewType : Int {
- case None
- case Main
- case Annatiton
- case Page
- case Conversion
- case ScanOCR
- case editPDF
- case Form
- case FillSign
- case Tool
- case redact
- case Move
- case Magnify
- case Select
- case SelectZoom
- case LeftPanel
- case RightPanel
- case viewSetting
- case sign
- case AITools
-
- func isToolMode() -> Bool {
- return (self == .Move || self == .Magnify || self == .Select || self == .SelectZoom)
- }
-
- func itemIdentifier() -> String {
- if (self == .Annatiton) {
- return KMDocumentAnnotationToolbarItemIdentifier
- } else if (self == .Page) {
- return KMDocumentPageToolbarItemIdentifier
- } else if (self == .Conversion) {
- return KMDocumentConversonToolbarItemIdentifier
- } else if (self == .ScanOCR) {
- return KMDocumentScanOCRToolbarItemIdentifier
- } else if (self == .editPDF) {
- return KMDocumentEditToolbarItemIdentifier
- } else if (self == .Form) {
- return KMDocumentFormToolbarItemIdentifier
- } else if (self == .FillSign) {
- return KMDocumentFillSginToolbarItemIdentifier
- } else if (self == .Tool) {
- return KMDocumentToolToolbarItemIdentifier
- } else if (self == .Move) {
- return KMToolbarMoveToolModeItemIdentifier
- } else if (self == .Magnify) {
- return KMToolbarMagnifyToolModeItemIdentifier
- } else if (self == .Select) {
- return KMToolbarSelectToolModeItemIdentifier
- } else if (self == .SelectZoom) {
- return KMToolbarZoomToSelectionItemIdentifier
- } else if (self == .LeftPanel) {
- return KMLeftControlToolbarItemIdentifier
- } else if (self == .RightPanel) {
- return KMRightControlToolbarItemIdentifier
- }
- return ""
- }
- }
- @objc enum KMToolbarType: Int {
- /// conversion
- case word = 3000
- case excel = 3001
- case ppt = 3002
- case rtf = 3003
- case csv = 3004
- case html = 3005
- case conversion_text = 3006
- case conversion_image = 3007
- case conversion_imageToPDF = 3008
- case conversion_other = 3009
- case json = 3010
-
- /// tool
- case compress = 8000
- case merge = 8001
- case fileCompare = 8002
- case secure = 8003
- case redact = 8004
- case watermark = 8005
- case background = 8006
- case headerAndFooter = 8007
- case bates = 8008
- case crop = 8009
- case comparison = 8010
- case aiTools = 8011
- case measure = 8012
- }
|