1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- //
- // KMAddBackgroundView.swift
- // PDF Master
- //
- // Created by lizhe on 2023/11/14.
- //
- import Cocoa
- typealias KMAddBackgroundViewBatchAction = (_ view: KMAddBackgroundView, _ files: [KMFileAttribute]) -> Void
- typealias KMAddBackgroundViewCancelAction = (_ view: KMAddBackgroundView) -> Void
- class KMAddBackgroundView: KMBaseXibView {
- @IBOutlet weak var doneButton: NSButton!
- @IBOutlet weak var cancelButton: NSButton!
- @IBOutlet weak var batchButton: NSButton!
-
- var cancelAction: KMAddBackgroundViewCancelAction?
- var batchAction: KMAddBackgroundViewCancelAction?
-
- override func draw(_ dirtyRect: NSRect) {
- super.draw(dirtyRect)
- // Drawing code here.
- }
- }
- extension KMAddBackgroundView {
- @IBAction func batchButtonAction(_ sender: Any) {
-
- }
-
- @IBAction func doneButtonAction(_ sender: Any) {
-
- }
-
- @IBAction func cancelButtonAction(_ sender: Any) {
- guard let callBack = cancelAction else { return }
-
- callBack(self)
- }
-
- }
|