1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-12-27 15:53:31 +03:00
vimr/nvox/AppDelegate.swift
2016-07-06 19:51:31 +02:00

41 lines
1.0 KiB
Swift

/**
* Tae Won Ha - http://taewon.de - @hataewon
* See LICENSE
*/
import Cocoa
import PureLayout
@NSApplicationMain
class AppDelegate: NSObject, NSApplicationDelegate, NeoVimViewDelegate {
@IBOutlet weak var window: NSWindow!
var neoVim: NeoVim!
@IBAction func debugSomething(sender: AnyObject!) {
let font = NSFont(name: "Courier", size: 14)!
self.neoVim.view.setFont(font)
}
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)
self.neoVim = NeoVim()
self.neoVim.view.delegate = self
let view = self.neoVim.view
view.translatesAutoresizingMaskIntoConstraints = false
self.window.contentView?.addSubview(self.neoVim.view)
view.autoPinEdgesToSuperviewEdges()
self.window.makeFirstResponder(self.neoVim.view)
}
func setTitle(title: String) {
self.window.title = title
}
}