         }
     }
 }
-
-private class KSButtonCell: NSButtonCell {
-    override func drawTitle(title: NSAttributedString, withFrame frame: NSRect, inView controlView: NSView) -> NSRect {
-        return super.drawTitle(self.attributedTitle, withFrame: frame, inView: controlView)
+extension KSTabView.KSButton {
+    private class ButtonCell: NSButtonCell {
+        override func drawTitle(title: NSAttributedString, withFrame frame: NSRect, inView controlView: NSView) -> NSRect {
+            return super.drawTitle(self.attributedTitle, withFrame: frame, inView: controlView)
+        }
+    }
+
+    private class UnderLine: NSBox {
+        init() {
+            super.init(frame: NSZeroRect)
+            self.boxType = NSBoxType.Custom
+            self.borderWidth = 0
+            self.fillColor = NSColor.whiteColor()
+            self.hidden = true
+        }
+        
+        required init?(coder: NSCoder) {
+            fatalError("init(coder:) has not been implemented")
+        }
     }
 }
-
-private class UnderLine: NSBox {
-    init() {
-        super.init(frame: NSZeroRect)
-        self.boxType = NSBoxType.Custom
-        self.borderWidth = 0
-        self.fillColor = NSColor.whiteColor()
-        self.hidden = true
-    }
-
-    required init?(coder: NSCoder) {
-        fatalError("init(coder:) has not been implemented")
-    }
-}


            self.identifier = identifier
        
            batton.setCell(KSButtonCell())
            batton.title = title
            batton.image = imagea
            batton.image?.size = NSMakeSize(parentTabView.fontSize * 1.5, parentTabView.fontSize * 1.5)

//MARK: KSButton
extension KSTabView {
    class KSButton: NSControl {

        var trackingArea: NSTrackingArea!
        private let parentTabView: KSTabView
        private var mouseInside = false {
