     
     var leftButtonList = [KSButton]()
     var rightButtonList = [KSButton]()
+    var selectionType: SelectionType = .One
+
     var currentButton: KSButton? {
         didSet {
-            println("CurrentButton set")
-            oldValue?.setSelected(false)
-            currentButton?.setSelected(true)
+            
+            switch selectionType {
+            case .None:()
+
+            case .One:
+                oldValue?.selected = false
+                currentButton?.selected = true
+
+            case .Any:()
+            currentButton?.toggleSelection()
+                
+            default:()
+            }
         }
     }
 

        var trackingArea: NSTrackingArea!
        let parentTabView: KSTabView
        var underline = NSBox(frame: NSZeroRect)

        override func updateTrackingAreas() {
            super.updateTrackingAreas()

import Cocoa

class KSTabView: NSControl {

    enum SelectionType {
        case None, One, Any
    }

    @IBInspectable var backgroundColor: NSColor! = NSColor(calibratedRed: 5 / 255, green: 105 / 255, blue: 92 / 255, alpha: 1)
    @IBInspectable var hoverColor: NSColor! = NSColor(calibratedRed: 5 / 255, green: 105 / 255, blue: 92 / 255, alpha: 1).colorWithAlphaComponent(0.8)
    @IBInspectable var titleColor: NSColor! = NSColor(calibratedRed: 137/255, green: 185/255, blue: 175/255, alpha: 1.0)
