//
//  TDLAppDelegate.swift
//  ToDoList
//
//  Created by narita on 2017/09/12.
//  Copyright © 2017年 narita. All rights reserved.
//

import Cocoa

@NSApplicationMain
class TDLAppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations
{
    // MARK: - class methods
    
    // MARK: - init methods
    
    public override init()
    {
        super.init()
        
        UserDefaults.setupDefaults()
    }

    // MARK: - dealloc
    
    // MARK: - NSCopying, hash, isEqual:
    
    // MARK: - NSCoding methods
    
    // MARK: - restorableState methods
    

    // MARK: - life cycle methods
    
    // MARK: - action methods
    
    @IBAction func showPreferences(_ sender : Any?)
    {
        MINTLPreferencesWindowController.sharedInstance()!.showWindow(self)
    }
    
    @objc func canShowPreferences(_ sender : Any?) -> Bool
    {
        return MINTLPreferencesWindowController.sharedInstance()!.canShowPreferences(sender)
    }

    // MARK: - event handling methods
    
    // MARK: - drawing methods
    
    // MARK: - delegate/datasource methods
    
    func applicationDidFinishLaunching(_ aNotification: Notification)
    {

    }
    
    func applicationWillTerminate(_ aNotification: Notification)
    {
        
    }
    
    // MARK: - accessor methods (in pairs)
    
    // MARK: - Utility methods
    
    func validateUserInterfaceItem(_ item: NSValidatedUserInterfaceItem) -> Bool
    {
        return respondsAndPerformValidatedUserInterface(item)
    }
}

