1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-11-23 10:13:32 +03:00
vimr/VimR/MainWindowController.swift
Tae Won Ha 4f46e619cf
Rename nvox to VimR
- hopefully we renamed everything
2016-07-12 17:59:01 +02:00

36 lines
801 B
Swift

/**
* Tae Won Ha - http://taewon.de - @hataewon
* See LICENSE
*/
import Cocoa
import PureLayout
class MainWindowController: NSWindowController, NSWindowDelegate {
var uuid: String {
return self.neoVimView.uuid
}
private weak var mainWindowManager: MainWindowManager?
private let neoVimView = NeoVimView(forAutoLayout: ())
func setup(manager manager: MainWindowManager) {
self.mainWindowManager = manager
self.addViews()
self.window?.makeFirstResponder(self.neoVimView)
}
func windowWillClose(notification: NSNotification) {
self.neoVimView.cleanUp()
self.mainWindowManager?.closeMainWindow(self)
}
private func addViews() {
self.window?.contentView?.addSubview(self.neoVimView)
self.neoVimView.autoPinEdgesToSuperviewEdges()
}
}