func (b *Button) GetType() ComponentType {
	return b.ctype
}
GetType get component type
package component
import (
	"fmt"
	"github.com/jroimartin/gocui"
)
type Button struct {
	*gocui.Gui
	label    string
	handlers Handlers
	ctype    ComponentType
	*Position
	*Attributes
}
func NewButton(gui *gocui.Gui, label string, x, y, width int) *Button {
	if len(label) >= width {
		width = len(label) + 1
	}
	b := &Button{
		Gui:   gui,
		label: label,
		Position: &Position{
			x,
			y,
			x + width + 2,
			y + 2,
		},
		Attributes: &Attributes{
			textColor:      gocui.ColorWhite | gocui.AttrBold,
			textBgColor:    gocui.ColorBlue,
			hilightColor:   gocui.ColorBlue | gocui.AttrBold,
			hilightBgColor: gocui.ColorWhite,
		},
		handlers: make(Handlers),
		ctype:    TypeButton,
	}
	return b
}
func (b *Button) AddHandler(key Key, handler Handler) *Button {
	b.handlers[key] = handler
	return b
}
func (b *Button) SetTextColor(fgColor, bgColor gocui.Attribute) *Button {
	b.textColor = fgColor
	b.textBgColor = bgColor
	return b
}
func (b *Button) SetHilightColor(fgColor, bgColor gocui.Attribute) *Button {
	b.hilightColor = fgColor
	b.hilightBgColor = bgColor
	return b
}
func (b *Button) GetLabel() string {
	return b.label
}
func (b *Button) GetPosition() *Position {
	return b.Position
}
func (b *Button) Focus() {
	b.Gui.Cursor = false
	v, _ := b.Gui.SetCurrentView(b.label)
	v.Highlight = true
}
func (b *Button) UnFocus() {
	v, _ := b.Gui.View(b.label)
	v.Highlight = false
}