1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-11-28 02:54:31 +03:00
vimr/nvox/AppDelegate.swift

39 lines
985 B
Swift
Raw Normal View History

/**
* Tae Won Ha - http://taewon.de - @hataewon
* See LICENSE
*/
2016-06-03 23:13:59 +03:00
import Cocoa
import PureLayout
2016-06-03 23:13:59 +03:00
@NSApplicationMain
class AppDelegate: NSObject, NSApplicationDelegate, NeoVimViewDelegate {
2016-06-03 23:13:59 +03:00
@IBOutlet weak var window: NSWindow!
2016-07-09 23:52:59 +03:00
let view = NeoVimView(forAutoLayout: ())
2016-06-03 23:13:59 +03:00
@IBAction func debugSomething(sender: AnyObject!) {
2016-07-10 15:24:45 +03:00
let font = NSFont(name: "Courier", size: 14)!
self.view.setFont(font)
}
2016-06-03 23:13:59 +03:00
func applicationDidFinishLaunching(aNotification: NSNotification) {
// let testView = InputTestView(frame: CGRect(x: 0, y: 0, width: 300, height: 300))
// self.window.contentView?.addSubview(testView)
// self.window.makeFirstResponder(testView)
2016-07-09 23:52:59 +03:00
self.window.contentView?.addSubview(self.view)
self.view.autoPinEdgesToSuperviewEdges()
self.window.makeFirstResponder(self.view)
}
func applicationWillTerminate(notification: NSNotification) {
self.view.cleanUp()
2016-06-03 23:13:59 +03:00
}
func setTitle(title: String) {
self.window.title = title
}
2016-06-03 23:13:59 +03:00
}