Add SetStyle Function
This commit is contained in:
37
wdgt_cli.go
37
wdgt_cli.go
@@ -172,24 +172,25 @@ func (w *Cli) Draw(screen tcell.Screen) {
|
||||
wh.DrawText(x, y, wh.PadR(post, w.w-x-2), dStyle, screen)
|
||||
}
|
||||
|
||||
func (w *Cli) Active() bool { return w.active }
|
||||
func (w *Cli) SetActive(a bool) { w.active = a }
|
||||
func (w *Cli) Visible() bool { return w.visible }
|
||||
func (w *Cli) SetVisible(a bool) { w.visible = a }
|
||||
func (w *Cli) Focusable() bool { return true }
|
||||
func (w *Cli) SetFocusable(b bool) { w.focusable = b }
|
||||
func (w *Cli) SetX(x int) { w.x = x }
|
||||
func (w *Cli) SetY(y int) { w.y = y }
|
||||
func (w *Cli) GetX() int { return w.x }
|
||||
func (w *Cli) GetY() int { return w.y }
|
||||
func (w *Cli) GetPos() Coord { return Coord{X: w.x, Y: w.y} }
|
||||
func (w *Cli) SetPos(c Coord) { w.x, w.y = c.X, c.Y }
|
||||
func (w *Cli) GetW() int { return w.w }
|
||||
func (w *Cli) GetH() int { return w.h }
|
||||
func (w *Cli) SetW(wd int) { w.w = wd }
|
||||
func (w *Cli) SetH(h int) { w.h = h }
|
||||
func (w *Cli) SetSize(c Coord) { w.w, w.h = c.X, c.Y }
|
||||
func (w *Cli) WantW() int { return wh.MaxInt }
|
||||
func (w *Cli) SetStyle(s tcell.Style) { w.style = s }
|
||||
func (w *Cli) Active() bool { return w.active }
|
||||
func (w *Cli) SetActive(a bool) { w.active = a }
|
||||
func (w *Cli) Visible() bool { return w.visible }
|
||||
func (w *Cli) SetVisible(a bool) { w.visible = a }
|
||||
func (w *Cli) Focusable() bool { return true }
|
||||
func (w *Cli) SetFocusable(b bool) { w.focusable = b }
|
||||
func (w *Cli) SetX(x int) { w.x = x }
|
||||
func (w *Cli) SetY(y int) { w.y = y }
|
||||
func (w *Cli) GetX() int { return w.x }
|
||||
func (w *Cli) GetY() int { return w.y }
|
||||
func (w *Cli) GetPos() Coord { return Coord{X: w.x, Y: w.y} }
|
||||
func (w *Cli) SetPos(c Coord) { w.x, w.y = c.X, c.Y }
|
||||
func (w *Cli) GetW() int { return w.w }
|
||||
func (w *Cli) GetH() int { return w.h }
|
||||
func (w *Cli) SetW(wd int) { w.w = wd }
|
||||
func (w *Cli) SetH(h int) { w.h = h }
|
||||
func (w *Cli) SetSize(c Coord) { w.w, w.h = c.X, c.Y }
|
||||
func (w *Cli) WantW() int { return wh.MaxInt }
|
||||
func (w *Cli) WantH() int {
|
||||
if w.minimized {
|
||||
return 3
|
||||
|
||||
Reference in New Issue
Block a user