2016-07-10 19:47:24 +03:00
|
|
|
/**
|
|
|
|
* Tae Won Ha - http://taewon.de - @hataewon
|
|
|
|
* See LICENSE
|
|
|
|
*/
|
|
|
|
|
|
|
|
import Cocoa
|
|
|
|
|
|
|
|
class MainWindowManager {
|
|
|
|
|
|
|
|
private var mainWindowControllers: [String: MainWindowController] = [:]
|
|
|
|
|
|
|
|
func newMainWindow() {
|
2016-07-11 18:56:55 +03:00
|
|
|
let mainWindowController = MainWindowController(windowNibName: "MainWindow")
|
2016-07-10 19:47:24 +03:00
|
|
|
self.mainWindowControllers[mainWindowController.uuid] = mainWindowController
|
2016-07-11 18:56:55 +03:00
|
|
|
|
|
|
|
mainWindowController.setup(manager: self)
|
|
|
|
mainWindowController.showWindow(self)
|
2016-07-10 19:47:24 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
func closeMainWindow(mainWindowController: MainWindowController) {
|
|
|
|
self.mainWindowControllers.removeValueForKey(mainWindowController.uuid)
|
|
|
|
}
|
|
|
|
}
|