123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168 |
- //
- // KMSystemViewMenu.swift
- // PDF Reader Pro
- //
- // Created by tangchao on 2023/12/26.
- //
- import Foundation
- protocol KMSystemViewMenuProtocol {
- // scale
- func menuItemAction_adjustWidth(_ sender: Any)
- func menuItemAction_adjustPage(_ sender: Any)
- func menuItemAction_size(_ sender: Any)
- func menuItemAction_zoomOut(_ sender: Any)
- func menuItemAction_zoomIn(_ sender: Any)
-
- // page show
- func menuItemAction_singlePage(_ sender: Any)
- func menuItemAction_singlePageContinue(_ sender: Any)
- func menuItemAction_doublePage(_ sender: Any)
- func menuItemAction_doublePageContinue(_ sender: Any)
- func menuItemAction_bookMode(_ sender: Any)
- func menuItemAction_readMode(_ sender: Any)
- func menuItemAction_showSplitPage(_ sender: Any)
- func menuItemAction_autoScrol(_ sender: Any)
- func menuItemAction_autoScrolSetting(_ sender: Any)
-
- // rotate
- func menuItemAction_rotateLeft(_ sender: Any)
- func menuItemAction_rotateRight(_ sender: Any)
- func menuItemAction_rotateAllPageLeft(_ sender: Any)
- func menuItemAction_rotateAllPageRight(_ sender: Any)
-
- // split screen
- func menuItemAction_splitScreenVerti(_ sender: Any)
- func menuItemAction_splitScreenHorti(_ sender: Any)
- func menuItemAction_splitScreenNo(_ sender: Any)
-
- func menuItemAction_view_readMode(_ sender: Any)
- func menuItemAction_enterFullScreen(_ sender: Any)
- func menuItemAction_hiddenLeftSide(_ sender: Any)
- func menuItemAction_hiddenRightSide(_ sender: Any)
- func menuItemAction_thumai(_ sender: Any)
- func menuItemAction_outline(_ sender: Any)
- func menuItemAction_bookmark(_ sender: Any)
- func menuItemAction_annotation(_ sender: Any)
- func menuItemAction_search(_ sender: Any)
- func menuItemAction_topic(_ sender: Any)
- func menuItemAction_hiddenPageIndicator(_ sender: Any)
-
- func togglePresentation(_ sender: Any?)
- func chooseTransition(_ sender: Any?)
-
- func toggleAutoFlow(_ sender: Any?)
- func chooseAutoFlowSetting(_ sender: Any?)
-
- func toggleReadingBar(_ sender: Any?)
-
- func toggleLeftSidePane(_ sender: Any?)
- func changeLeftSidePaneState(_ sender: Any?)
-
- func splitViewAction(_ sender: Any?)
- func themesColor(_ sender: Any?)
-
- func toggleStatusBar(_ sender: Any?)
- func toggleToolbarShow(_ sender: Any?)
- }
- extension KMSystemViewMenuProtocol {
- func menuItemAction_autoScrol(_ sender: Any) {}
- func menuItemAction_autoScrolSetting(_ sender: Any) {}
-
- func menuItemAction_splitScreenVerti(_ sender: Any) {}
- func menuItemAction_splitScreenHorti(_ sender: Any) {}
- func menuItemAction_splitScreenNo(_ sender: Any) {}
-
- func menuItemAction_enterFullScreen(_ sender: Any) {}
- func menuItemAction_topic(_ sender: Any) {}
- }
- extension KMSystemMenu.View {
- // scale
- public static let adjustWidthSelector = NSSelectorFromString("menuItemAction_adjustWidth:")
- public static let adjustPageSelector = NSSelectorFromString("menuItemAction_adjustPage:")
- public static let sizeSelector = NSSelectorFromString("menuItemAction_size:")
- public static let zoomOutSelector = NSSelectorFromString("menuItemAction_zoomOut:")
- public static let zoomInSelector = NSSelectorFromString("menuItemAction_zoomIn:")
- // page show
- public static let singlePageSelector = NSSelectorFromString("menuItemAction_singlePage:")
- public static let singlePageContinueSelector = NSSelectorFromString("menuItemAction_singlePageContinue:")
- public static let doublePageSelector = NSSelectorFromString("menuItemAction_doublePage:")
- public static let doublePageContinueSelector = NSSelectorFromString("menuItemAction_doublePageContinue:")
- public static let bookModeSelector = NSSelectorFromString("menuItemAction_bookMode:")
- public static let readModeSelector = NSSelectorFromString("menuItemAction_readMode:")
- public static let showSplitPageSelector = NSSelectorFromString("menuItemAction_showSplitPage:")
- public static let autoScrolSelector = NSSelectorFromString("menuItemAction_autoScrol:")
- public static let autoScrolSettingSelector = NSSelectorFromString("menuItemAction_autoScrolSetting:")
- // rotate
- public static let rotateLeftSelector = NSSelectorFromString("menuItemAction_rotateLeft:")
- public static let rotateRightSelector = NSSelectorFromString("menuItemAction_rotateRight:")
- public static let rotateAllPageLeftSelector = NSSelectorFromString("menuItemAction_rotateAllPageLeft:")
- public static let rotateAllPageRightSelector = NSSelectorFromString("menuItemAction_rotateAllPageRight:")
- // split screen
- public static let splitScreenVertiSelector = NSSelectorFromString("menuItemAction_splitScreenVerti:")
- public static let splitScreenHortiSelector = NSSelectorFromString("menuItemAction_splitScreenHorti:")
- public static let splitScreenNoSelector = NSSelectorFromString("menuItemAction_splitScreenNo:")
- public static let viewReadModeSelector = NSSelectorFromString("menuItemAction_view_readMode:")
- public static let enterFullScreenSelector = NSSelectorFromString("menuItemAction_enterFullScreen:")
-
- public static let hiddenLeftSideSelector = NSSelectorFromString("menuItemAction_hiddenLeftSide:")
- public static let hiddenRightSideSelector = NSSelectorFromString("menuItemAction_hiddenRightSide:")
- public static let thumaiSelector = NSSelectorFromString("menuItemAction_thumai:")
- public static let outlineSelector = NSSelectorFromString("menuItemAction_outline:")
- public static let bookmarkSelector = NSSelectorFromString("menuItemAction_bookmark:")
- public static let annotationSelector = NSSelectorFromString("menuItemAction_annotation:")
- public static let searchSelector = NSSelectorFromString("menuItemAction_search:")
-
- public static let topicSelector = NSSelectorFromString("menuItemAction_topic:")
- public static let hiddenPageIndicatorSelector = NSSelectorFromString("menuItemAction_hiddenPageIndicator:")
-
-
- public static let togglePresentationSelector = NSSelectorFromString("togglePresentation:")
- public static let chooseTransitionSelector = NSSelectorFromString("chooseTransition:")
-
- public static let toggleAutoFlowSelector = NSSelectorFromString("toggleAutoFlow:")
- public static let chooseAutoFlowSettingSelector = NSSelectorFromString("chooseAutoFlowSetting:")
-
- public static let toggleReadingBarSelector = NSSelectorFromString("toggleReadingBar:")
-
- public static let toggleLeftSidePaneSelector = NSSelectorFromString("toggleLeftSidePane:")
-
- public static let changeLeftSidePaneStateSelector = NSSelectorFromString("changeLeftSidePaneState:")
-
- public static let splitViewActionSelector = NSSelectorFromString("splitViewAction:")
- public static let themesColorSelector = NSSelectorFromString("themesColor:")
-
- public static let toggleStatusBarSelector = NSSelectorFromString("toggleStatusBar:")
- public static let toggleToolbarShowSelector = NSSelectorFromString("toggleToolbarShow:")
-
- public static func actions() -> [Selector] {
- return [self.adjustWidthSelector, self.adjustPageSelector, self.sizeSelector, self.zoomOutSelector, self.zoomInSelector,
- // page show
- self.singlePageSelector, self.singlePageContinueSelector, self.doublePageSelector, self.doublePageContinueSelector,
- self.bookModeSelector, self.readModeSelector, self.showSplitPageSelector, self.autoScrolSelector,
- self.autoScrolSettingSelector,
- // rotate
- self.rotateLeftSelector, self.rotateRightSelector, self.rotateAllPageLeftSelector, self.rotateAllPageRightSelector,
- // split screen
- self.splitScreenVertiSelector, self.splitScreenHortiSelector, self.splitScreenNoSelector,
- self.viewReadModeSelector, self.enterFullScreenSelector,
- self.hiddenLeftSideSelector, self.hiddenRightSideSelector,
- self.thumaiSelector, self.outlineSelector, self.bookmarkSelector, self.annotationSelector,
- self.searchSelector, self.topicSelector, self.hiddenPageIndicatorSelector,
- self.togglePresentationSelector, self.chooseTransitionSelector,
- self.toggleAutoFlowSelector, self.chooseAutoFlowSettingSelector,
- self.toggleReadingBarSelector,
- self.toggleLeftSidePaneSelector,
- self.changeLeftSidePaneStateSelector,
- self.splitViewActionSelector,
- self.themesColorSelector,
- self.toggleStatusBarSelector, self.toggleToolbarShowSelector]
- }
- }
|