1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-12-22 13:11:55 +03:00
vimr/VimR/MainWindowManager.swift

24 lines
623 B
Swift
Raw Normal View History

/**
* Tae Won Ha - http://taewon.de - @hataewon
* See LICENSE
*/
import Cocoa
class MainWindowManager {
private var mainWindowControllers: [String: MainWindowController] = [:]
func newMainWindow() {
let mainWindowController = MainWindowController(windowNibName: "MainWindow")
self.mainWindowControllers[mainWindowController.uuid] = mainWindowController
mainWindowController.setup(manager: self)
mainWindowController.showWindow(self)
}
func closeMainWindow(mainWindowController: MainWindowController) {
self.mainWindowControllers.removeValueForKey(mainWindowController.uuid)
}
}