123456789101112131415161718192021222324252627282930313233343536373839 |
- //
- // KMWatermarkFileView.swift
- // PDF Reader Pro
- //
- // Created by tangchao on 2022/12/18.
- //
- import Cocoa
- typealias KMWatermarkFileViewItemClick = (Int, Any) ->()
- class KMWatermarkFileView: KMWatermarkAdjectiveBaseView {
- @IBOutlet weak var tipLabel: NSTextField!
- @IBOutlet weak var addButton: NSButton!
-
- override func awakeFromNib() {
- super.awakeFromNib()
-
- tipLabel.stringValue = ""
- tipLabel.placeholderString = NSLocalizedString("Select File", comment: "")
- tipLabel.lineBreakMode = .byTruncatingTail
- addButton.wantsLayer = true
- addButton.layer?.borderWidth = 1
- addButton.layer?.borderColor = NSColor.black.cgColor
- addButton.layer?.cornerRadius = 2
- addButton.title = "+"
-
- addButton.target = self
- addButton.action = #selector(addButtonAction)
- }
-
- @objc func addButtonAction() {
- guard let callback = itemClick else {
- return
- }
-
- callback(0, "")
- }
- }
|