123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- //
- // KMWatermarkAdjectivePropertyMainController.swift
- // PDF Reader Pro
- //
- // Created by tangchao on 2023/1/30.
- //
- import Cocoa
- typealias KMWatermarkAdjectiveModelDidChange = (_ model: KMWatermarkAdjectiveBaseModel?) -> ()
- /// 水印相关 属性主控制器(基类)
- class KMWatermarkAdjectivePropertyMainController: NSViewController {
- /// 当前页面控制器
- var currentController: NSViewController!
- /// 预览视图页面数量
- var pageCount: Int = 0
-
- /// 模型已改变回调
- var modelDidChange: KMWatermarkAdjectiveModelDidChange!
- var model: KMWatermarkAdjectiveBaseModel?
-
- override func viewDidLoad() {
- super.viewDidLoad()
-
- /// 显示主页面
- self.gotoHomeController("")
- }
-
- /// 显示主页面
- func gotoHomeController(_ selectedModelID: String) {
- /// no things.
- }
-
- /// 显示创建页面
- func gotoCreateController() {
- /// no things.
- }
-
- /// 显示编辑页面
- func gotoEditController(_ model: KMWatermarkAdjectiveBaseModel) {
- /// no things.
- }
-
- /// 显示页面
- func showController(_ controller: NSViewController) {
- for subview in self.view.subviews {
- subview.removeFromSuperview()
- }
-
- controller.view.frame = self.view.bounds
- controller.view.autoresizingMask = NSView.AutoresizingMask(rawValue: 18)
- self.view.addSubview(controller.view)
- self.currentController = controller
- }
- }
|