12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- //
- // KMPDFFileInfoWindowController.swift
- // PDF Reader Pro
- //
- // Created by Niehaoyu on 2024/12/23.
- //
- import Cocoa
- import KMComponentLibrary
- class KMPDFFileInfoWindowController: NSWindowController {
- @IBOutlet var titleLabel: NSTextField!
- @IBOutlet var typeTabs: ComponentTabs!
- @IBOutlet var infoContendView: NSView!
- @IBOutlet var cancelButton: ComponentButton!
- @IBOutlet var doneButton: ComponentButton!
-
- @IBOutlet var DescriptionBox: NSBox!
-
- @IBOutlet var advancedBox: NSBox!
-
- @IBOutlet var securityBox: NSBox!
-
-
- static let shared = KMPDFFileInfoWindowController(windowNibName: "KMPDFFileInfoWindowController")
- let descriptionProperty = ComponentTabsProperty(tabsType: .underline_Fill, state: .normal, showIcon: false, title: NSLocalizedString("Page", comment: ""))
- let advanceProperty = ComponentTabsProperty(tabsType: .underline_Fill, state: .normal, showIcon: false, title: NSLocalizedString("Web", comment: ""))
- let securityProperty = ComponentTabsProperty(tabsType: .underline_Fill, state: .normal, showIcon: false, title: NSLocalizedString("Email", comment: ""))
-
-
-
- var filePath: String = "" {
- didSet {
-
- }
- }
-
- override func windowDidLoad() {
- super.windowDidLoad()
- // Implement this method to handle any initialization after your window controller's window has been loaded from its nib file.
-
- setupProperty()
-
- }
-
- func setupProperty() {
-
- typeTabs.updateItemProperty([descriptionProperty, advanceProperty, securityProperty])
- typeTabs.delegate = self
- }
-
- func reloadData() {
-
- }
-
-
- }
- //MARK: - ComponentTabsDelegate
- extension KMPDFFileInfoWindowController: ComponentTabsDelegate {
- func componentTabsDidSelected(_ view: ComponentTabs, _ property: ComponentTabsProperty) {
- if property == descriptionProperty {
-
- } else if property == advanceProperty {
-
- } else if property == securityProperty {
-
- }
- reloadData()
-
- }
- }
|