// // KMPDFToolbarConfig.swift // PDF Reader Pro // // Created by Niehaoyu on 2024/10/23. // import Foundation import KMComponentLibrary //MARK: - 工具栏ID let KMPDFToolbar_ViewDisplay_Identifier = "KMPDFToolbarViewDisplayIdentifier" //MARK: -PageEdit let KMPDFToolbar_PageEdit_Identifier = "KMPDFToolbar_PageEdit_Identifier" let KMPDFToolbar_PageEdit_page_oddPage_Identifier = "KMPDFToolbar_PageEdit_page_oddPage_Identifier" let KMPDFToolbar_PageEdit_page_EvenPage_Identifier = "KMPDFToolbar_PageEdit_page_EvenPage_Identifier" let KMPDFToolbar_PageEdit_page_PortraitPage_Identifier = "KMPDFToolbar_PageEdit_page_PortraitPage_Identifier" let KMPDFToolbar_PageEdit_page_LandscapePage_Identifier = "KMPDFToolbar_PageEdit_page_LandscapePage_Identifier" let KMPDFToolbar_PageEdit_page_AllPage_Identifier = "KMPDFToolbar_PageEdit_page_AllPage_Identifier" let KMPDFToolbar_PageEdit_page_CustomPage_Identifier = "KMPDFToolbar_PageEdit_page_CustomPage_Identifier" let KMPDFToolbar_PageEdit_InsertFile_Identifier = "KMPDFToolbar_PageEdit_InsertFile_Identifier" let KMPDFToolbar_PageEdit_InsertBlank_Identifier = "KMPDFToolbar_PageEdit_InsertBlank_Identifier" let KMPDFToolbar_PageEdit_InsertClip_Identifier = "KMPDFToolbar_PageEdit_InsertClip_Identifier" let KMPDFToolbar_PageEdit_InsertScanner_Identifier = "KMPDFToolbar_PageEdit_InsertScanner_Identifier" let KMPDFToolbar_PageEdit_Extract_Identifier = "KMPDFToolbar_PageEdit_Extract_Identifier" let KMPDFToolbar_PageEdit_Replace_Identifier = "KMPDFToolbar_PageEdit_Replace_Identifier" let KMPDFToolbar_PageEdit_Split_Identifier = "KMPDFToolbar_PageEdit_Split_Identifier" let KMPDFToolbar_PageEdit_Reverse_Identifier = "KMPDFToolbar_PageEdit_Reverse_Identifier" let KMPDFToolbar_PageEdit_LeftRotate_Identifier = "KMPDFToolbar_PageEdit_LeftRotate_Identifier" let KMPDFToolbar_PageEdit_RightRotate_Identifier = "KMPDFToolbar_PageEdit_RightRotate_Identifier" let KMPDFToolbar_PageEdit_Delete_Identifier = "KMPDFToolbar_PageEdit_Delete_Identifier" let KMPDFToolbar_PageEdit_Reduce_Identifier = "KMPDFToolbar_PageEdit_Reduce_Identifier" let KMPDFToolbar_PageEdit_Increase_Identifier = "KMPDFToolbar_PageEdit_Increase_Identifier" //MARK: -ViewTools let KMPDFToolbar_View_Select_Identifier = "KMPDFToolbar_View_Select_Identifier" let KMPDFToolbar_View_Scroll_Identifier = "KMPDFToolbar_View_Scroll_Identifier" let KMPDFToolbar_View_ContentSelection_Identifier = "KMPDFToolbar_View_ContentSelection_Identifier" let KMPDFToolbar_View_Magnify_Identifier = "KMPDFToolbar_View_Magnify_Identifier" let KMPDFToolbar_View_AreaZoom_Identifier = "KMPDFToolbar_View_AreaZoom_Identifier" //MARK: -Scale let KMPDFToolbar_Zoom_AdapWidth_Identifier = "KMPDFToolbar_Zoom_AdapWidth_Identifier" let KMPDFToolbar_Zoom_AdapPage_Identifier = "KMPDFToolbar_Zoom_AdapPage_Identifier" let KMPDFToolbar_Zoom_ActualSize_Identifier = "KMPDFToolbar_Zoom_ActualSize_Identifier" let KMPDFToolbar_Zoom_10_Identifier = "KMPDFToolbar_Zoom_10_Identifier" let KMPDFToolbar_Zoom_25_Identifier = "KMPDFToolbar_Zoom_25_Identifier" let KMPDFToolbar_Zoom_50_Identifier = "KMPDFToolbar_Zoom_50_Identifier" let KMPDFToolbar_Zoom_75_Identifier = "KMPDFToolbar_Zoom_75_Identifier" let KMPDFToolbar_Zoom_100_Identifier = "KMPDFToolbar_Zoom_100_Identifier" let KMPDFToolbar_Zoom_150_Identifier = "KMPDFToolbar_Zoom_150_Identifier" let KMPDFToolbar_Zoom_200_Identifier = "KMPDFToolbar_Zoom_200_Identifier" let KMPDFToolbar_Zoom_400_Identifier = "KMPDFToolbar_Zoom_400_Identifier" let KMPDFToolbar_Zoom_800_Identifier = "KMPDFToolbar_Zoom_800_Identifier" //MARK: -ToolMode let KMPDFToolbar_Markup_Identifier = "KMPDFToolbar_Markup_Identifier" let KMPDFToolbar_Edit_Identifier = "KMPDFToolbar_Edit_Identifier" let KMPDFToolbar_Form_Identifier = "KMPDFToolbar_Form_Identifier" let KMPDFToolbar_Fill_Identifier = "KMPDFToolbar_Fill_Identifier" let KMPDFToolbar_Convert_Identifier = "KMPDFToolbar_Convert_Identifier" let KMPDFToolbar_Protect_Identifier = "KMPDFToolbar_Protect_Identifier" let KMPDFToolbar_Tools_Identifier = "KMPDFToolbar_Tools_Identifier" //MARK: -Right let KMPDFToolbar_undo_Identifier = "KMPDFToolbar_undo_Identifier" let KMPDFToolbar_redo_Identifier = "KMPDFToolbar_redo_Identifier" let KMPDFToolbar_save_Identifier = "KMPDFToolbar_save_Identifier" let KMPDFToolbar_aiTools_Identifier = "KMPDFToolbar_aiTools_Identifier" let KMPDFToolbar_batch_Identifier = "KMPDFToolbar_batch_Identifier" let KMPDFToolbar_tts_Identifier = "KMPDFToolbar_tts_Identifier" let KMPDFToolbar_ppt_Identifier = "KMPDFToolbar_ppt_Identifier" let KMPDFToolbar_print_Identifier = "KMPDFToolbar_print_Identifier" let KMPDFToolbar_share_PDF_Identifier = "KMPDFToolbar_share_PDF_Identifier" let KMPDFToolbar_share_Flattened_Identifier = "KMPDFToolbar_share_Flattened_Identifier" let KMPDFToolbar_share_Original_Identifier = "KMPDFToolbar_share_Original_Identifier" let KMPDFToolbar_rightView_Identifier = "KMPDFToolbar_rightView_Identifier" //MARK: -Markup let KMPDFToolbar_highlight_Identifier = "KMPDFToolbar_highlight_Identifier" let KMPDFToolbar_underline_Identifier = "KMPDFToolbar_underline_Identifier" let KMPDFToolbar_waveline_Identifier = "KMPDFToolbar_waveline_Identifier" let KMPDFToolbar_strikethrough_Identifier = "KMPDFToolbar_strikethrough_Identifier" let KMPDFToolbar_text_Identifier = "KMPDFToolbar_text_Identifier" let KMPDFToolbar_note_Identifier = "KMPDFToolbar_note_Identifier" let KMPDFToolbar_pen_Identifier = "KMPDFToolbar_pen_Identifier" let KMPDFToolbar_eraser_Identifier = "KMPDFToolbar_eraser_Identifier" let KMPDFToolbar_rectangle_Identifier = "KMPDFToolbar_rectangle_Identifier" let KMPDFToolbar_circle_Identifier = "KMPDFToolbar_circle_Identifier" let KMPDFToolbar_arrow_Identifier = "KMPDFToolbar_arrow_Identifier" let KMPDFToolbar_line_Identifier = "KMPDFToolbar_line_Identifier" let KMPDFToolbar_stamp_Identifier = "KMPDFToolbar_stamp_Identifier" let KMPDFToolbar_sign_Identifier = "KMPDFToolbar_sign_Identifier" let KMPDFToolbar_eye_Identifier = "KMPDFToolbar_eye_Identifier" //MARK: -Edit let KMPDFToolbar_edit_text_Identifier = "KMPDFToolbar_edit_text_Identifier" let KMPDFToolbar_edit_image_Identifier = "KMPDFToolbar_edit_image_Identifier" let KMPDFToolbar_edit_link_Identifier = "KMPDFToolbar_edit_link_Identifier" let KMPDFToolbar_edit_crop_Identifier = "KMPDFToolbar_edit_crop_Identifier" let KMPDFToolbar_edit_addWatermark_Identifier = "KMPDFToolbar_edit_addWatermark_Identifier" let KMPDFToolbar_edit_removeWatermark_Identifier = "KMPDFToolbar_edit_removeWatermark_Identifier" let KMPDFToolbar_edit_batch_AddWatermark_Identifier = "KMPDFToolbar_edit_batch_AddWatermark_Identifier" let KMPDFToolbar_edit_batchRemoveWatermark_Identifier = "KMPDFToolbar_edit_batchRemoveWatermark_Identifier" let KMPDFToolbar_edit_addBG_Identifier = "KMPDFToolbar_edit_addBG_Identifier" let KMPDFToolbar_edit_removeBG_Identifier = "KMPDFToolbar_edit_removeBG_Identifier" let KMPDFToolbar_edit_batch_AddBG_Identifier = "KMPDFToolbar_edit_batch_AddBG_Identifier" let KMPDFToolbar_edit_batchRemoveBG_Identifier = "KMPDFToolbar_edit_batchRemoveBG_Identifier" let KMPDFToolbar_edit_addHF_Identifier = "KMPDFToolbar_edit_addHF_Identifier" let KMPDFToolbar_edit_removeHF_Identifier = "KMPDFToolbar_edit_removeHF_Identifier" let KMPDFToolbar_edit_batch_AddHF_Identifier = "KMPDFToolbar_edit_batch_AddHF_Identifier" let KMPDFToolbar_edit_batchRemoveHF_Identifier = "KMPDFToolbar_edit_batchRemoveHF_Identifier" let KMPDFToolbar_edit_addBates_Identifier = "KMPDFToolbar_edit_addBates_Identifier" let KMPDFToolbar_edit_removeBates_Identifier = "KMPDFToolbar_edit_removeBates_Identifier" let KMPDFToolbar_edit_batch_AddBates_Identifier = "KMPDFToolbar_edit_batch_AddBates_Identifier" let KMPDFToolbar_edit_batchRemoveBates_Identifier = "KMPDFToolbar_edit_batchRemoveBates_Identifier" //MARK: -Form let KMPDFToolbar_form_text_Identifier = "KMPDFToolbar_form_text_Identifier" let KMPDFToolbar_form_checkbox_Identifier = "KMPDFToolbar_form_checkbox_Identifier" let KMPDFToolbar_form_radio_Identifier = "KMPDFToolbar_form_radio_Identifier" let KMPDFToolbar_form_list_Identifier = "KMPDFToolbar_form_list_Identifier" let KMPDFToolbar_form_dropdown_Identifier = "KMPDFToolbar_form_dropdown_Identifier" let KMPDFToolbar_form_OK_Identifier = "KMPDFToolbar_form_OK_Identifier" let KMPDFToolbar_form_digitalSign_Identifier = "KMPDFToolbar_form_digitalSign_Identifier" //MARK: -Fill let KMPDFToolbar_fill_tick_Identifier = "KMPDFToolbar_fill_tick_Identifier" let KMPDFToolbar_fill_fork_Identifier = "KMPDFToolbar_fill_fork_Identifier" let KMPDFToolbar_fill_rectangle_Identifier = "KMPDFToolbar_fill_rectangle_Identifier" let KMPDFToolbar_fill_line_Identifier = "KMPDFToolbar_fill_line_Identifier" let KMPDFToolbar_fill_dot_Identifier = "KMPDFToolbar_fill_dot_Identifier" let KMPDFToolbar_fill_date_Identifier = "KMPDFToolbar_fill_date_Identifier" let KMPDFToolbar_fill_sign_Identifier = "KMPDFToolbar_fill_sign_Identifier" //MARK: -Convert let KMPDFToolbar_convert_word_Identifier = "KMPDFToolbar_convert_word_Identifier" let KMPDFToolbar_convert_excel_Identifier = "KMPDFToolbar_convert_excel_Identifier" let KMPDFToolbar_convert_ppt_Identifier = "KMPDFToolbar_convert_ppt_Identifier" let KMPDFToolbar_convert_image_Identifier = "KMPDFToolbar_convert_image_Identifier" let KMPDFToolbar_convert_others_Identifier = "KMPDFToolbar_convert_others_Identifier" let KMPDFToolbar_convert_imageToPDF_Identifier = "KMPDFToolbar_convert_imageToPDF_Identifier" let KMPDFToolbar_convert_ocr_Identifier = "KMPDFToolbar_convert_ocr_Identifier" let KMPDFToolbar_convert_RTF_Identifier = "KMPDFToolbar_convert_RTF_Identifier" let KMPDFToolbar_convert_CSV_Identifier = "KMPDFToolbar_convert_CSV_Identifier" let KMPDFToolbar_convert_HTML_Identifier = "KMPDFToolbar_convert_HTML_Identifier" let KMPDFToolbar_convert_Text_Identifier = "KMPDFToolbar_convert_Text_Identifier" let KMPDFToolbar_convert_Json_Identifier = "KMPDFToolbar_convert_Json_Identifier" //MARK: -Protect let KMPDFToolbar_protect_redact_Identifier = "KMPDFToolbar_protect_redact_Identifier" let KMPDFToolbar_protect_security_Identifier = "KMPDFToolbar_protect_security_Identifier" let KMPDFToolbar_protect_removeSecurity_Identifier = "KMPDFToolbar_protect_removeSecurity_Identifier" let KMPDFToolbar_protect_digitalSign_Identifier = "KMPDFToolbar_protect_digitalSign_Identifier" //MARK: -Tools let KMPDFToolbar_tools_OCR_Identifier = "KMPDFToolbar_tools_OCR_Identifier" let KMPDFToolbar_tools_merge_Identifier = "KMPDFToolbar_tools_merge_Identifier" let KMPDFToolbar_tools_compress_Identifier = "KMPDFToolbar_tools_compress_Identifier" let KMPDFToolbar_tools_compare_Identifier = "KMPDFToolbar_tools_compare_Identifier" let KMPDFToolbar_tools_extractImage_Identifier = "KMPDFToolbar_tools_extractImage_Identifier" let KMPDFToolbar_tools_TTS_Identifier = "KMPDFToolbar_tools_TTS_Identifier" let KMPDFToolbar_tools_batch_Identifier = "KMPDFToolbar_tools_batch_Identifier" let KMPDFToolbar_tools_AITools_Identifier = "KMPDFToolbar_tools_AITools_Identifier" class KMPDFToolbarConfig: NSObject { static func scaleZoomItems() -> [ComponentMenuitemProperty]{ let items: [(String, String)] = [("Adaptation Width", KMPDFToolbar_Zoom_AdapWidth_Identifier), ("Adapt to Page", KMPDFToolbar_Zoom_AdapPage_Identifier), ("Actual Size", KMPDFToolbar_Zoom_ActualSize_Identifier), (" ", " "), ("10%", KMPDFToolbar_Zoom_10_Identifier), ("25%", KMPDFToolbar_Zoom_25_Identifier), ("50%", KMPDFToolbar_Zoom_50_Identifier), ("75%", KMPDFToolbar_Zoom_75_Identifier), ("100%", KMPDFToolbar_Zoom_100_Identifier), ("150%", KMPDFToolbar_Zoom_150_Identifier), ("200%", KMPDFToolbar_Zoom_200_Identifier), ("400%", KMPDFToolbar_Zoom_400_Identifier), ("800%", KMPDFToolbar_Zoom_800_Identifier)] var menuItemArr: [ComponentMenuitemProperty] = [] for (i, value) in items { var itemProperty: ComponentMenuitemProperty = ComponentMenuitemProperty(multipleSelect: false, itemSelected: false, isDisabled: false, keyEquivalent: nil, text: KMLocalizedString(i, comment: ""), identifier: value) if i == " " { itemProperty = ComponentMenuitemProperty.divider() } menuItemArr.append(itemProperty) } return menuItemArr } }