41 lines
1.0 KiB
Swift
41 lines
1.0 KiB
Swift
//
|
|
// GraphWindow.swift
|
|
// Graphic Analysis 2
|
|
//
|
|
// Created by Kilian Hofmann on 17.06.17.
|
|
// Copyright © 2017 Kilian Hofmann. All rights reserved.
|
|
//
|
|
|
|
import Cocoa
|
|
|
|
class GraphWindow: NSWindowController {
|
|
|
|
var collectionViewItem: CollectionViewItemMonth?
|
|
|
|
override var windowNibName: String! {
|
|
return "GraphWindow"
|
|
}
|
|
|
|
required init?(coder: NSCoder) {
|
|
super.init(coder: coder)
|
|
}
|
|
|
|
init(collectionViewItem: CollectionViewItemMonth) {
|
|
super.init(window: nil)
|
|
self.collectionViewItem = collectionViewItem
|
|
}
|
|
|
|
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.
|
|
}
|
|
}
|
|
|
|
extension GraphWindow: NSWindowDelegate {
|
|
func windowShouldClose(_ sender: Any) -> Bool {
|
|
collectionViewItem?.isSelected = false
|
|
collectionViewItem?.view.layer?.borderColor = NSColor.clear.cgColor
|
|
return true
|
|
}
|
|
}
|