2016-06-04 00:43:39 +03:00
|
|
|
/**
|
|
|
|
* Tae Won Ha - http://taewon.de - @hataewon
|
|
|
|
* See LICENSE
|
|
|
|
*/
|
2016-06-03 23:13:59 +03:00
|
|
|
|
|
|
|
import Cocoa
|
2016-07-04 23:06:39 +03:00
|
|
|
import PureLayout
|
2016-06-03 23:13:59 +03:00
|
|
|
|
|
|
|
@NSApplicationMain
|
2016-06-05 10:49:14 +03:00
|
|
|
class AppDelegate: NSObject, NSApplicationDelegate, NeoVimViewDelegate {
|
2016-06-03 23:13:59 +03:00
|
|
|
|
|
|
|
@IBOutlet weak var window: NSWindow!
|
2016-06-04 00:43:39 +03:00
|
|
|
|
2016-07-09 23:52:59 +03:00
|
|
|
let view = NeoVimView(forAutoLayout: ())
|
2016-06-03 23:13:59 +03:00
|
|
|
|
2016-06-08 19:17:12 +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-08 19:17:12 +03:00
|
|
|
}
|
|
|
|
|
2016-06-03 23:13:59 +03:00
|
|
|
func applicationDidFinishLaunching(aNotification: NSNotification) {
|
2016-06-24 22:08:34 +03:00
|
|
|
// 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
|
|
|
}
|
|
|
|
|
2016-06-18 12:43:37 +03:00
|
|
|
func setTitle(title: String) {
|
|
|
|
self.window.title = title
|
|
|
|
}
|
2016-06-03 23:13:59 +03:00
|
|
|
}
|